2022 CDC Clinical Practice Guideline for Prescribing Opioids Implementation Guide
2022.1.0 - CI Build

2022 CDC Clinical Practice Guideline for Prescribing Opioids Implementation Guide, published by Centers for Disease Control and Prevention (CDC). This guide is not an authorized publication; it is the continuous build for version 2022.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/opioid-cds-r4/ and changes regularly. See the Directory of published versions

: Recommendation #1 - Nonpharmacologic and Nonopioid Pharmacologic Therapy Consideration - TTL Representation

Draft as of 2025-04-24

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:PlanDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "opioidcds-01"] ; # 
  fhir:meta [
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition>     ] [
fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-publishableplandefinition"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-publishableplandefinition>     ] )
  ] ; # 
  fhir:text [
fhir:status [ fhir:v "extensions" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n    <table class=\"grid dict\">\n        \n        <tr>\n            <th scope=\"row\"><b>Id: </b></th>\n            <td style=\"padding-left: 4px;\">opioidcds-01</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Url: </b></th>\n            <td style=\"padding-left: 4px;\"><a href=\"PlanDefinition-opioidcds-01.html\">Recommendation #1 - Nonpharmacologic and Nonopioid Pharmacologic Therapy Consideration</a></td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Version: </b></th>\n            <td style=\"padding-left: 4px;\">2022.1.0</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Identifier: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                \n                <p style=\"margin-bottom: 5px;\">\n                    <b>value: </b> <span>cdc-opioid-guidance</span>\n                </p>\n                \n            </td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Name: </b></th>\n            <td style=\"padding-left: 4px;\">PlanDefinition_Recommendation_01_Order_Sign</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Title: </b></th>\n            <td style=\"padding-left: 4px;\">Recommendation #1 - Nonpharmacologic and Nonopioid Pharmacologic Therapy Consideration</td>\n        </tr>\n        \n        \n        \n        <tr>\n            <th scope=\"row\"><b>Status: </b></th>\n            <td style=\"padding-left: 4px;\">draft</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Experimental: </b></th>\n            <td style=\"padding-left: 4px;\">true</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Type: </b></th>\n            <td style=\"padding-left: 4px;\">\n                \n                    \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>system: </b> <span><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-plan-definition-type.html\">http://terminology.hl7.org/CodeSystem/plan-definition-type</a></span>\n                        </p>\n                        \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>code: </b> <span>eca-rule</span>\n                        </p>\n                        \n                        \n                        <p style=\"margin-bottom: 5px;\">\n                            <b>display: </b> <span>ECA Rule</span>\n                        </p>\n                        \n                    \n                \n                \n            </td>\n        </tr>\n        \n        \n        \n        <tr>\n            <th scope=\"row\"><b>Date: </b></th>\n            <td style=\"padding-left: 4px;\">2025-04-24</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Publisher: </b></th>\n            <td style=\"padding-left: 4px;\">Centers for Disease Control and Prevention (CDC)</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Description: </b></th>\n            <td style=\"padding-left: 4px;\">Nonopioid therapies are at least as effective as opioids for many common types of acute pain. Clinicians should maximize use of nonpharmacologic and nonopioid pharmacologic therapies as appropriate for the specific condition and patient and only consider opioid therapy for acute pain if benefits are anticipated to outweigh risks to the patient. Before prescribing opioid therapy for acute pain, clinicians should discuss with patients the realistic benefits and known risks of opioid therapy.</td>\n        </tr>\n        \n        \n            <tr>\n                <th scope=\"row\"><a name=\"effective-data-requirements\"> </a><b>Logic Definitions: </b></th>\n                <td style=\"padding-left: 4px;\">\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSREC01</td>\n                                \n                                \n                                    <td>Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions</td>\n                                \n                                \n                                    <td>0</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&quot;:\n  ( Common.&quot;Is Opioid Analgesic with Ambulatory Misuse Potential?&quot;( ContextPrescriptions ) ) AmbulatoryOpioidPrescription\n    where Routines.&quot;Is Acute Pain Prescription?&quot;( AmbulatoryOpioidPrescription )</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSREC01</td>\n                                \n                                \n                                    <td>Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential</td>\n                                \n                                \n                                    <td>1</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&quot;:\n  exists( &quot;Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&quot; )</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Patient Age Less Than 18</td>\n                                \n                                \n                                    <td>2</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Patient Age Less Than 18&quot;:\n  if (Config.&quot;Age Less than 18 Years Is Enabled&quot;) then\n    AgeInYearsAt(Today()) &lt; 18\n  else false</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Condition Positive for Sickle Cell</td>\n                                \n                                \n                                    <td>3</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Condition Positive for Sickle Cell&quot;:\n  if (Config.&quot;Sickle Cell Check Enabled&quot;) then\n    exists(\n      Common.&quot;Positive Sickle Cell Condition&quot;\n    ) \n  else false</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Is Active Cancer Treatment?</td>\n                                \n                                \n                                    <td>4</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Is Active Cancer Treatment?&quot;:\n  if (Config.&quot;Active Cancer Treatment Encounters Condition Is Enabled&quot;) \n    then &quot;Has Two or More Encounters with Cancer Diagnosis During Encounter Period&quot;\n      or &quot;Has Active Cancer Diagnosis on Problem List&quot;\n  else false</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Conditions Likely Terminal for Opioid Prescribing</td>\n                                \n                                \n                                    <td>5</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Conditions Likely Terminal for Opioid Prescribing&quot;:\n  if (Config.&quot;End-Stage Disease Criteria Enabled&quot;) then\n    exists (\n      Common.&quot;US Core-Categorized Conditions&quot; EOLC\n        where EOLC.code in Common.&quot;Conditions likely terminal for opioid prescribing&quot;\n          // and EOLC.clinicalStatus in Common.&quot;Active Condition&quot;\n    )\n  else false</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Is Opioid Review Useful?</td>\n                                \n                                \n                                    <td>6</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Is Opioid Review Useful?&quot;:\n  not &quot;Patient Age Less Than 18&quot;\n    and not &quot;Condition Positive for Sickle Cell&quot;\n    and not &quot;Is Active Cancer Treatment?&quot;\n    and not &quot;Conditions Likely Terminal for Opioid Prescribing&quot;</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Has Opioid RX with Ambulatory Abuse Potential In Past 90 Days</td>\n                                \n                                \n                                    <td>7</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Has Opioid RX with Ambulatory Abuse Potential In Past 90 Days&quot;:\n    if (Config.&quot;Opioid Naive Prescription Condition Is Enabled&quot;) then\n      exists (&quot;Opioid RX with Ambulatory Abuse Potential In Past 90 Days&quot;)\n    else false</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days</td>\n                                \n                                \n                                    <td>8</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days&quot;:\n  if (Config.&quot;Opioid Naive Prescription Condition Is Enabled&quot;) then\n    exists (&quot;Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days&quot;)\n  else false</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Is Opioid Naive?</td>\n                                \n                                \n                                    <td>9</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">// NOTE: MedicationStatement-dependent logic comment out due to bug in Publisher not supporting MedicationStatement in AllTypes.\ndefine &quot;Is Opioid Naive?&quot;:\n    not (&quot;Has Opioid RX with Ambulatory Abuse Potential In Past 90 Days&quot;)\n    /* and not (&quot;Has Report of Opioid with Ambulatory Care Abuse Potential Reported in Past 90 Days&quot;) */\n    and not (&quot;Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days&quot;)</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSREC01</td>\n                                \n                                \n                                    <td>Inclusion Criteria</td>\n                                \n                                \n                                    <td>10</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Inclusion Criteria&quot;:\n  &quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&quot;\n    and Routines.&quot;Is Opioid Review Useful?&quot;\n    and Routines.&quot;Is Opioid Naive?&quot;</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSREC01</td>\n                                \n                                \n                                    <td>Exclusion Criteria</td>\n                                \n                                \n                                    <td>11</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Exclusion Criteria&quot;:\n  false</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSREC01</td>\n                                \n                                \n                                    <td>Is Recommendation Applicable?</td>\n                                \n                                \n                                    <td>12</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Is Recommendation Applicable?&quot;:\n  &quot;Inclusion Criteria&quot;\n    and not &quot;Exclusion Criteria&quot;</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSCommon</td>\n                                \n                                \n                                    <td>Is Opioid Analgesic with Ambulatory Misuse Potential?</td>\n                                \n                                \n                                    <td>13</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define function &quot;Is Opioid Analgesic with Ambulatory Misuse Potential?&quot;(value List&lt;MedicationRequest&gt;):\n  (&quot;Get MedicationRequest Medication as Code&quot;(value)) Rx\n    where Rx.medication in &quot;Opioid analgesics with ambulatory misuse potential&quot; \n      and Rx.category in &quot;Community&quot;</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSCommon</td>\n                                \n                                \n                                    <td>Get MedicationRequest Medication as Code</td>\n                                \n                                \n                                    <td>14</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define function &quot;Get MedicationRequest Medication as Code&quot;(value List&lt;MedicationRequest&gt;):\n  value Rx\n    let Med: \n      if Rx.medication is Reference then singleton from (\n        [Medication] M\n          where M.id = (Last(Split((Rx.medication as FHIR.Reference).reference, '/')))\n      ) else null\n    return \n      MedicationRequest {\n        id: Rx.id,\n        status: Rx.status,\n        intent: Rx.intent,\n        category: Rx.category,\n        medication: if Rx.medication is Reference then Med.code else Rx.medication as CodeableConcept,\n        subject: Rx.subject,\n        authoredOn: Rx.authoredOn,\n        recorder: Rx.recorder,\n        dosageInstruction: Rx.dosageInstruction,\n        dispenseRequest: Rx.dispenseRequest\n      }</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>FHIRHelpers</td>\n                                \n                                \n                                    <td>ToConcept</td>\n                                \n                                \n                                    <td>15</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Is Acute Pain Prescription?</td>\n                                \n                                \n                                    <td>16</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">// End of For Subacute or Chronic Pain Routine\n\n/*\n**  Routine #5\n**  For Acute Pain Routine\n**\n**  Definition                  | Answer to Proceed   | Details                                        | Data (Terminology) Requirement\n**  -----------------------------------------------------------------------------------------------------------------------------------\n**  Order for opioid analgesics | Yes                 | Look for an existing prescription (order) for  | Opioid analgesics with\n**  with ambulatory misuse      |                     | opioid analgesics with ambulatory abuse        | ambulatory misuse potential\n**  potential of duration &lt; 28  |                     | potential of duration &lt; 28 days                |\n**  days                        |                     |                                                |\n**  -----------------------------------------------------------------------------------------------------------------------------------\n**\n*/\n\n// should allow DateTime precision, but not working in the Ruler specifically\ndefine function &quot;Is Acute Pain Prescription?&quot;(prescription FHIR.MedicationRequest):\n  prescription.dispenseRequest is not null\n    and prescription.dispenseRequest.expectedSupplyDuration is not null\n    and Common.GetDurationInDays( prescription.dispenseRequest.expectedSupplyDuration ) &lt; 28 days</code></pre>\n                        \n                        <br/><br/>\n                    \n                        <table class=\"grid-dict\">\n                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>\n                            <tr>\n                                \n                                    <td>OpioidCDSCommon</td>\n                                \n                                \n                                    <td>GetDurationInDays</td>\n                                \n                                \n                                    <td>17</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define function GetDurationInDays(value FHIR.Duration):\n  if value is null then null\n  else\n    case\n      when value.code.value ~ 'a' then System.Quantity{ value: value.value.value * 365.0, unit: 'days' }\n      when value.code.value ~ 'mo' then System.Quantity{ value: value.value.value * 30.0, unit: 'days' }\n      when value.code.value ~ 'wk' then System.Quantity{ value: value.value.value * 7.0, unit: 'days' }\n      when value.code.value ~ 'd' then System.Quantity{ value: value.value.value, unit: 'days' }\n      when value.code.value ~ 'h' then System.Quantity{ value: value.value.value / 24.0, unit: 'days' }\n      when value.code.value ~ 'min' then System.Quantity{ value: value.value.value / 60.0 / 24.0, unit: 'days' }\n      when value.code.value ~ 's' then System.Quantity{ value: value.value.value / 60.0 / 60.0 / 24.0, unit: 'days' }\n      when value.code.value ~ 'ms' then System.Quantity{ value: value.value.value / 60.0 / 60.0 / 24.0 / 1000.0, unit: 'days' }\n      when value.code.value is null then Message(1000, true, 'Undefined', 'Error', 'Duration unit code is null')\n      else Message(1000, true, 'Undefined', 'Error', 'Unsupported duration unit code: ' + value.code.value)\nend</code></pre>\n                        \n                        <br/><br/>\n                    \n                </td>\n            </tr>\n        \n        \n        <tr>\n          <th scope=\"row\"><b>Knowledge Capability: </b></th>\n          <td style=\"padding-left: 4px;\">\n            shareable computable executable publishable \n          </td>\n        </tr>\n        \n        \n        \n        <tr>\n            <th scope=\"row\"><b>Use Context: </b></th>\n            <td style=\"padding-left: 4px;\">\n                <table class=\"grid-dict\">\n                    <tr><th><b>code</b></th><th><b>value</b></th><th><b>display</b></th></tr>\n                    \n                      <tr>\n                        <td>focus</td>\n                        <td>182888003</td>\n                        <td>Medication requested (situation)</td>\n                      </tr>\n                    \n                      <tr>\n                        <td>focus</td>\n                        <td>274663001</td>\n                        <td>Acute pain (finding)</td>\n                      </tr>\n                    \n                </table>\n            </td>\n        </tr>\n        \n        \n        \n        <tr>\n            <th scope=\"row\"><b>Purpose: </b></th>\n            <td style=\"padding-left: 4px;\"><div><p>The 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain is intended to improve communication between providers and patients about the risks and benefits of opioid therapy for chronic pain, improve the safety and effectiveness of pain treatment, and reduce the risks associated with long-term opioid therapy, including opioid use disorder and overdose. The Guideline is not intended for patients who are in active cancer treatment, palliative care, or end-of-life care.</p>\n</div></td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Usage: </b></th>\n            <td style=\"padding-left: 4px;\">Clinicians should consider opioid therapy only if expected benefits for both pain and function are anticipated to outweigh risks to the patient.</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Copyright: </b></th>\n            <td style=\"padding-left: 4px;\"><div><p>© CDC 2016+.</p>\n</div></td>\n        </tr>\n        \n        \n        \n        \n        \n        \n        <tr>\n          <th scope=\"row\"><b>Related Artifacts: </b></th>\n          <td style=\"padding-left: 4px;\">\n            \n            <p><b>Documentation</b></p>\n            <ul>\n              \n                  <li>\n                    <a href=\"https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm\"> 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain</a>\n                  </li>\n              \n            </ul>\n            \n            \n            \n            \n            \n            \n            \n          </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Libraries: </b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              \n                <tr><td><a href=\"Library-OpioidCDSREC01.html\">Library - Recommendation #1 - Nonpharmacologic and Nonopioid Pharmacologic Therapy Consideration</a></td></tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n\n        \n        <tr>\n          <th scope=\"row\"><b>Actions: </b></th>\n          <td style=\"padding-left: 4px;\">\n            <table class=\"grid-dict\">\n              \n                <tr>\n                  <td>\n                    <b> Consider Nonopioid Treatment Options for Acute Pain:</b> For many types of acute pain, clinicians should maximize the use of nonpharmacologic (for example, physical therapy) and nonopioid pharmacologic therapies (for example, NSAIDs), as appropriate for the specific condition and patient and only consider opioid therapy for acute pain if benefits are anticipated to outweigh risks to the patient. Before prescribing opioid therapy for acute pain, clinicians should discuss with patients the realistic benefits and known risks of opioid therapy.\r\n\r\n[Recommendation 1 of the 2022 CDC Clinical Practice Guideline](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#Recommendation1) provides nonopioid therapy options for common acute pain conditions.\r\n\r\n**Nonopioid Pharmacological Therapy**\r\n- [Dental pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=The%20American%20Dental%20Association%20(ADA)%20recommends%20NSAIDs%20as%20first%2Dline%20treatment%20for%20acute%20dental%20pain%20management)\r\n- [Dental pain (surgical)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=NSAIDs%20have%20been%20found%20to%20be%20more%20effective%20than%20opioids%20for%20surgical%20dental%20pain)\r\n- [Kidney stone pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20acute%20kidney%20stone%20pain%2C%20NSAIDs%20are%20at%20least%20as%20effective%20as%20opioids%20(124%E2%80%93127)%2C%20can%20decrease%20the%20ureteral%20smooth%20muscle%20tone%20and%20ureteral%20spasm%20(128)%20causing%20kidney%20stone%20pain%2C%20and%20are%20preferred%20for%20kidney%20stone%20pain%20if%20not%20contraindicated.)\r\n- [Low back pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=NSAIDs%20have%20been%20found%20to%20be%20more%20effective%20than%20opioids%20for%20surgical%20dental%20pain%20and%20kidney%20stone%20pain%20and%20similarly%20effective%20to%20opioids%20for%20low%20back%20pain)\r\n- [Migraine pain (episodic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20episodic%20migraine%2C%20triptans%2C%20NSAIDs%2C%20antiemetics%2C%20dihydroergotamine%2C%20calcitonin%20gene%2Drelated%20peptide%20antagonists%20(gepants)%2C%20and%20lasmiditan%20are%20associated%20with%20improved%20pain%20and%20function%20with%20usually%20mild%20and%20transient%20adverse%20events)\r\n- [Musculoskeletal pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=A%20systematic%20review%20found%20that%20for%20musculoskeletal%20injuries%20such%20as%20sprains%2C%20whiplash%2C%20and%20muscle%20strains%2C%20topical%20NSAIDs%20provided%20the%20greatest%20benefit%2Dharm%20ratio%2C%20followed%20by%20oral%20NSAIDs%20or%20acetaminophen%20with%20or%20without%20diclofenac)\r\n- [Postpartum pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Pain%20Management%20for%20Pregnant%20and%20Postpartum%20Persons)\r\n\r\n**Nonpharmacologic Treatments**\r\n- [Back pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=The%20American%20College%20of%20Physicians%20(ACP)%20recommends%20nonpharmacologic%20treatment%20with%20superficial%20heat%2C%20massage%2C%20acupuncture%2C%20or%20spinal%20manipulation%20as%20a%20cornerstone%20of%20treatment%20for%20acute%20low%20back%20pain)\r\n- [Migraine pain (episodic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=remote%20electrical%20neuromodulation%20for%20acute%20pain%20related%20to%20episodic%20migraine)\r\n- [Musculoskeletal pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=acupressure%20for%20acute%20musculoskeletal%20pain)\r\n- [Postoperative pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=massage%20for%20postoperative%20pain)<br/>\n                    <b>When:</b> <i>Named Event:</i> order-sign<br/>\n                    <b>If:</b> <i>Applicability:</i> Check whether the current order is for an opioid with ambulatory misuse potential, the patient is opioid naive and if an opioid review is appropriate for the patient <i>(Is Recommendation Applicable?)</i><br/>\n                    <b>Then:</b>\n                    \n                      <table class=\"grid-dict\">\n                        \n                          <tr>\n                            <td>\n                              <b> :</b> Document - Record reason for opioid therapy<br/>\n                              \n                              \n                              <b>Then:</b>\n                              \n                                \n                                \n                              \n                            </td>\n                          </tr>\n                        \n                          <tr>\n                            <td>\n                              <b> :</b> Snooze* - Attempt alternative therapy, snooze 3 months<br/>\n                              \n                              \n                              <b>Then:</b>\n                              \n                                \n                                \n                              \n                            </td>\n                          </tr>\n                        \n                          <tr>\n                            <td>\n                              <b> :</b> Order - Select alternative therapies from order set<br/>\n                              \n                              \n                              <b>Then:</b>\n                              \n                                \n                                \n                              \n                            </td>\n                          </tr>\n                        \n                          <tr>\n                            <td>\n                              <b> :</b> Snooze* - N/A see comment, snooze 3 months<br/>\n                              \n                              \n                              <b>Then:</b>\n                              \n                                \n                                \n                              \n                            </td>\n                          </tr>\n                        \n                          <tr>\n                            <td>\n                              <b> :</b> Remove - Will remove triggering medication order<br/>\n                              \n                              \n                              <b>Then:</b>\n                              \n                                \n                                \n                              \n                            </td>\n                          </tr>\n                        \n                      </table>\n                    \n                  </td>\n                </tr>\n              \n            </table>\n          </td>\n        </tr>\n        \n    </table>\n</div>"^^rdf:XMLLiteral
  ] ; # 
  fhir:contained ( [
a fhir:Library ;
fhir:id [ fhir:v "effective-data-requirements" ] ;
fhir:name [ fhir:v "EffectiveDataRequirements" ] ;
fhir:status [ fhir:v "active" ] ;
fhir:type [
      ( fhir:coding [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/library-type"^^xsd:anyURI ] ;
fhir:code [ fhir:v "module-definition" ]       ] )     ] ;
    ( fhir:relatedArtifact [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Library Common" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon|2022.1.0"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon|2022.1.0>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Library FHIRHelpers" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers|4.0.1"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers|4.0.1>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Library Routines" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines|2022.1.0"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines|2022.1.0>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Opioid analgesics with ambulatory misuse potential" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/opioid-analgesics-with-ambulatory-misuse-potential"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/opioid-analgesics-with-ambulatory-misuse-potential>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Community" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/medicationrequest-category-community"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/medicationrequest-category-community>       ]     ] ) ;
    ( fhir:parameter [
fhir:name [ fhir:v "ContextPrescriptions" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:min [ fhir:v 0 ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "MedicationRequest" ]     ] [
fhir:name [ fhir:v "Is Recommendation Applicable?" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v 0 ] ;
fhir:max [ fhir:v "1" ] ;
fhir:type [ fhir:v "boolean" ]     ] )
  ] ) ; # 
  fhir:extension ( [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [
a fhir:code ;
fhir:v "shareable"     ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [
a fhir:code ;
fhir:v "computable"     ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [
a fhir:code ;
fhir:v "executable"     ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [
a fhir:code ;
fhir:v "publishable"     ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSREC01"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions\":\n  ( Common.\"Is Opioid Analgesic with Ambulatory Misuse Potential?\"( ContextPrescriptions ) ) AmbulatoryOpioidPrescription\n    where Routines.\"Is Acute Pain Prescription?\"( AmbulatoryOpioidPrescription )"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 0       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSREC01"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential\":\n  exists( \"Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions\" )"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 1       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Patient Age Less Than 18"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Patient Age Less Than 18\":\n  if (Config.\"Age Less than 18 Years Is Enabled\") then\n    AgeInYearsAt(Today()) < 18\n  else false"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 2       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Condition Positive for Sickle Cell"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Condition Positive for Sickle Cell\":\n  if (Config.\"Sickle Cell Check Enabled\") then\n    exists(\n      Common.\"Positive Sickle Cell Condition\"\n    ) \n  else false"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 3       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Is Active Cancer Treatment?"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Is Active Cancer Treatment?\":\n  if (Config.\"Active Cancer Treatment Encounters Condition Is Enabled\") \n    then \"Has Two or More Encounters with Cancer Diagnosis During Encounter Period\"\n      or \"Has Active Cancer Diagnosis on Problem List\"\n  else false"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 4       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Conditions Likely Terminal for Opioid Prescribing"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Conditions Likely Terminal for Opioid Prescribing\":\n  if (Config.\"End-Stage Disease Criteria Enabled\") then\n    exists (\n      Common.\"US Core-Categorized Conditions\" EOLC\n        where EOLC.code in Common.\"Conditions likely terminal for opioid prescribing\"\n          // and EOLC.clinicalStatus in Common.\"Active Condition\"\n    )\n  else false"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 5       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Is Opioid Review Useful?"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Is Opioid Review Useful?\":\n  not \"Patient Age Less Than 18\"\n    and not \"Condition Positive for Sickle Cell\"\n    and not \"Is Active Cancer Treatment?\"\n    and not \"Conditions Likely Terminal for Opioid Prescribing\""       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 6       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Has Opioid RX with Ambulatory Abuse Potential In Past 90 Days"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Has Opioid RX with Ambulatory Abuse Potential In Past 90 Days\":\n    if (Config.\"Opioid Naive Prescription Condition Is Enabled\") then\n      exists (\"Opioid RX with Ambulatory Abuse Potential In Past 90 Days\")\n    else false"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 7       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days\":\n  if (Config.\"Opioid Naive Prescription Condition Is Enabled\") then\n    exists (\"Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days\")\n  else false"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 8       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Is Opioid Naive?"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "// NOTE: MedicationStatement-dependent logic comment out due to bug in Publisher not supporting MedicationStatement in AllTypes.\ndefine \"Is Opioid Naive?\":\n    not (\"Has Opioid RX with Ambulatory Abuse Potential In Past 90 Days\")\n    /* and not (\"Has Report of Opioid with Ambulatory Care Abuse Potential Reported in Past 90 Days\") */\n    and not (\"Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days\")"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 9       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSREC01"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Inclusion Criteria"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Inclusion Criteria\":\n  \"Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential\"\n    and Routines.\"Is Opioid Review Useful?\"\n    and Routines.\"Is Opioid Naive?\""       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 10       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSREC01"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Exclusion Criteria"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Exclusion Criteria\":\n  false"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 11       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSREC01"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Is Recommendation Applicable?"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define \"Is Recommendation Applicable?\":\n  \"Inclusion Criteria\"\n    and not \"Exclusion Criteria\""       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 12       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSCommon"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Is Opioid Analgesic with Ambulatory Misuse Potential?"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define function \"Is Opioid Analgesic with Ambulatory Misuse Potential?\"(value List<MedicationRequest>):\n  (\"Get MedicationRequest Medication as Code\"(value)) Rx\n    where Rx.medication in \"Opioid analgesics with ambulatory misuse potential\" \n      and Rx.category in \"Community\""       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 13       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSCommon"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Get MedicationRequest Medication as Code"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define function \"Get MedicationRequest Medication as Code\"(value List<MedicationRequest>):\n  value Rx\n    let Med: \n      if Rx.medication is Reference then singleton from (\n        [Medication] M\n          where M.id = (Last(Split((Rx.medication as FHIR.Reference).reference, '/')))\n      ) else null\n    return \n      MedicationRequest {\n        id: Rx.id,\n        status: Rx.status,\n        intent: Rx.intent,\n        category: Rx.category,\n        medication: if Rx.medication is Reference then Med.code else Rx.medication as CodeableConcept,\n        subject: Rx.subject,\n        authoredOn: Rx.authoredOn,\n        recorder: Rx.recorder,\n        dosageInstruction: Rx.dosageInstruction,\n        dispenseRequest: Rx.dispenseRequest\n      }"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 14       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "FHIRHelpers"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "ToConcept"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 15       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSRoutines"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "Is Acute Pain Prescription?"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "// End of For Subacute or Chronic Pain Routine\n\n/*\n**  Routine #5\n**  For Acute Pain Routine\n**\n**  Definition                  | Answer to Proceed   | Details                                        | Data (Terminology) Requirement\n**  -----------------------------------------------------------------------------------------------------------------------------------\n**  Order for opioid analgesics | Yes                 | Look for an existing prescription (order) for  | Opioid analgesics with\n**  with ambulatory misuse      |                     | opioid analgesics with ambulatory abuse        | ambulatory misuse potential\n**  potential of duration < 28  |                     | potential of duration < 28 days                |\n**  days                        |                     |                                                |\n**  -----------------------------------------------------------------------------------------------------------------------------------\n**\n*/\n\n// should allow DateTime precision, but not working in the Ruler specifically\ndefine function \"Is Acute Pain Prescription?\"(prescription FHIR.MedicationRequest):\n  prescription.dispenseRequest is not null\n    and prescription.dispenseRequest.expectedSupplyDuration is not null\n    and Common.GetDurationInDays( prescription.dispenseRequest.expectedSupplyDuration ) < 28 days"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 16       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "OpioidCDSCommon"       ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "GetDurationInDays"       ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [
a fhir:string ;
fhir:v "define function GetDurationInDays(value FHIR.Duration):\n  if value is null then null\n  else\n    case\n      when value.code.value ~ 'a' then System.Quantity{ value: value.value.value * 365.0, unit: 'days' }\n      when value.code.value ~ 'mo' then System.Quantity{ value: value.value.value * 30.0, unit: 'days' }\n      when value.code.value ~ 'wk' then System.Quantity{ value: value.value.value * 7.0, unit: 'days' }\n      when value.code.value ~ 'd' then System.Quantity{ value: value.value.value, unit: 'days' }\n      when value.code.value ~ 'h' then System.Quantity{ value: value.value.value / 24.0, unit: 'days' }\n      when value.code.value ~ 'min' then System.Quantity{ value: value.value.value / 60.0 / 24.0, unit: 'days' }\n      when value.code.value ~ 's' then System.Quantity{ value: value.value.value / 60.0 / 60.0 / 24.0, unit: 'days' }\n      when value.code.value ~ 'ms' then System.Quantity{ value: value.value.value / 60.0 / 60.0 / 24.0 / 1000.0, unit: 'days' }\n      when value.code.value is null then Message(1000, true, 'Undefined', 'Error', 'Duration unit code is null')\n      else Message(1000, true, 'Undefined', 'Error', 'Unsupported duration unit code: ' + value.code.value)\nend"       ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [
a fhir:integer ;
fhir:v 17       ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition"^^xsd:anyURI ]
  ] [
fhir:id [ fhir:v "effective-data-requirements" ] ;
fhir:url [ fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements"^^xsd:anyURI ] ;
fhir:value [
a fhir:canonical ;
fhir:v "#effective-data-requirements"^^xsd:anyURI     ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Device/cqf-tooling" ]     ]
  ] ) ; # 
  fhir:url [ fhir:v "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/opioidcds-01"^^xsd:anyURI] ; # 
  fhir:identifier ( [
fhir:use [ fhir:v "official" ] ;
fhir:value [ fhir:v "cdc-opioid-guidance" ]
  ] ) ; # 
  fhir:version [ fhir:v "2022.1.0"] ; # 
  fhir:name [ fhir:v "PlanDefinition_Recommendation_01_Order_Sign"] ; # 
  fhir:title [ fhir:v "Recommendation #1 - Nonpharmacologic and Nonopioid Pharmacologic Therapy Consideration"] ; # 
  fhir:type [
    ( fhir:coding [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/plan-definition-type"^^xsd:anyURI ] ;
fhir:code [ fhir:v "eca-rule" ] ;
fhir:display [ fhir:v "ECA Rule" ]     ] )
  ] ; # 
  fhir:status [ fhir:v "draft"] ; # 
  fhir:experimental [ fhir:v true] ; # 
  fhir:date [ fhir:v "2025-04-24"^^xsd:date] ; # 
  fhir:publisher [ fhir:v "Centers for Disease Control and Prevention (CDC)"] ; # 
  fhir:contact ( [
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://www.cdc.gov" ]     ] )
  ] ) ; # 
  fhir:description [ fhir:v "Nonopioid therapies are at least as effective as opioids for many common types of acute pain. Clinicians should maximize use of nonpharmacologic and nonopioid pharmacologic therapies as appropriate for the specific condition and patient and only consider opioid therapy for acute pain if benefits are anticipated to outweigh risks to the patient. Before prescribing opioid therapy for acute pain, clinicians should discuss with patients the realistic benefits and known risks of opioid therapy."] ; # 
  fhir:useContext ( [
fhir:code [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/usage-context-type"^^xsd:anyURI ] ;
fhir:code [ fhir:v "focus" ] ;
fhir:display [ fhir:v "Clinical Focus" ]     ] ;
fhir:value [
a fhir:CodeableConcept ;
      ( fhir:coding [
a sct:182888003 ;
fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
fhir:code [ fhir:v "182888003" ] ;
fhir:display [ fhir:v "Medication requested (situation)" ]       ] )     ]
  ] [
fhir:code [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/usage-context-type"^^xsd:anyURI ] ;
fhir:code [ fhir:v "focus" ] ;
fhir:display [ fhir:v "Clinical Focus" ]     ] ;
fhir:value [
a fhir:CodeableConcept ;
      ( fhir:coding [
a sct:274663001 ;
fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
fhir:code [ fhir:v "274663001" ] ;
fhir:display [ fhir:v "Acute pain (finding)" ]       ] )     ]
  ] ) ; # 
  fhir:purpose [ fhir:v "The 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain is intended to improve communication between providers and patients about the risks and benefits of opioid therapy for chronic pain, improve the safety and effectiveness of pain treatment, and reduce the risks associated with long-term opioid therapy, including opioid use disorder and overdose. The Guideline is not intended for patients who are in active cancer treatment, palliative care, or end-of-life care."] ; # 
  fhir:usage [ fhir:v "Clinicians should consider opioid therapy only if expected benefits for both pain and function are anticipated to outweigh risks to the patient."] ; # 
  fhir:copyright [ fhir:v "© CDC 2016+."] ; # 
  fhir:topic ( [
fhir:text [ fhir:v "Opioid Prescribing" ]
  ] ) ; # 
  fhir:author ( [
fhir:name [ fhir:v "Kensaku Kawamoto, MD, PhD, MHS" ]
  ] [
fhir:name [ fhir:v "Bryn Rhodes" ]
  ] [
fhir:name [ fhir:v "Floyd Eisenberg, MD, MPH" ]
  ] [
fhir:name [ fhir:v "Robert McClure, MD, MPH" ]
  ] ) ; # 
  fhir:relatedArtifact ( [
fhir:type [ fhir:v "documentation" ] ;
fhir:display [ fhir:v "2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain" ] ;
fhir:url [ fhir:v "https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm"^^xsd:anyURI ] ;
fhir:document [
fhir:url [ fhir:v "https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm"^^xsd:anyURI ]     ]
  ] ) ; # 
  fhir:library ( [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC01"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC01>
  ] ) ; # 
  fhir:action ( [
    ( fhir:extension [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation"^^xsd:anyURI ] ;
fhir:value [
a fhir:CodeableConcept ;
        ( fhir:coding [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/recommendation-strength"^^xsd:anyURI ] ;
fhir:code [ fhir:v "weak" ] ;
fhir:display [ fhir:v "Weak" ]         ] )       ]     ] [
fhir:url [ fhir:v "http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence"^^xsd:anyURI ] ;
fhir:value [
a fhir:CodeableConcept ;
        ( fhir:coding [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/evidence-quality"^^xsd:anyURI ] ;
fhir:code [ fhir:v "low" ] ;
fhir:display [ fhir:v "Low quality" ]         ] )       ]     ] ) ;
fhir:title [ fhir:v "Consider Nonopioid Treatment Options for Acute Pain" ] ;
fhir:description [ fhir:v "For many types of acute pain, clinicians should maximize the use of nonpharmacologic (for example, physical therapy) and nonopioid pharmacologic therapies (for example, NSAIDs), as appropriate for the specific condition and patient and only consider opioid therapy for acute pain if benefits are anticipated to outweigh risks to the patient. Before prescribing opioid therapy for acute pain, clinicians should discuss with patients the realistic benefits and known risks of opioid therapy.\r\n\r\n[Recommendation 1 of the 2022 CDC Clinical Practice Guideline](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#Recommendation1) provides nonopioid therapy options for common acute pain conditions.\r\n\r\n**Nonopioid Pharmacological Therapy**\r\n- [Dental pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=The%20American%20Dental%20Association%20(ADA)%20recommends%20NSAIDs%20as%20first%2Dline%20treatment%20for%20acute%20dental%20pain%20management)\r\n- [Dental pain (surgical)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=NSAIDs%20have%20been%20found%20to%20be%20more%20effective%20than%20opioids%20for%20surgical%20dental%20pain)\r\n- [Kidney stone pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20acute%20kidney%20stone%20pain%2C%20NSAIDs%20are%20at%20least%20as%20effective%20as%20opioids%20(124%E2%80%93127)%2C%20can%20decrease%20the%20ureteral%20smooth%20muscle%20tone%20and%20ureteral%20spasm%20(128)%20causing%20kidney%20stone%20pain%2C%20and%20are%20preferred%20for%20kidney%20stone%20pain%20if%20not%20contraindicated.)\r\n- [Low back pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=NSAIDs%20have%20been%20found%20to%20be%20more%20effective%20than%20opioids%20for%20surgical%20dental%20pain%20and%20kidney%20stone%20pain%20and%20similarly%20effective%20to%20opioids%20for%20low%20back%20pain)\r\n- [Migraine pain (episodic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20episodic%20migraine%2C%20triptans%2C%20NSAIDs%2C%20antiemetics%2C%20dihydroergotamine%2C%20calcitonin%20gene%2Drelated%20peptide%20antagonists%20(gepants)%2C%20and%20lasmiditan%20are%20associated%20with%20improved%20pain%20and%20function%20with%20usually%20mild%20and%20transient%20adverse%20events)\r\n- [Musculoskeletal pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=A%20systematic%20review%20found%20that%20for%20musculoskeletal%20injuries%20such%20as%20sprains%2C%20whiplash%2C%20and%20muscle%20strains%2C%20topical%20NSAIDs%20provided%20the%20greatest%20benefit%2Dharm%20ratio%2C%20followed%20by%20oral%20NSAIDs%20or%20acetaminophen%20with%20or%20without%20diclofenac)\r\n- [Postpartum pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Pain%20Management%20for%20Pregnant%20and%20Postpartum%20Persons)\r\n\r\n**Nonpharmacologic Treatments**\r\n- [Back pain (acute)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=The%20American%20College%20of%20Physicians%20(ACP)%20recommends%20nonpharmacologic%20treatment%20with%20superficial%20heat%2C%20massage%2C%20acupuncture%2C%20or%20spinal%20manipulation%20as%20a%20cornerstone%20of%20treatment%20for%20acute%20low%20back%20pain)\r\n- [Migraine pain (episodic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=remote%20electrical%20neuromodulation%20for%20acute%20pain%20related%20to%20episodic%20migraine)\r\n- [Musculoskeletal pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=acupressure%20for%20acute%20musculoskeletal%20pain)\r\n- [Postoperative pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=massage%20for%20postoperative%20pain)" ] ;
fhir:priority [ fhir:v "urgent" ] ;
    ( fhir:trigger [
fhir:type [ fhir:v "named-event" ] ;
fhir:name [ fhir:v "order-sign" ]     ] ) ;
    ( fhir:condition [
fhir:kind [ fhir:v "applicability" ] ;
fhir:expression [
fhir:description [ fhir:v "Check whether the current order is for an opioid with ambulatory misuse potential, the patient is opioid naive and if an opioid review is appropriate for the patient" ] ;
fhir:language [ fhir:v "text/cql.identifier" ] ;
fhir:expression [ fhir:v "Is Recommendation Applicable?" ]       ]     ] ) ;
fhir:groupingBehavior [ fhir:v "visual-group" ] ;
fhir:selectionBehavior [ fhir:v "any" ] ;
    ( fhir:action [
fhir:description [ fhir:v "Document - Record reason for opioid therapy" ]     ] [
fhir:description [ fhir:v "Snooze* - Attempt alternative therapy, snooze 3 months" ]     ] [
fhir:description [ fhir:v "Order - Select alternative therapies from order set" ]     ] [
fhir:description [ fhir:v "Snooze* - N/A see comment, snooze 3 months" ]     ] [
fhir:description [ fhir:v "Remove - Will remove triggering medication order" ]     ] )
  ] ) . #