eCQM QICore Content Implementation Guide
2024.0.0 - CI Build
eCQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2024.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/ecqm-content-qicore-2024/ and changes regularly. See the Directory of published versions
Draft as of 2024-07-09 |
<Measure xmlns="http://hl7.org/fhir">
<id value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
<meta>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm"/>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"/>
</meta>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table class="grid dict">
<tr>
<th scope="row"><b>Title: </b></th>
<td style="padding-left: 4px;">Hospital Harm - Severe HyperglycemiaFHIR</td>
</tr>
<tr>
<th scope="row"><b>Id: </b></th>
<td style="padding-left: 4px;">HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
</tr>
<tr>
<th scope="row"><b>Version: </b></th>
<td style="padding-left: 4px;">0.1.000</td>
</tr>
<tr>
<th scope="row"><b>Url: </b></th>
<td style="padding-left: 4px;"><a href="Measure-HospitalHarmHyperglycemiainHospitalizedPatientsFHIR.html">Hospital Harm - Severe HyperglycemiaFHIR</a></td>
</tr>
<tr>
<th scope="row">
<b>
short-name identifier:
</b>
</th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>CMS871FHIR</span>
</p>
</td>
</tr>
<tr>
<th scope="row">
<b>
version-independent identifier:
</b>
</th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>urn:uuid:c44ca609-d795-4715-a8fc-1b0b30e46048</span>
</p>
</td>
</tr>
<tr>
<th scope="row">
<b>
version-specific identifier:
</b>
</th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>urn:uuid:c7dbf77f-5869-42a0-b5e6-12e18004d2f4</span>
</p>
</td>
</tr>
<tr>
<th scope="row">
<b>
endorser (CMS Consensus Based Entity) identifier:
</b>
</th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>3533e</span>
</p>
</td>
</tr>
<tr>
<th scope="row">
<b>
publisher (CMS) identifier:
</b>
</th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>871FHIR</span>
</p>
</td>
</tr>
<tr>
<th scope="row"><b>Effective Period: </b></th>
<td style="padding-left: 4px;">2025-01-01..2025-12-31</td>
</tr>
<tr>
<th scope="row"><b>Status: </b></th>
<td style="padding-left: 4px;">draft</td>
</tr>
<tr>
<th scope="row"><b>Publisher: </b></th>
<td style="padding-left: 4px;">Centers for Medicare & Medicaid Services (CMS)</td>
</tr>
<tr>
<th scope="row"><b>Author: </b></th>
<td style="padding-left: 4px;">American Institutes for Research (AIR)</td>
</tr>
<tr>
<th scope="row"><b>Description: </b></th>
<td style="padding-left: 4px;"><div><p>This measure assesses the number of inpatient hospital days for patients age 18 and older with a hyperglycemic event (harm) per the total qualifying inpatient hospital days for that encounter</p>
</div></td>
</tr>
<tr>
<th scope="row"><b>Purpose: </b></th>
<td style="padding-left: 4px;"><div><p>UNKNOWN</p>
</div></td>
</tr>
<tr>
<th scope="row"><b>Copyright: </b></th>
<td style="padding-left: 4px;"><div><p>Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. American Institutes for Research(R), formerly IMPAQ International, disclaims all liability for use or accuracy of any third party codes contained in the specifications.</p>
<p>LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved.</p>
</div></td>
</tr>
<tr>
<th scope="row"><b>Disclaimer: </b></th>
<td style="padding-left: 4px;"><div><p>This performance measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications.</p>
<p>THE MEASURES AND SPECIFICATIONS 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>
</div></td>
</tr>
<tr>
<th scope="row"><b>Scoring: </b></th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>Proportion </span>
</p>
</td>
</tr>
<tr>
<th scope="row"><b>Rationale: </b></th>
<td style="padding-left: 4px;"><div><p>Hyperglycemia, i.e., elevated glucose level, is common among hospitalized patients, especially those with preexisting diabetes (Umpierrez et al., 2012) and account for over 30% of noncritically ill hospitalized patients (Korytkowski, 2022). Hyperglycemia can also affect individuals with no prior history of diabetes and may be induced by medications such as steroids, or parenteral (intravenous) or enteral (tube) feeding.</p>
<p>Severe hyperglycemia, i.e., extremely elevated glucose level, is significantly associated with a range of harms, including increased in-hospital mortality, infection rates, and hospital length of stay (Pasquel, et al., 2021; Umpierrez et al., 2012, 2015). Lower rates of inpatient severe hyperglycemia may not only improve care for patients, but also reduce costs for healthcare payers (Krinsley et al., 2016). The rate of hyperglycemia varies across hospitals, suggesting opportunities for improvement in inpatient glycemic management (Seisa et al., 2022; Bersoux et al., 2013). The rate of inpatient hyperglycemia can be considered a marker for quality of hospital care, since inpatient hyperglycemia is largely avoidable with proper glycemic management. The use of evidence-based standardized protocols and insulin management protocols have been shown to improve glycemic control and safety (Leroy et al., 2020; Maynard et al., 2015).</p>
<p>From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:
Recommendation 1.1
In adults with insulin-treated diabetes hospitalized for noncritical illness who are at high risk of hypoglycemia, we suggest the use of real-time continuous glucose monitoring (CGM) with confirmatory bedside point-of-care blood glucose (POC-BG) monitoring for adjustments in insulin dosing rather than point-of-care blood glucose (POC-BG) testing alone in hospital settings where resources and training are available.</p>
</div></td>
</tr>
<tr>
<th scope="row"><b>Clinical recommendation statement: </b></th>
<td style="padding-left: 4px;"><div><p>Multiple guidelines address recommended levels of glycemic control, though these do not define severe hyperglycemia:</p>
<p>From Section 16, Diabetes Care in the Hospital, in the Standards of Medical Care in Diabetes by the American Diabetes Association, (American Diabetes Association, 2023):</p>
<p>16.4 Insulin therapy should be initiated for the treatment of persistent hyperglycemia starting at a threshold ≥180 mg/dL (10.0 mmol/L) (checked on two occasions). Once insulin therapy is started, a target glucose range of 140–180 mg/dL (7.8–10.0 mmol/L) is recommended for most critically ill and noncritically ill patients.</p>
<p>16.5 More stringent goals, such as 110–140 mg/dL (6.1–7.8 mmol/L) or 100–180 mg/dL (5.6–10.0 mmol/L), may be appropriate for selected patients and are acceptable if they can be achieved without significant hypoglycemia.</p>
<p>From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting (2022):</p>
<p>Recommendation 10.1
In adults with no prior history of diabetes hospitalized for noncritical illness with hyperglycemia [defined as blood glucose (BG) > 140 mg/dL (7.8 mmol/L)] during hospitalization, we suggest initial therapy with correctional insulin over scheduled insulin therapy (defined as basal or basal/bolus insulin) to maintain glucose targets in the range of 100 to 180 mg/dL (5.6 to 10.0 mmol/L). For patients with persistent hyperglycemia [≥2 point-of-care blood glucose (POC-BG) measurements ≥ 180 mg/dL (≥10.0 mmol/L) in a 24-hour period on correctional insulin alone], we suggest the addition of scheduled insulin therapy.</p>
<p>Recommendation 10.2
In adults with diabetes treated with diet or noninsulin diabetes medications prior to admission, we suggest initial therapy with correctional insulin or scheduled insulin therapy to maintain glucose targets in the range of 100 to 180 mg/dL (5.6 to 10.0 mmol/L). For hospitalized adults started on correctional insulin alone and with persistent hyperglycemia [≥2 point-of-care blood glucose (POC-BG) measurements ≥ 180 mg/dL in a 24-hour period (≥10.0 mmol/L)], we suggest addition of scheduled insulin therapy. We suggest initiation of scheduled insulin therapy for patients with confirmed admission blood glucose (BG) ≥ 180 mg/dL (≥10.0 mmol/L).</p>
<p>Recommendation 10.3
In adults with insulin-treated diabetes prior to admission who are hospitalized for noncritical illness, we recommend continuation of the scheduled insulin regimen modified for nutritional status and severity of illness to maintain glucose targets in the range of 100 to 180 mg/dL (5.6 to 10.0 mmol/L).</p>
<p>Remarks
Reductions in the dose of basal insulin (by 10% to 20%) at time of hospitalization may be required for patients on basal heavy insulin regimens (defined as doses of basal insulin ≥ 0.6 to 1.0 units/kg/day), in which basal insulin is being used inappropriately to cover meal-related excursions in BG.</p>
<p>There is no clinically accepted cutoff for severe hyperglycemia. Studies have used thresholds of >140, >180 , >300, >350 and >400 mg/dL, among other values (American Diabetes Association, 2023; Umpierrez et al, 2012, 2015; Jamesen et al., 2015; Donihi et al., 2011; Mendez et al, 2015; Seisa et al., 2022). BGL <180 mg/dL is associated with lower rates of mortality and stroke compared with a target glucose <200 mg/dL (Sathya et al., 2013). Glycemic goals may also differ among hospitalized patients. For inpatient management of hyperglycemia in noncritical care, the expert consensus recommends a target range of 100–180 mg/dL (5.6–10.0 mmol/L) for noncritically ill patients with “new” hyperglycemia as well as people with known diabetes prior to admission. Glycemic levels >250 mg/dL (13.9 mmol/L) may be acceptable in terminally ill patients with short life expectancy. In these individuals, less aggressive insulin regimens to minimize glucosuria, dehydration, and electrolyte disturbances are often more appropriate. (ElSayed et al., 2023). In an older patient with a prior history of severe hypoglycemia, some degree of hyperglycemia may be tolerated to maximize safety. Intensive insulin therapy to target glucose of 100 and 140mg/dLin the ICU didn’t significantly reduce perioperative complications compared with target glucose of 141and180mg/dL after coronary artery bypass surgery (Umpierrez et al., 2015). The current recommendation is to maintain a blood glucose level between 140-180 mg/dL (7.8-10.0 mmol/L) in both cardiac and non-cardiac ICU patients (Sreedharan et al., 2022).</p>
<p>For patients who present with hyperglycemic crises, neurologic status must be monitored closely, with frequent re-examination. Care should be taken to prevent over-correction of hyperglycemia and hyperosmolarity following initial fluid resuscitation of these patients to prevent cerebral edema, which carries a high mortality rate. (Gosmanov et al., 2021).</p>
<p>From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:
Recommendation 1.1
In adults with insulin-treated diabetes hospitalized for noncritical illness who are at high risk of hypoglycemia, we suggest the use of real-time continuous glucose monitoring (CGM) with confirmatory bedside point-of-care blood glucose (POC-BG) monitoring for adjustments in insulin dosing rather than point-of-care blood glucose (POC-BG) testing alone in hospital settings where resources and training are available.</p>
</div></td>
</tr>
<tr>
<th scope="row"><b>Guidance (Usage): </b></th>
<td style="padding-left: 4px;">The measure is using mg/dL as the unit of measurement for glucose results.
When evaluating for days with a glucose level >300 mg/dL, the first 24-hour period after admission to the hospital is not evaluated to account for potentially poor glucose control outside of the hospital setting or that preceded the start of hospital care. The admission starts in the emergency department (ED) or observation when the transition between the ED encounter, observation encounter, and the inpatient encounter are within an hour or less of each other.
This measure evaluates the first 10 days of an eligible inpatient hospitalization in determining eligible days for the denominator and numerator (i.e., the length of stay is truncated to <=10 days when the length exceeds 10 days). Patients admitted for longer length of stays are more likely to have more complex medical conditions.
The “Days in Hospitalization” logic within Measure Observation 1 (associated with the denominator), in conjunction with other logic, returns the day number (e.g., day 1 to day 10) for each day within the hospitalization period to determine the eligible hospital days (e.g., from day 2 to day 10).
The “Days in Hospitalization” logic within Measure Observation 2 (associated with the numerator), in conjunction with other logic, returns the day number (e.g., day 1 to day 10) for each day within the hospitalization period to determine the eligible hyperglycemic event days (e.g., from day 2 to day 10).
Since the measure does not count any hyperglycemic events that occur in the first 24 hours, day 1 is not considered an eligible hospital day for the Measure Observations. Eligible days range from day 2 up to day 10.
Although the measure does not count any hyperglycemic events that occur in the first 24 hours as a hyperglycemic event day in Measure Observation 2, the first 24 hours of the encounter is considered day 1. This is because if there was a day during the encounter where a glucose result is not found, the measure evaluates the two days preceding to see if each had a glucose value >=200 mg/dL. The measure allows the first 24 hours of the encounter, i.e., day 1, to be one of the preceding days.
Multiple hyperglycemic events can occur during a ‘day’, but this is still considered one hyperglycemic event day.
The numerator returns the first eligible encounter that meets the qualifying criteria: an inpatient hospitalization with a hyperglycemic event. Only one numerator is counted per encounter. Note that the Numerator returns the encounters, not days, that meet the criteria.
The specimen source for the glucose test is blood, serum, plasma, or interstitial fluid, and can be obtained by a laboratory test, a Point of Care (POC) test, or a continuous glucose monitor (CGM). Glucose test results from urine specimens are not considered.
This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.
This FHIR-based measure has been derived from the QDM-based measure: CMS871v4.
Please refer to the HL7 QI-Core Implementation Guide(https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</td>
</tr>
<tr>
<th scope="row"><b>Population Criteria: </b></th>
<td style="padding-left: 4px;">
<table class="grid-dict">
<tr>
<th><b>6501fe8dda013638e7b3dc0d</b></th>
</tr>
<tr>
<td>Initial Population:</td>
<td>Inpatient hospitalizations for patients age 18 and older that end during the measurement period, as well as either:
- A diagnosis of diabetes that starts before or during the encounter; or
- Administration of at least one dose of insulin or any hypoglycemic medication during the encounter; or
- Presence of at least one glucose value >=200 mg/dL at any time during the encounter</td>
</tr>
<tr>
<td>Denominator:</td>
<td>Equals Initial Population</td>
</tr>
<tr>
<td>Denominator Exclusion:</td>
<td>-Inpatient hospitalizations for patients with a glucose result of >=1000 mg/dL anytime between 1 hour prior to the start of the encounter to 6 hours after the start of the encounter
-Inpatient hospitalizations for patients who have comfort care measures ordered or provided during the encounter
-Inpatient hospitalizations for patients who have a discharge disposition to home or to a health care facility for hospice care
</td>
</tr>
<tr>
<td>Numerator:</td>
<td>Inpatient hospitalizations with a hyperglycemic event within the first 10 days of the encounter minus the first 24 hours, and minus the last period before discharge from the hospital if less than 24 hours
A hyperglycemic event is defined as:
- A day with at least one glucose value >300 mg/dL;
OR
- A day where a glucose test and result was not found, and it was preceded by two consecutive days where at least one glucose value during each of the two days was >=200 mg/dL</td>
</tr>
<tr>
<td>Measure Observation:</td>
<td>None</td>
</tr>
<tr>
<td>Measure Observation:</td>
<td>None</td>
</tr>
</table>
</td>
</tr>
<tr>
<th scope="row"><b> Supplemental Data Elements: </b></th>
<td style="padding-left: 4px;">
<p>SDE Ethnicity</p>
<p>SDE Payer</p>
<p>SDE Race</p>
<p>SDE Sex</p>
</td>
</tr>
<tr>
<th scope="row">
<b> Supplemental Data Guidance
: </b></th>
<td style="padding-left: 4px;"> For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity
SDE Payer
SDE Race
SDE Sex
</td>
</tr>
<tr>
<th scope="row"><b>Libraries: </b></th>
<td style="padding-left: 4px;">
<table class="grid-dict">
<tr>
<td><a href="Library-HospitalHarmHyperglycemiainHospitalizedPatientsFHIR.html">HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<th scope="row"><b>Terminology and Other Dependencies: </b></th>
<td style="padding-left: 4px;">
<li><code>Library/SupplementalDataElements|3.5.000</code></li>
<li><code>Library/FHIRHelpers|4.4.000</code></li>
<li><code>Library/CQMCommon|2.2.000</code></li>
<li><code>Library/QICoreCommon|2.1.000</code></li>
<li><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">AdministrativeGender</a></li>
<li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a></li>
<li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a></li>
<li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a></li>
<li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.103.12.1001/expansion">Diabetes</a></li>
<li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1196.394/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.394</a></li>
<li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.34/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34</a></li>
<li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></li>
</td>
</tr>
<tr>
<th scope="row"><b>Parameters:</b></th>
<td style="padding-left: 4px;">
<table class="grid-dict">
<tr>
<th><b>name</b></th>
<th><b>use</b></th>
<th><b>min</b></th>
<th><b>max</b></th>
<th><b>type</b></th>
</tr>
<tr>
<td>Measurement Period</td>
<td>In</td>
<td>0</td>
<td>1</td>
<td>Period</td>
</tr>
<tr>
<td>SDE Sex</td>
<td>Out</td>
<td>0</td>
<td>1</td>
<td>Coding</td>
</tr>
<tr>
<td>Numerator</td>
<td>Out</td>
<td>0</td>
<td>*</td>
<td>Resource</td>
</tr>
<tr>
<td>Denominator</td>
<td>Out</td>
<td>0</td>
<td>*</td>
<td>Resource</td>
</tr>
<tr>
<td>SDE Payer</td>
<td>Out</td>
<td>0</td>
<td>*</td>
<td>Resource</td>
</tr>
<tr>
<td>Initial Population</td>
<td>Out</td>
<td>0</td>
<td>*</td>
<td>Resource</td>
</tr>
<tr>
<td>SDE Ethnicity</td>
<td>Out</td>
<td>0</td>
<td>1</td>
<td>Resource</td>
</tr>
<tr>
<td>Denominator Exclusions</td>
<td>Out</td>
<td>0</td>
<td>*</td>
<td>Resource</td>
</tr>
<tr>
<td>SDE Race</td>
<td>Out</td>
<td>0</td>
<td>1</td>
<td>Resource</td>
</tr>
</table>
</td>
</tr>
<tr>
<th scope="row"><b>DataRequirements:</b></th>
<td style="padding-left: 4px;">
<table class="grid-dict">
<tr>
<th><b>Resource Type</b></th>
<th><b>Resource Elements</b></th>
<th><b>Valueset Name</b></th>
<th><b>Valueset</b></th>
</tr>
<tr>
<td>Patient(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html">QICorePatient</a>)</td>
<td>
ethnicity
race
</td>
<td>
</td>
<td/>
</tr>
<tr>
<td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
<td>
type
status
status.value
period
</td>
<td>
Observation Services
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a></td>
</tr>
<tr>
<td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
<td>
type
status
status.value
period
</td>
<td>
Emergency Department Visit
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a></td>
</tr>
<tr>
<td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
<td>
type
period
status
status.value
hospitalizationPeriod
encounter
</td>
<td>
Encounter Inpatient
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a></td>
</tr>
<tr>
<td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
<td>
code
</td>
<td>
Diabetes
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.103.12.1001/expansion">Diabetes</a></td>
</tr>
<tr>
<td>MedicationAdministration(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationadministration.html">QICoreMedicationAdministration</a>)</td>
<td>
medication
status
status.value
effective
</td>
<td>
Hypoglycemics Treatment Medications
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1196.394/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.394</a></td>
</tr>
<tr>
<td>Observation(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html">QICoreObservation</a>)</td>
<td>
code
effective
status
status.value
value
id
id.value
</td>
<td>
Glucose Lab Test Mass Per Volume
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.34/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34</a></td>
</tr>
<tr>
<td>Observation(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html">QICoreObservation</a>)</td>
<td>
code
effective
value
status
status.value
id
id.value
</td>
<td>
Glucose Lab Test Mass Per Volume
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.34/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34</a></td>
</tr>
<tr>
<td>Coverage(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html">QICoreCoverage</a>)</td>
<td>
type
period
</td>
<td>
Payer Type
</td>
<td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<th scope="row"><b>Direct Reference Codes:</b></th>
<td style="padding-left: 4px;">
<table class="grid-dict">
<tr>
<th><b>display</b></th>
<th><b>code</b></th>
<th><b>system</b></th>
</tr>
<tr>
<td>Male</td>
<td>M</td>
<td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
</tr>
<tr>
<td>Female</td>
<td>F</td>
<td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
</tr>
</table>
</td>
</tr>
<tr>
<th scope="row"><b>Logic Definitions:</b></th>
<td style="padding-left: 4px;">
<table class="grid-dict">
<tr>
<th><b>Group</b></th>
<th><b>Scoring</b></th>
<th><b>Population Criteria</b></th>
<th><b>Expression</b></th>
</tr>
<tr>
<td> 6501fe8dda013638e7b3dc0d </td>
<td colspan="3" style="padding-left: 4px;">
<b>Group scoring:</b>
<span> ratio </span>
<b>Measure scoring:</b>
<p style="margin-bottom: 5px;">
<span>Proportion</span>
</p>
<tr>
<th scope="row"><b>Type: </b></th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>Outcome </span>
</p>
</td>
</tr>
<tr>
<th scope="row"><b>Rate Aggregation: </b></th>
<td colspan="3" style="padding-left: 4px;">None</td>
</tr>
<tr>
<th scope="row"><b>Improvement Notation: </b></th>
<td style="padding-left: 4px;">
<p style="margin-bottom: 5px;">
<span>decrease </span>
</p>
</td>
</tr>
</td>
<tr>
<td/>
<td/>
<td>Initial Population</td>
<td>
<pre><code class="language-cql">define "Initial Population":
"Encounter with Existing Diabetes Diagnosis"
union "Encounter with Hypoglycemic Medication"
union "Encounter with Elevated Glucose Greater Than or Equal to 200"</code></pre>
</td>
</tr>
<tr>
<td/>
<td/>
<td>Denominator</td>
<td>
<pre><code class="language-cql">define "Denominator":
"Initial Population"</code></pre>
</td>
</tr>
<tr>
<td/>
<td/>
<td>Denominator Exclusion</td>
<td>
<pre><code class="language-cql">define "Denominator Exclusions":
"Encounter with First Glucose Greater Than or Equal to 1000"</code></pre>
</td>
</tr>
<tr>
<td/>
<td/>
<td>Numerator</td>
<td>
<pre><code class="language-cql">define "Numerator":
"Encounter with Hyperglycemic Events"</code></pre>
</td>
</tr>
<tr>
<td/>
<td/>
<td>Measure Observation</td>
<td>
<pre><code class="language-cql">/**
* Counts the number of eligible days in an encounter. This simply filters and counts the data built in
* "Relevant Encounters With Hyperglycemic Event Days".*/
define function "Denominator Observations"(QualifyingEncounter Encounter):
if QualifyingEncounter.id in "Denominator Exclusions".id then singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return 0
)
else singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return Count(EncounterWithEventDays.eligibleEventDays)
)</code></pre>
</td>
</tr>
<tr>
<td/>
<td/>
<td>Measure Observation</td>
<td>
<pre><code class="language-cql">/**
* Counts the number of eligible days with a hyperglycemic event in an encounter. This simply filters and counts the data built in
* "Relevant Encounters With Hyperglycemic Event Days".*/
define function "Numerator Observations"(QualifyingEncounter Encounter):
if QualifyingEncounter.id in "Denominator Exclusions".id then singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return 0
)
else singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return Count(EncounterWithEventDays.eligibleEventDays EligibleEventDay
where EligibleEventDay.hasHyperglycemicEvent
)
)</code></pre>
</td>
</tr>
</tr>
</table>
<table class="grid-dict">
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>SupplementalDataElements</td>
<td>SDE Sex</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Sex":
case
when Patient.gender = 'male' then "M"
when Patient.gender = 'female' then "F"
else null
end</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>SDE Sex</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Sex":
SDE."SDE Sex"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Qualifying Encounter</td>
</tr>
<tr>
<td/>
<td>
<pre class="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><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Encounter with Hospitalization Period</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Create paring of encounters to hospitalization period so this calculation can be inspected and the result
* can be reused, making the logic faster.*/
define "Encounter with Hospitalization Period":
"Qualifying Encounter" QualifyingHospitalization
return Tuple {
encounter: QualifyingHospitalization,
hospitalizationPeriod: CQMCommon."HospitalizationWithObservation" ( QualifyingHospitalization )
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Encounter with Existing Diabetes Diagnosis</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Using the already calculated pairing of hospitalization periods with encounters, filter on ones with
* diabetes and return the encounter.*/
define "Encounter with Existing Diabetes Diagnosis":
"Encounter with Hospitalization Period" Hospitalization
with ["Condition": "Diabetes"] Diabetes
such that ( QICoreCommon."ToPrevalenceInterval" ( Diabetes ) starts before end of Hospitalization.hospitalizationPeriod )
return Hospitalization.encounter</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Encounter with Hypoglycemic Medication</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Using the already calculated pairing of hospitalization periods with encounters, filter on ones with
* hypoglycemic medicatons and return the encounter.*/
define "Encounter with Hypoglycemic Medication":
from
"Encounter with Hospitalization Period" Hospitalization,
["MedicationAdministration": "Hypoglycemics Treatment Medications"] HypoglycemicMed
where HypoglycemicMed.status = 'completed'
and HypoglycemicMed.status != 'not-done'
and QICoreCommon."ToInterval" ( HypoglycemicMed.effective ) during Hospitalization.hospitalizationPeriod
return Hospitalization.encounter</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Encounter with Elevated Glucose Greater Than or Equal to 200</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Using the already calculated pairing of hospitalization periods with encounters, filter on ones with
* any elevated (>= 200) blood glucose reading during the hospitalization*/
define "Encounter with Elevated Glucose Greater Than or Equal to 200":
"Encounter with Hospitalization Period" Hospitalization
with ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
such that QICoreCommon."Earliest" ( GlucoseTest.effective ) during Hospitalization.hospitalizationPeriod
and GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and GlucoseTest.value >= 200 'mg/dL'
return Hospitalization.encounter</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Initial Population</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Initial Population":
"Encounter with Existing Diabetes Diagnosis"
union "Encounter with Hypoglycemic Medication"
union "Encounter with Elevated Glucose Greater Than or Equal to 200"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Denominator</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Denominator":
"Initial Population"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Measurement Population</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Measurement Population":
"Denominator"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Days in Hospitalization</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/***/
define "Days in Hospitalization":
"Measurement Population" EligibleInpatientHospitalization
let period: CQMCommon."HospitalizationWithObservation" ( EligibleInpatientHospitalization ),
relevantPeriod: "Hospital Days Max 10"(period)
return Tuple {
encounter: EligibleInpatientHospitalization,
hospitalizationPeriod: period,
relevantPeriod: relevantPeriod,
relevantDays: "Days In Period"(relevantPeriod)
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Days with Glucose Results</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Days with Glucose Results":
"Days in Hospitalization" InpatientHospitalDays
return Tuple {
encounter: InpatientHospitalDays.encounter,
relevantPeriod: InpatientHospitalDays.relevantPeriod,
relevantDays: ( InpatientHospitalDays.relevantDays EncounterDay
return Tuple {
dayNumber: EncounterDay.dayNumber,
dayPeriod: EncounterDay.dayPeriod,
hasSevereResult: exists ( ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
where GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and GlucoseTest.value > 300 'mg/dL'
and QICoreCommon."Earliest" ( GlucoseTest.effective ) during EncounterDay.dayPeriod
),
hasElevatedResult: exists ( ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
where GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and GlucoseTest.value >= 200 'mg/dL'
and QICoreCommon."Earliest" ( GlucoseTest.effective ) during EncounterDay.dayPeriod
),
hasNoGlucoseTest: not exists ( ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
where GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and QICoreCommon."Earliest" ( GlucoseTest.effective ) during EncounterDay.dayPeriod
)
}
)
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Days with Hyperglycemic Events</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/*# hyper days uses "Relevant Encounters With Glucose Result Days" to find if hyper event on each day. Skips 1st day in 'RelevantDays`. Returns boolean based on: Today high result OR Today no result AND Yesterday high result AND 2 days ago high result*/
define "Days with Hyperglycemic Events":
"Days with Glucose Results" EncounterWithResultDays
let eligibleEventDays: EncounterWithResultDays.relevantDays EncounterDay
where EncounterDay.dayNumber > 1
return Tuple {
dayIndex: EncounterDay.dayNumber,
dayPeriod: EncounterDay.dayPeriod,
hasHyperglycemicEvent: ( EncounterDay.hasSevereResult
or ( EncounterDay.hasNoGlucoseTest
and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 2].hasElevatedResult
and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 3].hasElevatedResult
)
)
}
return Tuple {
encounter: EncounterWithResultDays.encounter,
relevantPeriod: EncounterWithResultDays.relevantPeriod,
eligibleEventDays: eligibleEventDays
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Encounter with Hyperglycemic Events</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/***/
define "Encounter with Hyperglycemic Events":
"Days with Hyperglycemic Events" HyperglycemicEventDays
where exists ( HyperglycemicEventDays.eligibleEventDays EligibleEventDay
where EligibleEventDay.hasHyperglycemicEvent
)
return HyperglycemicEventDays.encounter</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Numerator</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Numerator":
"Encounter with Hyperglycemic Events"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>SupplementalDataElements</td>
<td>SDE Payer</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Payer":
[Coverage: type in "Payer Type"] Payer
return {
code: Payer.type,
period: Payer.period
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>SDE Payer</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Payer":
SDE."SDE Payer"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>SupplementalDataElements</td>
<td>SDE Ethnicity</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
Patient.ethnicity E
return Tuple {
codes: { E.ombCategory } union E.detailed,
display: E.text
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>SDE Ethnicity</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
SDE."SDE Ethnicity"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start":
from
"Initial Population" InpatientHospitalization,
["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
let HospitalizationInterval: CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ),
GlucoseTestTime: QICoreCommon."Earliest" ( GlucoseTest.effective )
where GlucoseTest.value as Quantity >= 1000 'mg/dL'
and GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hours )]
return GlucoseTest</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start":
from
"Initial Population" InpatientHospitalization,
"Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start" GlucoseResult1000,
["Observation": "Glucose Lab Test Mass Per Volume"] EarlierGlucoseTest
let HospitalizationInterval: CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ),
GlucoseTest1000Time: QICoreCommon."Earliest" ( GlucoseResult1000.effective ),
EarlierGlucoseTestTime: QICoreCommon."Earliest" ( EarlierGlucoseTest.effective )
where GlucoseTest1000Time during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hour )]
and EarlierGlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), GlucoseTest1000Time )
and EarlierGlucoseTest.id !~ GlucoseResult1000.id
return GlucoseResult1000</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start":
"Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start" GlucoseResult1000
where not ( GlucoseResult1000.id in "Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start".id )</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Encounter with First Glucose Greater Than or Equal to 1000</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Encounter with First Glucose Greater Than or Equal to 1000":
"Initial Population" InpatientHospitalization
with "Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start" FirstGlucoseResult
such that FirstGlucoseResult.value as Quantity >= 1000 'mg/dL'
and QICoreCommon."Earliest" ( FirstGlucoseResult.effective ) during Interval[( start of CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ) - 1 hour ), ( start of CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ) + 6 hours )]</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Denominator Exclusions</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "Denominator Exclusions":
"Encounter with First Glucose Greater Than or Equal to 1000"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>SupplementalDataElements</td>
<td>SDE Race</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Race":
Patient.race R
return Tuple {
codes: R.ombCategory union R.detailed,
display: R.text
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>SDE Race</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define "SDE Race":
SDE."SDE Race"</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>CQMCommon</td>
<td>HospitalizationWithObservation</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/*
@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
@deprecated: This function is deprecated. Use the fluent function `hospitalizationWithObservation()` instead.
*/
define 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><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>QICoreCommon</td>
<td>ToPrevalenceInterval</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
@deprecated: This function is deprecated. Use the `prevalenceInterval()` fluent function instead
*/
define function ToPrevalenceInterval(condition Condition):
if condition.clinicalStatus ~ "active"
or condition.clinicalStatus ~ "recurrence"
or condition.clinicalStatus ~ "relapse" then
Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]
else
(end of ToAbatementInterval(condition)) abatementDate
return if abatementDate is null then
Interval[start of ToInterval(condition.onset), abatementDate)
else
Interval[start of ToInterval(condition.onset), abatementDate]</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>QICoreCommon</td>
<td>Earliest</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/*
@description: Given an interval, return the starting point if the interval has a starting boundary specified,
otherwise, return the ending point
@deprecated: This function is deprecated. Use the fluent function `earliest()` instead
*/
define function "Earliest"(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>> ):
(choice.toInterval()) period
return
if (HasStart(period)) then start of period
else end of period</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Hospital Days Max 10</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Crops an interval to a maximum length of 10 days.*/
define function "Hospital Days Max 10"(Period Interval<DateTime>):
Interval[start of Period, Min({
end of Period, start of Period + 10 days }
)]</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Days In Period</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Creates a list of 24 hour long intervals in an interval paired with the index (1 indexed) to which 24 hour interval it is.*/
define function "Days In Period"(Period Interval<DateTime>):
( "Interval To Day Numbers"(Period) ) DayNumber
let startPeriod: start of Period + ( 24 hours * ( DayNumber - 1 ) ),
endPeriod: if ( hours between startPeriod and end of Period < 24 ) then startPeriod
else start of Period + ( 24 hours * DayNumber )
return Tuple {
dayNumber: DayNumber,
dayPeriod: Interval[startPeriod, endPeriod )
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Interval To Day Numbers</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Creates a list of integers from 1 to how many days are in the interval. Note, this wont create an index for
* the final day if it is less than 24 hours. This also includes the first 24 hour period.*/
define function "Interval To Day Numbers"(Period Interval<DateTime>):
( expand { Interval[1, duration in days between start of Period and end of Period]} ) DayExpand
return end of DayExpand</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Denominator Observations</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Counts the number of eligible days in an encounter. This simply filters and counts the data built in
* "Relevant Encounters With Hyperglycemic Event Days".*/
define function "Denominator Observations"(QualifyingEncounter Encounter):
if QualifyingEncounter.id in "Denominator Exclusions".id then singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return 0
)
else singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return Count(EncounterWithEventDays.eligibleEventDays)
)</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>FHIRHelpers</td>
<td>ToString</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>FHIRHelpers</td>
<td>ToCode</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
if coding is null then
null
else
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}</code></pre>
</td>
</tr>
<tr>
<th><b>Library Name</b></th>
<th><b>Name</b></th>
</tr>
<tr>
<td>HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>
<td>Numerator Observations</td>
</tr>
<tr>
<td/>
<td>
<pre class="highlight language-cql"><code class="language-cql">/**
* Counts the number of eligible days with a hyperglycemic event in an encounter. This simply filters and counts the data built in
* "Relevant Encounters With Hyperglycemic Event Days".*/
define function "Numerator Observations"(QualifyingEncounter Encounter):
if QualifyingEncounter.id in "Denominator Exclusions".id then singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return 0
)
else singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return Count(EncounterWithEventDays.eligibleEventDays EligibleEventDay
where EligibleEventDay.hasHyperglycemicEvent
)
)</code></pre>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</text>
<contained>
<Library>
<id value="effective-data-requirements"/>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
<valueCoding>
<system value="http://hl7.org/fhir/administrative-gender"/>
<code value="M"/>
<display value="Male"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
<valueCoding>
<system value="http://hl7.org/fhir/administrative-gender"/>
<code value="F"/>
<display value="Female"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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.gender = 'male' then "M"
when Patient.gender = 'female' then "F"
else null
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="0"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</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/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</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="2"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Encounter with Hospitalization Period"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Create paring of encounters to hospitalization period so this calculation can be inspected and the result
* can be reused, making the logic faster.*/
define "Encounter with Hospitalization Period":
"Qualifying Encounter" QualifyingHospitalization
return Tuple {
encounter: QualifyingHospitalization,
hospitalizationPeriod: CQMCommon."HospitalizationWithObservation" ( QualifyingHospitalization )
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="3"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Encounter with Existing Diabetes Diagnosis"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Using the already calculated pairing of hospitalization periods with encounters, filter on ones with
* diabetes and return the encounter.*/
define "Encounter with Existing Diabetes Diagnosis":
"Encounter with Hospitalization Period" Hospitalization
with ["Condition": "Diabetes"] Diabetes
such that ( QICoreCommon."ToPrevalenceInterval" ( Diabetes ) starts before end of Hospitalization.hospitalizationPeriod )
return Hospitalization.encounter"/>
</extension>
<extension url="displaySequence">
<valueInteger value="4"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Encounter with Hypoglycemic Medication"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Using the already calculated pairing of hospitalization periods with encounters, filter on ones with
* hypoglycemic medicatons and return the encounter.*/
define "Encounter with Hypoglycemic Medication":
from
"Encounter with Hospitalization Period" Hospitalization,
["MedicationAdministration": "Hypoglycemics Treatment Medications"] HypoglycemicMed
where HypoglycemicMed.status = 'completed'
and HypoglycemicMed.status != 'not-done'
and QICoreCommon."ToInterval" ( HypoglycemicMed.effective ) during Hospitalization.hospitalizationPeriod
return Hospitalization.encounter"/>
</extension>
<extension url="displaySequence">
<valueInteger value="5"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString
value="Encounter with Elevated Glucose Greater Than or Equal to 200"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Using the already calculated pairing of hospitalization periods with encounters, filter on ones with
* any elevated (>= 200) blood glucose reading during the hospitalization*/
define "Encounter with Elevated Glucose Greater Than or Equal to 200":
"Encounter with Hospitalization Period" Hospitalization
with ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
such that QICoreCommon."Earliest" ( GlucoseTest.effective ) during Hospitalization.hospitalizationPeriod
and GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and GlucoseTest.value >= 200 'mg/dL'
return Hospitalization.encounter"/>
</extension>
<extension url="displaySequence">
<valueInteger value="6"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Initial Population"/>
</extension>
<extension url="statement">
<valueString
value="define "Initial Population":
"Encounter with Existing Diabetes Diagnosis"
union "Encounter with Hypoglycemic Medication"
union "Encounter with Elevated Glucose Greater Than or Equal to 200""/>
</extension>
<extension url="displaySequence">
<valueInteger value="7"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</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/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Measurement Population"/>
</extension>
<extension url="statement">
<valueString
value="define "Measurement Population":
"Denominator""/>
</extension>
<extension url="displaySequence">
<valueInteger value="9"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Days in Hospitalization"/>
</extension>
<extension url="statement">
<valueString
value="/***/
define "Days in Hospitalization":
"Measurement Population" EligibleInpatientHospitalization
let period: CQMCommon."HospitalizationWithObservation" ( EligibleInpatientHospitalization ),
relevantPeriod: "Hospital Days Max 10"(period)
return Tuple {
encounter: EligibleInpatientHospitalization,
hospitalizationPeriod: period,
relevantPeriod: relevantPeriod,
relevantDays: "Days In Period"(relevantPeriod)
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="10"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Days with Glucose Results"/>
</extension>
<extension url="statement">
<valueString
value="define "Days with Glucose Results":
"Days in Hospitalization" InpatientHospitalDays
return Tuple {
encounter: InpatientHospitalDays.encounter,
relevantPeriod: InpatientHospitalDays.relevantPeriod,
relevantDays: ( InpatientHospitalDays.relevantDays EncounterDay
return Tuple {
dayNumber: EncounterDay.dayNumber,
dayPeriod: EncounterDay.dayPeriod,
hasSevereResult: exists ( ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
where GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and GlucoseTest.value > 300 'mg/dL'
and QICoreCommon."Earliest" ( GlucoseTest.effective ) during EncounterDay.dayPeriod
),
hasElevatedResult: exists ( ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
where GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and GlucoseTest.value >= 200 'mg/dL'
and QICoreCommon."Earliest" ( GlucoseTest.effective ) during EncounterDay.dayPeriod
),
hasNoGlucoseTest: not exists ( ["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
where GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTest.status != 'cancelled'
and QICoreCommon."Earliest" ( GlucoseTest.effective ) during EncounterDay.dayPeriod
)
}
)
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="11"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Days with Hyperglycemic Events"/>
</extension>
<extension url="statement">
<valueString
value="/*# hyper days uses "Relevant Encounters With Glucose Result Days" to find if hyper event on each day. Skips 1st day in 'RelevantDays`. Returns boolean based on: Today high result OR Today no result AND Yesterday high result AND 2 days ago high result*/
define "Days with Hyperglycemic Events":
"Days with Glucose Results" EncounterWithResultDays
let eligibleEventDays: EncounterWithResultDays.relevantDays EncounterDay
where EncounterDay.dayNumber > 1
return Tuple {
dayIndex: EncounterDay.dayNumber,
dayPeriod: EncounterDay.dayPeriod,
hasHyperglycemicEvent: ( EncounterDay.hasSevereResult
or ( EncounterDay.hasNoGlucoseTest
and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 2].hasElevatedResult
and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 3].hasElevatedResult
)
)
}
return Tuple {
encounter: EncounterWithResultDays.encounter,
relevantPeriod: EncounterWithResultDays.relevantPeriod,
eligibleEventDays: eligibleEventDays
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="12"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Encounter with Hyperglycemic Events"/>
</extension>
<extension url="statement">
<valueString
value="/***/
define "Encounter with Hyperglycemic Events":
"Days with Hyperglycemic Events" HyperglycemicEventDays
where exists ( HyperglycemicEventDays.eligibleEventDays EligibleEventDay
where EligibleEventDay.hasHyperglycemicEvent
)
return HyperglycemicEventDays.encounter"/>
</extension>
<extension url="displaySequence">
<valueInteger value="13"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Numerator"/>
</extension>
<extension url="statement">
<valueString
value="define "Numerator":
"Encounter with Hyperglycemic Events""/>
</extension>
<extension url="displaySequence">
<valueInteger value="14"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="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="15"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</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="16"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="SupplementalDataElements"/>
</extension>
<extension url="name">
<valueString value="SDE 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="17"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</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="18"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString
value="Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start"/>
</extension>
<extension url="statement">
<valueString
value="define "Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start":
from
"Initial Population" InpatientHospitalization,
["Observation": "Glucose Lab Test Mass Per Volume"] GlucoseTest
let HospitalizationInterval: CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ),
GlucoseTestTime: QICoreCommon."Earliest" ( GlucoseTest.effective )
where GlucoseTest.value as Quantity >= 1000 'mg/dL'
and GlucoseTest.status in { 'final', 'amended', 'corrected' }
and GlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hours )]
return GlucoseTest"/>
</extension>
<extension url="displaySequence">
<valueInteger value="19"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString
value="Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start"/>
</extension>
<extension url="statement">
<valueString
value="define "Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start":
from
"Initial Population" InpatientHospitalization,
"Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start" GlucoseResult1000,
["Observation": "Glucose Lab Test Mass Per Volume"] EarlierGlucoseTest
let HospitalizationInterval: CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ),
GlucoseTest1000Time: QICoreCommon."Earliest" ( GlucoseResult1000.effective ),
EarlierGlucoseTestTime: QICoreCommon."Earliest" ( EarlierGlucoseTest.effective )
where GlucoseTest1000Time during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hour )]
and EarlierGlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), GlucoseTest1000Time )
and EarlierGlucoseTest.id !~ GlucoseResult1000.id
return GlucoseResult1000"/>
</extension>
<extension url="displaySequence">
<valueInteger value="20"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString
value="Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start"/>
</extension>
<extension url="statement">
<valueString
value="define "Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start":
"Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start" GlucoseResult1000
where not ( GlucoseResult1000.id in "Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start".id )"/>
</extension>
<extension url="displaySequence">
<valueInteger value="21"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString
value="Encounter with First Glucose Greater Than or Equal to 1000"/>
</extension>
<extension url="statement">
<valueString
value="define "Encounter with First Glucose Greater Than or Equal to 1000":
"Initial Population" InpatientHospitalization
with "Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start" FirstGlucoseResult
such that FirstGlucoseResult.value as Quantity >= 1000 'mg/dL'
and QICoreCommon."Earliest" ( FirstGlucoseResult.effective ) during Interval[( start of CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ) - 1 hour ), ( start of CQMCommon."HospitalizationWithObservation" ( InpatientHospitalization ) + 6 hours )]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="22"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Denominator Exclusions"/>
</extension>
<extension url="statement">
<valueString
value="define "Denominator Exclusions":
"Encounter with First Glucose Greater Than or Equal to 1000""/>
</extension>
<extension url="displaySequence">
<valueInteger value="23"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="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="24"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</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="25"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="CQMCommon"/>
</extension>
<extension url="name">
<valueString value="HospitalizationWithObservation"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
@deprecated: This function is deprecated. Use the fluent function `hospitalizationWithObservation()` instead.
*/
define 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="26"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="QICoreCommon"/>
</extension>
<extension url="name">
<valueString value="ToPrevalenceInterval"/>
</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.
@deprecated: This function is deprecated. Use the `prevalenceInterval()` fluent function instead
*/
define function ToPrevalenceInterval(condition Condition):
if condition.clinicalStatus ~ "active"
or condition.clinicalStatus ~ "recurrence"
or condition.clinicalStatus ~ "relapse" then
Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]
else
(end of ToAbatementInterval(condition)) abatementDate
return if abatementDate is null then
Interval[start of ToInterval(condition.onset), abatementDate)
else
Interval[start of ToInterval(condition.onset), abatementDate]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="27"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="QICoreCommon"/>
</extension>
<extension url="name">
<valueString value="Earliest"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Given an interval, return the starting point if the interval has a starting boundary specified,
otherwise, return the ending point
@deprecated: This function is deprecated. Use the fluent function `earliest()` instead
*/
define function "Earliest"(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>> ):
(choice.toInterval()) period
return
if (HasStart(period)) then start of period
else end of period"/>
</extension>
<extension url="displaySequence">
<valueInteger value="28"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Hospital Days Max 10"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Crops an interval to a maximum length of 10 days.*/
define function "Hospital Days Max 10"(Period Interval<DateTime>):
Interval[start of Period, Min({
end of Period, start of Period + 10 days }
)]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="29"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Days In Period"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Creates a list of 24 hour long intervals in an interval paired with the index (1 indexed) to which 24 hour interval it is.*/
define function "Days In Period"(Period Interval<DateTime>):
( "Interval To Day Numbers"(Period) ) DayNumber
let startPeriod: start of Period + ( 24 hours * ( DayNumber - 1 ) ),
endPeriod: if ( hours between startPeriod and end of Period < 24 ) then startPeriod
else start of Period + ( 24 hours * DayNumber )
return Tuple {
dayNumber: DayNumber,
dayPeriod: Interval[startPeriod, endPeriod )
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="30"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Interval To Day Numbers"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Creates a list of integers from 1 to how many days are in the interval. Note, this wont create an index for
* the final day if it is less than 24 hours. This also includes the first 24 hour period.*/
define function "Interval To Day Numbers"(Period Interval<DateTime>):
( expand { Interval[1, duration in days between start of Period and end of Period]} ) DayExpand
return end of DayExpand"/>
</extension>
<extension url="displaySequence">
<valueInteger value="31"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Denominator Observations"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Counts the number of eligible days in an encounter. This simply filters and counts the data built in
* "Relevant Encounters With Hyperglycemic Event Days".*/
define function "Denominator Observations"(QualifyingEncounter Encounter):
if QualifyingEncounter.id in "Denominator Exclusions".id then singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return 0
)
else singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return Count(EncounterWithEventDays.eligibleEventDays)
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="32"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="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="33"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToCode"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
if coding is null then
null
else
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="34"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString
value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
</extension>
<extension url="name">
<valueString value="Numerator Observations"/>
</extension>
<extension url="statement">
<valueString
value="/**
* Counts the number of eligible days with a hyperglycemic event in an encounter. This simply filters and counts the data built in
* "Relevant Encounters With Hyperglycemic Event Days".*/
define function "Numerator Observations"(QualifyingEncounter Encounter):
if QualifyingEncounter.id in "Denominator Exclusions".id then singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return 0
)
else singleton from ( "Days with Hyperglycemic Events" EncounterWithEventDays
where EncounterWithEventDays.encounter = QualifyingEncounter
return Count(EncounterWithEventDays.eligibleEventDays EligibleEventDay
where EligibleEventDay.hasHyperglycemicEvent
)
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="35"/>
</extension>
</extension>
<name value="EffectiveDataRequirements"/>
<status value="active"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/library-type"/>
<code value="module-definition"/>
</coding>
</type>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library SDE"/>
<resource value="Library/SupplementalDataElements|3.5.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library FHIRHelpers"/>
<resource value="Library/FHIRHelpers|4.4.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library CQMCommon"/>
<resource value="Library/CQMCommon|2.2.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library QICoreCommon"/>
<resource value="Library/QICoreCommon|2.1.000"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system AdministrativeGender"/>
<resource value="http://hl7.org/fhir/administrative-gender"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="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 Diabetes"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.103.12.1001"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Hypoglycemics Treatment Medications"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.394"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Glucose Lab Test Mass Per Volume"/>
<resource
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34"/>
</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="SDE Sex"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Coding"/>
</parameter>
<parameter>
<name value="Numerator"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Resource"/>
</parameter>
<parameter>
<name value="Denominator"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Resource"/>
</parameter>
<parameter>
<name value="SDE Payer"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Resource"/>
</parameter>
<parameter>
<name value="Initial Population"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Resource"/>
</parameter>
<parameter>
<name value="SDE Ethnicity"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Resource"/>
</parameter>
<parameter>
<name value="Denominator Exclusions"/>
<use value="out"/>
<min value="0"/>
<max value="*"/>
<type value="Resource"/>
</parameter>
<parameter>
<name value="SDE Race"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="Resource"/>
</parameter>
<dataRequirement>
<type value="Patient"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
<mustSupport value="ethnicity"/>
<mustSupport value="race"/>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
<mustSupport value="type"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="period"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
</codeFilter>
<codeFilter>
<path value="status.value"/>
<code>
<code value="finished"/>
</code>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Encounter"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
<mustSupport value="type"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="period"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
</codeFilter>
<codeFilter>
<path value="status.value"/>
<code>
<code value="finished"/>
</code>
</codeFilter>
<dateFilter>
<path value="period"/>
<valuePeriod>
<extension url="http://hl7.org/fhir/uv/crmi-analysisException">
<valueString
value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
</extension>
</valuePeriod>
</dateFilter>
</dataRequirement>
<dataRequirement>
<type value="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="hospitalizationPeriod"/>
<mustSupport value="encounter"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
</codeFilter>
<codeFilter>
<path value="status.value"/>
<code>
<code value="finished"/>
</code>
</codeFilter>
<dateFilter>
<path value="period"/>
<valuePeriod>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
<valueExpression>
<language value="text/cql-identifier"/>
<expression value="Measurement Period"/>
</valueExpression>
</extension>
</valuePeriod>
</dateFilter>
</dataRequirement>
<dataRequirement>
<type value="Condition"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
<mustSupport value="code"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.103.12.1001"/>
</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"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.394"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
<mustSupport value="code"/>
<mustSupport value="effective"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="value"/>
<mustSupport value="id"/>
<mustSupport value="id.value"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34"/>
</codeFilter>
<codeFilter>
<path value="status.value"/>
<code>
<code value="cancelled"/>
</code>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
<mustSupport value="code"/>
<mustSupport value="effective"/>
<mustSupport value="value"/>
<mustSupport value="status"/>
<mustSupport value="status.value"/>
<mustSupport value="id"/>
<mustSupport value="id.value"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Coverage"/>
<profile
value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
<mustSupport value="type"/>
<mustSupport value="period"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
</codeFilter>
</dataRequirement>
</Library>
</contained>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
<extension url="guidance">
<valueString
value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity
SDE Payer
SDE Race
SDE Sex
"/>
</extension>
<extension url="usage">
<valueCodeableConcept>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
<code value="supplemental-data"/>
<display value="Supplemental Data"/>
</coding>
<text value="Supplemental Data Guidance"/>
</valueCodeableConcept>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
<valueReference>
<reference value="#effective-data-requirements"/>
</valueReference>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
<valueReference>
<reference value="Device/cqf-tooling"/>
</valueReference>
</extension>
<url
value="https://madie.cms.gov/Measure/HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
<identifier>
<use value="usual"/>
<type>
<coding>
<system
value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
<code value="short-name"/>
</coding>
</type>
<system value="https://madie.cms.gov/measure/shortName"/>
<value value="CMS871FHIR"/>
</identifier>
<identifier>
<use value="official"/>
<type>
<coding>
<system
value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
<code value="version-independent"/>
</coding>
</type>
<system value="urn:ietf:rfc:3986"/>
<value value="urn:uuid:c44ca609-d795-4715-a8fc-1b0b30e46048"/>
</identifier>
<identifier>
<use value="official"/>
<type>
<coding>
<system
value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
<code value="version-specific"/>
</coding>
</type>
<system value="urn:ietf:rfc:3986"/>
<value value="urn:uuid:c7dbf77f-5869-42a0-b5e6-12e18004d2f4"/>
</identifier>
<identifier>
<use value="official"/>
<type>
<coding>
<system
value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
<code value="endorser"/>
</coding>
</type>
<system value="https://madie.cms.gov/measure/cbeId"/>
<value value="3533e"/>
<assigner>
<display value="CMS Consensus Based Entity"/>
</assigner>
</identifier>
<identifier>
<use value="official"/>
<type>
<coding>
<system
value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
<code value="publisher"/>
</coding>
</type>
<system value="https://madie.cms.gov/measure/cmsId"/>
<value value="871FHIR"/>
<assigner>
<display value="CMS"/>
</assigner>
</identifier>
<version value="0.1.000"/>
<name value="HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
<title value="Hospital Harm - Severe HyperglycemiaFHIR"/>
<status value="draft"/>
<experimental value="false"/>
<date value="2024-07-09T14:53:55+00:00"/>
<publisher value="Centers for Medicare & 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 hospital days for patients age 18 and older with a hyperglycemic event (harm) per the total qualifying inpatient hospital days for that encounter"/>
<purpose value="UNKNOWN"/>
<usage
value="The measure is using mg/dL as the unit of measurement for glucose results.
When evaluating for days with a glucose level >300 mg/dL, the first 24-hour period after admission to the hospital is not evaluated to account for potentially poor glucose control outside of the hospital setting or that preceded the start of hospital care. The admission starts in the emergency department (ED) or observation when the transition between the ED encounter, observation encounter, and the inpatient encounter are within an hour or less of each other.
This measure evaluates the first 10 days of an eligible inpatient hospitalization in determining eligible days for the denominator and numerator (i.e., the length of stay is truncated to <=10 days when the length exceeds 10 days). Patients admitted for longer length of stays are more likely to have more complex medical conditions.
The “Days in Hospitalization” logic within Measure Observation 1 (associated with the denominator), in conjunction with other logic, returns the day number (e.g., day 1 to day 10) for each day within the hospitalization period to determine the eligible hospital days (e.g., from day 2 to day 10).
The “Days in Hospitalization” logic within Measure Observation 2 (associated with the numerator), in conjunction with other logic, returns the day number (e.g., day 1 to day 10) for each day within the hospitalization period to determine the eligible hyperglycemic event days (e.g., from day 2 to day 10).
Since the measure does not count any hyperglycemic events that occur in the first 24 hours, day 1 is not considered an eligible hospital day for the Measure Observations. Eligible days range from day 2 up to day 10.
Although the measure does not count any hyperglycemic events that occur in the first 24 hours as a hyperglycemic event day in Measure Observation 2, the first 24 hours of the encounter is considered day 1. This is because if there was a day during the encounter where a glucose result is not found, the measure evaluates the two days preceding to see if each had a glucose value >=200 mg/dL. The measure allows the first 24 hours of the encounter, i.e., day 1, to be one of the preceding days.
Multiple hyperglycemic events can occur during a ‘day’, but this is still considered one hyperglycemic event day.
The numerator returns the first eligible encounter that meets the qualifying criteria: an inpatient hospitalization with a hyperglycemic event. Only one numerator is counted per encounter. Note that the Numerator returns the encounters, not days, that meet the criteria.
The specimen source for the glucose test is blood, serum, plasma, or interstitial fluid, and can be obtained by a laboratory test, a Point of Care (POC) test, or a continuous glucose monitor (CGM). Glucose test results from urine specimens are not considered.
This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.
This FHIR-based measure has been derived from the QDM-based measure: CMS871v4.
Please refer to the HL7 QI-Core Implementation Guide(https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/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. American Institutes for Research(R), formerly IMPAQ International, disclaims all liability for use or accuracy of any third party codes contained in the specifications.
LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved."/>
<effectivePeriod>
<start value="2025-01-01"/>
<end value="2025-12-31"/>
</effectivePeriod>
<author>
<name value="American Institutes for Research (AIR)"/>
<telecom>
<system value="url"/>
<value value="https://www.air.org"/>
</telecom>
</author>
<library
value="https://madie.cms.gov/Library/HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"/>
<disclaimer
value="This performance measure is not a clinical guideline and 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]."/>
<scoring>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
<code value="proportion"/>
<display value="Proportion"/>
</coding>
</scoring>
<rationale
value="Hyperglycemia, i.e., elevated glucose level, is common among hospitalized patients, especially those with preexisting diabetes (Umpierrez et al., 2012) and account for over 30% of noncritically ill hospitalized patients (Korytkowski, 2022). Hyperglycemia can also affect individuals with no prior history of diabetes and may be induced by medications such as steroids, or parenteral (intravenous) or enteral (tube) feeding.
Severe hyperglycemia, i.e., extremely elevated glucose level, is significantly associated with a range of harms, including increased in-hospital mortality, infection rates, and hospital length of stay (Pasquel, et al., 2021; Umpierrez et al., 2012, 2015). Lower rates of inpatient severe hyperglycemia may not only improve care for patients, but also reduce costs for healthcare payers (Krinsley et al., 2016). The rate of hyperglycemia varies across hospitals, suggesting opportunities for improvement in inpatient glycemic management (Seisa et al., 2022; Bersoux et al., 2013). The rate of inpatient hyperglycemia can be considered a marker for quality of hospital care, since inpatient hyperglycemia is largely avoidable with proper glycemic management. The use of evidence-based standardized protocols and insulin management protocols have been shown to improve glycemic control and safety (Leroy et al., 2020; Maynard et al., 2015).
From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:
Recommendation 1.1
In adults with insulin-treated diabetes hospitalized for noncritical illness who are at high risk of hypoglycemia, we suggest the use of real-time continuous glucose monitoring (CGM) with confirmatory bedside point-of-care blood glucose (POC-BG) monitoring for adjustments in insulin dosing rather than point-of-care blood glucose (POC-BG) testing alone in hospital settings where resources and training are available."/>
<clinicalRecommendationStatement
value="Multiple guidelines address recommended levels of glycemic control, though these do not define severe hyperglycemia:
From Section 16, Diabetes Care in the Hospital, in the Standards of Medical Care in Diabetes by the American Diabetes Association, (American Diabetes Association, 2023):
16.4 Insulin therapy should be initiated for the treatment of persistent hyperglycemia starting at a threshold ≥180 mg/dL (10.0 mmol/L) (checked on two occasions). Once insulin therapy is started, a target glucose range of 140–180 mg/dL (7.8–10.0 mmol/L) is recommended for most critically ill and noncritically ill patients.
16.5 More stringent goals, such as 110–140 mg/dL (6.1–7.8 mmol/L) or 100–180 mg/dL (5.6–10.0 mmol/L), may be appropriate for selected patients and are acceptable if they can be achieved without significant hypoglycemia.
From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting (2022):
Recommendation 10.1
In adults with no prior history of diabetes hospitalized for noncritical illness with hyperglycemia [defined as blood glucose (BG) > 140 mg/dL (7.8 mmol/L)] during hospitalization, we suggest initial therapy with correctional insulin over scheduled insulin therapy (defined as basal or basal/bolus insulin) to maintain glucose targets in the range of 100 to 180 mg/dL (5.6 to 10.0 mmol/L). For patients with persistent hyperglycemia [≥2 point-of-care blood glucose (POC-BG) measurements ≥ 180 mg/dL (≥10.0 mmol/L) in a 24-hour period on correctional insulin alone], we suggest the addition of scheduled insulin therapy.
Recommendation 10.2
In adults with diabetes treated with diet or noninsulin diabetes medications prior to admission, we suggest initial therapy with correctional insulin or scheduled insulin therapy to maintain glucose targets in the range of 100 to 180 mg/dL (5.6 to 10.0 mmol/L). For hospitalized adults started on correctional insulin alone and with persistent hyperglycemia [≥2 point-of-care blood glucose (POC-BG) measurements ≥ 180 mg/dL in a 24-hour period (≥10.0 mmol/L)], we suggest addition of scheduled insulin therapy. We suggest initiation of scheduled insulin therapy for patients with confirmed admission blood glucose (BG) ≥ 180 mg/dL (≥10.0 mmol/L).
Recommendation 10.3
In adults with insulin-treated diabetes prior to admission who are hospitalized for noncritical illness, we recommend continuation of the scheduled insulin regimen modified for nutritional status and severity of illness to maintain glucose targets in the range of 100 to 180 mg/dL (5.6 to 10.0 mmol/L).
Remarks
Reductions in the dose of basal insulin (by 10% to 20%) at time of hospitalization may be required for patients on basal heavy insulin regimens (defined as doses of basal insulin ≥ 0.6 to 1.0 units/kg/day), in which basal insulin is being used inappropriately to cover meal-related excursions in BG.
There is no clinically accepted cutoff for severe hyperglycemia. Studies have used thresholds of >140, >180 , >300, >350 and >400 mg/dL, among other values (American Diabetes Association, 2023; Umpierrez et al, 2012, 2015; Jamesen et al., 2015; Donihi et al., 2011; Mendez et al, 2015; Seisa et al., 2022). BGL <180 mg/dL is associated with lower rates of mortality and stroke compared with a target glucose <200 mg/dL (Sathya et al., 2013). Glycemic goals may also differ among hospitalized patients. For inpatient management of hyperglycemia in noncritical care, the expert consensus recommends a target range of 100–180 mg/dL (5.6–10.0 mmol/L) for noncritically ill patients with “new” hyperglycemia as well as people with known diabetes prior to admission. Glycemic levels >250 mg/dL (13.9 mmol/L) may be acceptable in terminally ill patients with short life expectancy. In these individuals, less aggressive insulin regimens to minimize glucosuria, dehydration, and electrolyte disturbances are often more appropriate. (ElSayed et al., 2023). In an older patient with a prior history of severe hypoglycemia, some degree of hyperglycemia may be tolerated to maximize safety. Intensive insulin therapy to target glucose of 100 and 140mg/dLin the ICU didn’t significantly reduce perioperative complications compared with target glucose of 141and180mg/dL after coronary artery bypass surgery (Umpierrez et al., 2015). The current recommendation is to maintain a blood glucose level between 140-180 mg/dL (7.8-10.0 mmol/L) in both cardiac and non-cardiac ICU patients (Sreedharan et al., 2022).
For patients who present with hyperglycemic crises, neurologic status must be monitored closely, with frequent re-examination. Care should be taken to prevent over-correction of hyperglycemia and hyperosmolarity following initial fluid resuscitation of these patients to prevent cerebral edema, which carries a high mortality rate. (Gosmanov et al., 2021).
From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:
Recommendation 1.1
In adults with insulin-treated diabetes hospitalized for noncritical illness who are at high risk of hypoglycemia, we suggest the use of real-time continuous glucose monitoring (CGM) with confirmatory bedside point-of-care blood glucose (POC-BG) monitoring for adjustments in insulin dosing rather than point-of-care blood glucose (POC-BG) testing alone in hospital settings where resources and training are available."/>
<group id="6501fe8dda013638e7b3dc0d">
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
<valueCodeableConcept>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
<code value="ratio"/>
<display value="Ratio"/>
</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">
<valueCode value="None"/>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
<valueCodeableConcept>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
<code value="decrease"/>
<display value="decrease"/>
</coding>
</valueCodeableConcept>
</extension>
<population id="9B922C53-7F1B-4AF5-96E6-1A1E4AF7909C">
<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 for patients age 18 and older that end during the measurement period, as well as either:
- A diagnosis of diabetes that starts before or during the encounter; or
- Administration of at least one dose of insulin or any hypoglycemic medication during the encounter; or
- Presence of at least one glucose value >=200 mg/dL at any time during the encounter"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="Initial Population"/>
</criteria>
</population>
<population id="6402512C-2305-42DC-B5F6-A226B5057B89">
<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="0F4405D3-B373-4620-A9CC-D29558C39E85">
<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 for patients with a glucose result of >=1000 mg/dL anytime between 1 hour prior to the start of the encounter to 6 hours after the start of the encounter
-Inpatient hospitalizations for patients who have comfort care measures ordered or provided during the encounter
-Inpatient hospitalizations for patients who have a discharge disposition to home or to a health care facility for hospice care
"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="Denominator Exclusions"/>
</criteria>
</population>
<population id="340EA45E-2411-4192-9C9D-3DF8D89A1D97">
<code>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-population"/>
<code value="numerator"/>
<display value="Numerator"/>
</coding>
</code>
<description
value="Inpatient hospitalizations with a hyperglycemic event within the first 10 days of the encounter minus the first 24 hours, and minus the last period before discharge from the hospital if less than 24 hours
A hyperglycemic event is defined as:
- A day with at least one glucose value >300 mg/dL;
OR
- A day where a glucose test and result was not found, and it was preceded by two consecutive days where at least one glucose value during each of the two days was >=200 mg/dL"/>
<criteria>
<language value="text/cql-identifier"/>
<expression value="Numerator"/>
</criteria>
</population>
<population id="68900484-66a1-4da3-9b02-1a10a5fd592b">
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod">
<valueString value="Sum"/>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference">
<valueString value="6402512C-2305-42DC-B5F6-A226B5057B89"/>
</extension>
<code>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-population"/>
<code value="measure-observation"/>
<display value="Measure Observation"/>
</coding>
</code>
<criteria>
<language value="text/cql-identifier"/>
<expression value="Denominator Observations"/>
</criteria>
</population>
<population id="f1bc37e5-f64f-4ed8-b965-2011f1181225">
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod">
<valueString value="Sum"/>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference">
<valueString value="340EA45E-2411-4192-9C9D-3DF8D89A1D97"/>
</extension>
<code>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/measure-population"/>
<code value="measure-observation"/>
<display value="Measure Observation"/>
</coding>
</code>
<criteria>
<language value="text/cql-identifier"/>
<expression value="Numerator Observations"/>
</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>