eCQM QICore Content Implementation Guide
2024.0.0 - CI Build

eCQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2024.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/ecqm-content-qicore-2024/ and changes regularly. See the Directory of published versions

: Safe Use of Opioids Concurrent PrescribingFHIR - XML Representation

Draft as of 2024-07-09

Raw xml | Download


<Measure xmlns="http://hl7.org/fhir">
  <id value="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
    <table class="grid dict">
        
            <tr>
                <th scope="row"><b>Title: </b></th>
                <td style="padding-left: 4px;">Safe Use of Opioids Concurrent PrescribingFHIR</td>
            </tr>
        

        

        
            <tr>
                <th scope="row"><b>Id: </b></th>
                <td style="padding-left: 4px;">SafeUseofOpioidsConcurrentPrescribingFHIR</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Version: </b></th>
                <td style="padding-left: 4px;">0.2.000</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Url: </b></th>
                <td style="padding-left: 4px;"><a href="Measure-SafeUseofOpioidsConcurrentPrescribingFHIR.html">Safe Use of Opioids Concurrent PrescribingFHIR</a></td>
            </tr>
        

        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                short-name identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>CMS506FHIR</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                version-independent identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>urn:uuid:95d529af-66b4-4cfd-bc1f-f43704dc47ad</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                version-specific identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>urn:uuid:18e2d10e-da9c-412b-8d74-07d01207754a</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                endorser (CMS Consensus Based Entity) identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>3316e</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                publisher (CMS) identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>506FHIR</span>
                        </p>
                    
                </td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Effective Period: </b></th>
                <td style="padding-left: 4px;">2025-01-01..2025-12-31</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Status: </b></th>
                <td style="padding-left: 4px;">draft</td>
            </tr>
        

        

        
            <tr>
                <th scope="row"><b>Publisher: </b></th>
                <td style="padding-left: 4px;">Centers for Medicare &amp; Medicaid Services (CMS)</td>
            </tr>
        

        
        <tr>
            <th scope="row"><b>Author: </b></th>
            <td style="padding-left: 4px;">Mathematica</td>
        </tr>
        

        

        
            <tr>
                <th scope="row"><b>Description: </b></th>
                <td style="padding-left: 4px;"><div><p>Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed, or continued on, two or more opioids or an opioid and benzodiazepine concurrently at discharge</p>
</div></td>
            </tr>
        

        

        

        

        

        

        
            <tr>
                <th scope="row"><b>Purpose: </b></th>
                <td style="padding-left: 4px;"><div><p>UNKNOWN</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Copyright: </b></th>
                <td style="padding-left: 4px;"><div><p>Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third party codes contained in the specifications.  CPT(R) contained in the measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Disclaimer: </b></th>
                <td style="padding-left: 4px;"><div><p>These performance measures are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.  THE MEASURES AND SPECIFICATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND.  Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</p>
</div></td>
            </tr>
        

        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Rationale: </b></th>
            <td style="padding-left: 4px;"><div><p>Unintentional opioid overdose fatalities have become a major public health concern in the United States (Rudd et al., 2016). Reducing the number of unintentional overdoses has become a priority for numerous federal organizations including, but not limited to, the Centers for Disease Control and Prevention (CDC), the Federal Interagency Workgroup for Opioid Adverse Drug Events, and the Substance Abuse and Mental Health Services Administration.   Concurrent prescriptions of opioids or opioids and benzodiazepines places patients at a greater risk of unintentional overdose due to the increased risk of respiratory depression (Dowell, Haegerich, &amp; Chou, 2016; Dowell, Ragan, Jones, Baldwin, &amp; Chou, 2022).  An analysis of national prescribing patterns shows that more than half of patients who received an opioid prescription in 2009 had filled another opioid prescription within the previous 30 days (National Institute on Drug Abuse, 2011). Studies of multiple claims and prescription databases have shown that between 5%-15% of patients receive concurrent opioid prescriptions and 5%-20% of patients receive concurrent opioid and benzodiazepine prescriptions across various settings (Liu et al., 2013; Mack et al., 2015, Park et al., 2015). Patients who have multiple opioid prescriptions have an increased risk for overdose (Jena et al., 2014). Rates of fatal overdose are ten times higher in patients who are co-dispensed opioid analgesics and benzodiazepines than opioids alone (Dasgupta et al., 2015). The number of opioid overdose deaths involving benzodiazepines increased 14% on average each year from 2006 to 2011, while the number of opioid analgesic overdose deaths not involving benzodiazepines did not change significantly (Jones &amp; McAninch, 2015). Furthermore, concurrent use of benzodiazepines with opioids was prevalent in 31%-51% of fatal overdoses (Dowell, Haegerich, &amp; Chou, 2016). One study found that eliminating concurrent use of opioids and benzodiazepines could reduce the risk of opioid overdose-related emergency department (ED) and inpatient visits by 15% and potentially could have prevented an estimated 2,630 deaths related to opioid painkiller overdoses in 2015 (Sun et al., 2017).   A study on The Opioid Safety Initiative in the Veterans Health Administration (VHA), which includes an opioid and benzodiazepine concurrent prescribing measure that this measure is based on, was associated with a decrease of 20.67% overall and 0.86% patients per month (781 patients per month) receiving concurrent benzodiazepine with an opioid among all adult VHA patients who filled outpatient opioid prescriptions from October 2012 to September 2014 (Lin et al., 2017).  Adopting a measure that calculates the proportion of patients with two or more opioids or opioids and benzodiazepines concurrently has the potential to reduce preventable mortality and reduce the costs associated with adverse events related to opioid use by (1) encouraging providers to identify patients with concurrent prescriptions of opioids or opioids and benzodiazepines and (2) discouraging providers from prescribing two or more opioids or opioids and benzodiazepines concurrently.</p>
