eCQM QICore Content Subset Implementation Guide
2024.0.0 - CI Build

eCQM QICore Content Subset 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-subset/ and changes regularly. See the Directory of published versions

: Hospital Harm - Severe HyperglycemiaFHIR - JSON Representation

Active as of 2024-09-09

Raw json | Download


{
  "resourceType" : "Measure",
  "id" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR",
  "meta" : {
    "profile" : [
      🔗 "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"🔗 ,
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm"🔗 ,
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"
    ]
  },
  "text" : {
    "status" : "extensions",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Knowledge Artifact Metadata</th>\n\n</tr>\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Name (machine-readable)</th>\n\n<td class=\"content-container\">HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Title (human-readable)</th>\n\n<td class=\"content-container\">Hospital Harm - Severe HyperglycemiaFHIR</td>\n</tr>\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Status</th>\n\n<td class=\"content-container\">Active</td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Experimental</th>\n\n<td class=\"content-container\">false</td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n<td class=\"content-container\"><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>\n</div></td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Purpose</th>\n\n<td class=\"content-container\"><div><p>UNKNOWN</p>\n</div></td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Clinical Usage</th>\n\n<td class=\"content-container\">The measure is using mg/dL as the unit of measurement for glucose results.\n\nWhen evaluating for days with a glucose level &gt;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.\n\nThis 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 &lt;=10 days when the length exceeds 10 days). Patients admitted for longer length of stays are more likely to have more complex medical conditions.  \n\nThe “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). \n\nThe “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).\n\nSince 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.\n\nAlthough 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 &gt;=200 mg/dL. The measure allows the first 24 hours of the encounter, i.e., day 1, to be one of the preceding days.\n\nMultiple hyperglycemic events can occur during a ‘day’, but this is still considered one hyperglycemic event day.\n\nThe 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.\n\nThe 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.\n\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS871v4.\n\nPlease 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>\n</tr>\n\n\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Effective Period</th>\n\n<td class=\"content-container\">2025-01-01..2025-12-31</td>\n</tr>\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Use Context</th>\n\n<td class=\"content-container\">Setting (Details: Extended Usage Context Type Codes code setting  = ' Setting ', stated as ' Setting '): <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/intended-care-setting-codes hospital}\">Hospital</span></td>\n</tr>\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Measure Developer</th>\n\n<td class=\"content-container\">American Institutes for Research (AIR): <a href=\"https://www.air.org\">https://www.air.org</a></td>\n</tr>\n\n\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Measure Steward</th>\n\n<td class=\"content-container\">Centers for Medicare &amp; Medicaid Services (CMS)</td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Steward Contact Details</th>\n\n<td class=\"content-container\"><a href=\"https://www.cms.gov/\">https://www.cms.gov/</a></td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Copyright</th>\n\n<td class=\"content-container\"><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>\n<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>\n</div></td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Metadata</th>\n\n</tr>\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Short Name Identifier</th>\n\n<td class=\"content-container\">CMS871FHIR</td>\n</tr>\n\n\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Version Independent Identifier</th>\n\n<td class=\"content-container\">urn:uuid:c44ca609-d795-4715-a8fc-1b0b30e46048</td>\n</tr>\n\n\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Version Specific Identifier</th>\n\n<td class=\"content-container\">urn:uuid:c7dbf77f-5869-42a0-b5e6-12e18004d2f4</td>\n</tr>\n\n\n\n  \n    \n    \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Publisher (CMS) Identifier</th>\n\n<td class=\"content-container\">871FHIR</td>\n</tr>\n\n  \n\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n<td class=\"content-container\">Endorser/3533e\u00a0(use:\u00a0official,\u00a0)</td>\n</tr>\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Version Number</th>\n\n<td class=\"content-container\">0.1.000</td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Measure Scoring</th>\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring ratio}\">Ratio</span></td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Rationale</th>\n\n<td class=\"content-container\"><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>\n<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>\n<p>From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:\nRecommendation 1.1\nIn 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>\n</div></td>\n</tr>\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Clinical Recommendation Statement</th>\n\n<td class=\"content-container\"><div><p>Multiple guidelines address recommended levels of glycemic control, though these do not define severe hyperglycemia:</p>\n<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>\n<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>\n<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>\n<p>From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting (2022):</p>\n<p>Recommendation 10.1\nIn adults with no prior history of diabetes hospitalized for noncritical illness with hyperglycemia [defined as blood glucose (BG) &gt; 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>\n<p>Recommendation 10.2\nIn 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>\n<p>Recommendation 10.3\nIn 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>\n<p>Remarks\nReductions 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>\n<p>There is no clinically accepted cutoff for severe hyperglycemia. Studies have used thresholds of &gt;140, &gt;180 , &gt;300, &gt;350 and &gt;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 &lt;180 mg/dL is associated with lower rates of mortality and stroke compared with a target glucose &lt;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 &gt;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>\n<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>\n<p>From the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:\nRecommendation 1.1\nIn 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>\n</div></td>\n</tr>\n\n\n\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Guidance</th>\n\n<td class=\"content-container\"><div><p>The measure is using mg/dL as the unit of measurement for glucose results.</p>\n<p>When evaluating for days with a glucose level &gt;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.</p>\n<p>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 &lt;=10 days when the length exceeds 10 days). Patients admitted for longer length of stays are more likely to have more complex medical conditions.</p>\n<p>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).</p>\n<p>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).</p>\n<p>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.</p>\n<p>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 &gt;=200 mg/dL. The measure allows the first 24 hours of the encounter, i.e., day 1, to be one of the preceding days.</p>\n<p>Multiple hyperglycemic events can occur during a ‘day’, but this is still considered one hyperglycemic event day.</p>\n<p>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.</p>\n<p>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.</p>\n<p>This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.</p>\n<p>This FHIR-based measure has been derived from the QDM-based measure: CMS871v4.</p>\n<p>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).</p>\n</div></td>\n</tr>\n\n\n  \n    \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Supplemental Data Guidance</th>\n\n<td class=\"content-container\">For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity \n SDE Payer \n SDE Race \n SDE Sex \n </td>\n</tr>\n\n  \n\n\n\n\n\n  \n    \n    <tr>\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Population Criteria (ID: 6501fe8dda013638e7b3dc0d)</th>\n\n</tr>\n  \n  \n  \n  \n    <tr>\n      \n        \n<th scope=\"row\" class=\"row-header\">Initial Population</th>\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: 9B922C53-7F1B-4AF5-96E6-1A1E4AF7909C\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Inpatient hospitalizations for patients age 18 and older that end during the measurement period, as well as either: \n\n - A diagnosis of diabetes that starts before or during the encounter; or \n - Administration of at least one dose of insulin or any hypoglycemic medication during the encounter; or \n - Presence of at least one glucose value &gt;=200 mg/dL at any time during the encounter</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-initial-population\">Initial Population</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n<th scope=\"row\" class=\"row-header\">Denominator</th>\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: 6402512C-2305-42DC-B5F6-A226B5057B89\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Equals Initial Population</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-denominator\">Denominator</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n<th scope=\"row\" class=\"row-header\">Denominator Exclusion</th>\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: 0F4405D3-B373-4620-A9CC-D29558C39E85\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">-Inpatient hospitalizations for patients with a glucose result of &gt;=1000 mg/dL anytime between 1 hour prior to the start of the encounter to 6 hours after the start of the encounter\n-Inpatient hospitalizations for patients who have comfort care measures ordered or provided during the encounter\n-Inpatient hospitalizations for patients who have a discharge disposition to home or to a health care facility for hospice care\n</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-denominator-exclusions\">Denominator Exclusions</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n<th scope=\"row\" class=\"row-header\">Numerator</th>\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: 340EA45E-2411-4192-9C9D-3DF8D89A1D97\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">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\n\nA hyperglycemic event is defined as: \n\n - A day with at least one glucose value &gt;300 mg/dL; \nOR\n - 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 &gt;=200 mg/dL</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-numerator\">Numerator</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n<th scope=\"row\" class=\"row-header\">Measure Observation</th>\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: 68900484-66a1-4da3-9b02-1a10a5fd592b\n        <br/>\n        \n        \n          <em>Description</em>: No description provided\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-denominator-observations\">Denominator Observations</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n<th scope=\"row\" class=\"row-header\">Measure Observation</th>\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: f1bc37e5-f64f-4ed8-b965-2011f1181225\n        <br/>\n        \n        \n          <em>Description</em>: No description provided\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-numerator-observations\">Numerator Observations</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n  \n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Population Basis</th>\n\n<td class=\"content-container\">Encounter</td>\n</tr>\n\n\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Scoring</th>\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring ratio}\">Ratio</span></td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-type outcome}\">Outcome</span></td>\n</tr>\n\n\n\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Rate Aggregation</th>\n\n<td class=\"content-container\">None</td>\n</tr>\n\n\n\n  \n<tr>\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-improvement-notation decrease}\">decrease</span></td>\n</tr>\n\n\n\n\n  <tr>\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Supplemental Data Elements</th>\n\n</tr>\n\n\n<tr>\n  \n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-ethnicity\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}\">Supplemental Data</span>\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Ethnicity\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-ethnicity\">SDE Ethnicity</a> \n      \n    \n  </td>\n</tr>\n\n<tr>\n  \n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-payer\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}\">Supplemental Data</span>\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Payer\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-payer\">SDE Payer</a> \n      \n    \n  </td>\n</tr>\n\n<tr>\n  \n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-race\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}\">Supplemental Data</span>\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Race\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-race\">SDE Race</a> \n      \n    \n  </td>\n</tr>\n\n<tr>\n  \n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-sex\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}\">Supplemental Data</span>\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Sex\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-sex\">SDE Sex</a> \n      \n    \n  </td>\n</tr>\n\n\n<tr>\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Logic</th>\n\n</tr>\n\n<tr>\n\n<th scope=\"row\" class=\"row-header\">Primary Library</th>\n\n<td class=\"content-container\"><a href=\"Library-HospitalHarmHyperglycemiainHospitalizedPatientsFHIR.html\">HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</a></td>\n</tr>\n\n\n\n\n  \n  \n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library SDE\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <code>Library/SupplementalDataElements|3.5.000</code>\n    <br/>\n    <em>Canonical URL</em>: <tt>Library/SupplementalDataElements|3.5.000</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library FHIRHelpers\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <code>Library/FHIRHelpers|4.4.000</code>\n    <br/>\n    <em>Canonical URL</em>: <tt>Library/FHIRHelpers|4.4.000</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library CQMCommon\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <code>Library/CQMCommon|2.2.000</code>\n    <br/>\n    <em>Canonical URL</em>: <tt>Library/CQMCommon|2.2.000</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library QICoreCommon\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <code>Library/QICoreCommon|2.1.000</code>\n    <br/>\n    <em>Canonical URL</em>: <tt>Library/QICoreCommon|2.1.000</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Code system AdministrativeGender\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">AdministrativeGender</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/administrative-gender</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Encounter Inpatient\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Observation Services\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Emergency Department Visit\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Diabetes\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.103.12.1001/expansion\">Diabetes</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.103.12.1001</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Hypoglycemics Treatment Medications\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <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>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.394</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Glucose Lab Test Mass Per Volume\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <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>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34</tt>\n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n  \n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Payer Type\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion\">Payer</a>\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>\n    \n  </td>\n</tr>\n\n\n  \n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Male\n        <br/>\n      \n      <em>Code</em>: M\n      <br/>\n      <em>System</em>: <tt>http://hl7.org/fhir/administrative-gender</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Female\n        <br/>\n      \n      <em>Code</em>: F\n      <br/>\n      <em>System</em>: <tt>http://hl7.org/fhir/administrative-gender</tt>\n    </td>\n  </tr>\n\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: Measurement Period\n    <br/>\n    <em>Use</em>: In\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: 1\n    <br/>\n    <em>Type</em>: Period\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: SDE Sex\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: 1\n    <br/>\n    <em>Type</em>: Coding\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: Numerator\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: *\n    <br/>\n    <em>Type</em>: Resource\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: Denominator\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: *\n    <br/>\n    <em>Type</em>: Resource\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: SDE Payer\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: *\n    <br/>\n    <em>Type</em>: Resource\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: Initial Population\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: *\n    <br/>\n    <em>Type</em>: Resource\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: SDE Ethnicity\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: 1\n    <br/>\n    <em>Type</em>: Resource\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: Denominator Exclusions\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: *\n    <br/>\n    <em>Type</em>: Resource\n  </td>\n</tr>\n  \n  <tr>\n  \n<th scope=\"row\" class=\"row-header\">Parameter</th>\n\n  <td class=\"content-container\">\n    <em>Name</em>: SDE Race\n    <br/>\n    <em>Use</em>: Out\n    <br/>\n    <em>Min Cardinality</em>: 0\n    <br/>\n    <em>Max Cardinality</em>: 1\n    <br/>\n    <em>Type</em>: Resource\n  </td>\n</tr>\n  \n  \n  <tr>\n    <th colspan=\"2\" scope=\"row\" class=\"section-header\"><a name=\"effective-data-requirements\"> </a>Measure Logic Data Requirements</th>\n  </tr>\n  \n  \n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Patient\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html\">QICorePatient</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: ethnicity, race\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a>\n    <br/> \n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Path</em>: status.value</span>\n    <br/>\n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Code</em>: </span>\n    <br/>\n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a>\n    <br/> \n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Path</em>: status.value</span>\n    <br/>\n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Code</em>: </span>\n    <br/>\n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, period, status, status.value, hospitalizationPeriod, encounter\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a>\n    <br/> \n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Path</em>: status.value</span>\n    <br/>\n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Code</em>: </span>\n    <br/>\n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html\">QICoreCondition</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.103.12.1001/expansion\">Diabetes</a>\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: MedicationAdministration\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationadministration.html\">QICoreMedicationAdministration</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: medication, status, status.value, effective\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: medication</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <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>\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Observation\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html\">QICoreObservation</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, effective, status, status.value, value, id, id.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <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>\n    <br/> \n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Path</em>: status.value</span>\n    <br/>\n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Code</em>: </span>\n    <br/>\n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Observation\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html\">QICoreObservation</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, effective, value, status, status.value, id, id.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <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>\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Coverage\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    <a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html\">QICoreCoverage</a>\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion\">Payer</a>\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n  \n  <tr>\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Logic Definitions</th>\n\n</tr>\n  \n          \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-sex\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n  case\n    when Patient.gender = 'male' then &quot;M&quot;\n    when Patient.gender = 'female' then &quot;F&quot;\n    else null\n  end</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-sex\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n  SDE.&quot;SDE Sex&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-qualifying-encounter\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Qualifying Encounter&quot;:\n  [&quot;Encounter&quot;: &quot;Encounter Inpatient&quot;] InpatientEncounter\n    where AgeInYearsAt(date from start of InpatientEncounter.period) &gt;= 18\n      and InpatientEncounter.period ends during day of &quot;Measurement Period&quot;\n      and InpatientEncounter.status = 'finished'</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-encounter-with-hospitalization-period\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Create paring of encounters to hospitalization period so this calculation can be inspected and the result \n * can be reused, making the logic faster.*/\n\n\ndefine &quot;Encounter with Hospitalization Period&quot;:\n  &quot;Qualifying Encounter&quot; QualifyingHospitalization\n    return Tuple {\n      encounter: QualifyingHospitalization,\n      hospitalizationPeriod: CQMCommon.&quot;HospitalizationWithObservation&quot; ( QualifyingHospitalization )\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-encounter-with-existing-diabetes-diagnosis\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Using the already calculated pairing of hospitalization periods with encounters, filter on ones with \n * diabetes and return the encounter.*/\n\n\ndefine &quot;Encounter with Existing Diabetes Diagnosis&quot;:\n  &quot;Encounter with Hospitalization Period&quot; Hospitalization\n    with [&quot;Condition&quot;: &quot;Diabetes&quot;] Diabetes\n      such that ( QICoreCommon.&quot;ToPrevalenceInterval&quot; ( Diabetes ) starts before end of Hospitalization.hospitalizationPeriod )\n    return Hospitalization.encounter</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-encounter-with-hypoglycemic-medication\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Using the already calculated pairing of hospitalization periods with encounters, filter on ones with \n * hypoglycemic medicatons and return the encounter.*/\n\n\ndefine &quot;Encounter with Hypoglycemic Medication&quot;:\n  from\n    &quot;Encounter with Hospitalization Period&quot; Hospitalization,\n    [&quot;MedicationAdministration&quot;: &quot;Hypoglycemics Treatment Medications&quot;] HypoglycemicMed\n    where HypoglycemicMed.status = 'completed'\n      and HypoglycemicMed.status != 'not-done'\n      and QICoreCommon.&quot;ToInterval&quot; ( HypoglycemicMed.effective ) during Hospitalization.hospitalizationPeriod\n    return Hospitalization.encounter</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-encounter-with-elevated-glucose-greater-than-or-equal-to-200\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Using the already calculated pairing of hospitalization periods with encounters, filter on ones with \n * any elevated (&gt;= 200) blood glucose reading during the hospitalization*/\n\n\ndefine &quot;Encounter with Elevated Glucose Greater Than or Equal to 200&quot;:\n  &quot;Encounter with Hospitalization Period&quot; Hospitalization\n    with [&quot;Observation&quot;: &quot;Glucose Lab Test Mass Per Volume&quot;] GlucoseTest\n      such that QICoreCommon.&quot;Earliest&quot; ( GlucoseTest.effective ) during Hospitalization.hospitalizationPeriod\n        and GlucoseTest.status in { 'final', 'amended', 'corrected' }\n        and GlucoseTest.status != 'cancelled'\n        and GlucoseTest.value &gt;= 200 'mg/dL'\n    return Hospitalization.encounter</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-initial-population\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot;:\n  &quot;Encounter with Existing Diabetes Diagnosis&quot;\n    union &quot;Encounter with Hypoglycemic Medication&quot;\n    union &quot;Encounter with Elevated Glucose Greater Than or Equal to 200&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-denominator\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator&quot;:\n  &quot;Initial Population&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-measurement-population\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Measurement Population&quot;:\n  &quot;Denominator&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-days-in-hospitalization\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/***/\n\n\ndefine &quot;Days in Hospitalization&quot;:\n  &quot;Measurement Population&quot; EligibleInpatientHospitalization\n    let period: CQMCommon.&quot;HospitalizationWithObservation&quot; ( EligibleInpatientHospitalization ),\n    relevantPeriod: &quot;Hospital Days Max 10&quot;(period)\n    return Tuple {\n      encounter: EligibleInpatientHospitalization,\n      hospitalizationPeriod: period,\n      relevantPeriod: relevantPeriod,\n      relevantDays: &quot;Days In Period&quot;(relevantPeriod)\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-days-with-glucose-results\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Days with Glucose Results&quot;:\n  &quot;Days in Hospitalization&quot; InpatientHospitalDays\n    return Tuple {\n      encounter: InpatientHospitalDays.encounter,\n      relevantPeriod: InpatientHospitalDays.relevantPeriod,\n      relevantDays: ( InpatientHospitalDays.relevantDays EncounterDay\n          return Tuple {\n            dayNumber: EncounterDay.dayNumber,\n            dayPeriod: EncounterDay.dayPeriod,\n            hasSevereResult: exists ( [&quot;Observation&quot;: &quot;Glucose Lab Test Mass Per Volume&quot;] GlucoseTest\n                where GlucoseTest.status in { 'final', 'amended', 'corrected' }\n                  and GlucoseTest.status != 'cancelled'\n                  and GlucoseTest.value &gt; 300 'mg/dL'\n                  and QICoreCommon.&quot;Earliest&quot; ( GlucoseTest.effective ) during EncounterDay.dayPeriod\n            ),\n            hasElevatedResult: exists ( [&quot;Observation&quot;: &quot;Glucose Lab Test Mass Per Volume&quot;] GlucoseTest\n                where GlucoseTest.status in { 'final', 'amended', 'corrected' }\n                  and GlucoseTest.status != 'cancelled'\n                  and GlucoseTest.value &gt;= 200 'mg/dL'\n                  and QICoreCommon.&quot;Earliest&quot; ( GlucoseTest.effective ) during EncounterDay.dayPeriod\n            ),\n            hasNoGlucoseTest: not exists ( [&quot;Observation&quot;: &quot;Glucose Lab Test Mass Per Volume&quot;] GlucoseTest\n                where GlucoseTest.status in { 'final', 'amended', 'corrected' }\n                  and GlucoseTest.status != 'cancelled'\n                  and QICoreCommon.&quot;Earliest&quot; ( GlucoseTest.effective ) during EncounterDay.dayPeriod\n            )\n          }\n      )\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-days-with-hyperglycemic-events\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*# hyper days uses &quot;Relevant Encounters With Glucose Result Days&quot; 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*/\n\n\ndefine &quot;Days with Hyperglycemic Events&quot;:\n  &quot;Days with Glucose Results&quot; EncounterWithResultDays\n    let eligibleEventDays: EncounterWithResultDays.relevantDays EncounterDay\n      where EncounterDay.dayNumber &gt; 1\n      return Tuple {\n        dayIndex: EncounterDay.dayNumber,\n        dayPeriod: EncounterDay.dayPeriod,\n        hasHyperglycemicEvent: ( EncounterDay.hasSevereResult\n            or ( EncounterDay.hasNoGlucoseTest\n                and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 2].hasElevatedResult\n                and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 3].hasElevatedResult\n            )\n        )\n      }\n    return Tuple {\n      encounter: EncounterWithResultDays.encounter,\n      relevantPeriod: EncounterWithResultDays.relevantPeriod,\n      eligibleEventDays: eligibleEventDays\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-encounter-with-hyperglycemic-events\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/***/\n\n\ndefine &quot;Encounter with Hyperglycemic Events&quot;:\n  &quot;Days with Hyperglycemic Events&quot; HyperglycemicEventDays\n    where exists ( HyperglycemicEventDays.eligibleEventDays EligibleEventDay\n        where EligibleEventDay.hasHyperglycemicEvent\n    )\n    return HyperglycemicEventDays.encounter</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-numerator\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator&quot;:\n  &quot;Encounter with Hyperglycemic Events&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-payer\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n  [Coverage: type in &quot;Payer Type&quot;] Payer\n    return {\n      code: Payer.type,\n      period: Payer.period\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-payer\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n  SDE.&quot;SDE Payer&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-ethnicity\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n  Patient.ethnicity E\n    return Tuple {\n      codes: { E.ombCategory } union E.detailed,\n      display: E.text\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-ethnicity\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n  SDE.&quot;SDE Ethnicity&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-glucose-greater-than-or-equal-to-1000-within-1-hour-prior-to-and-6-hours-after-encounter-start\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start&quot;:\n  from\n    &quot;Initial Population&quot; InpatientHospitalization,\n    [&quot;Observation&quot;: &quot;Glucose Lab Test Mass Per Volume&quot;] GlucoseTest\n    let HospitalizationInterval: CQMCommon.&quot;HospitalizationWithObservation&quot; ( InpatientHospitalization ),\n    GlucoseTestTime: QICoreCommon.&quot;Earliest&quot; ( GlucoseTest.effective )\n    where GlucoseTest.value as Quantity &gt;= 1000 'mg/dL'\n      and GlucoseTest.status in { 'final', 'amended', 'corrected' }\n      and GlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hours )]\n    return GlucoseTest</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-glucose-tests-earlier-than-glucose-greater-than-or-equal-to-1000-within-1-hour-prior-to-and-6-hours-after-encounter-start\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start&quot;:\n  from\n    &quot;Initial Population&quot; InpatientHospitalization,\n    &quot;Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start&quot; GlucoseResult1000,\n    [&quot;Observation&quot;: &quot;Glucose Lab Test Mass Per Volume&quot;] EarlierGlucoseTest\n    let HospitalizationInterval: CQMCommon.&quot;HospitalizationWithObservation&quot; ( InpatientHospitalization ),\n    GlucoseTest1000Time: QICoreCommon.&quot;Earliest&quot; ( GlucoseResult1000.effective ),\n    EarlierGlucoseTestTime: QICoreCommon.&quot;Earliest&quot; ( EarlierGlucoseTest.effective )\n    where GlucoseTest1000Time during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hour )]\n      and EarlierGlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), GlucoseTest1000Time )\n      and EarlierGlucoseTest.id !~ GlucoseResult1000.id\n    return GlucoseResult1000</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-initial-glucose-greater-than-or-equal-to-1000-within-1-hour-prior-to-and-6-hours-after-encounter-start\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start&quot;:\n  &quot;Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start&quot; GlucoseResult1000\n    where not ( GlucoseResult1000.id in &quot;Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start&quot;.id )</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-encounter-with-first-glucose-greater-than-or-equal-to-1000\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Encounter with First Glucose Greater Than or Equal to 1000&quot;:\n  &quot;Initial Population&quot; InpatientHospitalization\n    with &quot;Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start&quot; FirstGlucoseResult\n      such that FirstGlucoseResult.value as Quantity &gt;= 1000 'mg/dL'\n        and QICoreCommon.&quot;Earliest&quot; ( FirstGlucoseResult.effective ) during Interval[( start of CQMCommon.&quot;HospitalizationWithObservation&quot; ( InpatientHospitalization ) - 1 hour ), ( start of CQMCommon.&quot;HospitalizationWithObservation&quot; ( InpatientHospitalization ) + 6 hours )]</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-denominator-exclusions\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator Exclusions&quot;:\n  &quot;Encounter with First Glucose Greater Than or Equal to 1000&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-race\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n  Patient.race R\n    return Tuple {\n      codes: R.ombCategory union R.detailed,\n      display: R.text\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-sde-race\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n  SDE.&quot;SDE Race&quot;</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cqmcommon-hospitalizationwithobservation\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CQMCommon</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@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\n@deprecated: This function is deprecated. Use the fluent function `hospitalizationWithObservation()` instead.\n*/\ndefine function &quot;HospitalizationWithObservation&quot;(TheEncounter Encounter ):\n  TheEncounter Visit\n  \t\tlet ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs\n  \t\t\t\twhere LastObs.status = 'finished'\n            and LastObs.period ends 1 hour or less on or before start of Visit.period\n  \t\t\t\tsort by end of period\n  \t\t\t),\n  \t\t\tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n  \t\t\tEDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED\n  \t\t\t\twhere LastED.status = 'finished'\n            and LastED.period ends 1 hour or less on or before VisitStart\n  \t\t\t\tsort by end of period\n  \t\t\t)\n  \t\treturn Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"qicorecommon-toprevalenceinterval\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> QICoreCommon</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting \ninterval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.\n@deprecated: This function is deprecated. Use the `prevalenceInterval()` fluent function instead\n*/\ndefine function ToPrevalenceInterval(condition Condition):\nif condition.clinicalStatus ~ &quot;active&quot;\n  or condition.clinicalStatus ~ &quot;recurrence&quot;\n  or condition.clinicalStatus ~ &quot;relapse&quot; then\n  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]\nelse\n   (end of ToAbatementInterval(condition)) abatementDate\n    return if abatementDate is null then\n      Interval[start of ToInterval(condition.onset), abatementDate)\n    else\n      Interval[start of ToInterval(condition.onset), abatementDate]</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"qicorecommon-earliest\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> QICoreCommon</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Given an interval, return the starting point if the interval has a starting boundary specified,\notherwise, return the ending point\n@deprecated: This function is deprecated. Use the fluent function `earliest()` instead\n*/\ndefine function &quot;Earliest&quot;(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):\n  (choice.toInterval()) period\n    return\n      if (HasStart(period)) then start of period\n      else end of period</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-hospital-days-max-10\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Crops an interval to a maximum length of 10 days.*/\n\n\ndefine function &quot;Hospital Days Max 10&quot;(Period Interval&lt;DateTime&gt;):\n  Interval[start of Period, Min({ \n    end of Period, start of Period + 10 days }\n  )]</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-days-in-period\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Creates a list of 24 hour long intervals in an interval paired with the index (1 indexed) to which 24 hour interval it is.*/\n\n\ndefine function &quot;Days In Period&quot;(Period Interval&lt;DateTime&gt;):\n  ( &quot;Interval To Day Numbers&quot;(Period) ) DayNumber\n    let startPeriod: start of Period + ( 24 hours * ( DayNumber - 1 ) ),\n    endPeriod: if ( hours between startPeriod and end of Period &lt; 24 ) then startPeriod \n      else start of Period + ( 24 hours * DayNumber )\n    return Tuple {\n      dayNumber: DayNumber,\n      dayPeriod: Interval[startPeriod, endPeriod )\n    }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-interval-to-day-numbers\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Creates a list of integers from 1 to how many days are in the interval. Note, this wont create an index for\n * the final day if it is less than 24 hours. This also includes the first 24 hour period.*/\n\n\ndefine function &quot;Interval To Day Numbers&quot;(Period Interval&lt;DateTime&gt;):\n  ( expand { Interval[1, duration in days between start of Period and end of Period]} ) DayExpand\n    return end of DayExpand</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-denominator-observations\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Counts the number of eligible days in an encounter. This simply filters and counts the data built in\n * &quot;Relevant Encounters With Hyperglycemic Event Days&quot;.*/\n\n\ndefine function &quot;Denominator Observations&quot;(QualifyingEncounter Encounter):\n  if QualifyingEncounter.id in &quot;Denominator Exclusions&quot;.id then singleton from ( &quot;Days with Hyperglycemic Events&quot; EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return 0\n  ) \n    else singleton from ( &quot;Days with Hyperglycemic Events&quot; EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return Count(EncounterWithEventDays.eligibleEventDays)\n  )</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"fhirhelpers-tostring\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value uri): value.value</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"fhirhelpers-tocode\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }</code></pre>\n  </td>\n\n</tr>\n        \n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospitalharmhyperglycemiainhospitalizedpatientsfhir-numerator-observations\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> HospitalHarmHyperglycemiainHospitalizedPatientsFHIR</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**\n * Counts the number of eligible days with a hyperglycemic event in an encounter. This simply filters and counts the data built in\n * &quot;Relevant Encounters With Hyperglycemic Event Days&quot;.*/\n\n\ndefine function &quot;Numerator Observations&quot;(QualifyingEncounter Encounter):\n  if QualifyingEncounter.id in &quot;Denominator Exclusions&quot;.id then singleton from ( &quot;Days with Hyperglycemic Events&quot; EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return 0\n  ) \n    else singleton from ( &quot;Days with Hyperglycemic Events&quot; EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return Count(EncounterWithEventDays.eligibleEventDays EligibleEventDay\n          where EligibleEventDay.hasHyperglycemicEvent\n      )\n  )</code></pre>\n  </td>\n\n</tr>\n\n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.6 of the sample-content-ig Liquid templates</th>\n</tr>\n    </tbody>\n  </table>\n</div>"
  },
  "contained" : [
    {
      "resourceType" : "Library",
      "id" : "effective-data-requirements",
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding" : {
            "system" : "http://hl7.org/fhir/administrative-gender",
            "code" : "M",
            "display" : "Male"
          }
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding" : {
            "system" : "http://hl7.org/fhir/administrative-gender",
            "code" : "F",
            "display" : "Female"
          }
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Sex"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Sex\":\n  case\n    when Patient.gender = 'male' then \"M\"\n    when Patient.gender = 'female' then \"F\"\n    else null\n  end"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 0
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "SDE Sex"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Sex\":\n  SDE.\"SDE Sex\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 1
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Qualifying Encounter"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Qualifying Encounter\":\n  [\"Encounter\": \"Encounter Inpatient\"] InpatientEncounter\n    where AgeInYearsAt(date from start of InpatientEncounter.period) >= 18\n      and InpatientEncounter.period ends during day of \"Measurement Period\"\n      and InpatientEncounter.status = 'finished'"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 2
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with Hospitalization Period"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Create paring of encounters to hospitalization period so this calculation can be inspected and the result \n * can be reused, making the logic faster.*/\n\n\ndefine \"Encounter with Hospitalization Period\":\n  \"Qualifying Encounter\" QualifyingHospitalization\n    return Tuple {\n      encounter: QualifyingHospitalization,\n      hospitalizationPeriod: CQMCommon.\"HospitalizationWithObservation\" ( QualifyingHospitalization )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 3
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with Existing Diabetes Diagnosis"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Using the already calculated pairing of hospitalization periods with encounters, filter on ones with \n * diabetes and return the encounter.*/\n\n\ndefine \"Encounter with Existing Diabetes Diagnosis\":\n  \"Encounter with Hospitalization Period\" Hospitalization\n    with [\"Condition\": \"Diabetes\"] Diabetes\n      such that ( QICoreCommon.\"ToPrevalenceInterval\" ( Diabetes ) starts before end of Hospitalization.hospitalizationPeriod )\n    return Hospitalization.encounter"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 4
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with Hypoglycemic Medication"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Using the already calculated pairing of hospitalization periods with encounters, filter on ones with \n * hypoglycemic medicatons and return the encounter.*/\n\n\ndefine \"Encounter with Hypoglycemic Medication\":\n  from\n    \"Encounter with Hospitalization Period\" Hospitalization,\n    [\"MedicationAdministration\": \"Hypoglycemics Treatment Medications\"] HypoglycemicMed\n    where HypoglycemicMed.status = 'completed'\n      and HypoglycemicMed.status != 'not-done'\n      and QICoreCommon.\"ToInterval\" ( HypoglycemicMed.effective ) during Hospitalization.hospitalizationPeriod\n    return Hospitalization.encounter"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 5
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with Elevated Glucose Greater Than or Equal to 200"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Using the already calculated pairing of hospitalization periods with encounters, filter on ones with \n * any elevated (>= 200) blood glucose reading during the hospitalization*/\n\n\ndefine \"Encounter with Elevated Glucose Greater Than or Equal to 200\":\n  \"Encounter with Hospitalization Period\" Hospitalization\n    with [\"Observation\": \"Glucose Lab Test Mass Per Volume\"] GlucoseTest\n      such that QICoreCommon.\"Earliest\" ( GlucoseTest.effective ) during Hospitalization.hospitalizationPeriod\n        and GlucoseTest.status in { 'final', 'amended', 'corrected' }\n        and GlucoseTest.status != 'cancelled'\n        and GlucoseTest.value >= 200 'mg/dL'\n    return Hospitalization.encounter"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 6
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Initial Population"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Initial Population\":\n  \"Encounter with Existing Diabetes Diagnosis\"\n    union \"Encounter with Hypoglycemic Medication\"\n    union \"Encounter with Elevated Glucose Greater Than or Equal to 200\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 7
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Denominator"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Denominator\":\n  \"Initial Population\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 8
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Measurement Population"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Measurement Population\":\n  \"Denominator\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 9
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Days in Hospitalization"
            },
            {
              "url" : "statement",
              "valueString" : "/***/\n\n\ndefine \"Days in Hospitalization\":\n  \"Measurement Population\" EligibleInpatientHospitalization\n    let period: CQMCommon.\"HospitalizationWithObservation\" ( EligibleInpatientHospitalization ),\n    relevantPeriod: \"Hospital Days Max 10\"(period)\n    return Tuple {\n      encounter: EligibleInpatientHospitalization,\n      hospitalizationPeriod: period,\n      relevantPeriod: relevantPeriod,\n      relevantDays: \"Days In Period\"(relevantPeriod)\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 10
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Days with Glucose Results"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Days with Glucose Results\":\n  \"Days in Hospitalization\" InpatientHospitalDays\n    return Tuple {\n      encounter: InpatientHospitalDays.encounter,\n      relevantPeriod: InpatientHospitalDays.relevantPeriod,\n      relevantDays: ( InpatientHospitalDays.relevantDays EncounterDay\n          return Tuple {\n            dayNumber: EncounterDay.dayNumber,\n            dayPeriod: EncounterDay.dayPeriod,\n            hasSevereResult: exists ( [\"Observation\": \"Glucose Lab Test Mass Per Volume\"] GlucoseTest\n                where GlucoseTest.status in { 'final', 'amended', 'corrected' }\n                  and GlucoseTest.status != 'cancelled'\n                  and GlucoseTest.value > 300 'mg/dL'\n                  and QICoreCommon.\"Earliest\" ( GlucoseTest.effective ) during EncounterDay.dayPeriod\n            ),\n            hasElevatedResult: exists ( [\"Observation\": \"Glucose Lab Test Mass Per Volume\"] GlucoseTest\n                where GlucoseTest.status in { 'final', 'amended', 'corrected' }\n                  and GlucoseTest.status != 'cancelled'\n                  and GlucoseTest.value >= 200 'mg/dL'\n                  and QICoreCommon.\"Earliest\" ( GlucoseTest.effective ) during EncounterDay.dayPeriod\n            ),\n            hasNoGlucoseTest: not exists ( [\"Observation\": \"Glucose Lab Test Mass Per Volume\"] GlucoseTest\n                where GlucoseTest.status in { 'final', 'amended', 'corrected' }\n                  and GlucoseTest.status != 'cancelled'\n                  and QICoreCommon.\"Earliest\" ( GlucoseTest.effective ) during EncounterDay.dayPeriod\n            )\n          }\n      )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 11
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Days with Hyperglycemic Events"
            },
            {
              "url" : "statement",
              "valueString" : "/*# 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*/\n\n\ndefine \"Days with Hyperglycemic Events\":\n  \"Days with Glucose Results\" EncounterWithResultDays\n    let eligibleEventDays: EncounterWithResultDays.relevantDays EncounterDay\n      where EncounterDay.dayNumber > 1\n      return Tuple {\n        dayIndex: EncounterDay.dayNumber,\n        dayPeriod: EncounterDay.dayPeriod,\n        hasHyperglycemicEvent: ( EncounterDay.hasSevereResult\n            or ( EncounterDay.hasNoGlucoseTest\n                and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 2].hasElevatedResult\n                and EncounterWithResultDays.relevantDays[EncounterDay.dayNumber - 3].hasElevatedResult\n            )\n        )\n      }\n    return Tuple {\n      encounter: EncounterWithResultDays.encounter,\n      relevantPeriod: EncounterWithResultDays.relevantPeriod,\n      eligibleEventDays: eligibleEventDays\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 12
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with Hyperglycemic Events"
            },
            {
              "url" : "statement",
              "valueString" : "/***/\n\n\ndefine \"Encounter with Hyperglycemic Events\":\n  \"Days with Hyperglycemic Events\" HyperglycemicEventDays\n    where exists ( HyperglycemicEventDays.eligibleEventDays EligibleEventDay\n        where EligibleEventDay.hasHyperglycemicEvent\n    )\n    return HyperglycemicEventDays.encounter"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 13
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Numerator"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Numerator\":\n  \"Encounter with Hyperglycemic Events\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 14
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Payer"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Payer\":\n  [Coverage: type in \"Payer Type\"] Payer\n    return {\n      code: Payer.type,\n      period: Payer.period\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 15
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "SDE Payer"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Payer\":\n  SDE.\"SDE Payer\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 16
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Ethnicity"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Ethnicity\":\n  Patient.ethnicity E\n    return Tuple {\n      codes: { E.ombCategory } union E.detailed,\n      display: E.text\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 17
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "SDE Ethnicity"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Ethnicity\":\n  SDE.\"SDE Ethnicity\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 18
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start\":\n  from\n    \"Initial Population\" InpatientHospitalization,\n    [\"Observation\": \"Glucose Lab Test Mass Per Volume\"] GlucoseTest\n    let HospitalizationInterval: CQMCommon.\"HospitalizationWithObservation\" ( InpatientHospitalization ),\n    GlucoseTestTime: QICoreCommon.\"Earliest\" ( GlucoseTest.effective )\n    where GlucoseTest.value as Quantity >= 1000 'mg/dL'\n      and GlucoseTest.status in { 'final', 'amended', 'corrected' }\n      and GlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hours )]\n    return GlucoseTest"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 19
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Glucose Tests Earlier Than Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start\":\n  from\n    \"Initial Population\" InpatientHospitalization,\n    \"Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start\" GlucoseResult1000,\n    [\"Observation\": \"Glucose Lab Test Mass Per Volume\"] EarlierGlucoseTest\n    let HospitalizationInterval: CQMCommon.\"HospitalizationWithObservation\" ( InpatientHospitalization ),\n    GlucoseTest1000Time: QICoreCommon.\"Earliest\" ( GlucoseResult1000.effective ),\n    EarlierGlucoseTestTime: QICoreCommon.\"Earliest\" ( EarlierGlucoseTest.effective )\n    where GlucoseTest1000Time during Interval[( start of HospitalizationInterval - 1 hour ), ( start of HospitalizationInterval + 6 hour )]\n      and EarlierGlucoseTestTime during Interval[( start of HospitalizationInterval - 1 hour ), GlucoseTest1000Time )\n      and EarlierGlucoseTest.id !~ GlucoseResult1000.id\n    return GlucoseResult1000"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 20
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start\":\n  \"Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start\" GlucoseResult1000\n    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 )"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 21
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Encounter with First Glucose Greater Than or Equal to 1000"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Encounter with First Glucose Greater Than or Equal to 1000\":\n  \"Initial Population\" InpatientHospitalization\n    with \"Initial Glucose Greater Than or Equal to 1000 within 1 Hour Prior To and 6 Hours After Encounter Start\" FirstGlucoseResult\n      such that FirstGlucoseResult.value as Quantity >= 1000 'mg/dL'\n        and QICoreCommon.\"Earliest\" ( FirstGlucoseResult.effective ) during Interval[( start of CQMCommon.\"HospitalizationWithObservation\" ( InpatientHospitalization ) - 1 hour ), ( start of CQMCommon.\"HospitalizationWithObservation\" ( InpatientHospitalization ) + 6 hours )]"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 22
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Denominator Exclusions"
            },
            {
              "url" : "statement",
              "valueString" : "define \"Denominator Exclusions\":\n  \"Encounter with First Glucose Greater Than or Equal to 1000\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 23
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "SupplementalDataElements"
            },
            {
              "url" : "name",
              "valueString" : "SDE Race"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Race\":\n  Patient.race R\n    return Tuple {\n      codes: R.ombCategory union R.detailed,\n      display: R.text\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 24
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "SDE Race"
            },
            {
              "url" : "statement",
              "valueString" : "define \"SDE Race\":\n  SDE.\"SDE Race\""
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 25
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "CQMCommon"
            },
            {
              "url" : "name",
              "valueString" : "HospitalizationWithObservation"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@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\n@deprecated: This function is deprecated. Use the fluent function `hospitalizationWithObservation()` instead.\n*/\ndefine function \"HospitalizationWithObservation\"(TheEncounter Encounter ):\n  TheEncounter Visit\n  \t\tlet ObsVisit: Last([Encounter: \"Observation Services\"] LastObs\n  \t\t\t\twhere LastObs.status = 'finished'\n            and LastObs.period ends 1 hour or less on or before start of Visit.period\n  \t\t\t\tsort by end of period\n  \t\t\t),\n  \t\t\tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n  \t\t\tEDVisit: Last([Encounter: \"Emergency Department Visit\"] LastED\n  \t\t\t\twhere LastED.status = 'finished'\n            and LastED.period ends 1 hour or less on or before VisitStart\n  \t\t\t\tsort by end of period\n  \t\t\t)\n  \t\treturn Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 26
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "QICoreCommon"
            },
            {
              "url" : "name",
              "valueString" : "ToPrevalenceInterval"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting \ninterval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.\n@deprecated: This function is deprecated. Use the `prevalenceInterval()` fluent function instead\n*/\ndefine function ToPrevalenceInterval(condition Condition):\nif condition.clinicalStatus ~ \"active\"\n  or condition.clinicalStatus ~ \"recurrence\"\n  or condition.clinicalStatus ~ \"relapse\" then\n  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]\nelse\n   (end of ToAbatementInterval(condition)) abatementDate\n    return if abatementDate is null then\n      Interval[start of ToInterval(condition.onset), abatementDate)\n    else\n      Interval[start of ToInterval(condition.onset), abatementDate]"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 27
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "QICoreCommon"
            },
            {
              "url" : "name",
              "valueString" : "Earliest"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@description: Given an interval, return the starting point if the interval has a starting boundary specified,\notherwise, return the ending point\n@deprecated: This function is deprecated. Use the fluent function `earliest()` instead\n*/\ndefine function \"Earliest\"(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>> ):\n  (choice.toInterval()) period\n    return\n      if (HasStart(period)) then start of period\n      else end of period"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 28
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Hospital Days Max 10"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Crops an interval to a maximum length of 10 days.*/\n\n\ndefine function \"Hospital Days Max 10\"(Period Interval<DateTime>):\n  Interval[start of Period, Min({ \n    end of Period, start of Period + 10 days }\n  )]"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 29
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Days In Period"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Creates a list of 24 hour long intervals in an interval paired with the index (1 indexed) to which 24 hour interval it is.*/\n\n\ndefine function \"Days In Period\"(Period Interval<DateTime>):\n  ( \"Interval To Day Numbers\"(Period) ) DayNumber\n    let startPeriod: start of Period + ( 24 hours * ( DayNumber - 1 ) ),\n    endPeriod: if ( hours between startPeriod and end of Period < 24 ) then startPeriod \n      else start of Period + ( 24 hours * DayNumber )\n    return Tuple {\n      dayNumber: DayNumber,\n      dayPeriod: Interval[startPeriod, endPeriod )\n    }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 30
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Interval To Day Numbers"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Creates a list of integers from 1 to how many days are in the interval. Note, this wont create an index for\n * the final day if it is less than 24 hours. This also includes the first 24 hour period.*/\n\n\ndefine function \"Interval To Day Numbers\"(Period Interval<DateTime>):\n  ( expand { Interval[1, duration in days between start of Period and end of Period]} ) DayExpand\n    return end of DayExpand"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 31
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Denominator Observations"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Counts the number of eligible days in an encounter. This simply filters and counts the data built in\n * \"Relevant Encounters With Hyperglycemic Event Days\".*/\n\n\ndefine function \"Denominator Observations\"(QualifyingEncounter Encounter):\n  if QualifyingEncounter.id in \"Denominator Exclusions\".id then singleton from ( \"Days with Hyperglycemic Events\" EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return 0\n  ) \n    else singleton from ( \"Days with Hyperglycemic Events\" EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return Count(EncounterWithEventDays.eligibleEventDays)\n  )"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 32
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "FHIRHelpers"
            },
            {
              "url" : "name",
              "valueString" : "ToString"
            },
            {
              "url" : "statement",
              "valueString" : "define function ToString(value uri): value.value"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 33
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "FHIRHelpers"
            },
            {
              "url" : "name",
              "valueString" : "ToCode"
            },
            {
              "url" : "statement",
              "valueString" : "/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 34
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension" : [
            {
              "url" : "libraryName",
              "valueString" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
            },
            {
              "url" : "name",
              "valueString" : "Numerator Observations"
            },
            {
              "url" : "statement",
              "valueString" : "/**\n * Counts the number of eligible days with a hyperglycemic event in an encounter. This simply filters and counts the data built in\n * \"Relevant Encounters With Hyperglycemic Event Days\".*/\n\n\ndefine function \"Numerator Observations\"(QualifyingEncounter Encounter):\n  if QualifyingEncounter.id in \"Denominator Exclusions\".id then singleton from ( \"Days with Hyperglycemic Events\" EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return 0\n  ) \n    else singleton from ( \"Days with Hyperglycemic Events\" EncounterWithEventDays\n      where EncounterWithEventDays.encounter = QualifyingEncounter\n      return Count(EncounterWithEventDays.eligibleEventDays EligibleEventDay\n          where EligibleEventDay.hasHyperglycemicEvent\n      )\n  )"
            },
            {
              "url" : "displaySequence",
              "valueInteger" : 35
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        }
      ],
      "name" : "EffectiveDataRequirements",
      "status" : "active",
      "type" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/library-type",
            "code" : "module-definition"
          }
        ]
      },
      "relatedArtifact" : [
        {
          "type" : "depends-on",
          "display" : "Library SDE",
          "resource" : "Library/SupplementalDataElements|3.5.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library FHIRHelpers",
          "resource" : "Library/FHIRHelpers|4.4.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library CQMCommon",
          "resource" : "Library/CQMCommon|2.2.000"
        },
        {
          "type" : "depends-on",
          "display" : "Library QICoreCommon",
          "resource" : "Library/QICoreCommon|2.1.000"
        },
        {
          "type" : "depends-on",
          "display" : "Code system AdministrativeGender",
          "resource" : "http://hl7.org/fhir/administrative-gender"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Encounter Inpatient",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Observation Services",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Emergency Department Visit",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Diabetes",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.103.12.1001"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Hypoglycemics Treatment Medications",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.394"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Glucose Lab Test Mass Per Volume",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34"
        },
        {
          "type" : "depends-on",
          "display" : "Value set Payer Type",
          "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
        }
      ],
      "parameter" : [
        {
          "name" : "Measurement Period",
          "use" : "in",
          "min" : 0,
          "max" : "1",
          "type" : "Period"
        },
        {
          "name" : "SDE Sex",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Coding"
        },
        {
          "name" : "Numerator",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Denominator",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "SDE Payer",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "Initial Population",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "SDE Ethnicity",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Resource"
        },
        {
          "name" : "Denominator Exclusions",
          "use" : "out",
          "min" : 0,
          "max" : "*",
          "type" : "Resource"
        },
        {
          "name" : "SDE Race",
          "use" : "out",
          "min" : 0,
          "max" : "1",
          "type" : "Resource"
        }
      ],
      "dataRequirement" : [
        {
          "type" : "Patient",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport" : [
            "ethnicity",
            "race"
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "status",
            "status.value",
            "period"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
            },
            {
              "path" : "status.value",
              "code" : [
                {
                  "code" : "finished"
                }
              ]
            }
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "status",
            "status.value",
            "period"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
            },
            {
              "path" : "status.value",
              "code" : [
                {
                  "code" : "finished"
                }
              ]
            }
          ],
          "dateFilter" : [
            {
              "path" : "period",
              "valuePeriod" : {
                "extension" : [
                  {
                    "url" : "http://hl7.org/fhir/uv/crmi-analysisException",
                    "valueString" : "Error attempting to determine filter value: toFhirValue not implemented for Subtract"
                  }
                ]
              }
            }
          ]
        },
        {
          "type" : "Encounter",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport" : [
            "type",
            "period",
            "status",
            "status.value",
            "hospitalizationPeriod",
            "encounter"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
            },
            {
              "path" : "status.value",
              "code" : [
                {
                  "code" : "finished"
                }
              ]
            }
          ],
          "dateFilter" : [
            {
              "path" : "period",
              "valuePeriod" : {
                "extension" : [
                  {
                    "url" : "http://hl7.org/fhir/StructureDefinition/cqf-expression",
                    "valueExpression" : {
                      "language" : "text/cql-identifier",
                      "expression" : "Measurement Period"
                    }
                  }
                ]
              }
            }
          ]
        },
        {
          "type" : "Condition",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"
          ],
          "mustSupport" : [
            "code"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.103.12.1001"
            }
          ]
        },
        {
          "type" : "MedicationAdministration",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationadministration"
          ],
          "mustSupport" : [
            "medication",
            "status",
            "status.value",
            "effective"
          ],
          "codeFilter" : [
            {
              "path" : "medication",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1196.394"
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "status",
            "status.value",
            "value",
            "id",
            "id.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34"
            },
            {
              "path" : "status.value",
              "code" : [
                {
                  "code" : "cancelled"
                }
              ]
            }
          ]
        },
        {
          "type" : "Observation",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"
          ],
          "mustSupport" : [
            "code",
            "effective",
            "value",
            "status",
            "status.value",
            "id",
            "id.value"
          ],
          "codeFilter" : [
            {
              "path" : "code",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.34"
            }
          ]
        },
        {
          "type" : "Coverage",
          "profile" : [
            🔗 "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"
          ],
          "mustSupport" : [
            "type",
            "period"
          ],
          "codeFilter" : [
            {
              "path" : "type",
              "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
            }
          ]
        }
      ]
    }
  ],
  "extension" : [
    {
      "id" : "supplementalDataGuidance",
      "extension" : [
        {
          "url" : "guidance",
          "valueString" : "For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity \n SDE Payer \n SDE Race \n SDE Sex \n "
        },
        {
          "url" : "usage",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
                "code" : "supplemental-data",
                "display" : "Supplemental Data"
              }
            ],
            "text" : "Supplemental Data Guidance"
          }
        }
      ],
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance"
    },
    {
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
      "valueReference" : {
        "reference" : "Device/cqf-tooling"
      }
    },
    {
      "id" : "effective-data-requirements",
      "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements",
      "valueReference" : {
        "reference" : "#effective-data-requirements"
      }
    }
  ],
  "url" : "https://madie.cms.gov/Measure/HospitalHarmHyperglycemiainHospitalizedPatientsFHIR",
  "identifier" : [
    {
      "use" : "usual",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "short-name",
            "display" : "Short Name"
          }
        ]
      },
      "system" : "https://madie.cms.gov/measure/shortName",
      "value" : "CMS871FHIR"
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "version-independent",
            "display" : "Version Independent"
          }
        ]
      },
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:uuid:c44ca609-d795-4715-a8fc-1b0b30e46048"
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "version-specific",
            "display" : "Version Specific"
          }
        ]
      },
      "system" : "urn:ietf:rfc:3986",
      "value" : "urn:uuid:c7dbf77f-5869-42a0-b5e6-12e18004d2f4"
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "endorser",
            "display" : "Endorser"
          }
        ]
      },
      "system" : "https://madie.cms.gov/measure/cbeId",
      "value" : "3533e",
      "assigner" : {
        "display" : "CMS Consensus Based Entity"
      }
    },
    {
      "use" : "official",
      "type" : {
        "coding" : [
          {
            "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
            "code" : "publisher",
            "display" : "Publisher"
          }
        ]
      },
      "system" : "https://madie.cms.gov/measure/cmsId",
      "value" : "871FHIR",
      "assigner" : {
        "display" : "CMS"
      }
    }
  ],
  "version" : "0.1.000",
  "name" : "HospitalHarmHyperglycemiainHospitalizedPatientsFHIR",
  "title" : "Hospital Harm - Severe HyperglycemiaFHIR",
  "status" : "active",
  "experimental" : false,
  "date" : "2024-09-09T19:21:02+00:00",
  "publisher" : "Centers for Medicare & Medicaid Services (CMS)",
  "contact" : [
    {
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.cms.gov/"
        }
      ]
    }
  ],
  "description" : "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",
  "useContext" : [
    {
      "code" : {
        "system" : "http://terminology.hl7.org/CodeSystem/extended-usage-context-type-codes",
        "code" : "setting",
        "display" : "Setting"
      },
      "valueCodeableConcept" : {
        "coding" : [
          {
            "system" : "http://terminology.hl7.org/CodeSystem/intended-care-setting-codes",
            "code" : "hospital",
            "display" : "Hospital"
          }
        ]
      }
    }
  ],
  "purpose" : "UNKNOWN",
  "usage" : "The measure is using mg/dL as the unit of measurement for glucose results.\n\nWhen 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.\n\nThis 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.  \n\nThe “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). \n\nThe “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).\n\nSince 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.\n\nAlthough 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.\n\nMultiple hyperglycemic events can occur during a ‘day’, but this is still considered one hyperglycemic event day.\n\nThe 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.\n\nThe 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.\n\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS871v4.\n\nPlease 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" : "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.\n\nLOINC(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" : "2025-01-01",
    "end" : "2025-12-31"
  },
  "author" : [
    {
      "name" : "American Institutes for Research (AIR)",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://www.air.org"
        }
      ]
    }
  ],
  "library" : [
    🔗 "https://madie.cms.gov/Library/HospitalHarmHyperglycemiainHospitalizedPatientsFHIR"
  ],
  "disclaimer" : "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.\n\nTHE MEASURES AND SPECIFICATIONS ARE PROVIDED \"AS IS\" WITHOUT WARRANTY OF ANY KIND.\n\nDue to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].",
  "scoring" : {
    "coding" : [
      {
        "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
        "code" : "ratio",
        "display" : "Ratio"
      }
    ],
    "text" : "Ratio"
  },
  "rationale" : "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.\n\nSevere 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).\n\nFrom the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:\nRecommendation 1.1\nIn 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" : "Multiple guidelines address recommended levels of glycemic control, though these do not define severe hyperglycemia: \n\nFrom Section 16, Diabetes Care in the Hospital, in the Standards of Medical Care in Diabetes by the American Diabetes Association, (American Diabetes Association, 2023): \n\n16.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.\n\n16.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.\n\nFrom the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting (2022): \n\nRecommendation 10.1\nIn 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. \n\nRecommendation 10.2\nIn 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). \n\nRecommendation 10.3\nIn 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).\n\nRemarks\nReductions 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.\n\nThere 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). \n\nFor 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).\n\nFrom the Endocrine Society clinical practice guideline on the Management of Hyperglycemia in Hospitalized Patients in Non-critical Care Setting, 2022:\nRecommendation 1.1\nIn 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.",
  "guidance" : "The measure is using mg/dL as the unit of measurement for glucose results.\n\nWhen 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.\n\nThis 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.  \n\nThe “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). \n\nThe “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).\n\nSince 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.\n\nAlthough 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.\n\nMultiple hyperglycemic events can occur during a ‘day’, but this is still considered one hyperglycemic event day.\n\nThe 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.\n\nThe 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.\n\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.\n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS871v4.\n\nPlease 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).",
  "group" : [
    {
      "id" : "6501fe8dda013638e7b3dc0d",
      "extension" : [
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
                "code" : "ratio",
                "display" : "Ratio"
              }
            ]
          }
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
          "valueCode" : "Encounter"
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-type",
                "code" : "outcome",
                "display" : "Outcome"
              }
            ]
          }
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
          "valueCode" : "None"
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
          "valueCodeableConcept" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
                "code" : "decrease",
                "display" : "decrease"
              }
            ]
          }
        }
      ],
      "population" : [
        {
          "id" : "9B922C53-7F1B-4AF5-96E6-1A1E4AF7909C",
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "initial-population",
                "display" : "Initial Population"
              }
            ]
          },
          "description" : "Inpatient hospitalizations for patients age 18 and older that end during the measurement period, as well as either: \n\n - A diagnosis of diabetes that starts before or during the encounter; or \n - Administration of at least one dose of insulin or any hypoglycemic medication during the encounter; or \n - Presence of at least one glucose value >=200 mg/dL at any time during the encounter",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Initial Population"
          }
        },
        {
          "id" : "6402512C-2305-42DC-B5F6-A226B5057B89",
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "denominator",
                "display" : "Denominator"
              }
            ]
          },
          "description" : "Equals Initial Population",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Denominator"
          }
        },
        {
          "id" : "0F4405D3-B373-4620-A9CC-D29558C39E85",
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "denominator-exclusion",
                "display" : "Denominator Exclusion"
              }
            ]
          },
          "description" : "-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\n-Inpatient hospitalizations for patients who have comfort care measures ordered or provided during the encounter\n-Inpatient hospitalizations for patients who have a discharge disposition to home or to a health care facility for hospice care\n",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Denominator Exclusions"
          }
        },
        {
          "id" : "340EA45E-2411-4192-9C9D-3DF8D89A1D97",
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "numerator",
                "display" : "Numerator"
              }
            ]
          },
          "description" : "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\n\nA hyperglycemic event is defined as: \n\n - A day with at least one glucose value >300 mg/dL; \nOR\n - 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" : "text/cql-identifier",
            "expression" : "Numerator"
          }
        },
        {
          "id" : "68900484-66a1-4da3-9b02-1a10a5fd592b",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod",
              "valueString" : "Sum"
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference",
              "valueString" : "6402512C-2305-42DC-B5F6-A226B5057B89"
            }
          ],
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "measure-observation",
                "display" : "Measure Observation"
              }
            ]
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Denominator Observations"
          }
        },
        {
          "id" : "f1bc37e5-f64f-4ed8-b965-2011f1181225",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod",
              "valueString" : "Sum"
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference",
              "valueString" : "340EA45E-2411-4192-9C9D-3DF8D89A1D97"
            }
          ],
          "code" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                "code" : "measure-observation",
                "display" : "Measure Observation"
              }
            ]
          },
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "Numerator Observations"
          }
        }
      ]
    }
  ],
  "supplementalData" : [
    {
      "id" : "sde-ethnicity",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Ethnicity",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Ethnicity"
      }
    },
    {
      "id" : "sde-payer",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Payer",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Payer"
      }
    },
    {
      "id" : "sde-race",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Race",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Race"
      }
    },
    {
      "id" : "sde-sex",
      "usage" : [
        {
          "coding" : [
            {
              "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code" : "supplemental-data"
            }
          ]
        }
      ],
      "description" : "SDE Sex",
      "criteria" : {
        "language" : "text/cql-identifier",
        "expression" : "SDE Sex"
      }
    }
  ]
}