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

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

: Recommendation #10 - Urine Drug Testing (patient-view) - XML Representation

Draft as of 2024-04-22

Raw xml | Download



<PlanDefinition xmlns="http://hl7.org/fhir">
  <id value="opioidcds-10-patient-view"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition"/>
    <profile
             value="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-publishableplandefinition"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
    <table class="grid dict">
        
        <tr>
            <th scope="row"><b>Id: </b></th>
            <td style="padding-left: 4px;">opioidcds-10-patient-view</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Url: </b></th>
            <td style="padding-left: 4px;"><a href="PlanDefinition-opioidcds-10-patient-view.html">Recommendation #10 - Urine Drug Testing (patient-view)</a></td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Version: </b></th>
            <td style="padding-left: 4px;">2022.1.0</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Identifier: </b></th>
            <td style="padding-left: 4px;">
                
                
                <p style="margin-bottom: 5px;">
                    <b>value: </b> <span>cdc-opioid-guidance</span>
                </p>
                
            </td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Name: </b></th>
            <td style="padding-left: 4px;">PlanDefinition_Recommendation_10_Patient_View</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Title: </b></th>
            <td style="padding-left: 4px;">Recommendation #10 - Urine Drug Testing (patient-view)</td>
        </tr>
        
        
        
        <tr>
            <th scope="row"><b>Status: </b></th>
            <td style="padding-left: 4px;">draft</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Experimental: </b></th>
            <td style="padding-left: 4px;">true</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Type: </b></th>
            <td style="padding-left: 4px;">
                
                    
                        
                        <p style="margin-bottom: 5px;">
                            <b>system: </b> <span><a href="http://terminology.hl7.org/5.5.0/CodeSystem-plan-definition-type.html">PlanDefinitionType</a></span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>code: </b> <span>eca-rule</span>
                        </p>
                        
                        
                        <p style="margin-bottom: 5px;">
                            <b>display: </b> <span>ECA Rule</span>
                        </p>
                        
                    
                
                
            </td>
        </tr>
        
        
        
        <tr>
            <th scope="row"><b>Date: </b></th>
            <td style="padding-left: 4px;">2024-04-22</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Publisher: </b></th>
            <td style="padding-left: 4px;">Centers for Disease Control and Prevention (CDC)</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Description: </b></th>
            <td style="padding-left: 4px;">When prescribing opioids for subacute or chronic pain, clinicians should consider the benefits and risks of toxicology testing to assess for prescribed medications as well as other prescribed and nonprescribed controlled substances.</td>
        </tr>
        
        
            <tr>
                <th scope="row"><a name="effective-data-requirements"> </a><b>Logic Definitions: </b></th>
                <td style="padding-left: 4px;">
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommon</td>
                                
                                
                                    <td>Active Ambulatory Opioid Rx</td>
                                
                                
                                    <td>0</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Active Ambulatory Opioid Rx&amp;quot;:
    if Config.&amp;quot;Can the implementing EHR support queries for past medications by date range?&amp;quot; then
      (
        &amp;quot;Get MedicationRequest Medication as Code&amp;quot;(&amp;quot;Get Active Ambulatory Medication Requests&amp;quot;([MedicationRequest]))
      ) Rx
        where date from Rx.authoredOn 2 years or less on or before Today()
          and Rx.medication in &amp;quot;Opioid analgesics with ambulatory misuse potential&amp;quot;
    else
        List&amp;lt;FHIR.MedicationRequest&amp;gt;{}</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10PatientView</td>
                                
                                
                                    <td>Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions</td>
                                
                                
                                    <td>1</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&amp;quot;:
  Common.&amp;quot;Active Ambulatory Opioid Rx&amp;quot; AmbulatoryOpioidPrescription
    where Routines.&amp;quot;Is Subacute or Chronic Pain Prescription?&amp;quot;(AmbulatoryOpioidPrescription)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10PatientView</td>
                                
                                
                                    <td>Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential</td>
                                
                                
                                    <td>2</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&amp;quot;:
  exists (&amp;quot;Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSRoutines</td>
                                
                                
                                    <td>Patient Age Less Than 18</td>
                                
                                
                                    <td>3</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Patient Age Less Than 18&amp;quot;:
  if (Config.&amp;quot;Age Less than 18 Years Is Enabled&amp;quot;) then
    AgeInYearsAt(Today()) &amp;lt; 18
  else
    false</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSRoutines</td>
                                
                                
                                    <td>Condition Positive for Sickle Cell</td>
                                
                                
                                    <td>4</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Condition Positive for Sickle Cell&amp;quot;:
      if (Config.&amp;quot;Sickle Cell Check Enabled&amp;quot;) then
        exists(
            Common.&amp;quot;Positive Sickle Cell Condition&amp;quot;
        )  else
        false</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommon</td>
                                
                                
                                    <td>US Core-Categorized Conditions</td>
                                
                                
                                    <td>5</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// 3. Medications indicating end of life
    /* or exists (
      &amp;quot;Medications Indicating End of Life&amp;quot;
    ) */
define &amp;quot;US Core-Categorized Conditions&amp;quot;:
  [Condition: category in &amp;quot;Encounter Diagnosis Condition Category&amp;quot;]
    union [Condition: category in &amp;quot;Problem List Condition Category&amp;quot;]
    union [Condition: category in &amp;quot;US Core Health Concern Condition Category&amp;quot;]</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSRoutines</td>
                                
                                
                                    <td>Conditions Indicating End Of Life Present</td>
                                
                                
                                    <td>6</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Conditions Indicating End Of Life Present&amp;quot;:
  exists (
    Common.&amp;quot;US Core-Categorized Conditions&amp;quot; LLEC
      where LLEC.code in Common.&amp;quot;Limited life expectancy conditions&amp;quot;
        and LLEC.clinicalStatus in Common.&amp;quot;Active Condition&amp;quot;
  )</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSRoutines</td>
                                
                                
                                    <td>Is Active Cancer Treatment?</td>
                                
                                
                                    <td>7</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Is Active Cancer Treatment?&amp;quot;:
  if (Config.&amp;quot;Active Cancer Treatment Encounters Condition Is Enabled&amp;quot;) then
      &amp;quot;Has Two or More Encounters with Cancer Diagnosis During Encounter Period&amp;quot;
    else
      false</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSRoutines</td>
                                
                                
                                    <td>Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present</td>
                                
                                
                                    <td>8</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present&amp;quot;:
  if (Config.&amp;quot;End-Stage Disease Criteria Enabled&amp;quot;) then
    exists (
      Common.&amp;quot;US Core-Categorized Conditions&amp;quot; EOLC
        where EOLC.code in Common.&amp;quot;Conditions likely terminal for opioid prescribing&amp;quot;
          and EOLC.clinicalStatus in Common.&amp;quot;Active Condition&amp;quot;
    )
  else
    false</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSRoutines</td>
                                
                                
                                    <td>Is Opioid Review Useful?</td>
                                
                                
                                    <td>9</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Is Opioid Review Useful?&amp;quot;:
  not &amp;quot;Patient Age Less Than 18&amp;quot;
    and not &amp;quot;Condition Positive for Sickle Cell&amp;quot;
    and not &amp;quot;Conditions Indicating End Of Life Present&amp;quot;
    and not &amp;quot;Is Active Cancer Treatment?&amp;quot;
    and not &amp;quot;Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>UDS Lookback Period</td>
                                
                                
                                    <td>10</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Constants
define &amp;quot;UDS Lookback Period&amp;quot;:
  Interval[Today() - 12 months - 1 days, Today()]</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>All Opioid or Non-opioid UDS in Lookback Period</td>
                                
                                
                                    <td>11</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot;:
  (
    [Observation: Common.&amp;quot;All Drug Urine Screening&amp;quot;] Lab
      where date from Lab.effective in day of &amp;quot;UDS Lookback Period&amp;quot;
        and not (Lab.status.value in { 'unknown', 'entered-in-error', 'cancelled' })
  ) X sort by date from FHIRHelpers.ToDateTime(effective as FHIR.dateTime) desc</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Inclusion Criteria For UDS Recommendation</td>
                                
                                
                                    <td>12</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">/*
@description: Determines whether an opioid review is appropriate for the patient and whether they had a UDS performed in the past year
*/
define &amp;quot;Inclusion Criteria For UDS Recommendation&amp;quot;:
  Routines.&amp;quot;Is Opioid Review Useful?&amp;quot;
    and not exists (&amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommon</td>
                                
                                
                                    <td>Conditions Indicating End of Life or With Limited Life Expectancy</td>
                                
                                
                                    <td>13</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Conditions Indicating End of Life or With Limited Life Expectancy&amp;quot;:
  (
    &amp;quot;US Core-Categorized Conditions&amp;quot; C
      where C.code in &amp;quot;Conditions likely terminal for opioid prescribing&amp;quot;
        and C.clinicalStatus in &amp;quot;Active Condition&amp;quot;
  )
  union
  (
    &amp;quot;US Core-Categorized Conditions&amp;quot; C
      where C.code in &amp;quot;Limited life expectancy conditions&amp;quot;
        and C.clinicalStatus in &amp;quot;Active Condition&amp;quot;
  )</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommon</td>
                                
                                
                                    <td>Admitted/Referred/Discharged to Hospice Care</td>
                                
                                
                                    <td>14</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Admitted/Referred/Discharged to Hospice Care&amp;quot;:
  (
    if (Config.&amp;quot;Hospice Findings Exclusion Enabled&amp;quot;) then
      [Observation: code in &amp;quot;Hospice Finding Codes&amp;quot;] O
        where not (O.status.value in { 'unknown', 'entered-in-error', 'cancelled' })
    else
      {}
  )
  union
  (
    [Encounter] E
      where date from E.period.start 1 year or less on or before Today()
        and (
          if E.hospitalization.dischargeDisposition.coding is null
              or not exists (E.hospitalization.dischargeDisposition.coding)
            then false
          else E.hospitalization.dischargeDisposition in &amp;quot;Hospice Disposition&amp;quot;
        )
        and E.status.value in { 'planned', 'arrived', 'in-progress', 'finished', 'onleave' }
  )</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommon</td>
                                
                                
                                    <td>End of Life Assessment</td>
                                
                                
                                    <td>15</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;End of Life Assessment&amp;quot;:
    // 1. Conditions indicating end of life or with limited life expectancy
    exists (
      &amp;quot;Conditions Indicating End of Life or With Limited Life Expectancy&amp;quot;
    )
    // 2. Admitted/referred/discharged to hospice care
    or exists (
      &amp;quot;Admitted/Referred/Discharged to Hospice Care&amp;quot;
    )</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Exclusion Criteria</td>
                                
                                
                                    <td>16</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Exclusion Criteria&amp;quot;:
  Common.&amp;quot;End of Life Assessment&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10PatientView</td>
                                
                                
                                    <td>Is Perform Drug Screen Recommendation Applicable?</td>
                                
                                
                                    <td>17</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Is Perform Drug Screen Recommendation Applicable?&amp;quot;:
  &amp;quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&amp;quot;
    and Rec10Common.&amp;quot;Inclusion Criteria For UDS Recommendation&amp;quot;
    and not Rec10Common.&amp;quot;Exclusion Criteria&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Amphetamine Simple Identifier</td>
                                
                                
                                    <td>18</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Amphetamine Simple Identifier&amp;quot;: 'Amphetamine'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Amphetamine Screenings In Lookback Period</td>
                                
                                
                                    <td>19</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Amphetamines
define &amp;quot;Amphetamine Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
    where Lab.code in Common.&amp;quot;Amphetamine Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Amphetamine Screenings In Lookback Period</td>
                                
                                
                                    <td>20</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Amphetamine Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Amphetamine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Amphetamine Screenings In Lookback Period</td>
                                
                                
                                    <td>21</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Amphetamine Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Amphetamine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Rx Lookback Period</td>
                                
                                
                                    <td>22</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Rx Lookback Period&amp;quot;:
  Interval[Today() - 12 months - 31 days, Today()]</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Normalize Rx In Lookback Period</td>
                                
                                
                                    <td>23</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Normalize Rx In Lookback Period&amp;quot;:
  Common.&amp;quot;Get MedicationRequest Medication as Code&amp;quot;(
    [MedicationRequest: status in { 'active', 'completed', 'stopped' }] Rx
      where Rx.category in Common.&amp;quot;Community&amp;quot;
        and Rx.intent = 'order'
        and Rx.authoredOn.value in day of &amp;quot;Rx Lookback Period&amp;quot;
  )</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Amphetamine Rx In Lookback Period</td>
                                
                                
                                    <td>24</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Amphetamine Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
      where Rx.medication in Common.&amp;quot;Amphetamine Medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Barbiturate Simple Identifier</td>
                                
                                
                                    <td>25</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Barbiturate Simple Identifier&amp;quot;: 'Barbiturate'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Barbiturate Screenings In Lookback Period</td>
                                
                                
                                    <td>26</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Barbiturates
define &amp;quot;Barbiturate Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
    where Lab.code in Common.&amp;quot;Barbiturate Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Barbiturate Screenings In Lookback Period</td>
                                
                                
                                    <td>27</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Barbiturate Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Barbiturate Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Barbiturate Screenings In Lookback Period</td>
                                
                                
                                    <td>28</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Barbiturate Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Barbiturate Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Barbiturate Rx In Lookback Period</td>
                                
                                
                                    <td>29</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Barbiturate Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
      where Rx.medication in Common.&amp;quot;Barbiturate Medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Benzodiazepine Simple Identifier</td>
                                
                                
                                    <td>30</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Benzodiazepine Simple Identifier&amp;quot;: 'Benzodiazepine'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Benzodiazepine Screenings In Lookback Period</td>
                                
                                
                                    <td>31</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Benzodiazepines
define &amp;quot;Benzodiazepine Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
    where Lab.code in Common.&amp;quot;Benzodiazepine Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Benzodiazepine Screenings In Lookback Period</td>
                                
                                
                                    <td>32</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Benzodiazepine Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Benzodiazepine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Benzodiazepine Screenings In Lookback Period</td>
                                
                                
                                    <td>33</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Benzodiazepine Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Benzodiazepine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Benzodiazepine Rx In Lookback Period</td>
                                
                                
                                    <td>34</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Benzodiazepine Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
      where Rx.medication in Common.&amp;quot;Benzodiazepine medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Buprenorphine Simple Identifier</td>
                                
                                
                                    <td>35</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Buprenorphine Simple Identifier&amp;quot;: 'Buprenorphine'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Buprenorphine Screenings In Lookback Period</td>
                                
                                
                                    <td>36</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Buprenorphine
define &amp;quot;Buprenorphine Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
    where Lab.code in Common.&amp;quot;Buprenorphine Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Buprenorphine Screenings In Lookback Period</td>
                                
                                
                                    <td>37</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Buprenorphine Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Buprenorphine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Buprenorphine Screenings In Lookback Period</td>
                                
                                
                                    <td>38</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Buprenorphine Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Buprenorphine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Buprenorphine Rx In Lookback Period</td>
                                
                                
                                    <td>39</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Buprenorphine Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
      where Rx.medication in Common.&amp;quot;Buprenorphine Medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Cannabinoid Simple Identifier</td>
                                
                                
                                    <td>40</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Cannabinoid Simple Identifier&amp;quot;: 'Cannabinoid'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Cannabinoid Screenings In Lookback Period</td>
                                
                                
                                    <td>41</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Cannabinoids
define &amp;quot;Cannabinoid Screenings In Lookback Period&amp;quot;:
  if Config.&amp;quot;Cannabinoid Urine Screening Check Enabled&amp;quot;
    then (
      &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
        where Lab.code in Common.&amp;quot;Cannabinoid Urine Tests&amp;quot;
    ) else null</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommonConfig</td>
                                
                                
                                    <td>Cannabinoid Urine Screening Check Enabled</td>
                                
                                
                                    <td>42</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Cannabinoid Urine Screening Check Enabled&amp;quot;:
  false</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Cannabinoid Screenings In Lookback Period</td>
                                
                                
                                    <td>43</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Cannabinoid Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Cannabinoid Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Cannabinoid Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Cannabinoid Screenings In Lookback Period</td>
                                
                                
                                    <td>44</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Cannabinoid Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Cannabinoid Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Cannabinoid Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Cocaine Simple Identifier</td>
                                
                                
                                    <td>45</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Cocaine Simple Identifier&amp;quot;: 'Cocaine'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Cocaine Screenings In Lookback Period</td>
                                
                                
                                    <td>46</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Cocaine
define &amp;quot;Cocaine Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
    where Lab.code in Common.&amp;quot;Cocaine Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Cocaine Screenings In Lookback Period</td>
                                
                                
                                    <td>47</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Cocaine Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Cocaine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Cocaine Screenings In Lookback Period</td>
                                
                                
                                    <td>48</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Cocaine Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Cocaine Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Fentanyl Simple Identifier</td>
                                
                                
                                    <td>49</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Fentanyl Simple Identifier&amp;quot;: 'Fentanyl'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Fentanyl Screenings In Lookback Period</td>
                                
                                
                                    <td>50</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Fentanyl
define &amp;quot;Fentanyl Screenings In Lookback Period&amp;quot;:
  if Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;
  then (
    &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; AllLabs
      where AllLabs.code in Common.&amp;quot;Fentanyl Urine Tests&amp;quot;
  ) else null</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommonConfig</td>
                                
                                
                                    <td>Opiate Urine Screening Check Enabled</td>
                                
                                
                                    <td>51</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Recommendation 10
define &amp;quot;Opiate Urine Screening Check Enabled&amp;quot;:
  true</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Fentanyl Screenings In Lookback Period</td>
                                
                                
                                    <td>52</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Fentanyl Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Fentanyl Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Fentanyl Screenings In Lookback Period</td>
                                
                                
                                    <td>53</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Fentanyl Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Fentanyl Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Fentanyl Rx In Lookback Period</td>
                                
                                
                                    <td>54</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Fentanyl Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
    where Rx.medication in Common.&amp;quot;Fentanyl Medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Heroin Simple Identifier</td>
                                
                                
                                    <td>55</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Heroin Simple Identifier&amp;quot;: 'Heroin (6-AM)'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Heroin Screenings In Lookback Period</td>
                                
                                
                                    <td>56</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Heroin
define &amp;quot;Heroin Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
    where Lab.code in Common.&amp;quot;Heroin Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Heroin Screenings In Lookback Period</td>
                                
                                
                                    <td>57</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Heroin Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Heroin Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Heroin Screenings In Lookback Period</td>
                                
                                
                                    <td>58</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Heroin Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Heroin Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Methadone Simple Identifier</td>
                                
                                
                                    <td>59</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Methadone Simple Identifier&amp;quot;: 'Methadone'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Methadone Screenings In Lookback Period</td>
                                
                                
                                    <td>60</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Methadone
define &amp;quot;Methadone Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
    where Lab.code in Common.&amp;quot;Methadone Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Methadone Screenings In Lookback Period</td>
                                
                                
                                    <td>61</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Methadone Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Methadone Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Methadone Screenings In Lookback Period</td>
                                
                                
                                    <td>62</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Methadone Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Methadone Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Methadone Rx In Lookback Period</td>
                                
                                
                                    <td>63</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Methadone Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
      where Rx.medication in Common.&amp;quot;Methadone Medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Opiate Simple Identifier</td>
                                
                                
                                    <td>64</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Opiate Simple Identifier&amp;quot;: 'Opiate'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Opiate Screenings In Lookback Period</td>
                                
                                
                                    <td>65</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Opiates
define &amp;quot;Opiate Screenings In Lookback Period&amp;quot;:
  if Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;
    then (
      &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
        where Lab.code in Common.&amp;quot;General Opiate Urine Tests&amp;quot;
    ) else null</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Opiate Screenings In Lookback Period</td>
                                
                                
                                    <td>66</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Opiate Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Opiate Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Opiate Screenings In Lookback Period</td>
                                
                                
                                    <td>67</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Opiate Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Opiate Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Opiate Rx In Lookback Period</td>
                                
                                
                                    <td>68</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Opiate Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
      where Rx.medication in Common.&amp;quot;Opiate Medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Oxycodone Simple Identifier</td>
                                
                                
                                    <td>69</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Oxycodone Simple Identifier&amp;quot;: 'Oxycodone'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Oxycodone Screenings In Lookback Period</td>
                                
                                
                                    <td>70</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Oxycodone
define &amp;quot;Oxycodone Screenings In Lookback Period&amp;quot;:
  if Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;
    then (
      &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
        where Lab.code in Common.&amp;quot;Oxycodone Urine Tests&amp;quot;
    ) else null</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive Oxycodone Screenings In Lookback Period</td>
                                
                                
                                    <td>71</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive Oxycodone Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;Oxycodone Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative Oxycodone Screenings In Lookback Period</td>
                                
                                
                                    <td>72</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative Oxycodone Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;Oxycodone Screenings In Lookback Period&amp;quot;, Config.&amp;quot;Opiate Urine Screening Check Enabled&amp;quot;)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Oxycodone Rx In Lookback Period</td>
                                
                                
                                    <td>73</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Oxycodone Rx In Lookback Period&amp;quot;:
  &amp;quot;Normalize Rx In Lookback Period&amp;quot; Rx
      where Rx.medication in Common.&amp;quot;Oxycodone Medications&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>PCP Simple Identifier</td>
                                
                                
                                    <td>74</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;PCP Simple Identifier&amp;quot;: 'Phencyclidine (PCP)'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>PCP Screenings In Lookback Period</td>
                                
                                
                                    <td>75</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// PCP
define &amp;quot;PCP Screenings In Lookback Period&amp;quot;:
  &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; AllLabs
    where AllLabs.code in Common.&amp;quot;PCP Urine Tests&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Positive PCP Screenings In Lookback Period</td>
                                
                                
                                    <td>76</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Positive PCP Screenings In Lookback Period&amp;quot;:
  GetPositiveLabsInLookbackPeriod(&amp;quot;PCP Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Negative PCP Screenings In Lookback Period</td>
                                
                                
                                    <td>77</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Negative PCP Screenings In Lookback Period&amp;quot;:
  GetNegativeLabsInLookbackPeriod(&amp;quot;PCP Screenings In Lookback Period&amp;quot;, true)</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Unexpected Details</td>
                                
                                
                                    <td>78</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// Details Logic
define &amp;quot;Unexpected Details&amp;quot;:
  {
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Amphetamine Simple Identifier&amp;quot;, &amp;quot;Positive Amphetamine Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Amphetamine Screenings In Lookback Period&amp;quot;, &amp;quot;Amphetamine Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Barbiturate Simple Identifier&amp;quot;, &amp;quot;Positive Barbiturate Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Barbiturate Screenings In Lookback Period&amp;quot;, &amp;quot;Barbiturate Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Benzodiazepine Simple Identifier&amp;quot;, &amp;quot;Positive Benzodiazepine Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Benzodiazepine Screenings In Lookback Period&amp;quot;, &amp;quot;Benzodiazepine Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Buprenorphine Simple Identifier&amp;quot;, &amp;quot;Positive Buprenorphine Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Buprenorphine Screenings In Lookback Period&amp;quot;, &amp;quot;Buprenorphine Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &amp;quot;Cannabinoid Simple Identifier&amp;quot;, &amp;quot;Positive Cannabinoid Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Cannabinoid Screenings In Lookback Period&amp;quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &amp;quot;Cocaine Simple Identifier&amp;quot;, &amp;quot;Positive Cocaine Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Cocaine Screenings In Lookback Period&amp;quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Fentanyl Simple Identifier&amp;quot;, &amp;quot;Positive Fentanyl Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Fentanyl Screenings In Lookback Period&amp;quot;, &amp;quot;Fentanyl Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &amp;quot;Heroin Simple Identifier&amp;quot;, &amp;quot;Positive Heroin Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Heroin Screenings In Lookback Period&amp;quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Methadone Simple Identifier&amp;quot;, &amp;quot;Positive Methadone Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Methadone Screenings In Lookback Period&amp;quot;, &amp;quot;Methadone Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Opiate Simple Identifier&amp;quot;, &amp;quot;Positive Opiate Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Opiate Screenings In Lookback Period&amp;quot;, &amp;quot;Opiate Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &amp;quot;Oxycodone Simple Identifier&amp;quot;, &amp;quot;Positive Oxycodone Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative Oxycodone Screenings In Lookback Period&amp;quot;, &amp;quot;Oxycodone Rx In Lookback Period&amp;quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &amp;quot;PCP Simple Identifier&amp;quot;, &amp;quot;Positive PCP Screenings In Lookback Period&amp;quot;, 
      &amp;quot;Negative PCP Screenings In Lookback Period&amp;quot;
    )
  }</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Inclusion Criteria For Unexpected Results</td>
                                
                                
                                    <td>79</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Inclusion Criteria For Unexpected Results&amp;quot;:
  AnyTrue(
    &amp;quot;Unexpected Details&amp;quot; Details
      return (exists Details.unexpectedPosDetails) or (exists Details.unexpectedNegDetails)
  )</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10PatientView</td>
                                
                                
                                    <td>Applicable Because of Unexpected Results</td>
                                
                                
                                    <td>80</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Applicable Because of Unexpected Results&amp;quot;:
  &amp;quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&amp;quot;
    and Rec10Common.&amp;quot;Inclusion Criteria For Unexpected Results&amp;quot;
    and not Rec10Common.&amp;quot;Exclusion Criteria&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSCommon</td>
                                
                                
                                    <td>Style Header</td>
                                
                                
                                    <td>81</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Style Header&amp;quot;:
  '&amp;lt;style&amp;gt;\r\n  .alert-body {\r\n    width: 670px;\r\n    font-family: segoe-ui, sans-serif;\r\n    background-color: #FEFFF1;\r\n  }\r\n\r\n  .details-table {\r\n    border-collapse:collapse;\r\n    border-style: ridge;\r\n    background-color: #FEFFF1;\r\n    padding: 2px;\r\n  }\r\n\r\n  .details-caption {\r\n    border-style: ridge;\r\n    border-bottom: none;\r\n    background-color: #FEFFF1;\r\n    padding: 2px;\r\n  }\r\n\r\n  .details-table-header {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n  }\r\n\r\n  .details-table-cell {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n  }\r\n\r\n  .details-table-footer-cell {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n    font-size: small;\r\n  }\r\n\r\n  .details-table-cell-unexpected {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n    color: red;\r\n    font-weight: bold;\r\n  }\r\n\r\n  .more-text {\r\n    position: relative;\r\n    margin-bottom: 2em;\r\n  }\r\n  \r\n  .more {\r\n    display:none;\r\n  }\r\n\r\n  #box .show-more:checked + .more {\r\n    display:block;\r\n  }\r\n&amp;lt;\/style&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Unexpected Div Start</td>
                                
                                
                                    <td>82</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Unexpected Div Start&amp;quot;:
  '&amp;lt;div class=\&amp;quot;alert-body\&amp;quot;&amp;gt;&amp;lt;div&amp;gt;&amp;lt;p&amp;gt;Patient may have &amp;lt;strong&amp;gt;unexpected urine toxicology test results&amp;lt;\/strong&amp;gt; in the past year.&amp;lt;\/p&amp;gt;&amp;lt;\/div&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Table Start</td>
                                
                                
                                    <td>83</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Table Start&amp;quot;:
  '&amp;lt;div&amp;gt;&amp;lt;table class=\&amp;quot;details-table\&amp;quot;&amp;gt;&amp;lt;caption class=\&amp;quot;details-caption\&amp;quot;&amp;gt;Urine Toxicology Results&amp;lt;\/caption&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th class=\&amp;quot;details-table-header\&amp;quot;&amp;gt;Substance&amp;lt;\/th&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>All Lab Dates in Lookback Period</td>
                                
                                
                                    <td>84</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;All Lab Dates in Lookback Period&amp;quot;:
  (
    &amp;quot;All Opioid or Non-opioid UDS in Lookback Period&amp;quot; Lab
      return date from FHIRHelpers.ToDateTime(Lab.effective as FHIR.dateTime)
  ) X sort desc</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Table Headers</td>
                                
                                
                                    <td>85</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Table Headers&amp;quot;:
  &amp;quot;All Lab Dates in Lookback Period&amp;quot; LabDate
    return '&amp;lt;th class=\&amp;quot;details-table-header\&amp;quot;&amp;gt;' + ToString(LabDate) + '&amp;lt;\/th&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Generate Table Rows</td>
                                
                                
                                    <td>86</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Generate Table Rows&amp;quot;:
  &amp;quot;Unexpected Details&amp;quot; BOT
    let row: ToString(IndexOf(&amp;quot;Unexpected Details&amp;quot;, BOT) + 1)
    return '&amp;lt;tr&amp;gt;' + GetExpectedColumn(BOT.ingredient) + Combine(
      &amp;quot;All Lab Dates in Lookback Period&amp;quot; LabDate
        let col: ToString(IndexOf(&amp;quot;All Lab Dates in Lookback Period&amp;quot;, LabDate) + 2)
        return all (
          if BOT.unexpectedPosDetails.date contains LabDate
            then GetUnexpectedColumn('pos', row + ':' + col)
          else if BOT.unexpectedNegDetails.udsDate contains LabDate
            then GetUnexpectedColumn('neg', row + ':' + col)
          else if BOT.posDates contains LabDate
            then GetExpectedColumn('pos')
          else if BOT.negDates contains LabDate
            then GetExpectedColumn('neg')
          else GetExpectedColumn('n/a')
        )
    ) + '&amp;lt;\/tr&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Generate Footer Rows</td>
                                
                                
                                    <td>87</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Generate Footer Rows&amp;quot;:
  &amp;quot;Unexpected Details&amp;quot; BOT
      let row: ToString(IndexOf(&amp;quot;Unexpected Details&amp;quot;, BOT) + 1),
      colspan: Length(&amp;quot;All Lab Dates in Lookback Period&amp;quot;) + 1
      return Combine(
        &amp;quot;All Lab Dates in Lookback Period&amp;quot; LabDate
          let col: ToString(IndexOf(&amp;quot;All Lab Dates in Lookback Period&amp;quot;, LabDate) + 2)
          return all (
            if BOT.unexpectedPosDetails.date contains LabDate
              then singleton from (
                BOT.unexpectedPosDetails PosDetail
                  where PosDetail.date = LabDate
                    return '&amp;lt;tr&amp;gt;' + GetFooterColumn(colspan, row + ':' + col + ' - Possible unprescribed substance found: ' + PosDetail.udsDetail) + '&amp;lt;\/tr&amp;gt;'
              )
            else if BOT.unexpectedNegDetails.udsDate contains LabDate
              then singleton from (
                BOT.unexpectedNegDetails NegDetail
                  where NegDetail.udsDate = LabDate
                    return '&amp;lt;tr&amp;gt;' + GetFooterColumn(colspan, row + ':' + col + ' - Possible unexpected negative result found: prescribed ' + NegDetail.rxDetail + ' on ' + ToString(NegDetail.rxDate)) + '&amp;lt;\/tr&amp;gt;'
              )
            else ''
          )
      )</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Table End</td>
                                
                                
                                    <td>88</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Table End&amp;quot;:
  '&amp;lt;\/table&amp;gt;&amp;lt;\/div&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Details Table</td>
                                
                                
                                    <td>89</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Details Table&amp;quot;: 
  &amp;quot;Table Start&amp;quot; + Combine(&amp;quot;Table Headers&amp;quot;) 
    + '&amp;lt;tbody&amp;gt;' + Combine(&amp;quot;Generate Table Rows&amp;quot;) + '&amp;lt;/tbody&amp;gt;' 
    + '&amp;lt;tfoot&amp;gt;' + Combine(&amp;quot;Generate Footer Rows&amp;quot;) + '&amp;lt;\/tfoot&amp;gt;' 
  + &amp;quot;Table End&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Details More Info</td>
                                
                                
                                    <td>90</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Details More Info&amp;quot;:
  '&amp;lt;div id=\&amp;quot;box\&amp;quot;&amp;gt;\r\n  &amp;lt;p&amp;gt;Note on false positives and unexpected negative results...&amp;lt;\/p&amp;gt;\r\n  &amp;lt;input type=\&amp;quot;checkbox\&amp;quot; class=\&amp;quot;show-more\&amp;quot;&amp;gt; Show more\r\n  &amp;lt;div class=\&amp;quot;more\&amp;quot;&amp;gt;\r\n  &amp;lt;p&amp;gt;Positive results may be a false positives or could represent occasional use or possible substance use disorder.&amp;lt;br\/&amp;gt;&amp;lt;br\/&amp;gt;For a review regarding interpreting possible false positive urine toxicology results, see &amp;lt;a target=\&amp;quot;_blank\&amp;quot; href=\&amp;quot;https:\/\/pubmed.ncbi.nlm.nih.gov\/24986836\&amp;quot;&amp;gt;http:\/\/pubmed.ncbi.nlm.nih.gov\/24986836&amp;lt;\/a&amp;gt;. It is unknown if the findings reported in this article can be extrapolated to other laboratory analyzers that were not used in the referenced studies.&amp;lt;br\/&amp;gt;&amp;lt;br\/&amp;gt;For guidance regarding evaluating and addressing unexpected toxicology tests results, see &amp;lt;a target=\&amp;quot;_blank\&amp;quot; href=\&amp;quot;https:\/\/www.cdc.gov\/mmwr\/volumes\/71\/rr\/rr7103a1.htm#Recommendation10\&amp;quot;&amp;gt;Recommendation 10 of the 22 CDC Clinical Practice Guideiline&amp;lt;\/a&amp;gt;.&amp;lt;\/p&amp;gt;\r\n  &amp;lt;p&amp;gt;An unexpectedly negative test may be due to diversion, intermittent use, aberrant drug use behavior, or other factors, including a false negative result. Clinicians should interpret this result in the context of the overall treatment plan.&amp;lt;\/p&amp;gt;\r\n  &amp;lt;\/div&amp;gt;\r\n&amp;lt;\/div&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Div End</td>
                                
                                
                                    <td>91</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Div End&amp;quot;: '&amp;lt;\/div&amp;gt;'</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10Common</td>
                                
                                
                                    <td>Get HTML Details</td>
                                
                                
                                    <td>92</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">// HTML Generation
define &amp;quot;Get HTML Details&amp;quot;:
  Common.&amp;quot;Style Header&amp;quot; + &amp;quot;Unexpected Div Start&amp;quot; + &amp;quot;Details Table&amp;quot; + &amp;quot;Details More Info&amp;quot; + &amp;quot;Div End&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                        <table class="grid-dict">
                            <tr><th><b>Library Name</b></th><th><b>Name</b></th><th><b>sequence</b></th></tr>
                            <tr>
                                
                                    <td>OpioidCDSREC10PatientView</td>
                                
                                
                                    <td>Detail</td>
                                
                                
                                    <td>93</td>
                                
                            </tr>
                        </table>
                        
                            <pre><code class="language-cql">define &amp;quot;Detail&amp;quot;:
  Rec10Common.&amp;quot;Get HTML Details&amp;quot;</code></pre>
                        
                        <br/><br/>
                    
                </td>
            </tr>
        
        
        <tr>
          <th scope="row"><b>Knowledge Capability: </b></th>
          <td style="padding-left: 4px;">
            shareable computable executable publishable 
          </td>
        </tr>
        
        
        
        <tr>
            <th scope="row"><b>Use Context: </b></th>
            <td style="padding-left: 4px;">
                <table class="grid-dict">
                    <tr><th><b>code</b></th><th><b>value</b></th><th><b>display</b></th></tr>
                    
                      <tr>
                        <td>focus</td>
                        <td>82423001</td>
                        <td>Chronic pain (finding)</td>
                      </tr>
                    
                      <tr>
                        <td>focus</td>
                        <td/>
                        <td/>
                      </tr>
                    
                </table>
            </td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Jurisdiction: </b></th>
            <td style="padding-left: 4px;">US</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Purpose: </b></th>
            <td style="padding-left: 4px;"><div><p>The 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain is intended to improve communication between clinicians and patients about the benefits and risks of pain treatments, including opioid therapy; improve the effectiveness and safety of pain treatment; mitigate pain; improve function and quality of life for patients with pain; and reduce risks associated with opioid pain therapy, including opioid use disorder, overdose, and death. The recommendations do not apply to pain related to sickle cell disease or cancer or to patients receiving palliative or end-of-life care.</p>
</div></td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Usage: </b></th>
            <td style="padding-left: 4px;">Before starting opioids and periodically (at least annually) during opioid therapy, clinicians should consider the benefits and risks of toxicology testing to assess for prescribed opioids and other prescription and nonprescription controlled substances that increase risk for overdose when combined with opioids, including nonprescribed and illicit opioids and benzodiazepines.</td>
        </tr>
        
        
        <tr>
            <th scope="row"><b>Copyright: </b></th>
            <td style="padding-left: 4px;"><div><p>© CDC 2016+.</p>
</div></td>
        </tr>
        
        
        
        
        
        
        <tr>
          <th scope="row"><b>Related Artifacts: </b></th>
          <td style="padding-left: 4px;">
            
            <p><b>Documentation</b></p>
            <ul>
              
                  <li>
                    <a href="https://www.cdc.gov/mmwr/volumes/71/rr/pdfs/rr7103a1-H.pdf"> 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain</a>
                  </li>
              
            </ul>
            
            
            
            
            
            
            
          </td>
        </tr>
        

        
        <tr>
          <th scope="row"><b>Libraries: </b></th>
          <td style="padding-left: 4px;">
            <table class="grid-dict">
              
                <tr><td><a href="Library-OpioidCDSREC10PatientView.html">Library - Recommendation #10 Patient View - Urine Drug Testing</a></td></tr>
              
            </table>
          </td>
        </tr>
        

        
        <tr>
          <th scope="row"><b>Actions: </b></th>
          <td style="padding-left: 4px;">
            <table class="grid-dict">
              
                <tr>
                  <td>
                    <b>1. Consider the Benefits and Risks of Conducting a Urine Toxicology Screen:</b> Consider the benefits and risks of toxicology testing to assess for prescribed medications as well as other prescribed and nonprescribed controlled substances.

For guidance regarding utilizing toxicology tests when prescribing opioids, see [Recommendation 10 of the 2022 CDC Clinical Practice Guideline](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=evidence%20type%3A%204).-,Implementation%20Considerations,-Toxicology%20testing%20should).<br/>
                    <b>When:</b> <i>named-event:</i> patient-view<br/>
                    <b>If:</b> <i>applicability:</i> Patient has not had a urine screening in the past 12 months <i>(Is Perform Drug Screen Recommendation Applicable?)</i><br/>
                    <b>Then:</b>
                    
                      <table class="grid-dict">
                        
                          <tr>
                            <td>
                              <b> :</b> Document - Ordered toxicology screen<br/>
                              
                              
                              <b>Then:</b>
                              
                                
                                
                              
                            </td>
                          </tr>
                        
                          <tr>
                            <td>
                              <b> :</b> Document - Risks outweigh benefits<br/>
                              
                              
                              <b>Then:</b>
                              
                                
                                
                              
                            </td>
                          </tr>
                        
                          <tr>
                            <td>
                              <b> :</b> Snooze* - N/A see comment, snooze 3 months<br/>
                              
                              
                              <b>Then:</b>
                              
                                
                                
                              
                            </td>
                          </tr>
                        
                      </table>
                    
                  </td>
                </tr>
              
                <tr>
                  <td>
                    <b>2. Patient May Have Unexpected Toxicology Test Results:</b> Patient may have unexpected urine toxicology test results in the past year<br/>
                    <b>When:</b> <i>named-event:</i> patient-view<br/>
                    <b>If:</b> <i>applicability:</i> Urine screening tested positive for cocaine, opiates or PCP <i>(Applicable Because of Unexpected Results)</i><br/>
                    <b>Then:</b>
                    
                      <table class="grid-dict">
                        
                          <tr>
                            <td>
                              <b> :</b> Document - Will repeat urine drug screen more frequently<br/>
                              
                              
                              <b>Then:</b>
                              
                                
                                
                              
                            </td>
                          </tr>
                        
                          <tr>
                            <td>
                              <b> :</b> Document - Will assess patient for substance use disorder<br/>
                              
                              
                              <b>Then:</b>
                              
                                
                                
                              
                            </td>
                          </tr>
                        
                          <tr>
                            <td>
                              <b> :</b> Snooze* - Patient's test results were expected, snooze for 3 months<br/>
                              
                              
                              <b>Then:</b>
                              
                                
                                
                              
                            </td>
                          </tr>
                        
                          <tr>
                            <td>
                              <b> :</b> Snooze* - N/A snooze for 3 months<br/>
                              
                              
                              <b>Then:</b>
                              
                                
                                
                              
                            </td>
                          </tr>
                        
                      </table>
                    
                  </td>
                </tr>
              
            </table>
          </td>
        </tr>
        
    </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Common"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon|2022.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Routines"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines|2022.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Rec10Common"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC10Common|2022.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Routines"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines|2022.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Config"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig|2022.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Encounter Diagnosis Condition Category"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-encounter-diagnosis-category"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Problem List Condition Category"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-problem-list-category"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set US Core Health Concern Condition Category"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-us-core-health-concern-category"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Limited life expectancy conditions"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/limited-life-expectancy-conditions"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Active Condition"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-clinical-status-active"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set All Drug Urine Screening"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Conditions likely terminal for opioid prescribing"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/conditions-likely-terminal-for-opioid-prescribing"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Amphetamine Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/amphetamine-drug-urine-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Community"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/medicationrequest-category-community"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Amphetamine Medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/amphetamines-class-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Barbiturate Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/barbiturate-drug-urine-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Barbiturate Medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/barbiturate-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Benzodiazepine Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/benzodiazepine-drug-urine-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Benzodiazepine medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/benzodiazepine-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Buprenorphine Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/buprenorphine-drug-urine-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Buprenorphine Medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/buprenorphine-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Cocaine Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/cocaine-urine-drug-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Fentanyl Medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/fentanyl-type-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Heroin Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/heroin-drug-urine-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Methadone Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/methadone-drug-urine-screening-tests"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Methadone Medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/methadone-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Opiate Medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/non-synthetic-opioid-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Oxycodone Medications"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/oxycodone-medications"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set PCP Urine Tests"/>
        <resource
                  value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/phencyclidine-urine-drug-screening-tests"/>
      </relatedArtifact>
      <parameter>
        <name value="Is Perform Drug Screen Recommendation Applicable?"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Applicable Because of Unexpected Results"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Detail"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="category"/>
        <codeFilter>
          <path value="category"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-encounter-diagnosis-category"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="category"/>
        <codeFilter>
          <path value="category"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-problem-list-category"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="category"/>
        <codeFilter>
          <path value="category"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/condition-us-core-health-concern-category"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="period"/>
        <mustSupport value="period.start"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="id"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/cdc/opioid-cds/ValueSet/all-urine-drug-screening-tests"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="status"/>
        <mustSupport value="category"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
          <code>
            <code value="completed"/>
          </code>
          <code>
            <code value="stopped"/>
          </code>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability">
    <valueCode value="shareable"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability">
    <valueCode value="computable"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability">
    <valueCode value="executable"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability">
    <valueCode value="publishable"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
    <valueReference>🔗 
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <extension
             url="http://fhir.org/guides/cdc/opioid-cds/StructureDefinition/effectiveDataRequirements" id="effective-data-requirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommon"/>
    </extension>
    <extension url="name">
      <valueString value="Active Ambulatory Opioid Rx"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Active Ambulatory Opioid Rx&quot;:
    if Config.&quot;Can the implementing EHR support queries for past medications by date range?&quot; then
      (
        &quot;Get MedicationRequest Medication as Code&quot;(&quot;Get Active Ambulatory Medication Requests&quot;([MedicationRequest]))
      ) Rx
        where date from Rx.authoredOn 2 years or less on or before Today()
          and Rx.medication in &quot;Opioid analgesics with ambulatory misuse potential&quot;
    else
        List&lt;FHIR.MedicationRequest&gt;{}"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="0"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10PatientView"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&quot;:
  Common.&quot;Active Ambulatory Opioid Rx&quot; AmbulatoryOpioidPrescription
    where Routines.&quot;Is Subacute or Chronic Pain Prescription?&quot;(AmbulatoryOpioidPrescription)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="1"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10PatientView"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&quot;:
  exists (&quot;Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="2"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSRoutines"/>
    </extension>
    <extension url="name">
      <valueString value="Patient Age Less Than 18"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Patient Age Less Than 18&quot;:
  if (Config.&quot;Age Less than 18 Years Is Enabled&quot;) then
    AgeInYearsAt(Today()) &lt; 18
  else
    false"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="3"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSRoutines"/>
    </extension>
    <extension url="name">
      <valueString value="Condition Positive for Sickle Cell"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Condition Positive for Sickle Cell&quot;:
      if (Config.&quot;Sickle Cell Check Enabled&quot;) then
        exists(
            Common.&quot;Positive Sickle Cell Condition&quot;
        )  else
        false"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="4"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommon"/>
    </extension>
    <extension url="name">
      <valueString value="US Core-Categorized Conditions"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// 3. Medications indicating end of life
    /* or exists (
      &quot;Medications Indicating End of Life&quot;
    ) */
define &quot;US Core-Categorized Conditions&quot;:
  [Condition: category in &quot;Encounter Diagnosis Condition Category&quot;]
    union [Condition: category in &quot;Problem List Condition Category&quot;]
    union [Condition: category in &quot;US Core Health Concern Condition Category&quot;]"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="5"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSRoutines"/>
    </extension>
    <extension url="name">
      <valueString value="Conditions Indicating End Of Life Present"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Conditions Indicating End Of Life Present&quot;:
  exists (
    Common.&quot;US Core-Categorized Conditions&quot; LLEC
      where LLEC.code in Common.&quot;Limited life expectancy conditions&quot;
        and LLEC.clinicalStatus in Common.&quot;Active Condition&quot;
  )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="6"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSRoutines"/>
    </extension>
    <extension url="name">
      <valueString value="Is Active Cancer Treatment?"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Is Active Cancer Treatment?&quot;:
  if (Config.&quot;Active Cancer Treatment Encounters Condition Is Enabled&quot;) then
      &quot;Has Two or More Encounters with Cancer Diagnosis During Encounter Period&quot;
    else
      false"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="7"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSRoutines"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present&quot;:
  if (Config.&quot;End-Stage Disease Criteria Enabled&quot;) then
    exists (
      Common.&quot;US Core-Categorized Conditions&quot; EOLC
        where EOLC.code in Common.&quot;Conditions likely terminal for opioid prescribing&quot;
          and EOLC.clinicalStatus in Common.&quot;Active Condition&quot;
    )
  else
    false"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="8"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSRoutines"/>
    </extension>
    <extension url="name">
      <valueString value="Is Opioid Review Useful?"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Is Opioid Review Useful?&quot;:
  not &quot;Patient Age Less Than 18&quot;
    and not &quot;Condition Positive for Sickle Cell&quot;
    and not &quot;Conditions Indicating End Of Life Present&quot;
    and not &quot;Is Active Cancer Treatment?&quot;
    and not &quot;Conditions Including Cancer To Exclude Opioid Management Indicating End-Stage Disease Present&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="9"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="UDS Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Constants
define &quot;UDS Lookback Period&quot;:
  Interval[Today() - 12 months - 1 days, Today()]"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="10"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="All Opioid or Non-opioid UDS in Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;All Opioid or Non-opioid UDS in Lookback Period&quot;:
  (
    [Observation: Common.&quot;All Drug Urine Screening&quot;] Lab
      where date from Lab.effective in day of &quot;UDS Lookback Period&quot;
        and not (Lab.status.value in { 'unknown', 'entered-in-error', 'cancelled' })
  ) X sort by date from FHIRHelpers.ToDateTime(effective as FHIR.dateTime) desc"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="11"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Inclusion Criteria For UDS Recommendation"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="/*
@description: Determines whether an opioid review is appropriate for the patient and whether they had a UDS performed in the past year
*/
define &quot;Inclusion Criteria For UDS Recommendation&quot;:
  Routines.&quot;Is Opioid Review Useful?&quot;
    and not exists (&quot;All Opioid or Non-opioid UDS in Lookback Period&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="12"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommon"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Conditions Indicating End of Life or With Limited Life Expectancy"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Conditions Indicating End of Life or With Limited Life Expectancy&quot;:
  (
    &quot;US Core-Categorized Conditions&quot; C
      where C.code in &quot;Conditions likely terminal for opioid prescribing&quot;
        and C.clinicalStatus in &quot;Active Condition&quot;
  )
  union
  (
    &quot;US Core-Categorized Conditions&quot; C
      where C.code in &quot;Limited life expectancy conditions&quot;
        and C.clinicalStatus in &quot;Active Condition&quot;
  )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="13"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommon"/>
    </extension>
    <extension url="name">
      <valueString value="Admitted/Referred/Discharged to Hospice Care"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Admitted/Referred/Discharged to Hospice Care&quot;:
  (
    if (Config.&quot;Hospice Findings Exclusion Enabled&quot;) then
      [Observation: code in &quot;Hospice Finding Codes&quot;] O
        where not (O.status.value in { 'unknown', 'entered-in-error', 'cancelled' })
    else
      {}
  )
  union
  (
    [Encounter] E
      where date from E.period.start 1 year or less on or before Today()
        and (
          if E.hospitalization.dischargeDisposition.coding is null
              or not exists (E.hospitalization.dischargeDisposition.coding)
            then false
          else E.hospitalization.dischargeDisposition in &quot;Hospice Disposition&quot;
        )
        and E.status.value in { 'planned', 'arrived', 'in-progress', 'finished', 'onleave' }
  )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="14"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommon"/>
    </extension>
    <extension url="name">
      <valueString value="End of Life Assessment"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;End of Life Assessment&quot;:
    // 1. Conditions indicating end of life or with limited life expectancy
    exists (
      &quot;Conditions Indicating End of Life or With Limited Life Expectancy&quot;
    )
    // 2. Admitted/referred/discharged to hospice care
    or exists (
      &quot;Admitted/Referred/Discharged to Hospice Care&quot;
    )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="15"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Exclusion Criteria"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Exclusion Criteria&quot;:
  Common.&quot;End of Life Assessment&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="16"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10PatientView"/>
    </extension>
    <extension url="name">
      <valueString value="Is Perform Drug Screen Recommendation Applicable?"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Is Perform Drug Screen Recommendation Applicable?&quot;:
  &quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&quot;
    and Rec10Common.&quot;Inclusion Criteria For UDS Recommendation&quot;
    and not Rec10Common.&quot;Exclusion Criteria&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="17"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Amphetamine Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Amphetamine Simple Identifier&quot;: 'Amphetamine'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="18"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Amphetamine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Amphetamines
define &quot;Amphetamine Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
    where Lab.code in Common.&quot;Amphetamine Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="19"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Positive Amphetamine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Amphetamine Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Amphetamine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="20"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Negative Amphetamine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Amphetamine Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Amphetamine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="21"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Rx Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Rx Lookback Period&quot;:
  Interval[Today() - 12 months - 31 days, Today()]"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="22"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Normalize Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Normalize Rx In Lookback Period&quot;:
  Common.&quot;Get MedicationRequest Medication as Code&quot;(
    [MedicationRequest: status in { 'active', 'completed', 'stopped' }] Rx
      where Rx.category in Common.&quot;Community&quot;
        and Rx.intent = 'order'
        and Rx.authoredOn.value in day of &quot;Rx Lookback Period&quot;
  )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="23"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Amphetamine Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Amphetamine Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
      where Rx.medication in Common.&quot;Amphetamine Medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="24"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Barbiturate Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Barbiturate Simple Identifier&quot;: 'Barbiturate'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="25"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Barbiturate Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Barbiturates
define &quot;Barbiturate Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
    where Lab.code in Common.&quot;Barbiturate Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="26"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Positive Barbiturate Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Barbiturate Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Barbiturate Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="27"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Negative Barbiturate Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Barbiturate Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Barbiturate Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="28"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Barbiturate Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Barbiturate Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
      where Rx.medication in Common.&quot;Barbiturate Medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="29"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Benzodiazepine Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Benzodiazepine Simple Identifier&quot;: 'Benzodiazepine'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="30"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Benzodiazepine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Benzodiazepines
define &quot;Benzodiazepine Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
    where Lab.code in Common.&quot;Benzodiazepine Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="31"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Positive Benzodiazepine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Benzodiazepine Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Benzodiazepine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="32"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Negative Benzodiazepine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Benzodiazepine Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Benzodiazepine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="33"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Benzodiazepine Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Benzodiazepine Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
      where Rx.medication in Common.&quot;Benzodiazepine medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="34"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Buprenorphine Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Buprenorphine Simple Identifier&quot;: 'Buprenorphine'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="35"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Buprenorphine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Buprenorphine
define &quot;Buprenorphine Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
    where Lab.code in Common.&quot;Buprenorphine Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="36"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Positive Buprenorphine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Buprenorphine Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Buprenorphine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="37"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Negative Buprenorphine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Buprenorphine Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Buprenorphine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="38"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Buprenorphine Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Buprenorphine Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
      where Rx.medication in Common.&quot;Buprenorphine Medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="39"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Cannabinoid Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Cannabinoid Simple Identifier&quot;: 'Cannabinoid'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="40"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Cannabinoid Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Cannabinoids
define &quot;Cannabinoid Screenings In Lookback Period&quot;:
  if Config.&quot;Cannabinoid Urine Screening Check Enabled&quot;
    then (
      &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
        where Lab.code in Common.&quot;Cannabinoid Urine Tests&quot;
    ) else null"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="41"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommonConfig"/>
    </extension>
    <extension url="name">
      <valueString value="Cannabinoid Urine Screening Check Enabled"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Cannabinoid Urine Screening Check Enabled&quot;:
  false"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="42"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Positive Cannabinoid Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Cannabinoid Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Cannabinoid Screenings In Lookback Period&quot;, Config.&quot;Cannabinoid Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="43"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString
                   value="Negative Cannabinoid Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Cannabinoid Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Cannabinoid Screenings In Lookback Period&quot;, Config.&quot;Cannabinoid Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="44"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Cocaine Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Cocaine Simple Identifier&quot;: 'Cocaine'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="45"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Cocaine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Cocaine
define &quot;Cocaine Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
    where Lab.code in Common.&quot;Cocaine Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="46"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Positive Cocaine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Cocaine Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Cocaine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="47"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Negative Cocaine Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Cocaine Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Cocaine Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="48"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Fentanyl Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Fentanyl Simple Identifier&quot;: 'Fentanyl'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="49"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Fentanyl Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Fentanyl
define &quot;Fentanyl Screenings In Lookback Period&quot;:
  if Config.&quot;Opiate Urine Screening Check Enabled&quot;
  then (
    &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; AllLabs
      where AllLabs.code in Common.&quot;Fentanyl Urine Tests&quot;
  ) else null"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="50"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommonConfig"/>
    </extension>
    <extension url="name">
      <valueString value="Opiate Urine Screening Check Enabled"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Recommendation 10
define &quot;Opiate Urine Screening Check Enabled&quot;:
  true"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="51"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Positive Fentanyl Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Fentanyl Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Fentanyl Screenings In Lookback Period&quot;, Config.&quot;Opiate Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="52"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Negative Fentanyl Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Fentanyl Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Fentanyl Screenings In Lookback Period&quot;, Config.&quot;Opiate Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="53"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Fentanyl Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Fentanyl Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
    where Rx.medication in Common.&quot;Fentanyl Medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="54"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Heroin Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Heroin Simple Identifier&quot;: 'Heroin (6-AM)'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="55"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Heroin Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Heroin
define &quot;Heroin Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
    where Lab.code in Common.&quot;Heroin Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="56"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Positive Heroin Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Heroin Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Heroin Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="57"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Negative Heroin Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Heroin Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Heroin Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="58"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Methadone Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Methadone Simple Identifier&quot;: 'Methadone'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="59"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Methadone Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Methadone
define &quot;Methadone Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
    where Lab.code in Common.&quot;Methadone Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="60"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Positive Methadone Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Methadone Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Methadone Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="61"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Negative Methadone Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Methadone Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Methadone Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="62"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Methadone Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Methadone Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
      where Rx.medication in Common.&quot;Methadone Medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="63"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Opiate Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Opiate Simple Identifier&quot;: 'Opiate'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="64"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Opiate Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Opiates
define &quot;Opiate Screenings In Lookback Period&quot;:
  if Config.&quot;Opiate Urine Screening Check Enabled&quot;
    then (
      &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
        where Lab.code in Common.&quot;General Opiate Urine Tests&quot;
    ) else null"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="65"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Positive Opiate Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Opiate Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Opiate Screenings In Lookback Period&quot;, Config.&quot;Opiate Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="66"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Negative Opiate Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Opiate Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Opiate Screenings In Lookback Period&quot;, Config.&quot;Opiate Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="67"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Opiate Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Opiate Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
      where Rx.medication in Common.&quot;Opiate Medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="68"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Oxycodone Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Oxycodone Simple Identifier&quot;: 'Oxycodone'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="69"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Oxycodone Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Oxycodone
define &quot;Oxycodone Screenings In Lookback Period&quot;:
  if Config.&quot;Opiate Urine Screening Check Enabled&quot;
    then (
      &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
        where Lab.code in Common.&quot;Oxycodone Urine Tests&quot;
    ) else null"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="70"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Positive Oxycodone Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive Oxycodone Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;Oxycodone Screenings In Lookback Period&quot;, Config.&quot;Opiate Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="71"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Negative Oxycodone Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative Oxycodone Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;Oxycodone Screenings In Lookback Period&quot;, Config.&quot;Opiate Urine Screening Check Enabled&quot;)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="72"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Oxycodone Rx In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Oxycodone Rx In Lookback Period&quot;:
  &quot;Normalize Rx In Lookback Period&quot; Rx
      where Rx.medication in Common.&quot;Oxycodone Medications&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="73"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="PCP Simple Identifier"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;PCP Simple Identifier&quot;: 'Phencyclidine (PCP)'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="74"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="PCP Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// PCP
define &quot;PCP Screenings In Lookback Period&quot;:
  &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; AllLabs
    where AllLabs.code in Common.&quot;PCP Urine Tests&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="75"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Positive PCP Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Positive PCP Screenings In Lookback Period&quot;:
  GetPositiveLabsInLookbackPeriod(&quot;PCP Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="76"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Negative PCP Screenings In Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Negative PCP Screenings In Lookback Period&quot;:
  GetNegativeLabsInLookbackPeriod(&quot;PCP Screenings In Lookback Period&quot;, true)"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="77"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Unexpected Details"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// Details Logic
define &quot;Unexpected Details&quot;:
  {
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Amphetamine Simple Identifier&quot;, &quot;Positive Amphetamine Screenings In Lookback Period&quot;, 
      &quot;Negative Amphetamine Screenings In Lookback Period&quot;, &quot;Amphetamine Rx In Lookback Period&quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Barbiturate Simple Identifier&quot;, &quot;Positive Barbiturate Screenings In Lookback Period&quot;, 
      &quot;Negative Barbiturate Screenings In Lookback Period&quot;, &quot;Barbiturate Rx In Lookback Period&quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Benzodiazepine Simple Identifier&quot;, &quot;Positive Benzodiazepine Screenings In Lookback Period&quot;, 
      &quot;Negative Benzodiazepine Screenings In Lookback Period&quot;, &quot;Benzodiazepine Rx In Lookback Period&quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Buprenorphine Simple Identifier&quot;, &quot;Positive Buprenorphine Screenings In Lookback Period&quot;, 
      &quot;Negative Buprenorphine Screenings In Lookback Period&quot;, &quot;Buprenorphine Rx In Lookback Period&quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &quot;Cannabinoid Simple Identifier&quot;, &quot;Positive Cannabinoid Screenings In Lookback Period&quot;, 
      &quot;Negative Cannabinoid Screenings In Lookback Period&quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &quot;Cocaine Simple Identifier&quot;, &quot;Positive Cocaine Screenings In Lookback Period&quot;, 
      &quot;Negative Cocaine Screenings In Lookback Period&quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Fentanyl Simple Identifier&quot;, &quot;Positive Fentanyl Screenings In Lookback Period&quot;, 
      &quot;Negative Fentanyl Screenings In Lookback Period&quot;, &quot;Fentanyl Rx In Lookback Period&quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &quot;Heroin Simple Identifier&quot;, &quot;Positive Heroin Screenings In Lookback Period&quot;, 
      &quot;Negative Heroin Screenings In Lookback Period&quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Methadone Simple Identifier&quot;, &quot;Positive Methadone Screenings In Lookback Period&quot;, 
      &quot;Negative Methadone Screenings In Lookback Period&quot;, &quot;Methadone Rx In Lookback Period&quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Opiate Simple Identifier&quot;, &quot;Positive Opiate Screenings In Lookback Period&quot;, 
      &quot;Negative Opiate Screenings In Lookback Period&quot;, &quot;Opiate Rx In Lookback Period&quot;
    ),
    CreateDetailWithPossibleUnexpectedNegative(
      &quot;Oxycodone Simple Identifier&quot;, &quot;Positive Oxycodone Screenings In Lookback Period&quot;, 
      &quot;Negative Oxycodone Screenings In Lookback Period&quot;, &quot;Oxycodone Rx In Lookback Period&quot;
    ),
    CreateDetailWithoutPossibleUnexpectedNegative(
      &quot;PCP Simple Identifier&quot;, &quot;Positive PCP Screenings In Lookback Period&quot;, 
      &quot;Negative PCP Screenings In Lookback Period&quot;
    )
  }"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="78"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Inclusion Criteria For Unexpected Results"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Inclusion Criteria For Unexpected Results&quot;:
  AnyTrue(
    &quot;Unexpected Details&quot; Details
      return (exists Details.unexpectedPosDetails) or (exists Details.unexpectedNegDetails)
  )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="79"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10PatientView"/>
    </extension>
    <extension url="name">
      <valueString value="Applicable Because of Unexpected Results"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Applicable Because of Unexpected Results&quot;:
  &quot;Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential&quot;
    and Rec10Common.&quot;Inclusion Criteria For Unexpected Results&quot;
    and not Rec10Common.&quot;Exclusion Criteria&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="80"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSCommon"/>
    </extension>
    <extension url="name">
      <valueString value="Style Header"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Style Header&quot;:
  '&lt;style&gt;\r\n  .alert-body {\r\n    width: 670px;\r\n    font-family: segoe-ui, sans-serif;\r\n    background-color: #FEFFF1;\r\n  }\r\n\r\n  .details-table {\r\n    border-collapse:collapse;\r\n    border-style: ridge;\r\n    background-color: #FEFFF1;\r\n    padding: 2px;\r\n  }\r\n\r\n  .details-caption {\r\n    border-style: ridge;\r\n    border-bottom: none;\r\n    background-color: #FEFFF1;\r\n    padding: 2px;\r\n  }\r\n\r\n  .details-table-header {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n  }\r\n\r\n  .details-table-cell {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n  }\r\n\r\n  .details-table-footer-cell {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n    font-size: small;\r\n  }\r\n\r\n  .details-table-cell-unexpected {\r\n    border-style: ridge;\r\n    padding: 5px;\r\n    color: red;\r\n    font-weight: bold;\r\n  }\r\n\r\n  .more-text {\r\n    position: relative;\r\n    margin-bottom: 2em;\r\n  }\r\n  \r\n  .more {\r\n    display:none;\r\n  }\r\n\r\n  #box .show-more:checked + .more {\r\n    display:block;\r\n  }\r\n&lt;\/style&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="81"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Unexpected Div Start"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Unexpected Div Start&quot;:
  '&lt;div class=\&quot;alert-body\&quot;&gt;&lt;div&gt;&lt;p&gt;Patient may have &lt;strong&gt;unexpected urine toxicology test results&lt;\/strong&gt; in the past year.&lt;\/p&gt;&lt;\/div&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="82"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Table Start"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Table Start&quot;:
  '&lt;div&gt;&lt;table class=\&quot;details-table\&quot;&gt;&lt;caption class=\&quot;details-caption\&quot;&gt;Urine Toxicology Results&lt;\/caption&gt;&lt;tr&gt;&lt;th class=\&quot;details-table-header\&quot;&gt;Substance&lt;\/th&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="83"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="All Lab Dates in Lookback Period"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;All Lab Dates in Lookback Period&quot;:
  (
    &quot;All Opioid or Non-opioid UDS in Lookback Period&quot; Lab
      return date from FHIRHelpers.ToDateTime(Lab.effective as FHIR.dateTime)
  ) X sort desc"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="84"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Table Headers"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Table Headers&quot;:
  &quot;All Lab Dates in Lookback Period&quot; LabDate
    return '&lt;th class=\&quot;details-table-header\&quot;&gt;' + ToString(LabDate) + '&lt;\/th&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="85"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Generate Table Rows"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Generate Table Rows&quot;:
  &quot;Unexpected Details&quot; BOT
    let row: ToString(IndexOf(&quot;Unexpected Details&quot;, BOT) + 1)
    return '&lt;tr&gt;' + GetExpectedColumn(BOT.ingredient) + Combine(
      &quot;All Lab Dates in Lookback Period&quot; LabDate
        let col: ToString(IndexOf(&quot;All Lab Dates in Lookback Period&quot;, LabDate) + 2)
        return all (
          if BOT.unexpectedPosDetails.date contains LabDate
            then GetUnexpectedColumn('pos', row + ':' + col)
          else if BOT.unexpectedNegDetails.udsDate contains LabDate
            then GetUnexpectedColumn('neg', row + ':' + col)
          else if BOT.posDates contains LabDate
            then GetExpectedColumn('pos')
          else if BOT.negDates contains LabDate
            then GetExpectedColumn('neg')
          else GetExpectedColumn('n/a')
        )
    ) + '&lt;\/tr&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="86"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Generate Footer Rows"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Generate Footer Rows&quot;:
  &quot;Unexpected Details&quot; BOT
      let row: ToString(IndexOf(&quot;Unexpected Details&quot;, BOT) + 1),
      colspan: Length(&quot;All Lab Dates in Lookback Period&quot;) + 1
      return Combine(
        &quot;All Lab Dates in Lookback Period&quot; LabDate
          let col: ToString(IndexOf(&quot;All Lab Dates in Lookback Period&quot;, LabDate) + 2)
          return all (
            if BOT.unexpectedPosDetails.date contains LabDate
              then singleton from (
                BOT.unexpectedPosDetails PosDetail
                  where PosDetail.date = LabDate
                    return '&lt;tr&gt;' + GetFooterColumn(colspan, row + ':' + col + ' - Possible unprescribed substance found: ' + PosDetail.udsDetail) + '&lt;\/tr&gt;'
              )
            else if BOT.unexpectedNegDetails.udsDate contains LabDate
              then singleton from (
                BOT.unexpectedNegDetails NegDetail
                  where NegDetail.udsDate = LabDate
                    return '&lt;tr&gt;' + GetFooterColumn(colspan, row + ':' + col + ' - Possible unexpected negative result found: prescribed ' + NegDetail.rxDetail + ' on ' + ToString(NegDetail.rxDate)) + '&lt;\/tr&gt;'
              )
            else ''
          )
      )"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="87"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Table End"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Table End&quot;:
  '&lt;\/table&gt;&lt;\/div&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="88"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Details Table"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Details Table&quot;: 
  &quot;Table Start&quot; + Combine(&quot;Table Headers&quot;) 
    + '&lt;tbody&gt;' + Combine(&quot;Generate Table Rows&quot;) + '&lt;/tbody&gt;' 
    + '&lt;tfoot&gt;' + Combine(&quot;Generate Footer Rows&quot;) + '&lt;\/tfoot&gt;' 
  + &quot;Table End&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="89"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Details More Info"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Details More Info&quot;:
  '&lt;div id=\&quot;box\&quot;&gt;\r\n  &lt;p&gt;Note on false positives and unexpected negative results...&lt;\/p&gt;\r\n  &lt;input type=\&quot;checkbox\&quot; class=\&quot;show-more\&quot;&gt; Show more\r\n  &lt;div class=\&quot;more\&quot;&gt;\r\n  &lt;p&gt;Positive results may be a false positives or could represent occasional use or possible substance use disorder.&lt;br\/&gt;&lt;br\/&gt;For a review regarding interpreting possible false positive urine toxicology results, see &lt;a target=\&quot;_blank\&quot; href=\&quot;https:\/\/pubmed.ncbi.nlm.nih.gov\/24986836\&quot;&gt;http:\/\/pubmed.ncbi.nlm.nih.gov\/24986836&lt;\/a&gt;. It is unknown if the findings reported in this article can be extrapolated to other laboratory analyzers that were not used in the referenced studies.&lt;br\/&gt;&lt;br\/&gt;For guidance regarding evaluating and addressing unexpected toxicology tests results, see &lt;a target=\&quot;_blank\&quot; href=\&quot;https:\/\/www.cdc.gov\/mmwr\/volumes\/71\/rr\/rr7103a1.htm#Recommendation10\&quot;&gt;Recommendation 10 of the 22 CDC Clinical Practice Guideiline&lt;\/a&gt;.&lt;\/p&gt;\r\n  &lt;p&gt;An unexpectedly negative test may be due to diversion, intermittent use, aberrant drug use behavior, or other factors, including a false negative result. Clinicians should interpret this result in the context of the overall treatment plan.&lt;\/p&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="90"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Div End"/>
    </extension>
    <extension url="statement">
      <valueString value="define &quot;Div End&quot;: '&lt;\/div&gt;'"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="91"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10Common"/>
    </extension>
    <extension url="name">
      <valueString value="Get HTML Details"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="// HTML Generation
define &quot;Get HTML Details&quot;:
  Common.&quot;Style Header&quot; + &quot;Unexpected Div Start&quot; + &quot;Details Table&quot; + &quot;Details More Info&quot; + &quot;Div End&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="92"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
    <extension url="libraryName">
      <valueString value="OpioidCDSREC10PatientView"/>
    </extension>
    <extension url="name">
      <valueString value="Detail"/>
    </extension>
    <extension url="statement">
      <valueString
                   value="define &quot;Detail&quot;:
  Rec10Common.&quot;Get HTML Details&quot;"/>
    </extension>
    <extension url="displaySequence">
      <valueInteger value="93"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <url
       value="http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/opioidcds-10-patient-view"/>
  <identifier>
    <use value="official"/>
    <value value="cdc-opioid-guidance"/>
  </identifier>
  <version value="2022.1.0"/>
  <name value="PlanDefinition_Recommendation_10_Patient_View"/>
  <title value="Recommendation #10 - Urine Drug Testing (patient-view)"/>
  <type>
    <coding>
      <system
              value="http://terminology.hl7.org/CodeSystem/plan-definition-type"/>
      <code value="eca-rule"/>
      <display value="ECA Rule"/>
    </coding>
  </type>
  <status value="draft"/>
  <experimental value="true"/>
  <date value="2024-04-22"/>
  <publisher value="Centers for Disease Control and Prevention (CDC)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.cdc.gov"/>
    </telecom>
  </contact>
  <description
               value="When prescribing opioids for subacute or chronic pain, clinicians should consider the benefits and risks of toxicology testing to assess for prescribed medications as well as other prescribed and nonprescribed controlled substances."/>
  <useContext>
    <code>
      <system
              value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="focus"/>
      <display value="Clinical Focus"/>
    </code>
    <valueCodeableConcept>
      <coding>
        <system value="http://snomed.info/sct"/>
        <code value="82423001"/>
        <display value="Chronic pain (finding)"/>
      </coding>
    </valueCodeableConcept>
  </useContext>
  <useContext>
    <code>
      <system
              value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="focus"/>
      <display value="Clinical Focus"/>
    </code>
    <valueCodeableConcept>
      <text value="Subacute pain"/>
    </valueCodeableConcept>
  </useContext>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <purpose
           value="The 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain is intended to improve communication between clinicians and patients about the benefits and risks of pain treatments, including opioid therapy; improve the effectiveness and safety of pain treatment; mitigate pain; improve function and quality of life for patients with pain; and reduce risks associated with opioid pain therapy, including opioid use disorder, overdose, and death. The recommendations do not apply to pain related to sickle cell disease or cancer or to patients receiving palliative or end-of-life care."/>
  <usage
         value="Before starting opioids and periodically (at least annually) during opioid therapy, clinicians should consider the benefits and risks of toxicology testing to assess for prescribed opioids and other prescription and nonprescription controlled substances that increase risk for overdose when combined with opioids, including nonprescribed and illicit opioids and benzodiazepines."/>
  <copyright value="© CDC 2016+."/>
  <topic>
    <text value="Opioid Prescribing"/>
  </topic>
  <author>
    <name value="Kensaku Kawamoto, MD, PhD, MHS"/>
  </author>
  <author>
    <name value="Bryn Rhodes"/>
  </author>
  <author>
    <name value="Floyd Eisenberg, MD, MPH"/>
  </author>
  <author>
    <name value="Robert McClure, MD, MPH"/>
  </author>
  <relatedArtifact>
    <type value="documentation"/>
    <display
             value="2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain"/>
    <url value="https://www.cdc.gov/mmwr/volumes/71/rr/pdfs/rr7103a1-H.pdf"/>
    <document>
      <contentType value="application/pdf"/>
      <language value="en-US"/>
      <url
           value="https://www.cdc.gov/mmwr/volumes/71/rr/pdfs/rr7103a1-H.pdf"/>
    </document>
  </relatedArtifact>
  <library
           value="http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC10PatientView"/>
  <action>
    <prefix value="1."/>
    <title
           value="Consider the Benefits and Risks of Conducting a Urine Toxicology Screen"/>
    <description
                 value="Consider the benefits and risks of toxicology testing to assess for prescribed medications as well as other prescribed and nonprescribed controlled substances.

For guidance regarding utilizing toxicology tests when prescribing opioids, see [Recommendation 10 of the 2022 CDC Clinical Practice Guideline](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=evidence%20type%3A%204).-,Implementation%20Considerations,-Toxicology%20testing%20should)."/>
    <priority value="urgent"/>
    <documentation>
      <type value="documentation"/>
      <url
           value="https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#Recommendation10:~:text=nonprescribed%20controlled%20substances-,(recommendation%20category%3A%20B%3B%20evidence%20type%3A%204).,-Implementation%20Considerations"/>
      <document>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/recommendation-strength"/>
              <code value="weak"/>
              <display value="Weak"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/evidence-quality"/>
              <code value="very-low"/>
              <display value="Very Low quality"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <url
             value="https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#Recommendation10:~:text=nonprescribed%20controlled%20substances-,(recommendation%20category%3A%20B%3B%20evidence%20type%3A%204).,-Implementation%20Considerations"/>
      </document>
    </documentation>
    <trigger>
      <type value="named-event"/>
      <name value="patient-view"/>
    </trigger>
    <condition>
      <kind value="applicability"/>
      <expression>
        <description
                     value="Patient has not had a urine screening in the past 12 months"/>
        <language value="text/cql.identifier"/>
        <expression
                    value="Is Perform Drug Screen Recommendation Applicable?"/>
      </expression>
    </condition>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/action-type"/>
        <code value="create"/>
        <display value="Create"/>
      </coding>
    </type>
    <definitionCanonical
                         value="http://fhir.org/guides/cdc/opioid-cds/ActivityDefinition/opioidcds-urine-screening-request"/>
    <action>
      <description value="Document - Ordered toxicology screen"/>
    </action>
    <action>
      <description value="Document - Risks outweigh benefits"/>
    </action>
    <action>
      <description value="Snooze* - N/A see comment, snooze 3 months"/>
    </action>
  </action>
  <action>
    <prefix value="2."/>
    <title value="Patient May Have Unexpected Toxicology Test Results"/>
    <description
                 value="Patient may have unexpected urine toxicology test results in the past year"/>
    <priority value="urgent"/>
    <documentation>
      <type value="documentation"/>
      <url
           value="https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#Recommendation10:~:text=nonprescribed%20controlled%20substances-,(recommendation%20category%3A%20B%3B%20evidence%20type%3A%204).,-Implementation%20Considerations"/>
      <document>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/recommendation-strength"/>
              <code value="weak"/>
              <display value="Weak"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/evidence-quality"/>
              <code value="very-low"/>
              <display value="Very Low quality"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <url
             value="https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#Recommendation10:~:text=nonprescribed%20controlled%20substances-,(recommendation%20category%3A%20B%3B%20evidence%20type%3A%204).,-Implementation%20Considerations"/>
      </document>
    </documentation>
    <trigger>
      <type value="named-event"/>
      <name value="patient-view"/>
    </trigger>
    <condition>
      <kind value="applicability"/>
      <expression>
        <description
                     value="Urine screening tested positive for cocaine, opiates or PCP"/>
        <language value="text/cql.identifier"/>
        <expression value="Applicable Because of Unexpected Results"/>
      </expression>
    </condition>
    <dynamicValue>
      <path value="action.description"/>
      <expression>
        <language value="text/cql.identifier"/>
        <expression value="Detail"/>
      </expression>
    </dynamicValue>
    <action>
      <description
                   value="Document - Will repeat urine drug screen more frequently"/>
    </action>
    <action>
      <description
                   value="Document - Will assess patient for substance use disorder"/>
    </action>
    <action>
      <description
                   value="Snooze* - Patient's test results were expected, snooze for 3 months"/>
    </action>
    <action>
      <description value="Snooze* - N/A snooze for 3 months"/>
    </action>
  </action>
</PlanDefinition>