This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
Clinical Decision Support Work Group | Maturity Level: N/A | Standards Status: Informative | Compartments: No defined compartments |
This is the narrative for the resource. See also the XML, JSON or Turtle format. This example conforms to the profile Library.
Generated Narrative: Library opioidcds-recommendation-11
Author | Kensaku Kawamoto, MD, PhD, MHS |
Author | Bryn Rhodes |
Author | Floyd Eisenberg, MD, MPH |
Author | Robert McClure, MD, MPH |
documentation | CDC guideline for prescribing opioids for chronic pain | |
depends-on | http://example.org/fhir/Library/opioidcds-common |
Type: MedicationRequest | |
Filter | Value |
medicationCodeableConcept | In ValueSet http://example.org/fhir/ValueSet/benzodiazepines |
Type: MedicationRequest | |
Filter | Value |
medicationCodeableConcept | In ValueSet http://example.org/fhir/ValueSet/opioids-abused-in-ambulatory-care |
application/elm+xml
<?xml version="1.0" encoding="UTF-8"?>
<library xmlns="urn:hl7-org:elm:r1" xmlns:t="urn:hl7-org:elm-types:r1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:fhir="http://hl7.org/fhir" xmlns:qdm43="urn:healthit-gov:qdm:v4_3" xmlns:qdm53="urn:healthit-gov:qdm:v5_3" xmlns:a="urn:hl7-org:cql-annotations:r1">
<annotation startLine="54" startChar="13" endLine="54" endChar="57" message="Could not resolve code path medicationCodeableConcept for the type of the retrieve FHIR.MedicationRequest." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
<annotation startLine="54" startChar="13" endLine="54" endChar="57" message="Could not resolve membership operator for terminology target of the retrieve." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
<annotation startLine="58" startChar="14" endLine="58" endChar="77" message="Could not resolve code path medicationCodeableConcept for the type of the retrieve FHIR.MedicationRequest." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
<annotation startLine="58" startChar="14" endLine="58" endChar="77" message="Could not resolve membership operator for terminology target of the retrieve." errorType="semantic" errorSeverity="warning" xsi:type="a:CqlToElmError"/>
<identifier id="OpioidCDS_STU4_REC_11" version="0.1.0"/>
<schemaIdentifier id="urn:hl7-org:elm" version="r1"/>
<usings>
<def localIdentifier="System" uri="urn:hl7-org:elm-types:r1"/>
<def localIdentifier="FHIR" uri="http://hl7.org/fhir" version="3.2.0"/>
</usings>
<includes>
<def localIdentifier="Common" path="OpioidCDS_STU4_Common" version="0.1.0"/>
</includes>
<parameters>
<def name="ContextPrescriptions" accessLevel="Public">
<parameterTypeSpecifier xsi:type="ListTypeSpecifier">
<elementType name="fhir:MedicationRequest" xsi:type="NamedTypeSpecifier"/>
</parameterTypeSpecifier>
</def>
</parameters>
<statements>
<def name="Patient" context="Patient">
<expression xsi:type="SingletonFrom">
<operand dataType="fhir:Patient" xsi:type="Retrieve"/>
</expression>
</def>
<def name="Validate Trigger Event For Benzodiazepine" context="Patient" accessLevel="Public">
<expression xsi:type="Exists">
<operand xsi:type="Query">
<source alias="triggerScript">
<expression name="ContextPrescriptions" xsi:type="ParameterRef"/>
</source>
<where name="IsBenzodiazepine" libraryName="Common" xsi:type="FunctionRef">
<operand name="ToCode" libraryName="Common" xsi:type="FunctionRef">
<operand xsi:type="Indexer">
<operand path="coding" xsi:type="Property">
<source path="medication" scope="triggerScript" xsi:type="Property"/>
</operand>
<operand valueType="t:Integer" value="0" xsi:type="Literal"/>
</operand>
</operand>
</where>
</operand>
</expression>
</def>
<def name="Validate Trigger Event For Ambulatory Care Abuse Potential" context="Patient" accessLevel="Public">
<expression xsi:type="Exists">
<operand xsi:type="Query">
<source alias="triggerScript">
<expression name="ContextPrescriptions" xsi:type="ParameterRef"/>
</source>
<where name="IsOpioidWithAmbulatoryAbusePotential" libraryName="Common" xsi:type="FunctionRef">
<operand name="ToCode" libraryName="Common" xsi:type="FunctionRef">
<operand xsi:type="Indexer">
<operand path="coding" xsi:type="Property">
<source path="medication" scope="triggerScript" xsi:type="Property"/>
</operand>
<operand valueType="t:Integer" value="0" xsi:type="Literal"/>
</operand>
</operand>
</where>
</operand>
</expression>
</def>
<def name="On Benzodiazepine" context="Patient" accessLevel="Public">
<expression xsi:type="Or">
<operand name="Validate Trigger Event For Benzodiazepine" xsi:type="ExpressionRef"/>
<operand xsi:type="Exists">
<operand dataType="fhir:MedicationRequest" codeProperty="medicationCodeableConcept" xsi:type="Retrieve">
<codes name="Benzodiazepines" libraryName="Common" xsi:type="ValueSetRef"/>
</operand>
</operand>
</expression>
</def>
<def name="Opioid with Ambulatory Care Abuse Potential" context="Patient" accessLevel="Public">
<expression xsi:type="Or">
<operand name="Validate Trigger Event For Ambulatory Care Abuse Potential" xsi:type="ExpressionRef"/>
<operand xsi:type="Exists">
<operand dataType="fhir:MedicationRequest" codeProperty="medicationCodeableConcept" xsi:type="Retrieve">
<codes name="Ambulatory Abuse Potential Opioids" libraryName="Common" xsi:type="ValueSetRef"/>
</operand>
</operand>
</expression>
</def>
<def name="Inclusion Criteria" context="Patient" accessLevel="Public">
<expression xsi:type="And">
<operand xsi:type="And">
<operand xsi:type="Or">
<operand name="Validate Trigger Event For Benzodiazepine" xsi:type="ExpressionRef"/>
<operand name="Validate Trigger Event For Ambulatory Care Abuse Potential" xsi:type="ExpressionRef"/>
</operand>
<operand name="On Benzodiazepine" xsi:type="ExpressionRef"/>
</operand>
<operand name="Opioid with Ambulatory Care Abuse Potential" xsi:type="ExpressionRef"/>
</expression>
</def>
<def name="Get Indicator" context="Patient" accessLevel="Public">
<expression valueType="t:String" value="warning" xsi:type="Literal"/>
</def>
<def name="Get Summary" context="Patient" accessLevel="Public">
<expression valueType="t:String" value="Avoid prescribing opioid pain medication and benzodiazepine concurrently whenever possible." xsi:type="Literal"/>
</def>
<def name="Get Detail" context="Patient" accessLevel="Public">
<expression xsi:type="If">
<condition asType="t:Boolean" xsi:type="As">
<operand name="Validate Trigger Event For Benzodiazepine" xsi:type="ExpressionRef"/>
</condition>
<then valueType="t:String" value="The benzodiazepine prescription request is concurrent with an active opioid prescription" xsi:type="Literal"/>
<else valueType="t:String" value="The opioid prescription request is concurrent with an active benzodiazepine prescription" xsi:type="Literal"/>
</expression>
</def>
</statements>
</library>
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.