FHIR Clinical Guidelines (v1.0.0) (STU1)

This page is part of the Clinical Guidelines (v1.0.0: STU 1) based on FHIR R4. This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

OpioidCDSR4Recommendation05

Formats: Narrative, XML, JSON, Turtle

Raw xml



<Library xmlns="http://hl7.org/fhir">
  <id value="OpioidCDSR4Recommendation05"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><h2>Participants</h2><table class="grid"><tr><td>Author</td><td>Kensaku Kawamoto, MD, PhD, MHS</td></tr><tr><td>Author</td><td>Bryn Rhodes</td></tr><tr><td>Author</td><td>Floyd Eisenberg, MD, MPH</td></tr><tr><td>Author</td><td>Robert McClure, MD, MPH</td></tr></table><h2>Related Artifacts</h2><table class="grid"><tr><td>documentation</td><td>CDC guideline for prescribing opioids for chronic pain</td><td>https://www.cdc.gov/mmwr/volumes/65/rr/rr6501e1.htm?CDC_AA_refVal=https%3A%2F%2Fwww.cdc.gov%2Fmmwr%2Fvolumes%2F65%2Frr%2Frr6501e1er.htm</td></tr><tr><td>depends-on</td><td></td><td><a href="Library-OpioidCDSR4Common.html">Opioid CDS R4 Common Logic</a></td></tr><tr><td>documentation</td><td>MME Conversion Tables</td><td>https://www.cdc.gov/drugoverdose/pdf/calculating_total_daily_dose-a.pdf</td></tr></table><h2>Data Requirements</h2><table class="grid"><tr><td colspan="2"><b>Type</b>: <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a></td></tr><tr style="background-color: #efefef"><td>Filter</td><td>Value</td></tr><tr><td>status</td><td>One of these codes: <a href="http://hl7.org/fhir/R4/codesystem-medicationrequest-status.html">http://hl7.org/fhir/CodeSystem/medicationrequest-status</a> active: Active</td></tr><tr><td>category</td><td>One of these codes: <a href="https://terminology.hl7.org/1.0.0//CodeSystem-medicationrequest-category.html">http://terminology.hl7.org/CodeSystem/medicationrequest-category</a> outpatient: Outpatient</td></tr></table><h2>Contents</h2><p><code>text/cql</code></p><pre><code class="language-sql">library OpioidCDSR4Recommendation05 version '0.1.0'

using FHIR version '4.0.0'

include OpioidCDSR4Common version '0.1.0' called Common

/*
**
** Recommendation #5
**
*/

/*
  Plan Definition:
	http://build.fhir.org/ig/cqframework/opioid-cds/PlanDefinition-opioidcds-r4-recommendation-05.html
*/

parameter ContextPrescriptions List&lt;MedicationRequest&gt;

context Patient

define "Inclusion Criteria":
  AgeInYears() &gt;= 18
    and not "Exclusion Criteria"
    and "Total MME" &gt;= 50 'mg/d'

define "Exclusion Criteria":
  Common."End of Life Assessment"

define "Total MME":
  Common.TotalMME(ContextPrescriptions union Common."Active Ambulatory Opioid Rx")

define "Taper Now": "Total MME".value &gt;= 90

define "Consider Tapering": "Total MME".value &lt; 90

define "Get Indicator":
  if "Inclusion Criteria"
    then 'warning'
  else null

define "Get Summary":
  if "Inclusion Criteria"
    then
      'High risk for opioid overdose - '
        + case when "Taper Now"
           then 'taper now'
           else 'consider tapering'
         end
  else null

define "Get Detail":
  if "Inclusion Criteria"
    then'Total morphine milligram equivalent (MME) is ' + ToString("Total MME") + '. Taper to less than 50.'
  else null