</div></td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Clinical recommendation statement: </b></th>
            <td style="padding-left: 4px;"><div><p>The CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022 recommends that clinicians should: - “[Use strategies minimizing] opioid use…for both opioid-naïve and opioid-tolerant patients with acute pain when possible. If patients receiving long-term opioid therapy require additional medication for acute pain, nonopioid medications should be used when possible.” - ”Use particular caution when prescribing opioid pain medication and benzodiazepines concurrently.&quot; - “Review increased risks for respiratory depression when opioids are taken with benzodiazepines, other sedatives, alcohol, nonprescribed or illicit drugs (e.g., heroin), or other opioids (see Recommendations 8 and 11)” - “Closely monitor patients who are unable to taper and who continue on high-dose or otherwise high-risk opioid regimens (e.g., opioids prescribed concurrently with benzodiazepines) and should work with patients to mitigate overdose risk (e.g., by providing overdose education and naloxone) (see Recommendation 8).” - &quot;Discuss information from the PDMP with the patient and confirm that the patient is aware of any additional prescriptions.” - “Discuss safety concerns, including increased risk for respiratory depression and overdose, with patients found to be receiving overlapping prescription opioids from multiple clinicians who are not coordinating the patient’s care or patients who are receiving medications that increase risk when combined with opioids (e.g., benzodiazepines) (see Recommendation 11), and offer naloxone (see Recommendation 8).&quot; - &quot;Discuss safety concerns with other clinicians who are prescribing controlled substances for the patient. Ideally, clinicians should first discuss concerns with the patient and inform them that they plan to coordinate care with their other clinicians to improve the patient’s safety.”  In addition to the 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain, opioid prescribing guidelines issued by various state agencies and professional societies for various settings agree with the recommendation to avoid concurrently prescribing opioids  (American Academy of Emergency Medicine (AAEM), 2013; and Washington Agency Medical Directors’ Group (WAMDG), 2015), and opioids and benzodiazepines (WAMDG, 2015; American Society of Interventional Pain Physicians (ASIPP), 2012.</p>
</div></td>
        </tr>
        

        

        
            <tr>
                <th scope="row"><b>Guidance (Usage): </b></th>
                <td style="padding-left: 4px;">Clinician judgement, clinical appropriateness, or both may indicate concurrent prescribing of two unique opioids or an opioid and benzodiazepine is medically necessary, thus the measure is not expected to have a zero rate.   Inpatient hospitalizations with discharge medications of a new or continuing opioid or a new or continuing benzodiazepine prescription should be included in the initial population.   Inpatient hospitalizations with discharge medications of two or more new or continuing opioids or new or continuing opioid and benzodiazepine resulting in concurrent therapy at discharge should be included in the numerator. Each benzodiazepine and opioid included on the medication discharge list is considered a unique prescription.  The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.  This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.  This FHIR-based measure has been derived from the QDM-based measure: CMS 506v7.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).  Definition For the purpose of this measure, the following are defined as: - Opioid: Schedule II, III and IV Opioid Medications that do not include naloxone.  - Benzodiazepine: Schedule IV benzodiazepine medications. - Medications for Opioid Use Disorder: Methadone, buprenorphine and buprenorphine in combination with naloxone.  - Prescribed: The intent of the measure is to capture opioid and/or benzodiazepine medications continued or ordered at discharge - Numerator criteria: Two or more unique orders for opioids, or an opioid and benzodiazepine at discharge</td>
            </tr>
        

        
            
                <tr>
                    <th scope="row"><b>Population Criteria: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <table class="grid-dict">
                                
                                    <tr>
                                        <th><b>64ef764056d636294b157b3e</b></th>
                                    </tr>
                                
                                
                                    <tr>
                                        <td>Initial Population:</td>

                                        
                                            
                                                <td>Inpatient hospitalizations that end during the measurement period, where the patient is 18 years of age and older at the start of the encounter and prescribed one or more new or continuing opioid or benzodiazepine at discharge</td>
                                            
                                        

                                    </tr>
                                
                                    <tr>
                                        <td>Denominator:</td>

                                        
                                            
                                                <td>Equals Initial Population</td>
                                            
                                        

                                    </tr>
                                
                                    <tr>
                                        <td>Denominator Exclusion:</td>

                                        
                                            
                                                <td>Inpatient hospitalizations where patients have cancer pain that begins prior to or during the encounter or are ordered or are receiving palliative or hospice care (including comfort measures, terminal care, and dying care) during the hospitalization or in an emergency department encounter or observation stay immediately prior to hospitalization, patients receiving medication for opioid use disorder, patients with sickle cell disease, patients discharged to another inpatient care facility or left against medical advice, and patients who expire during the inpatient stay</td>
                                            
                                        

                                    </tr>
                                
                                    <tr>
                                        <td>Numerator:</td>

                                        
                                            
                                                <td>Inpatient hospitalizations where the patient is prescribed or continuing to take two or more opioids or an opioid and benzodiazepine at discharge</td>
                                            
                                        

                                    </tr>
                                
                                
                            </table>
                        
                    </td>
                </tr>
            
        

        
            <tr>
                <th scope="row"><b> Supplemental Data Elements: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            
                                <p>SDE Ethnicity</p>
                            
                        
                    
                        
                            
                                <p>SDE Payer</p>
                            
                        
                    
                        
                            
                                <p>SDE Race</p>
                            
                        
                    
                        
                            
                                <p>SDE Sex</p>
                            
                        
                    
                </td>
            </tr>
        

        

        
            <tr>
                <th scope="row">
                    <b> Supplemental Data Guidance
                        : </b></th>
                <td style="padding-left: 4px;"> For every patient evaluated by this measure also identify payer, race, ethnicity and sex;  SDE Ethnicity  SDE Payer  SDE Race  SDE Sex    </td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Libraries: </b></th>
                <td style="padding-left: 4px;">
                    <table class="grid-dict">
                        
                            <tr>
                                <td><a href="Library-SafeUseofOpioidsConcurrentPrescribingFHIR.html">SafeUseofOpioidsConcurrentPrescribingFHIR</a></td>
                            </tr>
                        
                    </table>
                </td>
            </tr>
        

        

        
            
                <tr>
                    <th scope="row"><b>Terminology and Other Dependencies: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <li><code>Library/SupplementalDataElements|3.5.000</code></li>
                        
                            <li><code>Library/CQMCommon|2.2.000</code></li>
                        
                            <li><code>Library/FHIRHelpers|4.4.000</code></li>
                        
                            <li><code>Library/QICoreCommon|2.1.000</code></li>
                        
                            <li><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">AdministrativeGender</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-medicationrequest-category.html">MedicationRequest Category Codes</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-condition-category.html">Condition Category Codes</a></li>
                        
                            <li><a href="http://hl7.org/fhir/us/core/STU3.1.1/CodeSystem-condition-category.html">US Core Condition Category Extension Codes</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.241/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1125.1/expansion">Schedule IV Benzodiazepines</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.180/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.175/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.171/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.269/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.177/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.600.1.1579/expansion">Palliative or Hospice Care</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.87/expansion">Discharge To Acute Care Facility</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1116.365/expansion">Hospice Care Referral or Admission</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.309/expansion">Patient Expired</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.308/expansion">Left Against Medical Advice</a></li>
                        
                    </td>
                </tr>
                <tr>
                    <th scope="row"><b>Parameters:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr>
                                <th><b>name</b></th>
                                <th><b>use</b></th>
                                <th><b>min</b></th>
                                <th><b>max</b></th>
                                <th><b>type</b></th>
                            </tr>
                            
                                <tr>
                                    <td>Measurement Period</td>
                                    <td>In</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Period</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Sex</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Coding</td>
                                </tr>
                            
                                <tr>
                                    <td>Numerator</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Denominator</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Payer</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Initial Population</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Ethnicity</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Denominator Exclusion</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Race</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Resource</td>
                                </tr>
                            
                        </table>
                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>DataRequirements:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr>
                                <th><b>Resource Type</b></th>
                                <th><b>Resource Elements</b></th>
                                <th><b>Valueset Name</b></th>
                                <th><b>Valueset</b></th>
                            </tr>
                            
                                <tr>
                                    <td>Patient(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html">QICorePatient</a>)</td>
                                    <td>
                                        
                                            ethnicity
                                        
                                            race
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            status
                                        
                                            status.value
                                        
                                            period
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                            hospitalization
                                        
                                            hospitalization.dischargeDisposition
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Encounter Inpatient
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            status
                                        
                                            status.value
                                        
                                            period
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                            hospitalization
                                        
                                            hospitalization.dischargeDisposition
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Observation Services
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            status
                                        
                                            status.value
                                        
                                            period
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                            hospitalization
                                        
                                            hospitalization.dischargeDisposition
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Emergency Department Visit
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Medication(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html">QICoreMedication</a>)</td>
                                    <td>
                                        
                                            id
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Medication(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html">QICoreMedication</a>)</td>
                                    <td>
                                        
                                            id
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                    <td>
                                        
                                            medication
                                        
                                            status
                                        
                                            status.value
                                        
                                            intent
                                        
                                            intent.value
                                        
                                            authoredOn
                                        
                                            authoredOn.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Schedule II, III and IV Opioid Medications
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.241/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241</a></td>
                                </tr>
                            
                                <tr>
                                    <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                    <td>
                                        
                                            medication
                                        
                                            status
                                        
                                            status.value
                                        
                                            intent
                                        
                                            intent.value
                                        
                                            authoredOn
                                        
                                            authoredOn.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Schedule IV Benzodiazepines
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1125.1/expansion">Schedule IV Benzodiazepines</a></td>
                                </tr>
                            
                                <tr>
                                    <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                    <td>
                                        
                                            medication
                                        
                                            status
                                        
                                            status.value
                                        
                                            intent
                                        
                                            intent.value
                                        
                                            authoredOn
                                        
                                            authoredOn.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Schedule IV Benzodiazepines
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1125.1/expansion">Schedule IV Benzodiazepines</a></td>
                                </tr>
                            
                                <tr>
                                    <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                    <td>
                                        
                                            medication.reference
                                        
                                            status
                                        
                                            status.value
                                        
                                            intent
                                        
                                            intent.value
                                        
                                            authoredOn
                                        
                                            authoredOn.value
                                        
                                            medication
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                    <td>
                                        
                                            medication
                                        
                                            status
                                        
                                            status.value
                                        
                                            intent
                                        
                                            intent.value
                                        
                                            authoredOn
                                        
                                            authoredOn.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Medications for Opioid Use Disorder (MOUD)
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.269/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Coverage(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html">QICoreCoverage</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Payer Type
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            id
                                        
                                            id.value
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Cancer Related Pain
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.180/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Sickle Cell Disease with and without Crisis
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.175/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Opioid Use Disorder
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.171/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Procedure(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html">QICoreProcedure</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            performed
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Opioid Medication Assisted Treatment (MAT)
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.177/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Procedure(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html">QICoreProcedure</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Palliative or Hospice Care
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.600.1.1579/expansion">Palliative or Hospice Care</a></td>
                                </tr>
                            
                                <tr>
                                    <td>ServiceRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-servicerequest.html">QICoreServiceRequest</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Palliative or Hospice Care
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.600.1.1579/expansion">Palliative or Hospice Care</a></td>
                                </tr>
                            
                        </table>
                    </td>
                </tr>

                
                    <tr>
                        <th scope="row"><b>Direct Reference Codes:</b></th>
                        <td style="padding-left: 4px;">
                            <table class="grid-dict">
                                <tr>
                                    <th><b>display</b></th>
                                    <th><b>code</b></th>
                                    <th><b>system</b></th>
                                </tr>
                                
                                    <tr>
                                        <td>Male</td>
                                        <td>M</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Female</td>
                                        <td>F</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Community</td>
                                        <td>community</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-medicationrequest-category.html">http://terminology.hl7.org/CodeSystem/medicationrequest-category</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Discharge</td>
                                        <td>discharge</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-medicationrequest-category.html">http://terminology.hl7.org/CodeSystem/medicationrequest-category</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Problem List Item</td>
                                        <td>problem-list-item</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-condition-category.html">http://terminology.hl7.org/CodeSystem/condition-category</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Health Concern</td>
                                        <td>health-concern</td>
                                        <td><a href="http://hl7.org/fhir/us/core/STU3.1.1/CodeSystem-condition-category.html">http://hl7.org/fhir/us/core/CodeSystem/condition-category</a></td>
                                    </tr>
                                
                            </table>
                        </td>
                    </tr>
                

                
                <tr>
                    <th scope="row"><b>Logic Definitions:</b></th>
                    <td style="padding-left: 4px;">
                        
                        <table class="grid-dict">
                            <tr>
                                <th><b>Group</b></th>
                                <th><b>Scoring</b></th>
                                <th><b>Population Criteria</b></th>
                                <th><b>Expression</b></th>
                            </tr>
                            <tr>
                                
                                <td> 64ef764056d636294b157b3e </td>
                                <td colspan="3" style="padding-left: 4px;">
                                    
                                        <b>Group scoring:</b>
                                        
                                            <span>  proportion </span>
                                        
                                    

                                    

                                    

                                    

                                    
                                        <tr>
                                        
                                            <th scope="row"><b>Type: </b></th>
                                            <td style="padding-left: 4px;">
                                                
                                                    
                                                        <p style="margin-bottom: 5px;">
                                                            <span>Process </span>
                                                        </p>
                                                    
                                                
                                                
                                            </td>
                                        
                                        </tr>
                                    

                                    

                                    
                                    <tr>
                                        <th scope="row"><b>Rate Aggregation: </b></th>
                                        <td colspan="3" style="padding-left: 4px;">None</td>
                                    </tr>
                                    

                                    
                                        <tr>
                                            <th scope="row"><b>Improvement Notation: </b></th>
                                            <td style="padding-left: 4px;">
                                            
                                                
                                                    
                                                        <p style="margin-bottom: 5px;">
                                                            <span>increase </span>
                                                        </p>
                                                    
                                                
                                                
                                            
                                            </td>
                                        </tr>
                                    

                                    

                                </td>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Initial Population</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Initial Population&quot;:
  &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Denominator</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Initial Population&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Denominator Exclusion</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Denominator Exclusion&quot;:
  /*Excludes encounters of patients with cancer or who are receiving palliative or hospice care at the time of the encounter or who are discharged to another inpatient care facility or expire during the inpatient stay*/
  
  ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter
      where exists ( [Condition: &quot;Cancer Related Pain&quot;] CancerPain
          where ( CancerPain.isProblemListItem ( )
              or CancerPain.isHealthConcern ( )
          )
            and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
      )
        or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis
            where InpatientEncounterDiagnosis.code in &quot;Cancer Related Pain&quot;
        )
        or exists ( [Condition: &quot;Sickle Cell Disease with and without Crisis&quot;] SickleCellDisease
            where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
        )
        or exists ( [Condition: &quot;Opioid Use Disorder&quot;] OUD
            where start of OUD.prevalenceInterval ( ) before day of end of InpatientEncounter.period
        )
        or exists ( &quot;Treatment for Opioid Use Disorders&quot; OUDTreatment
            where OUDTreatment.authoredOn during day of InpatientEncounter.period
        )
        or exists ( &quot;Intervention Palliative or Hospice Care&quot; PalliativeOrHospiceCare
            where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter.&quot;hospitalizationWithObservation&quot; ( )
        )
        or ( InpatientEncounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Hospice Care Referral or Admission&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&quot;
        )
  )</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Numerator</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Numerator&quot;:
  /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/
  
  ( ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter
        where ( Count(&quot;Opioid at Discharge&quot; OpioidMedications
              where OpioidMedications.authoredOn during day of InpatientEncounter.period
              return distinct OpioidMedications.medication
          ) &gt;= 2
        )
          or exists ( &quot;Opioid at Discharge&quot; OpioidDischargeMedications
              where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
                and exists &quot;Benzodiazepine at Discharge&quot; BenzodiazepineDischargeMedication
                  where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
          )
    )
  )</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                
                            
                            </tr>
                        </table>
                

                <table class="grid-dict">
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Sex</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>SDE Sex</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CQMCommon</td>
                            
                            
                                <td>Inpatient Encounter</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Inpatient Encounter&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
		where EncounterInpatient.status = 'finished'
		and EncounterInpatient.period ends during day of &quot;Measurement Period&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Inpatient Encounter with Age Greater than or Equal to 18</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Inpatient Encounter with Age Greater than or Equal to 18&quot;:
  CQMCommon.&quot;Inpatient Encounter&quot; InpatientHospitalEncounter
    where AgeInYearsAt(date from start of InpatientHospitalEncounter.period) &gt;= 18</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Opioid at Discharge</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Opioid at Discharge&quot;:
  ( [MedicationRequest: &quot;Schedule II, III and IV Opioid Medications&quot;] OpioidMedications
    where ( OpioidMedications.isCommunity ( )
        or OpioidMedications.isDischarge ( )
    ) ) OpioidDischargeMedication
    where OpioidDischargeMedication.status in { 'active', 'completed' }
      and OpioidDischargeMedication.intent = 'order'</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Benzodiazepine at Discharge</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Benzodiazepine at Discharge&quot;:
  ( [MedicationRequest: medication in &quot;Schedule IV Benzodiazepines&quot;] BenzoMedications
    where ( BenzoMedications.isCommunity ( )
        or BenzoMedications.isDischarge ( )
    ) ) BenzodiazepineDischargeMedication
    where BenzodiazepineDischargeMedication.status in { 'active', 'completed' }
      and BenzodiazepineDischargeMedication.intent = 'order'</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Inpatient Encounters with an Opioid or Benzodiazepine at Discharge</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;:
  &quot;Inpatient Encounter with Age Greater than or Equal to 18&quot; InpatientEncounter
    with ( &quot;Opioid at Discharge&quot;
      union &quot;Benzodiazepine at Discharge&quot; ) OpioidOrBenzodiazepineAtDischarge
      such that OpioidOrBenzodiazepineAtDischarge.authoredOn during day of InpatientEncounter.period</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Numerator</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/
  
  ( ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter
        where ( Count(&quot;Opioid at Discharge&quot; OpioidMedications
              where OpioidMedications.authoredOn during day of InpatientEncounter.period
              return distinct OpioidMedications.medication
          ) &gt;= 2
        )
          or exists ( &quot;Opioid at Discharge&quot; OpioidDischargeMedications
              where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
                and exists &quot;Benzodiazepine at Discharge&quot; BenzodiazepineDischargeMedication
                  where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
          )
    )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Initial Population</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Denominator</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Initial Population&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Payer</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>SDE Payer</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Ethnicity</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>SDE Ethnicity</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Treatment for Opioid Use Disorders</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Treatment for Opioid Use Disorders&quot;:
  [MedicationRequest: &quot;Medications for Opioid Use Disorder (MOUD)&quot;] MedicationTreatment
    with [Procedure: &quot;Opioid Medication Assisted Treatment (MAT)&quot;] MAT
      such that MedicationTreatment.authoredOn during day of MAT.performed.toInterval ( )
        and MedicationTreatment.authoredOn during day of &quot;Measurement Period&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Intervention Palliative or Hospice Care</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Intervention Palliative or Hospice Care&quot;:
  [ServiceRequest: &quot;Palliative or Hospice Care&quot;]
    union [Procedure: &quot;Palliative or Hospice Care&quot;]</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>Denominator Exclusion</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusion&quot;:
  /*Excludes encounters of patients with cancer or who are receiving palliative or hospice care at the time of the encounter or who are discharged to another inpatient care facility or expire during the inpatient stay*/
  
  ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter
      where exists ( [Condition: &quot;Cancer Related Pain&quot;] CancerPain
          where ( CancerPain.isProblemListItem ( )
              or CancerPain.isHealthConcern ( )
          )
            and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
      )
        or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis
            where InpatientEncounterDiagnosis.code in &quot;Cancer Related Pain&quot;
        )
        or exists ( [Condition: &quot;Sickle Cell Disease with and without Crisis&quot;] SickleCellDisease
            where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
        )
        or exists ( [Condition: &quot;Opioid Use Disorder&quot;] OUD
            where start of OUD.prevalenceInterval ( ) before day of end of InpatientEncounter.period
        )
        or exists ( &quot;Treatment for Opioid Use Disorders&quot; OUDTreatment
            where OUDTreatment.authoredOn during day of InpatientEncounter.period
        )
        or exists ( &quot;Intervention Palliative or Hospice Care&quot; PalliativeOrHospiceCare
            where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter.&quot;hospitalizationWithObservation&quot; ( )
        )
        or ( InpatientEncounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Hospice Care Referral or Admission&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&quot;
        )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Race</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SafeUseofOpioidsConcurrentPrescribingFHIR</td>
                            
                            
                                <td>SDE Race</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>isCommunity</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given MedicationRequest has a category of Community
*/
define fluent function isCommunity(medicationRequest MedicationRequest):
  exists (medicationRequest.category C
    where C ~ Community
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToConcept</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>isDischarge</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given MedicationRequest has a category of Discharge
*/
define fluent function isDischarge(medicationRequest MedicationRequest):
  exists (medicationRequest.category C
    where C ~ Discharge
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToString</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToCode</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>isProblemListItem</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given condition is a problem list item.
*/
define fluent function isProblemListItem(condition Condition):
  exists (condition.category C
    where C ~ &quot;problem-list-item&quot;
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>isHealthConcern</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given condition is a health concern
*/
define fluent function isHealthConcern(condition Condition):
  exists (condition.category C
    where C ~ &quot;health-concern&quot;
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>prevalenceInterval</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition Condition):
if condition.clinicalStatus ~ &quot;active&quot;
  or condition.clinicalStatus ~ &quot;recurrence&quot;
  or condition.clinicalStatus ~ &quot;relapse&quot; then
  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
    (end of condition.abatementInterval()) abatementDate
    return if abatementDate is null then
      Interval[start of condition.onset.toInterval(), abatementDate)
    else
      Interval[start of condition.onset.toInterval(), abatementDate]</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CQMCommon</td>
                            
                            
                                <td>encounterDiagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns the Condition resources referenced by the diagnosis element of the Encounter
*/
define fluent function encounterDiagnosis(Encounter Encounter ):
  Encounter.diagnosis D
    return singleton from ([Condition] C where C.id = D.condition.reference.getId())</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>getId</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
@comment: This function can be used to determine the logical id of a given resource. It can be used in
a single-server environment to trace references. However, this function does not attempt to resolve
or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CQMCommon</td>
                            
                            
                                <td>hospitalizationWithObservation</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
*/
define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
  TheEncounter Visit
  		let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs
  				where LastObs.status = 'finished'
            and LastObs.period ends 1 hour or less on or before start of Visit.period
  				sort by end of period
  			),
  			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
  			EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED
  				where LastED.status = 'finished'
            and LastED.period ends 1 hour or less on or before VisitStart
  				sort by end of period
  			)
  		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]</code></pre>
                                </td>
                            
                        </tr>
                    
                    </table>
                </td>
            </tr>
            
        
    

    </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="M"/>
          <display value="Male"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="F"/>
          <display value="Female"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
          <code value="community"/>
          <display value="Community"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
          <code value="discharge"/>
          <display value="Discharge"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-category"/>
          <code value="problem-list-item"/>
          <display value="Problem List Item"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://hl7.org/fhir/us/core/CodeSystem/condition-category"/>
          <code value="health-concern"/>
          <display value="Health Concern"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;"/>
        </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="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="Inpatient Encounter"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Inpatient Encounter&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
		where EncounterInpatient.status = 'finished'
		and EncounterInpatient.period ends during day of &quot;Measurement Period&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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Inpatient Encounter with Age Greater than or Equal to 18"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Inpatient Encounter with Age Greater than or Equal to 18&quot;:
  CQMCommon.&quot;Inpatient Encounter&quot; InpatientHospitalEncounter
    where AgeInYearsAt(date from start of InpatientHospitalEncounter.period) &gt;= 18"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Opioid at Discharge"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Opioid at Discharge&quot;:
  ( [MedicationRequest: &quot;Schedule II, III and IV Opioid Medications&quot;] OpioidMedications
    where ( OpioidMedications.isCommunity ( )
        or OpioidMedications.isDischarge ( )
    ) ) OpioidDischargeMedication
    where OpioidDischargeMedication.status in { 'active', 'completed' }
      and OpioidDischargeMedication.intent = 'order'"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Benzodiazepine at Discharge"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Benzodiazepine at Discharge&quot;:
  ( [MedicationRequest: medication in &quot;Schedule IV Benzodiazepines&quot;] BenzoMedications
    where ( BenzoMedications.isCommunity ( )
        or BenzoMedications.isDischarge ( )
    ) ) BenzodiazepineDischargeMedication
    where BenzodiazepineDischargeMedication.status in { 'active', 'completed' }
      and BenzodiazepineDischargeMedication.intent = 'order'"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Inpatient Encounters with an Opioid or Benzodiazepine at Discharge"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;:
  &quot;Inpatient Encounter with Age Greater than or Equal to 18&quot; InpatientEncounter
    with ( &quot;Opioid at Discharge&quot;
      union &quot;Benzodiazepine at Discharge&quot; ) OpioidOrBenzodiazepineAtDischarge
      such that OpioidOrBenzodiazepineAtDischarge.authoredOn during day of InpatientEncounter.period"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Numerator&quot;:
  /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/
  
  ( ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter
        where ( Count(&quot;Opioid at Discharge&quot; OpioidMedications
              where OpioidMedications.authoredOn during day of InpatientEncounter.period
              return distinct OpioidMedications.medication
          ) &gt;= 2
        )
          or exists ( &quot;Opioid at Discharge&quot; OpioidDischargeMedications
              where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
                and exists &quot;Benzodiazepine at Discharge&quot; BenzodiazepineDischargeMedication
                  where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
          )
    )
  )"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Initial Population&quot;:
  &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator&quot;:
  &quot;Initial Population&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="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;"/>
        </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="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Treatment for Opioid Use Disorders"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Treatment for Opioid Use Disorders&quot;:
  [MedicationRequest: &quot;Medications for Opioid Use Disorder (MOUD)&quot;] MedicationTreatment
    with [Procedure: &quot;Opioid Medication Assisted Treatment (MAT)&quot;] MAT
      such that MedicationTreatment.authoredOn during day of MAT.performed.toInterval ( )
        and MedicationTreatment.authoredOn during day of &quot;Measurement Period&quot;"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Intervention Palliative or Hospice Care"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Intervention Palliative or Hospice Care&quot;:
  [ServiceRequest: &quot;Palliative or Hospice Care&quot;]
    union [Procedure: &quot;Palliative or 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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusion"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator Exclusion&quot;:
  /*Excludes encounters of patients with cancer or who are receiving palliative or hospice care at the time of the encounter or who are discharged to another inpatient care facility or expire during the inpatient stay*/
  
  ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter
      where exists ( [Condition: &quot;Cancer Related Pain&quot;] CancerPain
          where ( CancerPain.isProblemListItem ( )
              or CancerPain.isHealthConcern ( )
          )
            and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
      )
        or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis
            where InpatientEncounterDiagnosis.code in &quot;Cancer Related Pain&quot;
        )
        or exists ( [Condition: &quot;Sickle Cell Disease with and without Crisis&quot;] SickleCellDisease
            where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
        )
        or exists ( [Condition: &quot;Opioid Use Disorder&quot;] OUD
            where start of OUD.prevalenceInterval ( ) before day of end of InpatientEncounter.period
        )
        or exists ( &quot;Treatment for Opioid Use Disorders&quot; OUDTreatment
            where OUDTreatment.authoredOn during day of InpatientEncounter.period
        )
        or exists ( &quot;Intervention Palliative or Hospice Care&quot; PalliativeOrHospiceCare
            where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter.&quot;hospitalizationWithObservation&quot; ( )
        )
        or ( InpatientEncounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Hospice Care Referral or Admission&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;
            or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&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="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }"/>
        </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="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;"/>
        </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="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isCommunity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns true if the given MedicationRequest has a category of Community
*/
define fluent function isCommunity(medicationRequest MedicationRequest):
  exists (medicationRequest.category C
    where C ~ Community
  )"/>
        </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="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToConcept"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }"/>
        </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="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isDischarge"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns true if the given MedicationRequest has a category of Discharge
*/
define fluent function isDischarge(medicationRequest MedicationRequest):
  exists (medicationRequest.category C
    where C ~ Discharge
  )"/>
        </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="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value uri): value.value"/>
        </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="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCode"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }"/>
        </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="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isProblemListItem"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns true if the given condition is a problem list item.
