Release 5

This page is part of the FHIR Specification (v5.0.0: R5 - STU). This is the current published version. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4

Example Library/opioidcds-recommendation-11 (Narrative)

Clinical Decision Support Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: 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.


Participants

AuthorKensaku Kawamoto, MD, PhD, MHS
AuthorBryn Rhodes
AuthorFloyd Eisenberg, MD, MPH
AuthorRobert McClure, MD, MPH

Related Artifacts

DocumentationCDC guideline for prescribing opioids for chronic pain

https://guidelines.gov/summaries/summary/50153/cdc-guideline-for-prescribing-opioids-for-chronic-pain---united-states-2016#420 ()

Depends Onhttp://example.org/fhir/Library/opioidcds-common

Data Requirements

Type: MedicationRequest
FilterValue
medicationCodeableConceptIn ValueSet http://example.org/fhir/ValueSet/benzodiazepines
Type: MedicationRequest
FilterValue
medicationCodeableConceptIn ValueSet http://example.org/fhir/ValueSet/opioids-abused-in-ambulatory-care

Contents

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.