</code></pre></div>
  </text>
  <url
       value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSR4Recommendation05"/>
  <version value="1.0.0"/>
  <name value="OpioidCDSR4Recommendation05"/>
  <title value="Opioid CDS R4 Logic for recommendation #5"/>
  <status value="active"/>
  <experimental value="true"/>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
      <code value="logic-library"/>
      <display value="Logic Library"/>
    </coding>
  </type>
  <date value="2018-04-15T13:49:09-06:00"/>
  <publisher value="Centers for Disease Control and Prevention (CDC)"/>
  <description
               value="Opioid Decision Support Logic for use in implementing CDC Opioid Prescribing Guidelines."/>
  <useContext>
    <code>
      <system value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="focus"/>
      <display value="Clinical Focus"/>
    </code>
    <valueCodeableConcept>
      <coding>
        <system value="http://snomed.info/sct"/>
        <code value="182888003"/>
        <display value="Medication requested (situation)"/>
      </coding>
    </valueCodeableConcept>
  </useContext>
  <useContext>
    <code>
      <system value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="focus"/>
      <display value="Clinical Focus"/>
    </code>
    <valueCodeableConcept>
      <coding>
        <system value="http://snomed.info/sct"/>
        <code value="82423001"/>
        <display value="Chronic pain (finding)"/>
      </coding>
    </valueCodeableConcept>
  </useContext>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <purpose
           value="This library works in concert with the OMTK logic library to provide decision support for Morphine Milligram Equivalence calculations and dynamic value resolution."/>
  <usage
         value="This library is to notify the prescriber/user whether the current prescription exceeds the recommended MME."/>
  <copyright value="© CDC 2016+."/>
  <topic>
    <text value="Opioid Prescribing"/>
  </topic>
  <author>
    <name value="Kensaku Kawamoto, MD, PhD, MHS"/>
  </author>
  <author>
    <name value="Bryn Rhodes"/>
  </author>
  <author>
    <name value="Floyd Eisenberg, MD, MPH"/>
  </author>
  <author>
    <name value="Robert McClure, MD, MPH"/>
  </author>
  <relatedArtifact>
    <type value="documentation"/>
    <display value="CDC guideline for prescribing opioids for chronic pain"/>
    <url
         value="https://www.cdc.gov/mmwr/volumes/65/rr/rr6501e1.htm?CDC_AA_refVal=https%3A%2F%2Fwww.cdc.gov%2Fmmwr%2Fvolumes%2F65%2Frr%2Frr6501e1er.htm"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="depends-on"/>
    <resource
              value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSR4Common"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="documentation"/>
    <display value="MME Conversion Tables"/>
    <url
         value="https://www.cdc.gov/drugoverdose/pdf/calculating_total_daily_dose-a.pdf"/>
  </relatedArtifact>
  <dataRequirement id="medications">
    <type value="MedicationRequest"/>
    <codeFilter>
      <path value="status"/>
      <code>
        <system value="http://hl7.org/fhir/CodeSystem/medicationrequest-status"/>
        <code value="active"/>
      </code>
    </codeFilter>
    <codeFilter>
      <path value="category"/>
      <code>
        <system
                value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
        <code value="outpatient"/>
      </code>
    </codeFilter>
  </dataRequirement>
  <content>
    <contentType value="text/cql"/>
    <data
          value="bGlicmFyeSBPcGlvaWRDRFNSNFJlY29tbWVuZGF0aW9uMDUgdmVyc2lvbiAnMC4xLjAnCgp1c2luZyBGSElSIHZlcnNpb24gJzQuMC4wJwoKaW5jbHVkZSBPcGlvaWRDRFNSNENvbW1vbiB2ZXJzaW9uICcwLjEuMCcgY2FsbGVkIENvbW1vbgoKLyoKKioKKiogUmVjb21tZW5kYXRpb24gIzUKKioKKi8KCi8qCiAgUGxhbiBEZWZpbml0aW9uOgoJaHR0cDovL2J1aWxkLmZoaXIub3JnL2lnL2NxZnJhbWV3b3JrL29waW9pZC1jZHMvUGxhbkRlZmluaXRpb24tb3Bpb2lkY2RzLXI0LXJlY29tbWVuZGF0aW9uLTA1Lmh0bWwKKi8KCnBhcmFtZXRlciBDb250ZXh0UHJlc2NyaXB0aW9ucyBMaXN0PE1lZGljYXRpb25SZXF1ZXN0PgoKY29udGV4dCBQYXRpZW50CgpkZWZpbmUgIkluY2x1c2lvbiBDcml0ZXJpYSI6CiAgQWdlSW5ZZWFycygpID49IDE4CiAgICBhbmQgbm90ICJFeGNsdXNpb24gQ3JpdGVyaWEiCiAgICBhbmQgIlRvdGFsIE1NRSIgPj0gNTAgJ21nL2QnCgpkZWZpbmUgIkV4Y2x1c2lvbiBDcml0ZXJpYSI6CiAgQ29tbW9uLiJFbmQgb2YgTGlmZSBBc3Nlc3NtZW50IgoKZGVmaW5lICJUb3RhbCBNTUUiOgogIENvbW1vbi5Ub3RhbE1NRShDb250ZXh0UHJlc2NyaXB0aW9ucyB1bmlvbiBDb21tb24uIkFjdGl2ZSBBbWJ1bGF0b3J5IE9waW9pZCBSeCIpCg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