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="CMS819FHIRHHORAE"/>
<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">Hospital Harm - Opioid-Related Adverse EventsFHIR</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">CMS819FHIR</td>
</tr>
<tr>
<th scope="row" class="row-header">GUID (Version Independent)</th>
<td class="content-container">urn:uuid:30256069-ee4f-45b8-895a-5452cf8e9e4e</td>
</tr>
<tr>
<th scope="row" class="row-header">GUID (Version Specific)</th>
<td class="content-container">urn:uuid:d58ce964-1cb1-40b5-a4aa-40b030191990</td>
</tr>
<tr>
<th scope="row" class="row-header">CMS Identifier</th>
<td class="content-container">819FHIR</td>
</tr>
<tr>
<th scope="row" class="row-header">CMS Consensus Based Entity Identifier</th>
<td class="content-container">3501e</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">This measure assesses the number of inpatient hospitalizations for patients age 18 and older who have been administered an opioid medication and are subsequently administered an opioid antagonist within 12 hours, an indication of an opioid-related adverse event</td>
</tr>
<tr>
<th scope="row" class="row-header">Copyright</th>
<td class="content-container">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. 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.</td>
</tr>
<tr>
<th scope="row" class="row-header">Disclaimer</th>
<td class="content-container">This performance measure is not a clinical guideline, does not establish a standard of medical care and has not been tested for all potential applications. THE MEASURES AND SPECIFICATIONS 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].</td>
</tr>
<tr>
<th scope="row" class="row-header">Rationale</th>
<td class="content-container"><p>Opioids are often the foundation for sedation and pain relief. Opioid-based analgesia continues to be the most commonly used treatment in postoperative pain management, with more than 95% of surgical patients receiving opioids during their hospitalization (Baker et al., 2020). However, use of opioids can also lead to serious adverse events, including constipation, over sedation, delirium, and respiratory depression (Urman et al., 2021a). Opioid-related adverse events (ORADE) have both patient-level and financial implications. The presence of an ORADE was associated with a 55% longer postoperative length of stay, 29% lower odds of discharge home, and 2.9 times the odds of death (Urman et al., 2021b). For surgical patients, occurrence of opioid-related adverse events was associated with an increase of 1.6 days in length of stay (LOS) and $8225 more in cost for the index hospitalization. Patients who experienced ORADEs while in a hospitalized setting were more likely to have received a higher total dose of opioids during hospitalization (Cone et al., 2023; Shafi et al., 2018). Numerous studies report the additive (risk-adjusted) hospitalization cost burden of surgical patients with ORADEs to be between $4350-$8225, representing a 27-47% increase in (risk-adjusted) admission costs (Khanna et al., 2021).</p>
<p>Most opioid-related adverse events are preventable. Each year, adverse drug events (ADE) account for nearly 700,000 emergency department visits and 100,000 hospitalizations (AHRQ, 2019). An estimated one-third of all adverse events that occur in the inpatient setting are adverse drug events (ODPHP, 2020). Additionally, in a closed-claims analysis, 97% of adverse events were judged preventable with better monitoring and response (Lee et al., 2015). Naloxone administration is often used as an indicator of a severe opioid-related adverse event, and implementation of this measure can advance safe use of opioids in hospitals and prevent these serious and potentially lethal adverse drug events.</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Clinical Recommendation Statement</th>
<td class="content-container"><p>Naloxone is an opioid reversal agent typically used for severe opioid-related adverse events. Naloxone administration has been used in a number of studies as an indicator of opioid-related adverse events (Yiu, et al., 2022; Lynn & Galinkin, 2017; Nwulu et al., 2013).</p>
<p>From Section 10 of the 2015 American Heart Association Guidelines Update for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care (Lavonas et al., 2015), the following recommendation is listed for use of naloxone:</p>
<p>Naloxone is a potent opioid receptor antagonist in the brain, spinal cord, and gastrointestinal system. Naloxone has an excellent safety profile and can rapidly reverse central nervous system (CNS) and respiratory depression in a patient with an opioid-associated resuscitative emergency.</p>
<p>The 2020 American Heart Association guidelines update for cardiopulmonary resuscitation continue to recommend naloxone for a patient with suspected opioid overdose who has a definite pulse but no normal breathing or only gasping (i.e., a respiratory arrest), in addition to providing standard Pediatric Basic Life Support (PBLS) or Pediatric Advanced Life Support (PALS), it is reasonable for responders to administer intramuscular or intranasal naloxone. These recommendations are identical for adults (American Heart Association, 2020).</p>
<p>In February 2022, the Food and Drug Administration (FDA) approved its abbreviated new drug application for nalmefene hydrochloride injection, 2mg/2mL (1mg/1mL). Nalmefene is an opioid antagonist indicated for the complete or partial reversal of opioid drug effects, including respiratory depression, induced by either natural or synthetic opioids, and in the management of known or suspected opioid overdose (FDA, 2022). In contrast to naloxone, the long half-life of nalmefene is similar to or greater than that of many opioid receptor agonists (Britch & Walsh, 2022), which could decrease the need for repeat drug administration. In May 2023, FDA approved nalmefene hydrochloride nasal spray that delivers 2.7 milligrams (mg) of nalmefene into the nasal cavity (FDA, 2023).</p></td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Agency for Healthcare Research and Quality. (2019). Medication Errors and Adverse Drug Events. Rockville: US Department of Health & Human Services. Retrieved from https://psnet.ahrq.gov/primer/medication-errors-and-adverse-drug-events
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
American Heart Association and American Society of Anesthesiologists. (2021). Naloxone in CPR/AED Training and Public Access to Defibrillation. Retrieved from https://www.heart.org/-/media/Files/About-Us/Policy-Research/Policy-Positions/CPR-and-AED/Naloxone-Position-Statement.pdf
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
American Heart Association. (2020). Highlights of the 2020 American Heart Association's Guidelines for CPR and ECC. https://cpr.heart.org/-/media/cpr-files/cpr-guidelines-files/highlights/hghlghts_2020_ecc_guidelines_english.pdf
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Baker, J., Brovman, E.Y., Rao, N., Beutler, S.S., Urman, R.D. (2020). Potential Opioid-Related Adverse Drug Events Are Associated With Decreased Revenue in Hip Replacement Surgery in the Older Population. Geriatric Orthopaedic Surgery & Rehabilitation. January 2020. doi:10.1177/2151459320915328
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Britch, S.C., Walsh, S.L. (2022). Treatment of opioid overdose: current approaches and recent advances. Psychopharmacology (Berl). 2022;239(7):2063-2081. doi:10.1007/s00213-022-06125-5
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Food and Drug Administration. (2022). Nalmefene Hydrochloride Injection 2mg/2mL (1mg/1mL) [Full Prescribing Information]. Stamford, CT: Purdue Pharma L.P., 02/08/2022. https://www.accessdata.fda.gov/spl/data/d4bb0797-a4ed-4ed4-9904-604433eea4ff/d4bb0797-a4ed-4ed4-9904-604433eea4ff.xml
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Kessler, E. R., Shah, M., Gruschkus, S. K., & Raju, A. (2013). Cost and quality implications of opioid-based postsurgical pain control using administrative claims data from a large health system: opioid-related adverse events and their impact on clinical and economic outcomes. Pharmacotherapy, 33(4), 383-391. doi: 10.1002/phar.1223
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Khanna, A.K., Saager, L., Bergese, S.D., et al. (2021). Opioid-induced respiratory depression increases hospital costs and length of stay in patients recovering on the general care floor. BMC Anesthesiol. 2021;21(1):88. Published 2021 Mar 20. doi:10.1186/s12871-021-01307-8
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Lavonas, E. J., Drennan, I. R., Gabrielli, A., Heffner, A. C., Hoyte, C. O., Orkin, A. M., Donnino, M. W. (2015). Part 10: Special Circumstances of Resuscitation. 2015 American Heart Association Guidelines Update for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care, 132(18 suppl 2), S501-S518. doi: 10.1161/cir.0000000000000264
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Lee, L. A., Caplan, R. A., Stephens, L. S., Posner, K. L., Terman, G. W., Voepel-Lewis, T., & Domino, K. B. (2015). Postoperative opioid-induced respiratory depression: a closed claims analysis. Anesthesiology, 122(3), 659-665
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Lynn, R. R., Galinkin, J. (2017). Naloxone dosage for opioid reversal: Current evidence and clinical implications. Therapeutic Advances in Drug Safety, 9(1), 63-88. doi:10.1177/204209861774416
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Makary, M. A., Daniel, M. (2016). Medical error-the third leading cause of death in the US. BMJ, 353, i2139. doi: 10.1136/bmj.i2139
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Med Lett Drugs Ther. (2022). Nalmefene Returns for Reversal of Opioid Overdose. Sep 5;64(1658):141-2
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Nwulu, U., Nirantharakumar, K., Odesanya, R., McDowell, S. E., Coleman, J. J. (2013). Improvement in the detection of adverse drug events by the use of electronic health and prescription records: an evaluation of two trigger tools. Eur J Clin Pharmacol, 69(2), 255-259. doi: 10.1007/s00228-012-1327-1
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Shafi, S., Collinsworth, A.W., Copeland, L.A., et al. (2018). Association of Opioid-Related Adverse Drug Events With Clinical and Cost Outcomes Among Surgical Patients in a Large Integrated Health Care Delivery System. JAMA Surg. 2018;153(8):757-763. doi:10.1001/jamasurg.2018.1039. PMID: 29799927; PMCID: PMC6142954
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Urman, R.D., Khanna, A.K., Bergese, S.D., et al. (2021). Postoperative opioid administration characteristics associated with opioid-induced respiratory depression: Results from the PRODIGY trial. J Clin Anesth. 2021;70:110167. doi:10.1016/j.jclinane.110167
</td>
</tr>
<tr>
<th scope="row" class="row-header">Citation</th>
<td class="content-container">
Urman, R.D., Seger, D.L., Fiskio, J.M., et al. (2021). The Burden of Opioid-Related Adverse Drug Events on Hospitalized Previously Opioid-Free Surgical Patients. J Patient Saf. 2021;17(2):e76-e83
</td>
</tr>
<tr>
<th scope="row" class="row-header">Guidance (Usage)</th>
<td class="content-container"><p>Qualifying encounters (denominator) include all patients 18 years of age or older with at least one opioid medication administered outside of the operating room.</p>
<p>To create the numerator:</p>
<p>1. First, start with those encounters meeting denominator criteria.</p>
<p>2. Next, remove all events where an opioid or opioid antagonist was administered in the operating room.</p>
<p>Opioid antagonist administrations in the operating room are excluded because they could be part of the sedation plan as administered by an anesthesiologist. Encounters that include use of opioid antagonists for procedures and recovery outside of the operating room (e.g., bone marrow biopsy and PACU) are included in the numerator, as it would indicate the patient was over-sedated. Note that should a facility not utilize temporary patient locations, alternative times may be used to determine whether a patient is in the operating room during opioid antagonist administration. Since anesthesia end time could represent the time the anesthesiologist signed off, and thus may include the patient's time in the PACU, this should be avoided.</p>
<p>3. Next, remove all events where the opioid antagonist was administered via an enteral route. Only opioid antagonists given by a non-enteral (i.e., intravenous, intramuscular, subcutaneous, intranasal, inhalation) route are considered.</p>
<p>4. Finally, remove all administrations of opioid antagonist that were given greater than 12 hours following hospital administration of an opioid medication.</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: CMS819v4. 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#outcome: 'Outcome']</td>
</tr>
<tr>
<th scope="row" class="row-header">Rate Aggregation</th>
<td class="content-container">None</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">Inpatient hospitalizations that end during the measurement period for patients age 18 and older and at least one opioid medication administration starts during the hospitalization outside of the operating room</p>
<em>Logic Definition</em>: <a href="#primary-cms819fhirhhorae-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">Equals Initial Population</p>
<em>Logic Definition</em>: <a href="#primary-cms819fhirhhorae-denominator">Denominator</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">Inpatient hospitalizations where a non-enteral opioid antagonist administration starts during the hospitalization outside of the operating room and 12 hours or less following an opioid medication administered outside of the operating room. The route of administration of the opioid antagonist must be by intranasal spray, inhalation, intramuscular, subcutaneous, or intravenous injection. Only one numerator event is counted per encounter.</p>
<em>Logic Definition</em>: <a href="#primary-cms819fhirhhorae-numerator">Numerator</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Supplemental Data Guidance</th>
<td class="content-container">For every patient evaluated by this measure also identify payer, race, ethnicity and sex</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="#cms819fhirhhorae-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="#cms819fhirhhorae-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="#cms819fhirhhorae-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="#cms819fhirhhorae-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/CMS819FHIRHHORAE</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-cms819fhirhhorae-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":
"Encounter With Opioid Administration Outside Of Operating Room"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="primary-cms819fhirhhorae-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-cms819fhirhhorae-numerator"> </a>
Numerator
</th>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator":
"Encounter With NonOperating Room Opioid And Antagonist Administration"</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="cms819fhirhhorae-sde-sex"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</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="cms819fhirhhorae-non-enteral-opioid-antagonist-administration"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Non Enteral Opioid Antagonist Administration":
["MedicationAdministration": "Opioid Antagonist"] AntagonistGiven
where AntagonistGiven.status = 'completed'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms819fhirhhorae-opioid-administration"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Opioid Administration":
["MedicationAdministration": "Opioids, All"] Opioids
where Opioids.status = 'completed'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms819fhirhhorae-qualifying-encounter"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Qualifying Encounter":
["Encounter": "Encounter Inpatient"] InpatientEncounter
where AgeInYearsAt(date from start of InpatientEncounter.period) >= 18
and InpatientEncounter.period ends during day of "Measurement Period"
and InpatientEncounter.status = 'finished'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms819fhirhhorae-encounter-with-opioid-administration-outside-of-operating-room"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Encounter With Opioid Administration Outside Of Operating Room":
"Qualifying Encounter" InpatientEncounter
with "Opioid Administration" OpioidGiven
such that OpioidGiven.effective.toInterval ( ) starts during InpatientEncounter.hospitalizationWithObservation ( )
and not exists ( InpatientEncounter.location EncounterLocation
where EncounterLocation.location.getLocation ( ).type in "Operating Room Suite"
and OpioidGiven.effective.toInterval ( ) starts during EncounterLocation.period
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms819fhirhhorae-initial-population"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population":
"Encounter With Opioid Administration Outside Of Operating Room"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms819fhirhhorae-denominator"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</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="cms819fhirhhorae-encounter-with-nonoperating-room-opioid-and-antagonist-administration"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@author: Measure developer
@description: Provides guidance to implementers to interpret logic in following defintion correctly
@comment:Excludes opioid antagonist administered in operating room AND excludes opioids administered in operating room AND opioid is administered before opioid antagonist AND limits opioid antagonist to non-enteral routes
*/
define "Encounter With NonOperating Room Opioid And Antagonist Administration":
from
"Non Enteral Opioid Antagonist Administration" NonEnteralOpioidAntagonistGiven,
"Opioid Administration" OpioidGiven,
"Denominator" InpatientHospitalization
where not exists ( InpatientHospitalization.location EncounterLocation
where EncounterLocation.location.getLocation ( ).type in "Operating Room Suite"
and NonEnteralOpioidAntagonistGiven.effective.toInterval ( ) starts during EncounterLocation.period
)
and ( NonEnteralOpioidAntagonistGiven.effective.toInterval ( ) starts during InpatientHospitalization.hospitalizationWithObservation ( )
and OpioidGiven.effective.toInterval ( ) starts during InpatientHospitalization.hospitalizationWithObservation ( )
and OpioidGiven.effective.toInterval ( ) ends 12 hours or less before start of NonEnteralOpioidAntagonistGiven.effective.toInterval ( )
and NonEnteralOpioidAntagonistGiven.dosage.route in "Routes of Administration for Opioid Antagonists"
)
return InpatientHospitalization</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms819fhirhhorae-numerator"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator":
"Encounter With NonOperating Room Opioid And Antagonist Administration"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="cms819fhirhhorae-sde-payer"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</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="cms819fhirhhorae-sde-ethnicity"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</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="cms819fhirhhorae-sde-race"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> CMS819FHIRHHORAE</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="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 scope="row" rowspan="2" class="row-header">
<a name="cqmcommon-getlocation"> </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 Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference):
singleton from (
[Location] L where reference.references(L)
)</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 resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference Reference, resource Resource):
resource.id = Last(Split(reference.reference, '/'))</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 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">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Opioid Antagonist
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.119
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.119</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Opioids, All
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.226
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.226</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 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 Operating Room Suite
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.141
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.141</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Value Set</th>
<td class="content-container">
<em>Description</em>: Value set Routes of Administration for Opioid Antagonists
<br/>
<em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.187
<br/>
<em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.187</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">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 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 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 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 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
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration
<br/>
<em>Must Support Elements</em>: medication, status, status.value, effective, dosage, dosage.route
<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.1248.119
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration
<br/>
<em>Must Support Elements</em>: medication, status, status.value, effective, dosage, dosage.route
<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.1196.226
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration
<br/>
<em>Must Support Elements</em>: medication.reference.value, status, status.value, effective, dosage, dosage.route
<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>: 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, location
<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, location
<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>: Encounter
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
<br/>
<em>Must Support Elements</em>: type, period, status, status.value, location
<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>: Resource
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/StructureDefinition/Resource
<br/>
<em>Must Support Elements</em>: id, id.value
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Location
<br/>
<em>Profile(s)</em>:
http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-location
<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 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-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="CMS819FHIRHHORAE"/>
</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="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString value="Non Enteral Opioid Antagonist Administration"/>
</extension>
<extension url="statement">
<valueString
value="define "Non Enteral Opioid Antagonist Administration":
["MedicationAdministration": "Opioid Antagonist"] AntagonistGiven
where AntagonistGiven.status = 'completed'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="2"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString value="Opioid Administration"/>
</extension>
<extension url="statement">
<valueString
value="define "Opioid Administration":
["MedicationAdministration": "Opioids, All"] Opioids
where Opioids.status = 'completed'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="3"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString value="Qualifying Encounter"/>
</extension>
<extension url="statement">
<valueString
value="define "Qualifying Encounter":
["Encounter": "Encounter Inpatient"] InpatientEncounter
where AgeInYearsAt(date from start of InpatientEncounter.period) >= 18
and InpatientEncounter.period ends during day of "Measurement Period"
and InpatientEncounter.status = 'finished'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="4"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString
value="Encounter With Opioid Administration Outside Of Operating Room"/>
</extension>
<extension url="statement">
<valueString
value="define "Encounter With Opioid Administration Outside Of Operating Room":
"Qualifying Encounter" InpatientEncounter
with "Opioid Administration" OpioidGiven
such that OpioidGiven.effective.toInterval ( ) starts during InpatientEncounter.hospitalizationWithObservation ( )
and not exists ( InpatientEncounter.location EncounterLocation
where EncounterLocation.location.getLocation ( ).type in "Operating Room Suite"
and OpioidGiven.effective.toInterval ( ) starts during EncounterLocation.period
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="5"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString value="Initial Population"/>
</extension>
<extension url="statement">
<valueString
value="define "Initial Population":
"Encounter With Opioid Administration Outside Of Operating Room""/>
</extension>
<extension url="displaySequence">
<valueInteger value="6"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString value="Denominator"/>
</extension>
<extension url="statement">
<valueString
value="define "Denominator":
"Initial Population""/>
</extension>
<extension url="displaySequence">
<valueInteger value="7"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString
value="Encounter With NonOperating Room Opioid And Antagonist Administration"/>
</extension>
<extension url="statement">
<valueString
value="/*
@author: Measure developer
@description: Provides guidance to implementers to interpret logic in following defintion correctly
@comment:Excludes opioid antagonist administered in operating room AND excludes opioids administered in operating room AND opioid is administered before opioid antagonist AND limits opioid antagonist to non-enteral routes
*/
define "Encounter With NonOperating Room Opioid And Antagonist Administration":
from
"Non Enteral Opioid Antagonist Administration" NonEnteralOpioidAntagonistGiven,
"Opioid Administration" OpioidGiven,
"Denominator" InpatientHospitalization
where not exists ( InpatientHospitalization.location EncounterLocation
where EncounterLocation.location.getLocation ( ).type in "Operating Room Suite"
and NonEnteralOpioidAntagonistGiven.effective.toInterval ( ) starts during EncounterLocation.period
)
and ( NonEnteralOpioidAntagonistGiven.effective.toInterval ( ) starts during InpatientHospitalization.hospitalizationWithObservation ( )
and OpioidGiven.effective.toInterval ( ) starts during InpatientHospitalization.hospitalizationWithObservation ( )
and OpioidGiven.effective.toInterval ( ) ends 12 hours or less before start of NonEnteralOpioidAntagonistGiven.effective.toInterval ( )
and NonEnteralOpioidAntagonistGiven.dosage.route in "Routes of Administration for Opioid Antagonists"
)
return InpatientHospitalization"/>
</extension>
<extension url="displaySequence">
<valueInteger value="8"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</extension>
<extension url="name">
<valueString value="Numerator"/>
</extension>
<extension url="statement">
<valueString
value="define "Numerator":
"Encounter With NonOperating Room Opioid And Antagonist Administration""/>
</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="CMS819FHIRHHORAE"/>
</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="CMS819FHIRHHORAE"/>
</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="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="14"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CMS819FHIRHHORAE"/>
</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="15"/>
</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="16"/>
</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="17"/>
</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="18"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="CQMCommon"/>
</extension>
<extension url="name">
<valueString value="getLocation"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Returns the Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference):
singleton from (
[Location] L where reference.references(L)
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="19"/>
</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 resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference Reference, resource Resource):
resource.id = Last(Split(reference.reference, '/'))"/>
</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="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="21"/>
</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="22"/>
</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 QICoreCommon"/>
<resource value="https://madie.cms.gov/Library/QICoreCommon|4.0.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="Code system SNOMEDCT"/>
<resource value="http://snomed.info/sct"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Opioid Antagonist"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.119"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Opioids, All"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.226"/>
</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 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 Operating Room Suite"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.141"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display
value="Value set Routes of Administration for Opioid Antagonists"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.187"/>
</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>
<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="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"/>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration"/>
<mustSupport value="medication"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="effective"/>
<mustSupport value="dosage"/>
<mustSupport value="dosage.route"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.119"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration"/>
<mustSupport value="medication"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="effective"/>
<mustSupport value="dosage"/>
<mustSupport value="dosage.route"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.226"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration"/>
<mustSupport value="medication.reference.value"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="effective"/>
<mustSupport value="dosage"/>
<mustSupport value="dosage.route"/>
</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="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="location"/>
<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="location"/>
<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="Encounter"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
<mustSupport value="type"/>
<mustSupport value="period"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="location"/>
<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="Resource"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
<mustSupport value="id"/>
<mustSupport value="id.value"/>
</dataRequirement>
<dataRequirement>
<type value="Location"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-location"/>
</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>
</Library>
</contained>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
<extension url="guidance">
<valueString
value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex"/>
</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/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
<valueReference>
<reference value="#effective-data-requirements"/>
</valueReference>
</extension>
<url value="https://madie.cms.gov/Measure/CMS819FHIRHHORAE"/>
<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="CMS819FHIR"/>
</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:30256069-ee4f-45b8-895a-5452cf8e9e4e"/>
</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:d58ce964-1cb1-40b5-a4aa-40b030191990"/>
</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="3501e"/>
<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="819FHIR"/>
<assigner>
<display value="CMS"/>
</assigner>
</identifier>
<version value="1.0.000"/>
<name value="CMS819FHIRHHORAE"/>
<title value="Hospital Harm - Opioid-Related Adverse EventsFHIR
"/>
<status value="active"/>
<experimental value="false"/>
<date value="2025-08-25T21:38:29+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="This measure assesses the number of inpatient hospitalizations for patients age 18 and older who have been administered an opioid medication and are subsequently administered an opioid antagonist within 12 hours, an indication of an opioid-related adverse event
"/>
<usage
value="Qualifying encounters (denominator) include all patients 18 years of age or older with at least one opioid medication administered outside of the operating room.
To create the numerator:
1. First, start with those encounters meeting denominator criteria.
2. Next, remove all events where an opioid or opioid antagonist was administered in the operating room.
Opioid antagonist administrations in the operating room are excluded because they could be part of the sedation plan as administered by an anesthesiologist. Encounters that include use of opioid antagonists for procedures and recovery outside of the operating room (e.g., bone marrow biopsy and PACU) are included in the numerator, as it would indicate the patient was over-sedated. Note that should a facility not utilize temporary patient locations, alternative times may be used to determine whether a patient is in the operating room during opioid antagonist administration. Since anesthesia end time could represent the time the anesthesiologist signed off, and thus may include the patient's time in the PACU, this should be avoided.
3. Next, remove all events where the opioid antagonist was administered via an enteral route. Only opioid antagonists given by a non-enteral (i.e., intravenous, intramuscular, subcutaneous, intranasal, inhalation) route are considered.
4. Finally, remove all administrations of opioid antagonist that were given greater than 12 hours following hospital administration of an opioid medication.
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: CMS819v4. 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. 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="Agency for Healthcare Research and Quality. (2019). Medication Errors and Adverse Drug Events. Rockville: US Department of Health \& Human Services. Retrieved from https://psnet.ahrq.gov/primer/medication-errors-and-adverse-drug-events
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="American Heart Association and American Society of Anesthesiologists. (2021). Naloxone in CPR/AED Training and Public Access to Defibrillation. Retrieved from https://www.heart.org/-/media/Files/About-Us/Policy-Research/Policy-Positions/CPR-and-AED/Naloxone-Position-Statement.pdf
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="American Heart Association. (2020). Highlights of the 2020 American Heart Association's Guidelines for CPR and ECC. https://cpr.heart.org/-/media/cpr-files/cpr-guidelines-files/highlights/hghlghts_2020_ecc_guidelines_english.pdf
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Baker, J., Brovman, E.Y., Rao, N., Beutler, S.S., Urman, R.D. (2020). Potential Opioid-Related Adverse Drug Events Are Associated With Decreased Revenue in Hip Replacement Surgery in the Older Population. Geriatric Orthopaedic Surgery \& Rehabilitation. January 2020. doi:10.1177/2151459320915328
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Britch, S.C., Walsh, S.L. (2022). Treatment of opioid overdose: current approaches and recent advances. Psychopharmacology (Berl). 2022;239(7):2063-2081. doi:10.1007/s00213-022-06125-5
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Food and Drug Administration. (2022). Nalmefene Hydrochloride Injection 2mg/2mL (1mg/1mL) \[Full Prescribing Information\]. Stamford, CT: Purdue Pharma L.P., 02/08/2022. https://www.accessdata.fda.gov/spl/data/d4bb0797-a4ed-4ed4-9904-604433eea4ff/d4bb0797-a4ed-4ed4-9904-604433eea4ff.xml
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Kessler, E. R., Shah, M., Gruschkus, S. K., \& Raju, A. (2013). Cost and quality implications of opioid-based postsurgical pain control using administrative claims data from a large health system: opioid-related adverse events and their impact on clinical and economic outcomes. Pharmacotherapy, 33(4), 383-391. doi: 10.1002/phar.1223
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Khanna, A.K., Saager, L., Bergese, S.D., et al. (2021). Opioid-induced respiratory depression increases hospital costs and length of stay in patients recovering on the general care floor. BMC Anesthesiol. 2021;21(1):88. Published 2021 Mar 20. doi:10.1186/s12871-021-01307-8
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Lavonas, E. J., Drennan, I. R., Gabrielli, A., Heffner, A. C., Hoyte, C. O., Orkin, A. M., Donnino, M. W. (2015). Part 10: Special Circumstances of Resuscitation. 2015 American Heart Association Guidelines Update for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care, 132(18 suppl 2), S501-S518. doi: 10.1161/cir.0000000000000264
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Lee, L. A., Caplan, R. A., Stephens, L. S., Posner, K. L., Terman, G. W., Voepel-Lewis, T., \& Domino, K. B. (2015). Postoperative opioid-induced respiratory depression: a closed claims analysis. Anesthesiology, 122(3), 659-665
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Lynn, R. R., Galinkin, J. (2017). Naloxone dosage for opioid reversal: Current evidence and clinical implications. Therapeutic Advances in Drug Safety, 9(1), 63-88. doi:10.1177/204209861774416
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Makary, M. A., Daniel, M. (2016). Medical error-the third leading cause of death in the US. BMJ, 353, i2139. doi: 10.1136/bmj.i2139
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Med Lett Drugs Ther. (2022). Nalmefene Returns for Reversal of Opioid Overdose. Sep 5;64(1658):141-2
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Nwulu, U., Nirantharakumar, K., Odesanya, R., McDowell, S. E., Coleman, J. J. (2013). Improvement in the detection of adverse drug events by the use of electronic health and prescription records: an evaluation of two trigger tools. Eur J Clin Pharmacol, 69(2), 255-259. doi: 10.1007/s00228-012-1327-1
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Shafi, S., Collinsworth, A.W., Copeland, L.A., et al. (2018). Association of Opioid-Related Adverse Drug Events With Clinical and Cost Outcomes Among Surgical Patients in a Large Integrated Health Care Delivery System. JAMA Surg. 2018;153(8):757-763. doi:10.1001/jamasurg.2018.1039. PMID: 29799927; PMCID: PMC6142954
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Urman, R.D., Khanna, A.K., Bergese, S.D., et al. (2021). Postoperative opioid administration characteristics associated with opioid-induced respiratory depression: Results from the PRODIGY trial. J Clin Anesth. 2021;70:110167. doi:10.1016/j.jclinane.110167
"/>
</relatedArtifact>
<relatedArtifact>
<type value="citation"/>
<citation
value="Urman, R.D., Seger, D.L., Fiskio, J.M., et al. (2021). The Burden of Opioid-Related Adverse Drug Events on Hospitalized Previously Opioid-Free Surgical Patients. J Patient Saf. 2021;17(2):e76-e83
"/>
</relatedArtifact>
<library value="https://madie.cms.gov/Library/CMS819FHIRHHORAE"/>
<disclaimer
value="This performance measure is not a clinical guideline, does not establish a standard of medical care and has not been tested for all potential applications. THE MEASURES AND SPECIFICATIONS 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="Opioids are often the foundation for sedation and pain relief. Opioid-based analgesia continues to be the most commonly used treatment in postoperative pain management, with more than 95% of surgical patients receiving opioids during their hospitalization (Baker et al., 2020). However, use of opioids can also lead to serious adverse events, including constipation, over sedation, delirium, and respiratory depression (Urman et al., 2021a). Opioid-related adverse events (ORADE) have both patient-level and financial implications. The presence of an ORADE was associated with a 55% longer postoperative length of stay, 29% lower odds of discharge home, and 2.9 times the odds of death (Urman et al., 2021b). For surgical patients, occurrence of opioid-related adverse events was associated with an increase of 1.6 days in length of stay (LOS) and $8225 more in cost for the index hospitalization. Patients who experienced ORADEs while in a hospitalized setting were more likely to have received a higher total dose of opioids during hospitalization (Cone et al., 2023; Shafi et al., 2018). Numerous studies report the additive (risk-adjusted) hospitalization cost burden of surgical patients with ORADEs to be between $4350-$8225, representing a 27-47% increase in (risk-adjusted) admission costs (Khanna et al., 2021).
Most opioid-related adverse events are preventable. Each year, adverse drug events (ADE) account for nearly 700,000 emergency department visits and 100,000 hospitalizations (AHRQ, 2019). An estimated one-third of all adverse events that occur in the inpatient setting are adverse drug events (ODPHP, 2020). Additionally, in a closed-claims analysis, 97% of adverse events were judged preventable with better monitoring and response (Lee et al., 2015). Naloxone administration is often used as an indicator of a severe opioid-related adverse event, and implementation of this measure can advance safe use of opioids in hospitals and prevent these serious and potentially lethal adverse drug events.
"/>
<clinicalRecommendationStatement
value="Naloxone is an opioid reversal agent typically used for severe opioid-related adverse events. Naloxone administration has been used in a number of studies as an indicator of opioid-related adverse events (Yiu, et al., 2022; Lynn \& Galinkin, 2017; Nwulu et al., 2013).
From Section 10 of the 2015 American Heart Association Guidelines Update for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care (Lavonas et al., 2015), the following recommendation is listed for use of naloxone:
Naloxone is a potent opioid receptor antagonist in the brain, spinal cord, and gastrointestinal system. Naloxone has an excellent safety profile and can rapidly reverse central nervous system (CNS) and respiratory depression in a patient with an opioid-associated resuscitative emergency.
The 2020 American Heart Association guidelines update for cardiopulmonary resuscitation continue to recommend naloxone for a patient with suspected opioid overdose who has a definite pulse but no normal breathing or only gasping (i.e., a respiratory arrest), in addition to providing standard Pediatric Basic Life Support (PBLS) or Pediatric Advanced Life Support (PALS), it is reasonable for responders to administer intramuscular or intranasal naloxone. These recommendations are identical for adults (American Heart Association, 2020).
In February 2022, the Food and Drug Administration (FDA) approved its abbreviated new drug application for nalmefene hydrochloride injection, 2mg/2mL (1mg/1mL). Nalmefene is an opioid antagonist indicated for the complete or partial reversal of opioid drug effects, including respiratory depression, induced by either natural or synthetic opioids, and in the management of known or suspected opioid overdose (FDA, 2022). In contrast to naloxone, the long half-life of nalmefene is similar to or greater than that of many opioid receptor agonists (Britch \& Walsh, 2022), which could decrease the need for repeat drug administration. In May 2023, FDA approved nalmefene hydrochloride nasal spray that delivers 2.7 milligrams (mg) of nalmefene into the nasal cavity (FDA, 2023).
"/>
<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="outcome"/>
<display value="Outcome"/>
</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 for patients age 18 and older and at least one opioid medication administration starts during the hospitalization outside of the operating room
"/>
<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="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 a non-enteral opioid antagonist administration starts during the hospitalization outside of the operating room and 12 hours or less following an opioid medication administered outside of the operating room. The route of administration of the opioid antagonist must be by intranasal spray, inhalation, intramuscular, subcutaneous, or intravenous injection. Only one numerator event is counted per encounter.
"/>
<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>