*/
define fluent function isProblemListItem(condition Condition):
  exists (condition.category C
    where C ~ &quot;problem-list-item&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="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isHealthConcern"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns true if the given condition is a health concern
*/
define fluent function isHealthConcern(condition Condition):
  exists (condition.category C
    where C ~ &quot;health-concern&quot;
  )"/>
        </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="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="prevalenceInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition Condition):
if condition.clinicalStatus ~ &quot;active&quot;
  or condition.clinicalStatus ~ &quot;recurrence&quot;
  or condition.clinicalStatus ~ &quot;relapse&quot; then
  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
    (end of condition.abatementInterval()) abatementDate
    return if abatementDate is null then
      Interval[start of condition.onset.toInterval(), abatementDate)
    else
      Interval[start of condition.onset.toInterval(), abatementDate]"/>
        </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="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="encounterDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns the Condition resources referenced by the diagnosis element of the Encounter
*/
define fluent function encounterDiagnosis(Encounter Encounter ):
  Encounter.diagnosis D
    return singleton from ([Condition] C where C.id = D.condition.reference.getId())"/>
        </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="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getId"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
@comment: This function can be used to determine the logical id of a given resource. It can be used in
a single-server environment to trace references. However, this function does not attempt to resolve
or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))"/>
        </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="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hospitalizationWithObservation"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
