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

: PlanDefinition - 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain: Recommendation #2 - TTL Representation

Draft as of 2023-05-01

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@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-02"] ; # 
  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-02</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-02.html\">PlanDefinition - 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain: Recommendation #2</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;\">CDC_opioid_02</td>\n        </tr>\n        \n        \n        <tr>\n            <th scope=\"row\"><b>Title: </b></th>\n            <td style=\"padding-left: 4px;\">PlanDefinition - 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain: Recommendation #2</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://hl7.org/fhir/R4/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;\">2023-05-01</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;\">Nonpharmacologic therapy and nonopioid pharmacologic therapy are preferred for chronic pain.</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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Get Summary</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;Get Summary&quot;:\n  if &quot;Is Recommendation Applicable?&quot;\n    then 'Maximize Nonopioid Therapies as Appropriate'\n  else null</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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions</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;Chronic 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 Subacute or Chronic 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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential</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 Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&quot;:\n  exists( &quot;Chronic 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>3</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\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>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Condition Positive for Sickle Cell</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;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        )  else\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>OpioidCDSCommon</td>\n                                \n                                \n                                    <td>US Core-Categorized Conditions</td>\n                                \n                                \n                                    <td>5</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">// 3. Medications indicating end of life\n    /* or exists (\n      &quot;Medications Indicating End of Life&quot;\n    ) */\ndefine &quot;US Core-Categorized Conditions&quot;:\n  [Condition: category in &quot;Encounter Diagnosis Condition Category&quot;]\n    union [Condition: category in &quot;Problem List Condition Category&quot;]\n    union [Condition: category in &quot;US Core Health Concern Condition Category&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>Conditions Indicating End Of Life Present</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;Conditions Indicating End Of Life Present&quot;:\n  exists (\n    Common.&quot;US Core-Categorized Conditions&quot; LLEC\n      where LLEC.code in Common.&quot;Limited life expectancy conditions&quot;\n        and LLEC.clinicalStatus in Common.&quot;Active Condition&quot;\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>OpioidCDSCommon</td>\n                                \n                                \n                                    <td>Service Requests</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;Service Requests&quot;:\n   [ServiceRequest] SR\n    return SR</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>Palliative Care Lookback Period</td>\n                                \n                                \n                                    <td>8</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">/*\n**  Routine #1\n**  Opioid Review Useful Routine\n**\n**  Definition              | Answer to Proceed   | Details                                      | Data (Terminology) Requirement\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Age &lt; 18 years?         | No                  | Calculate age from date of birth; exclude    | Date of birth\n**                          |                     | patients with age less than 18 years at the  |\n**                          |                     | time of the prescription                     |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Evidence of             | No                  | Look for documented findings consistent      | Sickle cell disease conditions\n**  sickle cell disease?    |                     | with those listed in the sickle cell         |\n**                          |                     | value set                                    |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Limited life            | No                  | Look for documented findings consistent      | Limited life expectancy conditions\n**  expectancy conditions   |                     | with those listed in the limited life        |\n**  present?                |                     | expectancy value set (terminal illness, bad  |\n**                          |                     | prognosis, pre-terminal)                     |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Order for therapies     | No                  | Look for patients with an existing order for | Therapies indicating end of life care\n**  indicating end of life  |                     | therapies indicating end of life care        |\n**  care in past 90 days?   |                     | written within past 90 days                  |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Active cancer           | No                  | See sub-routine 3                            | See sub-routine 3\n**  treatment?              |                     |                                              |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Conditions Likely       | No                  | Look for patients with active conditions in  | Conditions likely terminal for opioid\n**  Terminal for opioid     |                     | the value set end-of-life-conditions         | prescribing\n**  prescribing present?    |                     |                                              |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**\n*/\ndefine &quot;Palliative Care Lookback Period&quot;:\n  Interval[Today() - 90 days, Today()]</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>Order For Palliative Care In Past 90 Days</td>\n                                \n                                \n                                    <td>9</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Order For Palliative Care In Past 90 Days&quot;:\n  exists (\n    Common.&quot;Service Requests&quot; SR\n    where SR.status in { 'active', 'completed'}\n      and SR.intent in {'proposal', 'plan,', 'directive', 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}\n      and FHIRHelpers.ToDateTime(SR.authoredOn) during day of &quot;Palliative Care Lookback Period&quot;\n      and SR.code in Common.&quot;Therapies indicating end of life care&quot;\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 Active Cancer Treatment?</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;Is Active Cancer Treatment?&quot;:\n  if (Config.&quot;Active Cancer Treatment Encounters Condition Is Enabled&quot;) then\n      &quot;Has Two or More Encounters with Cancer Diagnosis During Encounter Period&quot;\n    else\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>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present</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;Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present&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\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>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Is Opioid Review Useful?</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 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;Conditions Indicating End Of Life Present&quot;\n    and not &quot;Order For Palliative Care In Past 90 Days&quot;\n    and not &quot;Is Active Cancer Treatment?&quot;\n    and not &quot;Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present&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>13</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\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>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days</td>\n                                \n                                \n                                    <td>14</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\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>OpioidCDSRoutines</td>\n                                \n                                \n                                    <td>Is Opioid Naive?</td>\n                                \n                                \n                                    <td>15</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>OpioidCDSCommonConfig</td>\n                                \n                                \n                                    <td>Opioid Treatment Plan Verification Enabled</td>\n                                \n                                \n                                    <td>16</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">// Recommendation 2\ndefine &quot;Opioid Treatment Plan Verification Enabled&quot;:\n  true</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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Treatment Plan Lookback Period</td>\n                                \n                                \n                                    <td>17</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Treatment Plan Lookback Period&quot;:\n  Interval[Today() - 90 days, Today()]</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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Opioid Treatment Plan Creation or Update in Past 90 Days</td>\n                                \n                                \n                                    <td>18</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Opioid Treatment Plan Creation or Update in Past 90 Days&quot;:\n  [CarePlan: category in Common.&quot;Pain treatment plan&quot;] PainTreatmentPlan\n    where PainTreatmentPlan.status in { 'active', 'completed' }\n      and (\n        FHIRHelpers.ToDateTime( PainTreatmentPlan.created ) during day of &quot;Treatment Plan Lookback Period&quot;\n          or PainTreatmentPlan.meta.lastUpdated during day of &quot;Treatment Plan Lookback Period&quot;\n      )\n      and exists(\n        &quot;Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&quot;.recorder Recorder\n          where Recorder ~ PainTreatmentPlan.author\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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Had Opioid Treatment Plan Reviewed in Past 90 Days</td>\n                                \n                                \n                                    <td>19</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Had Opioid Treatment Plan Reviewed in Past 90 Days&quot;:\n  exists (\n    [Procedure: Common.&quot;Pain management procedure&quot;] PainManagementProcedure\n      where PainManagementProcedure.performed during day of &quot;Treatment Plan Lookback Period&quot;\n        and exists (\n          PainManagementProcedure.performer Performer\n            with &quot;Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&quot; ChronicPainScript\n            such that Performer.actor ~ ChronicPainScript.recorder\n        )\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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>No Opioid Treatment Plan Created, was Edited or Reviewed in Past 90 Days?</td>\n                                \n                                \n                                    <td>20</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;No Opioid Treatment Plan Created, was Edited or Reviewed in Past 90 Days?&quot;:\n  Config.&quot;Opioid Treatment Plan Verification Enabled&quot;\n    and not (\n      exists ( &quot;Opioid Treatment Plan Creation or Update in Past 90 Days&quot; )\n        or &quot;Had Opioid Treatment Plan Reviewed in Past 90 Days&quot;\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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Inclusion Criteria</td>\n                                \n                                \n                                    <td>21</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;\n    and &quot;No Opioid Treatment Plan Created, was Edited or Reviewed 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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Is Recommendation Applicable?</td>\n                                \n                                \n                                    <td>22</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;</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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Get Detail</td>\n                                \n                                \n                                    <td>23</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Get Detail&quot;:\n  if &quot;Is Recommendation Applicable?&quot;\n  then \n    'For many types of subacute and chronic pain, consider maximizing the use of nonpharmacologic and nonopioid pharmacologic therapies as appropriate. Consult Recommendation 2 of the 2022 CDC Clinical Practice Guideline for nonopioid therapy recommendations.\n    \n**Nonopioid Pharmacological Therapy**\n\n- [Back pain (chronic, moderate to severe)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20moderate%20to%20severe%20chronic%20back%20pain%20or%20hip%20or%20knee%20osteoarthritis%20pain%2C%20a%20nonopioid%20strategy%20starting%20with%20acetaminophen%20or%20NSAIDs%20results%20in%20improved%20pain%20intensity%20with%20fewer%20side%20effects%20compared%20with%20a%20strategy%20starting%20with%20opioids%20(74))\n- [Fibromyalgia](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=In%20patients%20with%20fibromyalgia%2C%20multiple,effectiveness%20is%20limited%20(8).)\n- [Hip or knee osteoarthritis pain (chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=or%20hip%20or%20knee%20osteoarthritis%20pain%2C%20a%20nonopioid%20strategy%20starting%20with%20acetaminophen%20or%20NSAIDs%20results%20in%20improved%20pain%20intensity%20with%20fewer%20side%20effects%20compared%20with%20a%20strategy%20starting%20with%20opioids%20(74).)\n- [Neuropathic pain syndromes](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Tricyclic%20antidepressants%2C%20SNRI%20antidepressants%2C%20selected%20anticonvulsants%2C%20or%20transdermal%20lidocaine%20are%20recommended%20for%20neuropathic%20pain%20syndromes%20(e.g.%2C%20diabetic%20neuropathy%20or%20postherpetic%20neuralgia)%20(156).)\n- [Temporomandibular disorder](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20temporomandibular%20disorder%20pain%20that%20is%20not%20sufficiently%20improved%20with%20nonpharmacologic%20interventions%2C%20NSAIDs%20can%20be%20effective%20(179%2C180).)\n\n**Nonpharmacologic Treatments**\n- [Back pain (chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Clinicians%20should%20recommend%20appropriate%20noninvasive%20nonpharmacologic%20approaches%20to%20help%20manage%20chronic%20pain%2C%20such%20as%20exercise%20(e.g.%2C%20aerobic%2C%20aquatic%2C%20or%20resistance%20exercises)%20or%20exercise%20therapy%20(a%20prominent%20modality%20in%20physical%20therapy)%20for%20back%20pain)\n- [Back pain (low back, chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=loss%20for%20knee%20osteoarthritis%3B%20manual%20therapies%20for%20hip%20osteoarthritis%3B-,psychological%20therapy%2C%20spinal%20manipulation%2C%20low%2Dlevel%20laser%20therapy%2C%20massage%2C%20mindfulness%2Dbased%20stress%20reduction%2C%20yoga%2C%20acupuncture%2C%20and%20multidisciplinary%20rehabilitation%20for%20low%20back%20pain,-%3B%20mind%2Dbody%20practices%20(e.g.%2C%20yoga%2C%20tai%20chi%2C%20or)\n- [Fibromyalgia](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=massage%2C%20and%20acupuncture%20for%20neck%20pain%3B%20cognitive-,behavioral%20therapy%2C%20myofascial%20release%20massage%2C%20mindfulness%20practices%2C%20tai%20chi%2C%20qigong%2C%20acupuncture%2C%20and%20multidisciplinary%20rehabilitation%20for%20fibromyalgia,-%3B%20and%20spinal%20manipulation%20for%20tension%20headache%20()\n- [Headache (tension)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=and%20spinal%20manipulation%20for%20tension%20headache.)\n- [Knee osteoarthritis pain (chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Many%20noninvasive%20nonpharmacologic,for%20hip%20osteoarthritis%3B)\n- [Neck pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=mind%2Dbody%20practices%20(e.g.%2C%20yoga%2C%20tai%20chi%2C%20or%20qigong)%2C%20massage%2C%20and%20acupuncture%20for%20neck%20pain%3B)\n- [Temporomandibular disorder](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20temporomandibular%20disorder%20pain%2C%20patient%20education%20and%20self%2Dcare%20can%20be%20effective%2C%20as%20can%20occlusal%20splints%20for%20some%20patients%20and%20biobehavioral%20therapy%20for%20prevention%20of%20disabling%20symptoms%20(172%2C173).)'\n  else null</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>OpioidCDSREC02</td>\n                                \n                                \n                                    <td>Get Indicator</td>\n                                \n                                \n                                    <td>24</td>\n                                \n                            </tr>\n                        </table>\n                        \n                            <pre style=\"max-width: 990px;\"><code class=\"language-cql\">define &quot;Get Indicator&quot;:\n  if &quot;Is Recommendation Applicable?&quot;\n    then 'warning'\n  else null</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>82423001</td>\n                        <td>Chronic 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 continue opioid therapy only if there is clinically meaningful improvement in pain and function that outweighs risks to patient safety.</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-OpioidCDSREC02.html\">Library - Recommendation #2 - Opioid Therapy Goals Discussion</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> Current Order is for Opioid With Ambulatory Misuse Potential.:</b> Checking if the trigger prescription meets the inclusion criteria for recommendation #2 workflow.<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 Opioid With Ambulatory Misuse Potential. <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 - Collaborated with patient to identify treatment goals<br/>\n                              \n                              \n                              <b>Then:</b>\n                              \n                                \n                                \n                              \n                            </td>\n                          </tr>\n                        \n                          <tr>\n                            <td>\n                              <b> :</b> Snooze* - Attempting alternate 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 select<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>"
  ] ; # 
  fhir:contained ( [
a fhir:Library ;
fhir:id [ fhir:v "effective-data-requirements" ] ;
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 "Library Config" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig|2022.1.0"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig|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:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Encounter Diagnosis Condition Category" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-encounter-diagnosis-category"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-encounter-diagnosis-category>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Problem List Condition Category" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-problem-list-category"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-problem-list-category>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set US Core Health Concern Condition Category" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-us-core-health-concern-category"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-us-core-health-concern-category>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Limited life expectancy conditions" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/limited-life-expectancy-conditions"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/limited-life-expectancy-conditions>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Active Condition" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-clinical-status-active"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-clinical-status-active>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Therapies indicating end of life care" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/therapies-indicating-end-of-life-care"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/therapies-indicating-end-of-life-care>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Pain treatment plan" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-treatment-plan"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-treatment-plan>       ]     ] [
fhir:type [ fhir:v "depends-on" ] ;
fhir:display [ fhir:v "Value set Pain management procedure" ] ;
fhir:resource [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-management-procedure"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-management-procedure>       ]     ] ) ;
    ( fhir:parameter [
fhir:name [ fhir:v "ContextPrescriptions" ] ;
fhir:use [ fhir:v "in" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "*" ] ;
fhir:type [ fhir:v "MedicationRequest" ]     ] [
fhir:name [ fhir:v "Get Summary" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "1" ] ;
fhir:type [ fhir:v "string" ]     ] [
fhir:name [ fhir:v "Is Recommendation Applicable?" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "1" ] ;
fhir:type [ fhir:v "boolean" ]     ] [
fhir:name [ fhir:v "Get Detail" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "1" ] ;
fhir:type [ fhir:v "string" ]     ] [
fhir:name [ fhir:v "Get Indicator" ] ;
fhir:use [ fhir:v "out" ] ;
fhir:min [ fhir:v "0"^^xsd:integer ] ;
fhir:max [ fhir:v "1" ] ;
fhir:type [ fhir:v "string" ]     ] ) ;
    ( fhir:dataRequirement [
fhir:type [ fhir:v "Medication" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/Medication"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Medication>       ] ) ;
      ( fhir:mustSupport [ fhir:v "id" ] ) ;
      ( fhir:codeFilter [
fhir:path [ fhir:v "id" ]       ] )     ] [
fhir:type [ fhir:v "Condition" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/Condition"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Condition>       ] ) ;
      ( fhir:mustSupport [ fhir:v "category" ] ) ;
      ( fhir:codeFilter [
fhir:path [ fhir:v "category" ] ;
fhir:valueSet [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-encounter-diagnosis-category"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-encounter-diagnosis-category>         ]       ] )     ] [
fhir:type [ fhir:v "Condition" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/Condition"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Condition>       ] ) ;
      ( fhir:mustSupport [ fhir:v "category" ] ) ;
      ( fhir:codeFilter [
fhir:path [ fhir:v "category" ] ;
fhir:valueSet [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-problem-list-category"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-problem-list-category>         ]       ] )     ] [
fhir:type [ fhir:v "Condition" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/Condition"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Condition>       ] ) ;
      ( fhir:mustSupport [ fhir:v "category" ] ) ;
      ( fhir:codeFilter [
fhir:path [ fhir:v "category" ] ;
fhir:valueSet [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-us-core-health-concern-category"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-us-core-health-concern-category>         ]       ] )     ] [
fhir:type [ fhir:v "ServiceRequest" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/ServiceRequest"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/ServiceRequest>       ] )     ] [
fhir:type [ fhir:v "ServiceRequest" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/ServiceRequest"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/ServiceRequest>       ] ) ;
      ( fhir:mustSupport [ fhir:v "status" ] [ fhir:v "intent" ] [ fhir:v "authoredOn" ] [ fhir:v "code" ] )     ] [
fhir:type [ fhir:v "CarePlan" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/CarePlan"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/CarePlan>       ] ) ;
      ( fhir:mustSupport [ fhir:v "category" ] [ fhir:v "status" ] [ fhir:v "created" ] [ fhir:v "meta" ] [ fhir:v "meta.lastUpdated" ] [ fhir:v "author" ] ) ;
      ( fhir:codeFilter [
fhir:path [ fhir:v "category" ] ;
fhir:valueSet [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-treatment-plan"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-treatment-plan>         ]       ] )     ] [
fhir:type [ fhir:v "Procedure" ] ;
      ( fhir:profile [
fhir:v "http://hl7.org/fhir/StructureDefinition/Procedure"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/StructureDefinition/Procedure>       ] ) ;
      ( fhir:mustSupport [ fhir:v "code" ] [ fhir:v "performed" ] [ fhir:v "performer" ] ) ;
      ( fhir:codeFilter [
fhir:path [ fhir:v "code" ] ;
fhir:valueSet [
fhir:v "http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-management-procedure"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-management-procedure>         ]       ] )     ] )
  ] ) ; # 
  fhir:extension ( [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [ fhir:v "shareable" ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [ fhir:v "computable" ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [ fhir:v "executable" ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability"^^xsd:anyURI ] ;
fhir:value [ fhir:v "publishable" ]
  ] [
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "Device/cqf-tooling" ]     ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Get Summary" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Get Summary\":\n  if \"Is Recommendation Applicable?\"\n    then 'Maximize Nonopioid Therapies as Appropriate'\n  else null" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "0"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions\":\n  ( Common.\"Is Opioid Analgesic with Ambulatory Misuse Potential?\"( ContextPrescriptions ) ) AmbulatoryOpioidPrescription\n    where Routines.\"Is Subacute or Chronic Pain Prescription?\"( AmbulatoryOpioidPrescription )" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "1"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential\":\n  exists( \"Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions\" )" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "2"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Patient Age Less Than 18" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ 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\n    false" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "3"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Condition Positive for Sickle Cell" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ 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        )  else\n        false" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "4"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSCommon" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "US Core-Categorized Conditions" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "// 3. Medications indicating end of life\n    /* or exists (\n      \"Medications Indicating End of Life\"\n    ) */\ndefine \"US Core-Categorized Conditions\":\n  [Condition: category in \"Encounter Diagnosis Condition Category\"]\n    union [Condition: category in \"Problem List Condition Category\"]\n    union [Condition: category in \"US Core Health Concern Condition Category\"]" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "5"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Conditions Indicating End Of Life Present" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Conditions Indicating End Of Life Present\":\n  exists (\n    Common.\"US Core-Categorized Conditions\" LLEC\n      where LLEC.code in Common.\"Limited life expectancy conditions\"\n        and LLEC.clinicalStatus in Common.\"Active Condition\"\n  )" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "6"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSCommon" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Service Requests" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Service Requests\":\n   [ServiceRequest] SR\n    return SR" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "7"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Palliative Care Lookback Period" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "/*\n**  Routine #1\n**  Opioid Review Useful Routine\n**\n**  Definition              | Answer to Proceed   | Details                                      | Data (Terminology) Requirement\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Age < 18 years?         | No                  | Calculate age from date of birth; exclude    | Date of birth\n**                          |                     | patients with age less than 18 years at the  |\n**                          |                     | time of the prescription                     |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Evidence of             | No                  | Look for documented findings consistent      | Sickle cell disease conditions\n**  sickle cell disease?    |                     | with those listed in the sickle cell         |\n**                          |                     | value set                                    |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Limited life            | No                  | Look for documented findings consistent      | Limited life expectancy conditions\n**  expectancy conditions   |                     | with those listed in the limited life        |\n**  present?                |                     | expectancy value set (terminal illness, bad  |\n**                          |                     | prognosis, pre-terminal)                     |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Order for therapies     | No                  | Look for patients with an existing order for | Therapies indicating end of life care\n**  indicating end of life  |                     | therapies indicating end of life care        |\n**  care in past 90 days?   |                     | written within past 90 days                  |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Active cancer           | No                  | See sub-routine 3                            | See sub-routine 3\n**  treatment?              |                     |                                              |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**  Conditions Likely       | No                  | Look for patients with active conditions in  | Conditions likely terminal for opioid\n**  Terminal for opioid     |                     | the value set end-of-life-conditions         | prescribing\n**  prescribing present?    |                     |                                              |\n**  ------------------------------------------------------------------------------------------------------------------------------------\n**\n*/\ndefine \"Palliative Care Lookback Period\":\n  Interval[Today() - 90 days, Today()]" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "8"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Order For Palliative Care In Past 90 Days" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Order For Palliative Care In Past 90 Days\":\n  exists (\n    Common.\"Service Requests\" SR\n    where SR.status in { 'active', 'completed'}\n      and SR.intent in {'proposal', 'plan,', 'directive', 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}\n      and FHIRHelpers.ToDateTime(SR.authoredOn) during day of \"Palliative Care Lookback Period\"\n      and SR.code in Common.\"Therapies indicating end of life care\"\n  )" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "9"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Is Active Cancer Treatment?" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Is Active Cancer Treatment?\":\n  if (Config.\"Active Cancer Treatment Encounters Condition Is Enabled\") then\n      \"Has Two or More Encounters with Cancer Diagnosis During Encounter Period\"\n    else\n      false" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "10"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present\":\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\n    false" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "11"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Is Opioid Review Useful?" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ 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 \"Conditions Indicating End Of Life Present\"\n    and not \"Order For Palliative Care In Past 90 Days\"\n    and not \"Is Active Cancer Treatment?\"\n    and not \"Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present\"" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "12"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Has Opioid RX with Ambulatory Abuse Potential In Past 90 Days" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ 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\n      false" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "13"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Has Opioid Dispense with Ambulatory Abuse Potential In Past 90 Days" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ 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\n    false" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "14"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSRoutines" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Is Opioid Naive?" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ 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 [ fhir:v "15"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSCommonConfig" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Opioid Treatment Plan Verification Enabled" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "// Recommendation 2\ndefine \"Opioid Treatment Plan Verification Enabled\":\n  true" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "16"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Treatment Plan Lookback Period" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Treatment Plan Lookback Period\":\n  Interval[Today() - 90 days, Today()]" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "17"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Opioid Treatment Plan Creation or Update in Past 90 Days" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Opioid Treatment Plan Creation or Update in Past 90 Days\":\n  [CarePlan: category in Common.\"Pain treatment plan\"] PainTreatmentPlan\n    where PainTreatmentPlan.status in { 'active', 'completed' }\n      and (\n        FHIRHelpers.ToDateTime( PainTreatmentPlan.created ) during day of \"Treatment Plan Lookback Period\"\n          or PainTreatmentPlan.meta.lastUpdated during day of \"Treatment Plan Lookback Period\"\n      )\n      and exists(\n        \"Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions\".recorder Recorder\n          where Recorder ~ PainTreatmentPlan.author\n      )" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "18"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Had Opioid Treatment Plan Reviewed in Past 90 Days" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Had Opioid Treatment Plan Reviewed in Past 90 Days\":\n  exists (\n    [Procedure: Common.\"Pain management procedure\"] PainManagementProcedure\n      where PainManagementProcedure.performed during day of \"Treatment Plan Lookback Period\"\n        and exists (\n          PainManagementProcedure.performer Performer\n            with \"Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions\" ChronicPainScript\n            such that Performer.actor ~ ChronicPainScript.recorder\n        )\n  )" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "19"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "No Opioid Treatment Plan Created, was Edited or Reviewed in Past 90 Days?" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"No Opioid Treatment Plan Created, was Edited or Reviewed in Past 90 Days?\":\n  Config.\"Opioid Treatment Plan Verification Enabled\"\n    and not (\n      exists ( \"Opioid Treatment Plan Creation or Update in Past 90 Days\" )\n        or \"Had Opioid Treatment Plan Reviewed in Past 90 Days\"\n    )" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "20"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Inclusion Criteria" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ 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?\"\n    and \"No Opioid Treatment Plan Created, was Edited or Reviewed in Past 90 Days?\"" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "21"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Is Recommendation Applicable?" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Is Recommendation Applicable?\":\n  \"Inclusion Criteria\"" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "22"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Get Detail" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Get Detail\":\n  if \"Is Recommendation Applicable?\"\n  then \n    'For many types of subacute and chronic pain, consider maximizing the use of nonpharmacologic and nonopioid pharmacologic therapies as appropriate. Consult Recommendation 2 of the 2022 CDC Clinical Practice Guideline for nonopioid therapy recommendations.\n    \n**Nonopioid Pharmacological Therapy**\n\n- [Back pain (chronic, moderate to severe)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20moderate%20to%20severe%20chronic%20back%20pain%20or%20hip%20or%20knee%20osteoarthritis%20pain%2C%20a%20nonopioid%20strategy%20starting%20with%20acetaminophen%20or%20NSAIDs%20results%20in%20improved%20pain%20intensity%20with%20fewer%20side%20effects%20compared%20with%20a%20strategy%20starting%20with%20opioids%20(74))\n- [Fibromyalgia](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=In%20patients%20with%20fibromyalgia%2C%20multiple,effectiveness%20is%20limited%20(8).)\n- [Hip or knee osteoarthritis pain (chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=or%20hip%20or%20knee%20osteoarthritis%20pain%2C%20a%20nonopioid%20strategy%20starting%20with%20acetaminophen%20or%20NSAIDs%20results%20in%20improved%20pain%20intensity%20with%20fewer%20side%20effects%20compared%20with%20a%20strategy%20starting%20with%20opioids%20(74).)\n- [Neuropathic pain syndromes](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Tricyclic%20antidepressants%2C%20SNRI%20antidepressants%2C%20selected%20anticonvulsants%2C%20or%20transdermal%20lidocaine%20are%20recommended%20for%20neuropathic%20pain%20syndromes%20(e.g.%2C%20diabetic%20neuropathy%20or%20postherpetic%20neuralgia)%20(156).)\n- [Temporomandibular disorder](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20temporomandibular%20disorder%20pain%20that%20is%20not%20sufficiently%20improved%20with%20nonpharmacologic%20interventions%2C%20NSAIDs%20can%20be%20effective%20(179%2C180).)\n\n**Nonpharmacologic Treatments**\n- [Back pain (chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Clinicians%20should%20recommend%20appropriate%20noninvasive%20nonpharmacologic%20approaches%20to%20help%20manage%20chronic%20pain%2C%20such%20as%20exercise%20(e.g.%2C%20aerobic%2C%20aquatic%2C%20or%20resistance%20exercises)%20or%20exercise%20therapy%20(a%20prominent%20modality%20in%20physical%20therapy)%20for%20back%20pain)\n- [Back pain (low back, chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=loss%20for%20knee%20osteoarthritis%3B%20manual%20therapies%20for%20hip%20osteoarthritis%3B-,psychological%20therapy%2C%20spinal%20manipulation%2C%20low%2Dlevel%20laser%20therapy%2C%20massage%2C%20mindfulness%2Dbased%20stress%20reduction%2C%20yoga%2C%20acupuncture%2C%20and%20multidisciplinary%20rehabilitation%20for%20low%20back%20pain,-%3B%20mind%2Dbody%20practices%20(e.g.%2C%20yoga%2C%20tai%20chi%2C%20or)\n- [Fibromyalgia](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=massage%2C%20and%20acupuncture%20for%20neck%20pain%3B%20cognitive-,behavioral%20therapy%2C%20myofascial%20release%20massage%2C%20mindfulness%20practices%2C%20tai%20chi%2C%20qigong%2C%20acupuncture%2C%20and%20multidisciplinary%20rehabilitation%20for%20fibromyalgia,-%3B%20and%20spinal%20manipulation%20for%20tension%20headache%20()\n- [Headache (tension)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=and%20spinal%20manipulation%20for%20tension%20headache.)\n- [Knee osteoarthritis pain (chronic)](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Many%20noninvasive%20nonpharmacologic,for%20hip%20osteoarthritis%3B)\n- [Neck pain](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=mind%2Dbody%20practices%20(e.g.%2C%20yoga%2C%20tai%20chi%2C%20or%20qigong)%2C%20massage%2C%20and%20acupuncture%20for%20neck%20pain%3B)\n- [Temporomandibular disorder](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=For%20temporomandibular%20disorder%20pain%2C%20patient%20education%20and%20self%2Dcare%20can%20be%20effective%2C%20as%20can%20occlusal%20splints%20for%20some%20patients%20and%20biobehavioral%20therapy%20for%20prevention%20of%20disabling%20symptoms%20(172%2C173).)'\n  else null" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "23"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
    ( fhir:extension [
fhir:url [ fhir:v "libraryName"^^xsd:anyURI ] ;
fhir:value [ fhir:v "OpioidCDSREC02" ]     ] [
fhir:url [ fhir:v "name"^^xsd:anyURI ] ;
fhir:value [ fhir:v "Get Indicator" ]     ] [
fhir:url [ fhir:v "statement"^^xsd:anyURI ] ;
fhir:value [ fhir:v "define \"Get Indicator\":\n  if \"Is Recommendation Applicable?\"\n    then 'warning'\n  else null" ]     ] [
fhir:url [ fhir:v "displaySequence"^^xsd:anyURI ] ;
fhir:value [ fhir:v "24"^^xsd:integer ]     ] ) ;
fhir:url [ fhir:v "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"^^xsd:anyURI ]
  ] [
fhir:id [ fhir:v "effective-data-requirements" ] ;
fhir:url [ fhir:v "http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/effectiveDataRequirements"^^xsd:anyURI ] ;
fhir:value [
a fhir:Reference ;
fhir:reference [ fhir:v "#effective-data-requirements" ]     ]
  ] ) ; # 
  fhir:url [ fhir:v "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/opioidcds-02"^^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 "CDC_opioid_02"] ; # 
  fhir:title [ fhir:v "PlanDefinition - 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain: Recommendation #2"] ; # 
  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"^^xsd:boolean] ; # 
  fhir:date [ fhir:v "2023-05-01"^^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 "Nonpharmacologic therapy and nonopioid pharmacologic therapy are preferred for chronic pain."] ; # 
  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:82423001 ;
fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
fhir:code [ fhir:v "82423001" ] ;
fhir:display [ fhir:v "Chronic 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 continue opioid therapy only if there is clinically meaningful improvement in pain and function that outweighs risks to patient safety."] ; # 
  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/OpioidCDSREC02"^^xsd:anyURI ;
fhir:link <http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC02>
  ] ) ; # 
  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 "strong" ] ;
fhir:display [ fhir:v "Strong" ]         ] )       ]     ] [
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 "moderate" ] ;
fhir:display [ fhir:v "Moderate quality" ]         ] )       ]     ] ) ;
fhir:title [ fhir:v "Current Order is for Opioid With Ambulatory Misuse Potential." ] ;
fhir:description [ fhir:v "Checking if the trigger prescription meets the inclusion criteria for recommendation #2 workflow." ] ;
    ( 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 Opioid With Ambulatory Misuse Potential." ] ;
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:dynamicValue [
fhir:path [ fhir:v "action.title" ] ;
fhir:expression [
fhir:language [ fhir:v "text/cql.identifier" ] ;
fhir:expression [ fhir:v "Get Summary" ]       ]     ] [
fhir:path [ fhir:v "action.description" ] ;
fhir:expression [
fhir:language [ fhir:v "text/cql.identifier" ] ;
fhir:expression [ fhir:v "Get Detail" ]       ]     ] [
fhir:path [ fhir:v "activity.extension" ] ;
fhir:expression [
fhir:language [ fhir:v "text/cql.identifier" ] ;
fhir:expression [ fhir:v "Get Indicator" ]       ]     ] ) ;
    ( fhir:action [
fhir:description [ fhir:v "Document - Collaborated with patient to identify treatment goals" ]     ] [
fhir:description [ fhir:v "Snooze* - Attempting alternate therapy, snooze 3 months" ]     ] [
fhir:description [ fhir:v "Order - Select alternative therapies from order select" ]     ] [
fhir:description [ fhir:v "Snooze* - N/A see comment, snooze 3 months" ]     ] [
fhir:description [ fhir:v "Remove - Will remove triggering medication order" ]     ] )
  ] ) . #