dQM QICore Content Implementation Guide
2025.0.0 - CI Build
dQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2025.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/dqm-content-qicore-2025/ and changes regularly. See the Directory of published versions
Active as of 2025-08-25 |
<Measure xmlns="http://hl7.org/fhir">
<id value="CMS506FHIRSafeUseofOpioids"/>
<meta>
<profile
value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure"/>
<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"/>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm"/>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm"/>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm"/>
</meta>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml" class="col-12">
<table class="narrative-table">
<tbody>
<tr>
<th colspan="2" scope="row" class="row-header">Metadata</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Safe Use of Opioids - Concurrent PrescribingFHIR</td>
</tr>
<tr>
<th scope="row" class="row-header">Version</th>
<td class="content-container">1.0.000</td>
</tr>
<tr>
<th scope="row" class="row-header">Short Name</th>
<td class="content-container">CMS506FHIR</td>
</tr>
<tr>
<th scope="row" class="row-header">GUID (Version Independent)</th>
<td class="content-container">urn:uuid:95d529af-66b4-4cfd-bc1f-f43704dc47ad</td>
</tr>
<tr>
<th scope="row" class="row-header">GUID (Version Specific)</th>
<td class="content-container">urn:uuid:58639502-c44d-4919-aeaf-8a011ce3872f</td>
</tr>
<tr>
<th scope="row" class="row-header">CMS Identifier</th>
<td class="content-container">506FHIR</td>
</tr>
<tr>
<th scope="row" class="row-header">CMS Consensus Based Entity Identifier</th>
<td class="content-container">3316e</td>
</tr>
<tr>
<th scope="row" class="row-header">Effective Period</th>
<td class="content-container">2026-01-01 through 2026-12-31</td>
</tr>
<tr>
<th scope="row" class="row-header">Steward (Publisher)</th>
<td class="content-container">Centers for Medicare & Medicaid Services (CMS)</td>
</tr>
<tr>
<th scope="row" class="row-header">Developer</th>
<td class="content-container">Mathematica</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container"><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></td>
</tr>
<tr>
<th scope="row" class="row-header">Copyright</th>
<td class="content-container"><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.</p>
<p>CPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Disclaimer</th>
<td class="content-container"><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.</p>
<p>THE MEASURES AND SPECIFICATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.</p>
<p>Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Rationale</th>
<td class="content-container"><p>Unintentional opioid overdose fatalities have become a major public health concern in the United States (Rudd, Aleshire, Zibbel, & Gladden, 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.</p>
<p>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, & Chou, 2016; Dowell, Ragan, Jones, Baldwin, & 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 & McAninch, 2015). Furthermore, concurrent use of benzodiazepines with opioids was prevalent in 31%-51% of fatal overdoses (Dowell, Haegerich, & 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, Dixit, Humphreys, Darnall, & Mackey, 2017).</p>
<p>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, Bohnert, Kerns, Clay, Ganoczy, & Ilgen, 2017).</p>
<p>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></td>
</tr>
<tr>
<th scope="row" class="row-header">Clinical Recommendation Statement</th>
<td class="content-container"><p>The CDC Clinical Practice Guideline for Prescribing Opioids for Pain - United States, 2022 recommends that clinicians should:</p>
<ul>
<li><p>"[Use strategies minimizing] opioid use... for both opioid-naive 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."</p></li>
<li><p>"Use particular caution when prescribing opioid pain medication and benzodiazepines concurrently."</p></li>
<li><p>"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)"</p></li>
<li><p>"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)."</p></li>
<li><p>"Discuss information from the PDMP with the patient and confirm that the patient is aware of any additional prescriptions."</p></li>
<li><p>"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)."</p></li>
<li><p>"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."</p></li>
</ul>
<p>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; and New York City Department Of Health and Mental Hygiene (NYC DPOMH), 2013) whenever possible as the combination of these medications may potentiate opioid-induced respiratory depression.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>American Academy of Emergency Medicine (AAEM). (2013). Emergency department opioid-prescribing guidelines for the treatment of non-cancer-related pain. Retrieved from https://www.aaem.org/UserFiles/file/Emergency-Department-Opoid-Prescribing-Guidelines.pdf</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>American Society of Interventional Pain Physicians (ASIPP). (2012). Guidelines for responsible opioid prescribing in chronic noncancer pain. Retrieved from https://pubmed.ncbi.nlm.nih.gov/22786449/</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Dasgupta, N., Jonsson Funk, M., Proescholdbell, S., et al. (2015, September). Cohort study of the impact of high-dose opioid analgesics on overdose mortality. Pain Medicine. Retrieved from http://onlinelibrary.wiley.com/doi/10.1111/pme.12907/abstract</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Dowell, D., Haegerich, T., & Chou, R. (2016). CDC guideline for prescribing opioids for chronic pain-United States, 2016. MMWR Recommendations and Reports, 65. Retrieved from http://www.cdc.gov/media/dpk/2016/dpk-opioid-prescription-guidelines.html</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Geller, A. I., Dowell, D., Lovegrove, M. C., Mcaninch, J. K., Goring, S. K., Rose, K. O., Budnitz, D. S. (2019). U.S. Emergency Department Visits Resulting From Nonmedical Use of Pharmaceuticals, 2016. American Journal of Preventive Medicine, 56(5), 639-647. https://doi.org/10.1016/j.amepre.2018.12.009</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Herzig, S., Rothberg, M., Cheung, M., et al. (2014). Opioid utilization and opioid-related adverse events in nonsurgical patients in U.S. hospitals. Journal of Hospital Medicine, 9(2), 73-81.</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Jena, A., Goldman, D., Schaeffer, L. D., et al. (2014). Opioid prescribing by multiple providers in Medicare: Retrospective observational study of insurance claims. BMJ, 348, g1393. DOI: 10.1136/bmj.g1393</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Lin, L. A., Bohnert, A. S., Kerns, R. D., et al. (2017). Impact of the opioid safety initiative on opioid-related prescribing in veterans. Pain, 158(5), 833-839. Retrieved from https://www.ncbi.nlm.nih.gov/pubmed/28240996</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Liu, Y., Logan, J., Paulozzi, L., et al. (2013). Potential misuse and inappropriate prescription practices involving opioid analgesics. American Journal of Managed Care, 19(8), 648-665. Retrieved from http://www.ajmc.com/journals/issue/2013/2013-1-vol19-n8/Potential-Misuse-and-Inappropriate-Prescription-Practices-Involving-Opioid-Analgesics/</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Mack, K., Zhang, K., Paulozzi, L., et al. (2015, February). Prescription practices involving opioid analgesics among Americans with Medicaid, 2010. Journal of Health Care for the Poor and Underserved, 26(1), 182-198. Retrieved from http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4365785</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>National Institute on Drug Abuse. (2011). Analysis of opioid prescription practices finds areas of concern. Retrieved from https://www.drugabuse.gov/news-events/news-releases/2011/04/analysis-opioid-prescription-practices-finds-areas-concern</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>New York City (NYC) Department of Health and Mental Hygiene (NYC DOHMH). (2013). NYC emergency department discharge opioid-prescribing guidelines. Retrieved from https://www1.nyc.gov/site/doh/providers/health-topics/opioid-prescribing-resources-for-emergency-departments.page</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Park, T., Saitz, R., Ganoczy, D., et al. (2015). Benzodiazepine-prescribing patterns and deaths from drug overdose among U.S. veterans receiving opioid analgesics: Case-cohort study. BMJ, 350, h2698. Retrieved from http://www.bmj.com/content/350/bmj.h2698</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Rudd, R., Aleshire, N., Zibbell, J., et al. (2016, January). Increases in drug and opioid overdose deaths-United States, 2000-2014. Morbidity and Mortality Weekly Report, 64(50), 1378-1382. Retrieved from http://www.cdc.gov/mmwr/preview/mmwrhtml/mm6450a3.htm</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Sun, E., Dixit, A., Humphreys, K., et al. (2017). Association between concurrent use of prescription opioids and benzodiazepines and overdose: Retrospective analysis. BMJ, 356, j760. Retrieved from http://www.bmj.com/content/356/bmj.j760</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>U.S. Department of Veterans Affairs. (2014). Opioid safety initiative toolkit. Retrieved from https://www.va.gov/PAINMANAGEMENT/Opioid_Safety_Initiative_OSI.asp</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>U.S. Department of Veterans Affairs. (2016). Opioid safety initiative: Opioids (including tramadol) used in combination with benzodiazepine derivative sedatives/hypnotics. Unpublished manuscript.</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
<p>Washington Agency Medical Directors' Group (WAMDG). (2015). Interagency guideline on prescribing opioids for pain, Part II: Prescribing opioids in the acute and subacute phase. Retrieved from http://www.agencymeddirectors.wa.gov/Files/2015AMDGOpioidGuideline.pdf</p>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container">Benzodiazepine: <p>Schedule IV benzodiazepine medications.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container">Medications for Opioid Use Disorder: <p>Methadone, buprenorphine and buprenorphine in combination with naloxone.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container">Numerator criteria: <p>Two or more unique orders for opioids, or an opioid and benzodiazepine at discharge.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container">Opioid: <p>Schedule II, III and IV Opioid Medications that do not include naloxone.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container">Prescribed: <p>The intent of the measure is to capture opioid and/or benzodiazepine medications continued or ordered at discharge.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Guidance (Usage)</th>
<td class="content-container"><p>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.</p>
<p>New or continuing opioid and benzodiazepine medications are included with the use of the MedicationRequest QI-Core Profile. The Profile's community and discharge category codes indicate that the medications should be taken by or given to the patient after being discharged from an inpatient encounter, which could include previously or newly prescribed medications.</p>
<p>Inpatient hospitalizations with discharge medications of an opioid or benzodiazepine prescription should be included in the initial population.</p>
<p>Inpatient hospitalizations with discharge medications of two or more opioids or an 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.</p>
<p>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.</p>
<p>This dQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.</p>
<p>This FHIR-based measure has been derived from the QDM-based measure: CMS506v8.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).</p></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: Group_1)</th>
</tr>
<tr>
<th scope="row" class="row-header">Basis</th>
<td class="content-container">Encounter</td>
</tr>
<tr>
<th scope="row" class="row-header">Scoring</th>
<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-scoring#proportion: 'Proportion']</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#process: 'Process']</td>
</tr>
<tr>
<th scope="row" class="row-header">Rate Aggregation</th>
<td class="content-container"><p>None</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Improvement Notation</th>
<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#decrease: 'Decreased score indicates improvement']</td>
</tr>
<tr>
<th scope="row" class="row-header">Initial Population</th>
<td class="content-container">
<em>ID</em>: InitialPopulation_1
<br/>
<em>Description</em>:
<p style="white-space: pre-line" class="tab-one"><p>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 opioid and/or benzodiazepine at discharge</p></p>
<em>Logic Definition</em>: <a href="#primary-cms506fhirsafeuseofopioids-initial-population">Initial Population</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Denominator</th>
<td class="content-container">
<em>ID</em>: Denominator_1
<br/>
<em>Description</em>:
<p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population</p></p>
<em>Logic Definition</em>: <a href="#primary-cms506fhirsafeuseofopioids-denominator">Denominator</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Denominator Exclusion</th>
<td class="content-container">
<em>ID</em>: DenominatorExclusion_1
<br/>
<em>Description</em>:
<p style="white-space: pre-line" class="tab-one"><p>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 (OUD) with active OUD diagnosis or Opioid Medication Assisted Treatment (MAT), 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</p></p>
<em>Logic Definition</em>: <a href="#primary-cms506fhirsafeuseofopioids-denominator-exclusion">Denominator Exclusion</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Numerator</th>
<td class="content-container">
<em>ID</em>: Numerator_1
<br/>
<em>Description</em>:
<p style="white-space: pre-line" class="tab-one"><p>Inpatient hospitalizations where the patient is prescribed two or more opioids or an opioid and benzodiazepine at discharge</p></p>
<em>Logic Definition</em>: <a href="#primary-cms506fhirsafeuseofopioids-numerator">Numerator</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Guidance</th>
<td class="content-container"><p>For every patient evaluated by this measure also identify payer, race, ethnicity and sex</p></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Supplemental Data Elements</th>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-ethnicity
<br/>
<em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
<br/>
<em>Description</em>: SDE Ethnicity
<br/>
<em>Logic Definition</em>: <a href="#cms506fhirsafeuseofopioids-sde-ethnicity">SDE Ethnicity</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-payer
<br/>
<em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
<br/>
<em>Description</em>: SDE Payer
<br/>
<em>Logic Definition</em>: <a href="#cms506fhirsafeuseofopioids-sde-payer">SDE Payer</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-race
<br/>
<em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
<br/>
<em>Description</em>: SDE Race
<br/>
<em>Logic Definition</em>: <a href="#cms506fhirsafeuseofopioids-sde-race">SDE Race</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Element</th>
<td class="content-container">
<em>ID</em>: sde-sex
<br/>
<em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
<br/>
<em>Description</em>: SDE Sex
<br/>
<em>Logic Definition</em>: <a href="#cms506fhirsafeuseofopioids-sde-sex">SDE Sex</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Measure Logic</th>
</tr>
<tr>
<th scope="row" class="row-header">Primary Library</th>
<td class="content-container">https://madie.cms.gov/Library/CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<th scope="row" class="row-header">Contents</th>
<td class="content-container">
<em><a href="#population-criteria">Population Criteria</a></em>
<br/>
<em><a href="#definitions">Logic Definitions</a></em>
<br/>
<em><a href="#terminology">Terminology</a></em>
<br/>
<em><a href="#dependencies">Dependencies</a></em>
<br/>
<em><a href="#data-requirements">Data Requirements</a></em>
<br/>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header"><a name="population-criteria"> </a>Population Criteria</th>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: Group_1)</th>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="primary-cms506fhirsafeuseofopioids-initial-population"> </a>
Initial Population
</th>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population":
"Inpatient Encounters With An Opioid Or Benzodiazepine At Discharge"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="primary-cms506fhirsafeuseofopioids-denominator"> </a>
Denominator
</th>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator":
"Initial Population"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="primary-cms506fhirsafeuseofopioids-denominator-exclusion"> </a>
Denominator Exclusion
</th>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay.
*/
define "Denominator Exclusion":
"Denominator" InpatientEncounter
where exists ( ["ConditionProblemsHealthConcerns": "Cancer Related Pain"] CancerPain
where CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
and CancerPain.isVerified ( )
)
or exists ( "Inpatient Encounter With Encounter Diagnosis Of Cancer Pain" )
or exists ( ["ConditionProblemsHealthConcerns": "Sickle Cell Disease with and without Crisis"] SickleCellDisease
where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
and SickleCellDisease.isVerified ( )
)
or exists ( "Treatment For Opioid Use Disorders" OUDTreatment
where OUDTreatment.authoredOn during day of InpatientEncounter.period
)
or exists ( "Intervention Palliative Or Hospice Care" PalliativeOrHospiceCare
where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during InpatientEncounter.hospitalizationWithObservation ( )
)
or ( InpatientEncounter.hospitalization.dischargeDisposition in "Discharge To Acute Care Facility"
or InpatientEncounter.hospitalization.dischargeDisposition in "Hospice Care Referral or Admission"
or InpatientEncounter.hospitalization.dischargeDisposition in "Patient Expired"
or InpatientEncounter.hospitalization.dischargeDisposition in "Left Against Medical Advice"
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="primary-cms506fhirsafeuseofopioids-numerator"> </a>
Numerator
</th>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.
*/
define "Numerator":
"Denominator" InpatientEncounter
where ( Count("Opioid At Discharge" OpioidMedications
where OpioidMedications.authoredOn during day of InpatientEncounter.period
return distinct OpioidMedications.medication
) >= 2
)
or ( exists "Opioid At Discharge" OpioidDischargeMedications
where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
and exists ( "Benzodiazepine At Discharge" BenzodiazepineDischargeMedication
where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
)
)</code></pre>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header"><a name="definitions"> </a>Logic Definitions</th>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="supplementaldataelements-sde-sex"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Sex":
case
when Patient.sex = '248153007' then "Male (finding)"
when Patient.sex = '248152002' then "Female (finding)"
else null
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="supplementaldataelements-sde-payer"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Payer":
[Coverage: type in "Payer Type"] Payer
return {
code: Payer.type,
period: Payer.period
}</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="supplementaldataelements-sde-ethnicity"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
Patient.ethnicity E
return Tuple {
codes: { E.ombCategory } union E.detailed,
display: E.text
}</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="supplementaldataelements-sde-race"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Race":
Patient.race R
return Tuple {
codes: R.ombCategory union R.detailed,
display: R.text
}</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tostring"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tointerval"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
if period is null then
null
else
if period."start" is null then
Interval(period."start".value, period."end".value]
else
Interval[period."start".value, period."end".value]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-toconcept"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container 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 scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tocode"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container 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 scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-sde-sex"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Sex":
SDE."SDE Sex"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-inpatient-encounter-with-age-greater-than-or-equal-to-18"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Inpatient Encounter With Age Greater Than Or Equal To 18":
CQMCommon."Inpatient Encounter" InpatientHospitalEncounter
where AgeInYearsAt(date from start of InpatientHospitalEncounter.period) >= 18</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-opioid-at-discharge"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Opioid At Discharge":
["MedicationRequest": "Schedule II, III and IV Opioid Medications"] OpioidMedications
where ( OpioidMedications.isCommunity ( )
or OpioidMedications.isDischarge ( )
)
and OpioidMedications.status in { 'active', 'completed' }
and OpioidMedications.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-benzodiazepine-at-discharge"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Benzodiazepine At Discharge":
["MedicationRequest": "Schedule IV Benzodiazepines"] BenzoMedications
where ( BenzoMedications.isCommunity ( )
or BenzoMedications.isDischarge ( )
)
and BenzoMedications.status in { 'active', 'completed' }
and BenzoMedications.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-inpatient-encounters-with-an-opioid-or-benzodiazepine-at-discharge"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Captures encounters of patients with an opioid and/or benzodiazepine at discharge.
*/
define "Inpatient Encounters With An Opioid Or Benzodiazepine At Discharge":
"Inpatient Encounter With Age Greater Than Or Equal To 18" InpatientEncounter
with ( "Opioid At Discharge"
union "Benzodiazepine At Discharge" ) OpioidOrBenzodiazepineAtDischarge
such that OpioidOrBenzodiazepineAtDischarge.authoredOn during day of InpatientEncounter.period</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-initial-population"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population":
"Inpatient Encounters With An Opioid Or Benzodiazepine At Discharge"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-denominator"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator":
"Initial Population"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-numerator"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.
*/
define "Numerator":
"Denominator" InpatientEncounter
where ( Count("Opioid At Discharge" OpioidMedications
where OpioidMedications.authoredOn during day of InpatientEncounter.period
return distinct OpioidMedications.medication
) >= 2
)
or ( exists "Opioid At Discharge" OpioidDischargeMedications
where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
and exists ( "Benzodiazepine At Discharge" BenzodiazepineDischargeMedication
where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
)
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-sde-payer"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Payer":
SDE."SDE Payer"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-sde-ethnicity"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
SDE."SDE Ethnicity"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-inpatient-encounter-with-encounter-diagnosis-of-cancer-pain"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Inpatient Encounter With Encounter Diagnosis Of Cancer Pain":
"Denominator" QualifyingEncounter
where QualifyingEncounter.reasonCode in "Cancer Related Pain"
or QualifyingEncounter.encounterDiagnosis ( ).code in "Cancer Related Pain"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-medications-for-opioid-use-disorder"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Medications For Opioid Use Disorder":
["MedicationRequest": "Medications for Opioid Use Disorder (MOUD)"] DischargeMedication
where ( DischargeMedication.isCommunity ( )
or DischargeMedication.isDischarge ( )
)
and DischargeMedication.status in { 'active', 'completed' }
and DischargeMedication.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-treatment-for-opioid-use-disorders"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Treatment For Opioid Use Disorders":
( "Medications For Opioid Use Disorder" MedicationTreatment
with ["Procedure": "Opioid Medication Assisted Treatment (MAT)"] MAT
such that MedicationTreatment.authoredOn during day of MAT.performed.toInterval ( )
and MedicationTreatment.authoredOn during day of "Measurement Period"
and MAT.status in { 'completed', 'in-progress' }
)
union ( "Medications For Opioid Use Disorder" MedicationTreatment
with ["ConditionProblemsHealthConcerns": "Opioid Use Disorder"] OUD
such that MedicationTreatment.authoredOn during day of OUD.prevalenceInterval ( )
and OUD.prevalenceInterval ( ) overlaps day of "Measurement Period"
and OUD.isVerified ( )
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-intervention-palliative-or-hospice-care"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Intervention Palliative Or Hospice Care":
( ["ServiceRequest": "Palliative or Hospice Care"] PalliativeOrHospiceCareOrder
where PalliativeOrHospiceCareOrder.status in { 'active', 'completed', 'on-hold' }
)
union ( ["Procedure": "Palliative or Hospice Care"] PalliativeOrHospiceCarePerformed
where PalliativeOrHospiceCarePerformed.status in { 'completed', 'in-progress' }
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-denominator-exclusion"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay.
*/
define "Denominator Exclusion":
"Denominator" InpatientEncounter
where exists ( ["ConditionProblemsHealthConcerns": "Cancer Related Pain"] CancerPain
where CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
and CancerPain.isVerified ( )
)
or exists ( "Inpatient Encounter With Encounter Diagnosis Of Cancer Pain" )
or exists ( ["ConditionProblemsHealthConcerns": "Sickle Cell Disease with and without Crisis"] SickleCellDisease
where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
and SickleCellDisease.isVerified ( )
)
or exists ( "Treatment For Opioid Use Disorders" OUDTreatment
where OUDTreatment.authoredOn during day of InpatientEncounter.period
)
or exists ( "Intervention Palliative Or Hospice Care" PalliativeOrHospiceCare
where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during InpatientEncounter.hospitalizationWithObservation ( )
)
or ( InpatientEncounter.hospitalization.dischargeDisposition in "Discharge To Acute Care Facility"
or InpatientEncounter.hospitalization.dischargeDisposition in "Hospice Care Referral or Admission"
or InpatientEncounter.hospitalization.dischargeDisposition in "Patient Expired"
or InpatientEncounter.hospitalization.dischargeDisposition in "Left Against Medical Advice"
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-sde-race"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Race":
SDE."SDE Race"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms506fhirsafeuseofopioids-isverified"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS506FHIRSafeUseofOpioids</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
*/
define fluent function isVerified(condition Choice<QICore.ConditionProblemsHealthConcerns, QICore.ConditionEncounterDiagnosis>):
condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon."confirmed"
or condition.verificationStatus ~ QICoreCommon."unconfirmed"
or condition.verificationStatus ~ QICoreCommon."provisional"
or condition.verificationStatus ~ QICoreCommon."differential"
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="qicorecommon-iscommunity"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> QICoreCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given MedicationRequest has a category of Community
*/
define fluent function isCommunity(medicationRequest Choice<MedicationRequest, MedicationNotRequested>):
exists (medicationRequest.category C
where C ~ Community
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="qicorecommon-isdischarge"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> QICoreCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given MedicationRequest has a category of Discharge
*/
define fluent function isDischarge(medicationRequest Choice<MedicationRequest, MedicationNotRequested>):
exists (medicationRequest.category C
where C ~ Discharge
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="qicorecommon-prevalenceinterval"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> QICoreCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container 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 Choice<"ConditionEncounterDiagnosis", "ConditionProblemsHealthConcerns">):
if condition.clinicalStatus ~ "active"
or condition.clinicalStatus ~ "recurrence"
or condition.clinicalStatus ~ "relapse" 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 scope="row" rowspan="2" class="row-header">
<a name="qicorecommon-abatementinterval"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> QICoreCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized abatement of a given Condition.
@comment: If the abatement element of the Condition is represented as a DateTime, the result
is an interval beginning and ending on that DateTime.
If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
result is an interval from the date the patient turned that age to immediately before one year later.
If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
before one year later than the date the patient turned the ending age of the quantity interval.
*/
define fluent function abatementInterval(condition Choice<"ConditionEncounterDiagnosis", "ConditionProblemsHealthConcerns">):
if condition.abatement is DateTime then
Interval[condition.abatement as DateTime, condition.abatement as DateTime]
else if condition.abatement is Quantity then
Interval[Patient.birthDate + (condition.abatement as Quantity),
Patient.birthDate + (condition.abatement as Quantity) + 1 year)
else if condition.abatement is Interval<Quantity> then
Interval[Patient.birthDate + (condition.abatement.low as Quantity),
Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)
else if condition.abatement is Interval<DateTime> then
Interval[condition.abatement.low, condition.abatement.high)
else null as Interval<DateTime></code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="qicorecommon-references"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> QICoreCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given reference is to the given resourceId
@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference Reference, resourceId String):
resourceId = Last(Split(reference.reference, '/'))</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="qicorecommon-tointerval"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> QICoreCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of DateTime, Quanitty, Interval<DateTime>, or Interval<Quantity> types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in QICore, allowing this function to be used across any resource.
The input can be provided as a DateTime, Quantity, Interval<DateTime> or Interval<Quantity>.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
If the input is a DateTime Interval, the result is the input.
If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
*/
define fluent function toInterval(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>, Timing>):
case
when choice is DateTime then
Interval[choice as DateTime, choice as DateTime]
when choice is Interval<DateTime> then
choice as Interval<DateTime>
when choice is Quantity then
Interval[Patient.birthDate + (choice as Quantity),
Patient.birthDate + (choice as Quantity) + 1 year)
when choice is Interval<Quantity> then
Interval[Patient.birthDate + (choice.low as Quantity),
Patient.birthDate + (choice.high as Quantity) + 1 year)
when choice is Timing then
Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval<DateTime>
else
null as Interval<DateTime>
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cqmcommon-inpatient-encounter"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CQMCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Inpatient Encounter":
[Encounter: "Encounter Inpatient"] EncounterInpatient
where EncounterInpatient.status = 'finished'
and EncounterInpatient.period ends during day of "Measurement Period"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cqmcommon-encounterdiagnosis"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CQMCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container 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.reasonReference D
return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cqmcommon-hospitalizationwithobservation"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CQMCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container 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: "Observation Services"] 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: "Emergency Department Visit"] 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>
<tr>
<th colspan="2" scope="row" class="row-header"><a name="terminology"> </a>Terminology</th>
</tr>
<tr>
<th scope="row" class="row-header">Code System</th>
<td class="content-container">
<em>Description</em>: Code system SNOMEDCT
<br/>
<em>Resource</em>: http://snomed.info/sct
<br/>
<em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Code System</th>
<td class="content-container">
<em>Description</em>: Code system MedicationRequestCategory
<br/>
<em>Resource</em>: http://terminology.hl7.org/CodeSystem/medicationrequest-category
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Code System</th>
<td class="content-container">
<em>Description</em>: Code system ConditionClinicalStatusCodes
<br/>
<em>Resource</em>: http://terminology.hl7.org/CodeSystem/condition-clinical
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Code System</th>
<td class="content-container">
<em>Description</em>: Code system ConditionVerificationStatusCodes
<br/>
<em>Resource</em>: http://terminology.hl7.org/CodeSystem/condition-ver-status
<br/>
<em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Encounter Inpatient
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Schedule II, III and IV Opioid Medications
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Schedule IV Benzodiazepines
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Payer Type
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Cancer Related Pain
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Sickle Cell Disease with and without Crisis
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Medications for Opioid Use Disorder (MOUD)
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Opioid Medication Assisted Treatment (MAT)
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Opioid Use Disorder
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Palliative or Hospice Care
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Observation Services
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Emergency Department Visit
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Discharge To Acute Care Facility
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Hospice Care Referral or Admission
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1116.365
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1116.365</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Patient Expired
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Left Against Medical Advice
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Male (finding)
<br/>
<em>Code</em>: 248153007
<br/>
<em>System</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Female (finding)
<br/>
<em>Code</em>: 248152002
<br/>
<em>System</em>: <tt>http://snomed.info/sct</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Community
<br/>
<em>Code</em>: community
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Discharge
<br/>
<em>Code</em>: discharge
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Active
<br/>
<em>Code</em>: active
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Recurrence
<br/>
<em>Code</em>: recurrence
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Relapse
<br/>
<em>Code</em>: relapse
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Confirmed
<br/>
<em>Code</em>: confirmed
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Unconfirmed
<br/>
<em>Code</em>: unconfirmed
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Provisional
<br/>
<em>Code</em>: provisional
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Direct Reference Code</th>
<td class="content-container">
<em>Display</em>: Differential
<br/>
<em>Code</em>: differential
<br/>
<em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header"><a name="dependencies"> </a>Dependencies</th>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: QICore model information
<br/>
<em>Resource</em>: http://hl7.org/fhir/Library/QICore-ModelInfo
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/Library/QICore-ModelInfo</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library SDE
<br/>
<em>Resource</em>: https://madie.cms.gov/Library/SupplementalDataElements|5.1.000
<br/>
<em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/SupplementalDataElements|5.1.000</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library FHIRHelpers
<br/>
<em>Resource</em>: https://madie.cms.gov/Library/FHIRHelpers|4.4.000
<br/>
<em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/FHIRHelpers|4.4.000</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library CQMCommon
<br/>
<em>Resource</em>: https://madie.cms.gov/Library/CQMCommon|4.1.000
<br/>
<em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/CQMCommon|4.1.000</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library QICoreCommon
<br/>
<em>Resource</em>: https://madie.cms.gov/Library/QICoreCommon|4.0.000
<br/>
<em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/QICoreCommon|4.0.000</tt>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header"><a name="data-requirements"> </a>Data Requirements</th>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Patient
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
<br/>
<em>Must Support Elements</em>: extension, url, birthDate, birthDate.value
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
<br/>
<em>Must Support Elements</em>: type, status, status.value, period, reasonCode, hospitalization, hospitalization.dischargeDisposition
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: type</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
<br/>
<em>Must Support Elements</em>: type, status, status.value, period, reasonCode, hospitalization, hospitalization.dischargeDisposition
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: type</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Encounter
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
<br/>
<em>Must Support Elements</em>: type, status, status.value, period, reasonCode, hospitalization, hospitalization.dischargeDisposition
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: type</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest
<br/>
<em>Must Support Elements</em>: medication, status, status.value, intent, intent.value, authoredOn, authoredOn.value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest
<br/>
<em>Must Support Elements</em>: medication, status, status.value, intent, intent.value, authoredOn, authoredOn.value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest
<br/>
<em>Must Support Elements</em>: medication, status, status.value, intent, intent.value, authoredOn, authoredOn.value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest
<br/>
<em>Must Support Elements</em>: medication.reference.value, status, status.value, intent, intent.value, authoredOn, authoredOn.value, medication
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Medication
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication
<br/>
<em>Must Support Elements</em>: id.value, code
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Coverage
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage
<br/>
<em>Must Support Elements</em>: type, period
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: type</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Condition
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Condition
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Condition
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
<br/>
<em>Must Support Elements</em>: code
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Condition
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
<br/>
<em>Must Support Elements</em>: code
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Condition
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
<br/>
<em>Must Support Elements</em>: code
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Procedure
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure
<br/>
<em>Must Support Elements</em>: code, performed, status, status.value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Procedure
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure
<br/>
<em>Must Support Elements</em>: code, status, status.value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: ServiceRequest
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
<br/>
<em>Must Support Elements</em>: code, status, status.value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579
<br/>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>
</tr>
</tbody>
</table>
</div>
</text>
<contained>
<Library>
<id value="effective-data-requirements"/>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://snomed.info/sct"/>
<code value="248153007"/>
<display value="Male (finding)"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system value="http://snomed.info/sct"/>
<code value="248152002"/>
<display value="Female (finding)"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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/StructureDefinition/cqf-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/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
<code value="active"/>
<display value="Active"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
<code value="recurrence"/>
<display value="Recurrence"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
<code value="relapse"/>
<display value="Relapse"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
<code value="confirmed"/>
<display value="Confirmed"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
<code value="unconfirmed"/>
<display value="Unconfirmed"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
<code value="provisional"/>
<display value="Provisional"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
<valueCoding>
<system
value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
<code value="differential"/>
<display value="Differential"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SupplementalDataElements"/>
</extension>
<extension url="name">
<valueString value="SDE Sex"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Sex":
case
when Patient.sex = '248153007' then "Male (finding)"
when Patient.sex = '248152002' then "Female (finding)"
else null
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="0"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="SDE Sex"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Sex":
SDE."SDE Sex""/>
</extension>
<extension url="displaySequence">
<valueInteger value="1"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CQMCommon"/>
</extension>
<extension url="name">
<valueString value="Inpatient Encounter"/>
</extension>
<extension url="statement">
<valueString
value="define "Inpatient Encounter":
[Encounter: "Encounter Inpatient"] EncounterInpatient
where EncounterInpatient.status = 'finished'
and EncounterInpatient.period ends during day of "Measurement Period""/>
</extension>
<extension url="displaySequence">
<valueInteger value="2"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString
value="Inpatient Encounter With Age Greater Than Or Equal To 18"/>
</extension>
<extension url="statement">
<valueString
value="define "Inpatient Encounter With Age Greater Than Or Equal To 18":
CQMCommon."Inpatient Encounter" InpatientHospitalEncounter
where AgeInYearsAt(date from start of InpatientHospitalEncounter.period) >= 18"/>
</extension>
<extension url="displaySequence">
<valueInteger value="3"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Opioid At Discharge"/>
</extension>
<extension url="statement">
<valueString
value="define "Opioid At Discharge":
["MedicationRequest": "Schedule II, III and IV Opioid Medications"] OpioidMedications
where ( OpioidMedications.isCommunity ( )
or OpioidMedications.isDischarge ( )
)
and OpioidMedications.status in { 'active', 'completed' }
and OpioidMedications.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="4"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Benzodiazepine At Discharge"/>
</extension>
<extension url="statement">
<valueString
value="define "Benzodiazepine At Discharge":
["MedicationRequest": "Schedule IV Benzodiazepines"] BenzoMedications
where ( BenzoMedications.isCommunity ( )
or BenzoMedications.isDischarge ( )
)
and BenzoMedications.status in { 'active', 'completed' }
and BenzoMedications.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="5"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString
value="Inpatient Encounters With An Opioid Or Benzodiazepine At Discharge"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Captures encounters of patients with an opioid and/or benzodiazepine at discharge.
*/
define "Inpatient Encounters With An Opioid Or Benzodiazepine At Discharge":
"Inpatient Encounter With Age Greater Than Or Equal To 18" InpatientEncounter
with ( "Opioid At Discharge"
union "Benzodiazepine At Discharge" ) 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/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Initial Population"/>
</extension>
<extension url="statement">
<valueString
value="define "Initial Population":
"Inpatient Encounters With An Opioid Or Benzodiazepine At Discharge""/>
</extension>
<extension url="displaySequence">
<valueInteger value="7"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Denominator"/>
</extension>
<extension url="statement">
<valueString
value="define "Denominator":
"Initial Population""/>
</extension>
<extension url="displaySequence">
<valueInteger value="8"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Numerator"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.
*/
define "Numerator":
"Denominator" InpatientEncounter
where ( Count("Opioid At Discharge" OpioidMedications
where OpioidMedications.authoredOn during day of InpatientEncounter.period
return distinct OpioidMedications.medication
) >= 2
)
or ( exists "Opioid At Discharge" OpioidDischargeMedications
where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
and exists ( "Benzodiazepine At Discharge" BenzodiazepineDischargeMedication
where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
)
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="9"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SupplementalDataElements"/>
</extension>
<extension url="name">
<valueString value="SDE Payer"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Payer":
[Coverage: type in "Payer Type"] Payer
return {
code: Payer.type,
period: Payer.period
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="10"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="SDE Payer"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Payer":
SDE."SDE Payer""/>
</extension>
<extension url="displaySequence">
<valueInteger value="11"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SupplementalDataElements"/>
</extension>
<extension url="name">
<valueString value="SDE Ethnicity"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Ethnicity":
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/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="SDE Ethnicity"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Ethnicity":
SDE."SDE Ethnicity""/>
</extension>
<extension url="displaySequence">
<valueInteger value="13"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString
value="Inpatient Encounter With Encounter Diagnosis Of Cancer Pain"/>
</extension>
<extension url="statement">
<valueString
value="define "Inpatient Encounter With Encounter Diagnosis Of Cancer Pain":
"Denominator" QualifyingEncounter
where QualifyingEncounter.reasonCode in "Cancer Related Pain"
or QualifyingEncounter.encounterDiagnosis ( ).code in "Cancer Related Pain""/>
</extension>
<extension url="displaySequence">
<valueInteger value="14"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Medications For Opioid Use Disorder"/>
</extension>
<extension url="statement">
<valueString
value="define "Medications For Opioid Use Disorder":
["MedicationRequest": "Medications for Opioid Use Disorder (MOUD)"] DischargeMedication
where ( DischargeMedication.isCommunity ( )
or DischargeMedication.isDischarge ( )
)
and DischargeMedication.status in { 'active', 'completed' }
and DischargeMedication.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="15"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Treatment For Opioid Use Disorders"/>
</extension>
<extension url="statement">
<valueString
value="define "Treatment For Opioid Use Disorders":
( "Medications For Opioid Use Disorder" MedicationTreatment
with ["Procedure": "Opioid Medication Assisted Treatment (MAT)"] MAT
such that MedicationTreatment.authoredOn during day of MAT.performed.toInterval ( )
and MedicationTreatment.authoredOn during day of "Measurement Period"
and MAT.status in { 'completed', 'in-progress' }
)
union ( "Medications For Opioid Use Disorder" MedicationTreatment
with ["ConditionProblemsHealthConcerns": "Opioid Use Disorder"] OUD
such that MedicationTreatment.authoredOn during day of OUD.prevalenceInterval ( )
and OUD.prevalenceInterval ( ) overlaps day of "Measurement Period"
and OUD.isVerified ( )
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="16"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Intervention Palliative Or Hospice Care"/>
</extension>
<extension url="statement">
<valueString
value="define "Intervention Palliative Or Hospice Care":
( ["ServiceRequest": "Palliative or Hospice Care"] PalliativeOrHospiceCareOrder
where PalliativeOrHospiceCareOrder.status in { 'active', 'completed', 'on-hold' }
)
union ( ["Procedure": "Palliative or Hospice Care"] PalliativeOrHospiceCarePerformed
where PalliativeOrHospiceCarePerformed.status in { 'completed', 'in-progress' }
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="17"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="Denominator Exclusion"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay.
*/
define "Denominator Exclusion":
"Denominator" InpatientEncounter
where exists ( ["ConditionProblemsHealthConcerns": "Cancer Related Pain"] CancerPain
where CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
and CancerPain.isVerified ( )
)
or exists ( "Inpatient Encounter With Encounter Diagnosis Of Cancer Pain" )
or exists ( ["ConditionProblemsHealthConcerns": "Sickle Cell Disease with and without Crisis"] SickleCellDisease
where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
and SickleCellDisease.isVerified ( )
)
or exists ( "Treatment For Opioid Use Disorders" OUDTreatment
where OUDTreatment.authoredOn during day of InpatientEncounter.period
)
or exists ( "Intervention Palliative Or Hospice Care" PalliativeOrHospiceCare
where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during InpatientEncounter.hospitalizationWithObservation ( )
)
or ( InpatientEncounter.hospitalization.dischargeDisposition in "Discharge To Acute Care Facility"
or InpatientEncounter.hospitalization.dischargeDisposition in "Hospice Care Referral or Admission"
or InpatientEncounter.hospitalization.dischargeDisposition in "Patient Expired"
or InpatientEncounter.hospitalization.dischargeDisposition in "Left Against Medical Advice"
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="18"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="SupplementalDataElements"/>
</extension>
<extension url="name">
<valueString value="SDE Race"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Race":
Patient.race R
return Tuple {
codes: R.ombCategory union R.detailed,
display: R.text
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="19"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="SDE Race"/>
</extension>
<extension url="statement">
<valueString
value="define "SDE Race":
SDE."SDE Race""/>
</extension>
<extension url="displaySequence">
<valueInteger value="20"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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="21"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToInterval"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
if period is null then
null
else
if period."start" is null then
Interval(period."start".value, period."end".value]
else
Interval[period."start".value, period."end".value]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="22"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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 Choice<MedicationRequest, MedicationNotRequested>):
exists (medicationRequest.category C
where C ~ Community
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="23"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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="24"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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="25"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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 Choice<MedicationRequest, MedicationNotRequested>):
exists (medicationRequest.category C
where C ~ Discharge
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="26"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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 Choice<"ConditionEncounterDiagnosis", "ConditionProblemsHealthConcerns">):
if condition.clinicalStatus ~ "active"
or condition.clinicalStatus ~ "recurrence"
or condition.clinicalStatus ~ "relapse" 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="27"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="QICoreCommon"/>
</extension>
<extension url="name">
<valueString value="abatementInterval"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Returns an interval representing the normalized abatement of a given Condition.
@comment: If the abatement element of the Condition is represented as a DateTime, the result
is an interval beginning and ending on that DateTime.
If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
result is an interval from the date the patient turned that age to immediately before one year later.
If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
before one year later than the date the patient turned the ending age of the quantity interval.
*/
define fluent function abatementInterval(condition Choice<"ConditionEncounterDiagnosis", "ConditionProblemsHealthConcerns">):
if condition.abatement is DateTime then
Interval[condition.abatement as DateTime, condition.abatement as DateTime]
else if condition.abatement is Quantity then
Interval[Patient.birthDate + (condition.abatement as Quantity),
Patient.birthDate + (condition.abatement as Quantity) + 1 year)
else if condition.abatement is Interval<Quantity> then
Interval[Patient.birthDate + (condition.abatement.low as Quantity),
Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)
else if condition.abatement is Interval<DateTime> then
Interval[condition.abatement.low, condition.abatement.high)
else null as Interval<DateTime>"/>
</extension>
<extension url="displaySequence">
<valueInteger value="28"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS506FHIRSafeUseofOpioids"/>
</extension>
<extension url="name">
<valueString value="isVerified"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
*/
define fluent function isVerified(condition Choice<QICore.ConditionProblemsHealthConcerns, QICore.ConditionEncounterDiagnosis>):
condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon."confirmed"
or condition.verificationStatus ~ QICoreCommon."unconfirmed"
or condition.verificationStatus ~ QICoreCommon."provisional"
or condition.verificationStatus ~ QICoreCommon."differential"
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="29"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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.reasonReference D
return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))"/>
</extension>
<extension url="displaySequence">
<valueInteger value="30"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="QICoreCommon"/>
</extension>
<extension url="name">
<valueString value="references"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Returns true if the given reference is to the given resourceId
@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference Reference, resourceId String):
resourceId = Last(Split(reference.reference, '/'))"/>
</extension>
<extension url="displaySequence">
<valueInteger value="31"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="QICoreCommon"/>
</extension>
<extension url="name">
<valueString value="toInterval"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of DateTime, Quanitty, Interval<DateTime>, or Interval<Quantity> types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in QICore, allowing this function to be used across any resource.
The input can be provided as a DateTime, Quantity, Interval<DateTime> or Interval<Quantity>.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
If the input is a DateTime Interval, the result is the input.
If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
*/
define fluent function toInterval(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>, Timing>):
case
when choice is DateTime then
Interval[choice as DateTime, choice as DateTime]
when choice is Interval<DateTime> then
choice as Interval<DateTime>
when choice is Quantity then
Interval[Patient.birthDate + (choice as Quantity),
Patient.birthDate + (choice as Quantity) + 1 year)
when choice is Interval<Quantity> then
Interval[Patient.birthDate + (choice.low as Quantity),
Patient.birthDate + (choice.high as Quantity) + 1 year)
when choice is Timing then
Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval<DateTime>
else
null as Interval<DateTime>
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="32"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-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: "Observation Services"] 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: "Emergency Department Visit"] 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="33"/>
</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="QICore model information"/>
<resource value="http://hl7.org/fhir/Library/QICore-ModelInfo"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library SDE"/>
<resource
value="https://madie.cms.gov/Library/SupplementalDataElements|5.1.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library FHIRHelpers"/>
<resource value="https://madie.cms.gov/Library/FHIRHelpers|4.4.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library CQMCommon"/>
<resource value="https://madie.cms.gov/Library/CQMCommon|4.1.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library QICoreCommon"/>
<resource value="https://madie.cms.gov/Library/QICoreCommon|4.0.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system SNOMEDCT"/>
<resource value="http://snomed.info/sct"/>
</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 ConditionClinicalStatusCodes"/>
<resource
value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system ConditionVerificationStatusCodes"/>
<resource
value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
</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 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 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 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="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="Initial Population"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<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 Sex"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Coding"/>
</parameter>
<parameter>
<name value="SDE Payer"/>
<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="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="extension"/>
<mustSupport value="url"/>
<mustSupport value="birthDate"/>
<mustSupport value="birthDate.value"/>
</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="reasonCode"/>
<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>
</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="reasonCode"/>
<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>
</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="reasonCode"/>
<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>
</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.1046.269"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationRequest"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
<mustSupport value="medication.reference.value"/>
<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="Medication"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"/>
<mustSupport value="id.value"/>
<mustSupport value="code"/>
</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-encounter-diagnosis"/>
</dataRequirement>
<dataRequirement>
<type value="Condition"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"/>
</dataRequirement>
<dataRequirement>
<type value="Condition"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"/>
<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="Condition"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"/>
<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-problems-health-concerns"/>
<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="Procedure"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
<mustSupport value="code"/>
<mustSupport value="performed"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<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"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<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"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<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="<p>For every patient evaluated by this measure also identify payer, race, ethnicity and sex</p>"/>
</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/StructureDefinition/cqf-definitionTerm">
<extension url="term">
<valueString value="Benzodiazepine"/>
</extension>
<extension url="definition">
<valueMarkdown value="Schedule IV benzodiazepine medications.
"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
<extension url="term">
<valueString value="Medications for Opioid Use Disorder"/>
</extension>
<extension url="definition">
<valueMarkdown
value="Methadone, buprenorphine and buprenorphine in combination with naloxone.
"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
<extension url="term">
<valueString value="Numerator criteria"/>
</extension>
<extension url="definition">
<valueMarkdown
value="Two or more unique orders for opioids, or an opioid and benzodiazepine at discharge.
"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
<extension url="term">
<valueString value="Opioid"/>
</extension>
<extension url="definition">
<valueMarkdown
value="Schedule II, III and IV Opioid Medications that do not include naloxone.
"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
<extension url="term">
<valueString value="Prescribed"/>
</extension>
<extension url="definition">
<valueMarkdown
value="The intent of the measure is to capture opioid and/or benzodiazepine medications continued or ordered at discharge.
"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
<valueReference>
<reference value="#effective-data-requirements"/>
</valueReference>
</extension>
<url value="https://madie.cms.gov/Measure/CMS506FHIRSafeUseofOpioids"/>
<identifier>
<use value="usual"/>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
<code value="short-name"/>
<display 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://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
<code value="version-independent"/>
<display 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://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
<code value="version-specific"/>
<display value="Version Specific"/>
</coding>
</type>
<system value="urn:ietf:rfc:3986"/>
<value value="urn:uuid:58639502-c44d-4919-aeaf-8a011ce3872f"/>
</identifier>
<identifier>
<use value="official"/>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
<code value="endorser"/>
<display 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://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
<code value="publisher"/>
<display value="Publisher"/>
</coding>
</type>
<system value="https://madie.cms.gov/measure/cmsId"/>
<value value="506FHIR"/>
<assigner>
<display value="CMS"/>
</assigner>
</identifier>
<version value="1.0.000"/>
<name value="CMS506FHIRSafeUseofOpioids"/>
<title value="Safe Use of Opioids - Concurrent PrescribingFHIR
"/>
<status value="active"/>
<experimental value="false"/>
<date value="2025-08-25T15:03:07+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
"/>
<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.
New or continuing opioid and benzodiazepine medications are included with the use of the MedicationRequest QI-Core Profile. The Profile's community and discharge category codes indicate that the medications should be taken by or given to the patient after being discharged from an inpatient encounter, which could include previously or newly prescribed medications.
Inpatient hospitalizations with discharge medications of an opioid or benzodiazepine prescription should be included in the initial population.
Inpatient hospitalizations with discharge medications of two or more opioids or an 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 dQM 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: CMS506v8.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
"/>
<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-2024 American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT\[R\]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.
"/>
<effectivePeriod>
<start value="2026-01-01"/>
<end value="2026-12-31"/>
</effectivePeriod>
<author>
<name value="Mathematica"/>
<telecom>
<system value="url"/>
<value value="https://www.mathematica.org/"/>
</telecom>
</author>
<relatedArtifact>
<type value="citation"/>
<citation
value="American Academy of Emergency Medicine (AAEM). (2013). Emergency department opioid-prescribing guidelines for the treatment of non-cancer-related pain. Retrieved from https://www.aaem.org/UserFiles/file/Emergency-Department-Opoid-Prescribing-Guidelines.pdf
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="American Society of Interventional Pain Physicians (ASIPP). (2012). Guidelines for responsible opioid prescribing in chronic noncancer pain. Retrieved from https://pubmed.ncbi.nlm.nih.gov/22786449/
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Dasgupta, N., Jonsson Funk, M., Proescholdbell, S., et al. (2015, September). Cohort study of the impact of high-dose opioid analgesics on overdose mortality. Pain Medicine. Retrieved from http://onlinelibrary.wiley.com/doi/10.1111/pme.12907/abstract
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Dowell, D., Haegerich, T., \& Chou, R. (2016). CDC guideline for prescribing opioids for chronic pain-United States, 2016. MMWR Recommendations and Reports, 65. Retrieved from http://www.cdc.gov/media/dpk/2016/dpk-opioid-prescription-guidelines.html
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Geller, A. I., Dowell, D., Lovegrove, M. C., Mcaninch, J. K., Goring, S. K., Rose, K. O., Budnitz, D. S. (2019). U.S. Emergency Department Visits Resulting From Nonmedical Use of Pharmaceuticals, 2016. American Journal of Preventive Medicine, 56(5), 639-647. https://doi.org/10.1016/j.amepre.2018.12.009
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Herzig, S., Rothberg, M., Cheung, M., et al. (2014). Opioid utilization and opioid-related adverse events in nonsurgical patients in U.S. hospitals. Journal of Hospital Medicine, 9(2), 73-81.
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Jena, A., Goldman, D., Schaeffer, L. D., et al. (2014). Opioid prescribing by multiple providers in Medicare: Retrospective observational study of insurance claims. BMJ, 348, g1393. DOI: 10.1136/bmj.g1393
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Lin, L. A., Bohnert, A. S., Kerns, R. D., et al. (2017). Impact of the opioid safety initiative on opioid-related prescribing in veterans. Pain, 158(5), 833-839. Retrieved from https://www.ncbi.nlm.nih.gov/pubmed/28240996
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Liu, Y., Logan, J., Paulozzi, L., et al. (2013). Potential misuse and inappropriate prescription practices involving opioid analgesics. American Journal of Managed Care, 19(8), 648-665. Retrieved from http://www.ajmc.com/journals/issue/2013/2013-1-vol19-n8/Potential-Misuse-and-Inappropriate-Prescription-Practices-Involving-Opioid-Analgesics/
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Mack, K., Zhang, K., Paulozzi, L., et al. (2015, February). Prescription practices involving opioid analgesics among Americans with Medicaid, 2010. Journal of Health Care for the Poor and Underserved, 26(1), 182-198. Retrieved from http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4365785
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="National Institute on Drug Abuse. (2011). Analysis of opioid prescription practices finds areas of concern. Retrieved from https://www.drugabuse.gov/news-events/news-releases/2011/04/analysis-opioid-prescription-practices-finds-areas-concern
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="New York City (NYC) Department of Health and Mental Hygiene (NYC DOHMH). (2013). NYC emergency department discharge opioid-prescribing guidelines. Retrieved from https://www1.nyc.gov/site/doh/providers/health-topics/opioid-prescribing-resources-for-emergency-departments.page
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Park, T., Saitz, R., Ganoczy, D., et al. (2015). Benzodiazepine-prescribing patterns and deaths from drug overdose among U.S. veterans receiving opioid analgesics: Case-cohort study. BMJ, 350, h2698. Retrieved from http://www.bmj.com/content/350/bmj.h2698
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Rudd, R., Aleshire, N., Zibbell, J., et al. (2016, January). Increases in drug and opioid overdose deaths-United States, 2000-2014. Morbidity and Mortality Weekly Report, 64(50), 1378-1382. Retrieved from http://www.cdc.gov/mmwr/preview/mmwrhtml/mm6450a3.htm
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Sun, E., Dixit, A., Humphreys, K., et al. (2017). Association between concurrent use of prescription opioids and benzodiazepines and overdose: Retrospective analysis. BMJ, 356, j760. Retrieved from http://www.bmj.com/content/356/bmj.j760
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="U.S. Department of Veterans Affairs. (2014). Opioid safety initiative toolkit. Retrieved from https://www.va.gov/PAINMANAGEMENT/Opioid_Safety_Initiative_OSI.asp
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="U.S. Department of Veterans Affairs. (2016). Opioid safety initiative: Opioids (including tramadol) used in combination with benzodiazepine derivative sedatives/hypnotics. Unpublished manuscript.
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Washington Agency Medical Directors' Group (WAMDG). (2015). Interagency guideline on prescribing opioids for pain, Part II: Prescribing opioids in the acute and subacute phase. Retrieved from http://www.agencymeddirectors.wa.gov/Files/2015AMDGOpioidGuideline.pdf
"/>
</relatedArtifact>
<library value="https://madie.cms.gov/Library/CMS506FHIRSafeUseofOpioids"/>
<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, Aleshire, Zibbel, \& Gladden, 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, \& Chou, 2016; Dowell, Ragan, Jones, Baldwin, \& 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 \& McAninch, 2015). Furthermore, concurrent use of benzodiazepines with opioids was prevalent in 31%-51% of fatal overdoses (Dowell, Haegerich, \& 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, Dixit, Humphreys, Darnall, \& Mackey, 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, Bohnert, Kerns, Clay, Ganoczy, \& Ilgen, 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-naive 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."
* "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)."
* "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)."
* "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; and New York City Department Of Health and Mental Hygiene (NYC DPOMH), 2013) whenever possible as the combination of these medications may potentiate opioid-induced respiratory depression.
"/>
<group id="Group_1">
<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">
<valueString 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="Decreased score indicates improvement"/>
</coding>
</valueCodeableConcept>
</extension>
<population id="InitialPopulation_1">
<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 opioid and/or benzodiazepine at discharge
"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="Initial Population"/>
</criteria>
</population>
<population id="Denominator_1">
<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="DenominatorExclusion_1">
<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 (OUD) with active OUD diagnosis or Opioid Medication Assisted Treatment (MAT), 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="Numerator_1">
<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 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>