*/
define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
  TheEncounter Visit
  		let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs
  				where LastObs.status = 'finished'
            and LastObs.period ends 1 hour or less on or before start of Visit.period
  				sort by end of period
  			),
  			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
  			EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED
  				where LastED.status = 'finished'
            and LastED.period ends 1 hour or less on or before VisitStart
  				sort by end of period
  			)
  		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <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 SDE"/>
        <resource value="Library/SupplementalDataElements|3.5.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library CQMCommon"/>
        <resource value="Library/CQMCommon|2.2.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource value="Library/QICoreCommon|2.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system AdministrativeGender"/>
        <resource value="http://hl7.org/fhir/administrative-gender"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system MedicationRequestCategory"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionCategory"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-category"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system USCoreConditionCategoryExtensionCodes"/>
        <resource
                  value="http://hl7.org/fhir/us/core/CodeSystem/condition-category"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Encounter Inpatient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Schedule II, III and IV Opioid Medications"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Schedule IV Benzodiazepines"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Payer Type"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Cancer Related Pain"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Sickle Cell Disease with and without Crisis"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Opioid Use Disorder"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Medications for Opioid Use Disorder (MOUD)"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Opioid Medication Assisted Treatment (MAT)"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Palliative or Hospice Care"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Observation Services"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Emergency Department Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Discharge To Acute Care Facility"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Care Referral or Admission"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1116.365"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Patient Expired"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Left Against Medical Advice"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Denominator Exclusion"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
        <mustSupport value="ethnicity"/>
        <mustSupport value="race"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="period"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="period"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="period"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString
                           value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1"/>
        </codeFilter>
        <codeFilter>
          <path value="intent.value"/>
          <code>
            <code value="order"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
        <mustSupport value="medication.reference"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="medication"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <mustSupport value="code"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="ServiceRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
    <extension url="guidance">
      <valueString
                   value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex;  SDE Ethnicity  SDE Payer  SDE Race  SDE Sex   "/>
    </extension>
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
          <display value="Supplemental Data"/>
        </coding>
        <text value="Supplemental Data Guidance"/>
      </valueCodeableConcept>
    </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>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
    <valueReference>
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <url
       value="https://madie.cms.gov/Measure/SafeUseofOpioidsConcurrentPrescribingFHIR"/>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="short-name"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/shortName"/>
    <value value="CMS506FHIR"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:95d529af-66b4-4cfd-bc1f-f43704dc47ad"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:18e2d10e-da9c-412b-8d74-07d01207754a"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="endorser"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cbeId"/>
    <value value="3316e"/>
    <assigner>
      <display value="CMS Consensus Based Entity"/>
    </assigner>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="publisher"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cmsId"/>
    <value value="506FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="0.2.000"/>
  <name value="SafeUseofOpioidsConcurrentPrescribingFHIR"/>
  <title value="Safe Use of Opioids Concurrent PrescribingFHIR"/>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2024-07-09T14:53:55+00:00"/>
  <publisher value="Centers for Medicare &amp; Medicaid Services (CMS)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.cms.gov/"/>
    </telecom>
  </contact>
  <description
               value="Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed, or continued on, two or more opioids or an opioid and benzodiazepine concurrently at discharge"/>
  <purpose value="UNKNOWN"/>
  <usage
         value="Clinician judgement, clinical appropriateness, or both may indicate concurrent prescribing of two unique opioids or an opioid and benzodiazepine is medically necessary, thus the measure is not expected to have a zero rate.   Inpatient hospitalizations with discharge medications of a new or continuing opioid or a new or continuing benzodiazepine prescription should be included in the initial population.   Inpatient hospitalizations with discharge medications of two or more new or continuing opioids or new or continuing opioid and benzodiazepine resulting in concurrent therapy at discharge should be included in the numerator. Each benzodiazepine and opioid included on the medication discharge list is considered a unique prescription.  The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.  This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.  This FHIR-based measure has been derived from the QDM-based measure: CMS 506v7.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).  Definition For the purpose of this measure, the following are defined as: - Opioid: Schedule II, III and IV Opioid Medications that do not include naloxone.  - Benzodiazepine: Schedule IV benzodiazepine medications. - Medications for Opioid Use Disorder: Methadone, buprenorphine and buprenorphine in combination with naloxone.  - Prescribed: The intent of the measure is to capture opioid and/or benzodiazepine medications continued or ordered at discharge - Numerator criteria: Two or more unique orders for opioids, or an opioid and benzodiazepine at discharge"/>
  <copyright
             value="Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third party codes contained in the specifications.  CPT(R) contained in the measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved."/>
  <effectivePeriod>
    <start value="2025-01-01"/>
    <end value="2025-12-31"/>
  </effectivePeriod>
  <author>
    <name value="Mathematica"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.mathematica.org/"/>
    </telecom>
  </author>
  <library
           value="https://madie.cms.gov/Library/SafeUseofOpioidsConcurrentPrescribingFHIR"/>
  <disclaimer
              value="These performance measures are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.  THE MEASURES AND SPECIFICATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND.  Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM]."/>
  <rationale
             value="Unintentional opioid overdose fatalities have become a major public health concern in the United States (Rudd et al., 2016). Reducing the number of unintentional overdoses has become a priority for numerous federal organizations including, but not limited to, the Centers for Disease Control and Prevention (CDC), the Federal Interagency Workgroup for Opioid Adverse Drug Events, and the Substance Abuse and Mental Health Services Administration.   Concurrent prescriptions of opioids or opioids and benzodiazepines places patients at a greater risk of unintentional overdose due to the increased risk of respiratory depression (Dowell, Haegerich, &amp; Chou, 2016; Dowell, Ragan, Jones, Baldwin, &amp; Chou, 2022).  An analysis of national prescribing patterns shows that more than half of patients who received an opioid prescription in 2009 had filled another opioid prescription within the previous 30 days (National Institute on Drug Abuse, 2011). Studies of multiple claims and prescription databases have shown that between 5%-15% of patients receive concurrent opioid prescriptions and 5%-20% of patients receive concurrent opioid and benzodiazepine prescriptions across various settings (Liu et al., 2013; Mack et al., 2015, Park et al., 2015). Patients who have multiple opioid prescriptions have an increased risk for overdose (Jena et al., 2014). Rates of fatal overdose are ten times higher in patients who are co-dispensed opioid analgesics and benzodiazepines than opioids alone (Dasgupta et al., 2015). The number of opioid overdose deaths involving benzodiazepines increased 14% on average each year from 2006 to 2011, while the number of opioid analgesic overdose deaths not involving benzodiazepines did not change significantly (Jones &amp; McAninch, 2015). Furthermore, concurrent use of benzodiazepines with opioids was prevalent in 31%-51% of fatal overdoses (Dowell, Haegerich, &amp; Chou, 2016). One study found that eliminating concurrent use of opioids and benzodiazepines could reduce the risk of opioid overdose-related emergency department (ED) and inpatient visits by 15% and potentially could have prevented an estimated 2,630 deaths related to opioid painkiller overdoses in 2015 (Sun et al., 2017).   A study on The Opioid Safety Initiative in the Veterans Health Administration (VHA), which includes an opioid and benzodiazepine concurrent prescribing measure that this measure is based on, was associated with a decrease of 20.67% overall and 0.86% patients per month (781 patients per month) receiving concurrent benzodiazepine with an opioid among all adult VHA patients who filled outpatient opioid prescriptions from October 2012 to September 2014 (Lin et al., 2017).  Adopting a measure that calculates the proportion of patients with two or more opioids or opioids and benzodiazepines concurrently has the potential to reduce preventable mortality and reduce the costs associated with adverse events related to opioid use by (1) encouraging providers to identify patients with concurrent prescriptions of opioids or opioids and benzodiazepines and (2) discouraging providers from prescribing two or more opioids or opioids and benzodiazepines concurrently."/>
  <clinicalRecommendationStatement
                                   value="The CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022 recommends that clinicians should: - “[Use strategies minimizing] opioid use…for both opioid-naïve and opioid-tolerant patients with acute pain when possible. If patients receiving long-term opioid therapy require additional medication for acute pain, nonopioid medications should be used when possible.” - ”Use particular caution when prescribing opioid pain medication and benzodiazepines concurrently.&quot; - “Review increased risks for respiratory depression when opioids are taken with benzodiazepines, other sedatives, alcohol, nonprescribed or illicit drugs (e.g., heroin), or other opioids (see Recommendations 8 and 11)” - “Closely monitor patients who are unable to taper and who continue on high-dose or otherwise high-risk opioid regimens (e.g., opioids prescribed concurrently with benzodiazepines) and should work with patients to mitigate overdose risk (e.g., by providing overdose education and naloxone) (see Recommendation 8).” - &quot;Discuss information from the PDMP with the patient and confirm that the patient is aware of any additional prescriptions.” - “Discuss safety concerns, including increased risk for respiratory depression and overdose, with patients found to be receiving overlapping prescription opioids from multiple clinicians who are not coordinating the patient’s care or patients who are receiving medications that increase risk when combined with opioids (e.g., benzodiazepines) (see Recommendation 11), and offer naloxone (see Recommendation 8).&quot; - &quot;Discuss safety concerns with other clinicians who are prescribing controlled substances for the patient. Ideally, clinicians should first discuss concerns with the patient and inform them that they plan to coordinate care with their other clinicians to improve the patient’s safety.”  In addition to the 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain, opioid prescribing guidelines issued by various state agencies and professional societies for various settings agree with the recommendation to avoid concurrently prescribing opioids  (American Academy of Emergency Medicine (AAEM), 2013; and Washington Agency Medical Directors’ Group (WAMDG), 2015), and opioids and benzodiazepines (WAMDG, 2015; American Society of Interventional Pain Physicians (ASIPP), 2012."/>
  <group id="64ef764056d636294b157b3e">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="proportion"/>
          <display value="Proportion"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
      <valueCode value="Encounter"/>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
          <code value="process"/>
          <display value="Process"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation">
      <valueCode value="None"/>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
          <code value="decrease"/>
          <display value="increase"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description
                 value="Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed, or continued on, two or more opioids or an opioid and benzodiazepine concurrently at discharge."/>
    <population id="345E1255-3623-402A-9016-2B5C9E096C26">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Inpatient hospitalizations that end during the measurement period, where the patient is 18 years of age and older at the start of the encounter and prescribed one or more new or continuing opioid or benzodiazepine at discharge"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="9ED4F80C-B465-4CDB-BFDD-CE376A165DD0">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description value="Equals Initial Population"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="25C57870-241A-428F-BDA8-63C5B4685EE4">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exclusion"/>
          <display value="Denominator Exclusion"/>
        </coding>
      </code>
      <description
                   value="Inpatient hospitalizations where patients have cancer pain that begins prior to or during the encounter or are ordered or are receiving palliative or hospice care (including comfort measures, terminal care, and dying care) during the hospitalization or in an emergency department encounter or observation stay immediately prior to hospitalization, patients receiving medication for opioid use disorder, patients with sickle cell disease, patients discharged to another inpatient care facility or left against medical advice, and patients who expire during the inpatient stay"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exclusion"/>
      </criteria>
    </population>
    <population id="C36B952C-8CCF-436F-A9E2-423A00C56A1A">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description
                   value="Inpatient hospitalizations where the patient is prescribed or continuing to take two or more opioids or an opioid and benzodiazepine at discharge"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
  </group>
  <supplementalData id="sde-ethnicity">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Ethnicity"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-payer">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Payer"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Race"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-sex">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Sex"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
</Measure>