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

Measure: Core Clinical Data Elements for the Hybrid Hospital Wide All Condition All Procedure Risk Standardized Mortality Measure HWMFHIR (Experimental)

This logic is intended to extract electronic clinical data. This is not an electronic clinical quality measure and this logic will not produce measure results. Instead, it will produce a file containing the data that CMS will link with administrative claims to risk adjust the Hybrid HWM outcome measure. It is designed to extract the first resulted set of vital signs and basic laboratory results obtained from hospitalizations for adult Medicare Fee-For-Service (FFS) and Medicare Advantage (MA) patients admitted to acute care hospitals.

UNKNOWN

Official URL: https://madie.cms.gov/Measure/HybridHospitalWideMortalityFHIR Version: 0.0.001
Active as of 2024-09-09 Responsible: Centers for Medicare & Medicaid Services (CMS)/a> Computable Name: HybridHospitalWideMortalityFHIR
Other Identifiers: Short Name: CMS844FHIR (use: usual, ), UUID:965255e9-dfeb-42d0-8416-2c4b7ecc5109 (use: official, ), UUID:9a5510d6-6e1b-48a6-8aa3-7540ce826466 (use: official, ), Endorser: 3502 (use: official, ), Publisher: 844FHIR (use: official, )

Usage:Venue: EH

Copyright/Legal: Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. All rights reserved. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc.

Knowledge Artifact Metadata
Name (machine-readable) HybridHospitalWideMortalityFHIR
Title (human-readable) Core Clinical Data Elements for the Hybrid Hospital Wide All Condition All Procedure Risk Standardized Mortality Measure HWMFHIR
Status Active
Experimental true
Description

This logic is intended to extract electronic clinical data. This is not an electronic clinical quality measure and this logic will not produce measure results. Instead, it will produce a file containing the data that CMS will link with administrative claims to risk adjust the Hybrid HWM outcome measure. It is designed to extract the first resulted set of vital signs and basic laboratory results obtained from hospitalizations for adult Medicare Fee-For-Service (FFS) and Medicare Advantage (MA) patients admitted to acute care hospitals.

Purpose

UNKNOWN

Clinical Usage These specifications are for use for data with discharges that occur between July 1, 2025 and June 30, 2026. The associated Hospital Specific Report (HSR) is anticipated to be released in Spring 2027. This logic guides the user to extract the FIRST resulted HWM-specific CCDEs for all Medicare FFS and MA hospitalizations for patients aged 65 through 94 years (Initial Population) directly admitted to the hospital or admitted to the same facility after being treated in another area, such as the emergency department or hospital outpatient location. The logic supports extraction of the FIRST set of HWM-specific CCDEs in two different ways, depending on if the patient was a direct admission, meaning that the patient was admitted directly to an inpatient unit without first receiving care in the emergency department or other hospital outpatient locations within the same admitting facility: 1. If the patient was a direct admission, the logic supports extraction of the FIRST resulted vital signs (physical exams) within 2 hours (120 minutes) after the start of the inpatient admission, and the FIRST resulted laboratory tests within 24 hours (1440 minutes) after the start of the inpatient admission. 2. If the patient has values captured prior to admission, for example from the emergency department, pre-operative, or other outpatient area within the hospital, the logic supports extraction of the FIRST resulted vital signs and laboratory tests within 24 hours (1440 minutes) PRIOR to the start of the inpatient admission. All clinical systems used in inpatient and outpatient locations within the hospital facility should be queried when looking for core clinical data element values related to a patient who is subsequently admitted. Value sets for the laboratory tests are represented using Logical Observation Identifiers Names and Codes (LOINC) currently available for these tests. If the institution is using local codes to capture and store relevant laboratory test data, those sites should map that information to the LOINC code for reporting of the core clinical data elements. NOTE: It is recommended hospitals only report the FIRST resulted value for EACH core clinical data element collected in the appropriate timeframe, if available. Hospitals may also choose to report ALL values on an encounter during their entire admission; however, only the first resulted values are utilized in the logic for measure calculation. For each CCDE, it is recommended that hospitals report the below Unified Code for Units of Measure (UCUM) units, however, any unit may be submitted. Where the reported unit is not easily converted to the requested UCUM units, the value will be set to missing and multiple imputation will be used to impute a value based on the characteristics of the CCDE reported. CCDE UCUM Unit: Bicarbonate--------------------------------------meq/L mmol/L Creatinine-----------------------------------------mg/dL Heart rate-----------------------------------------{Beats}/min Hematocrit ---------------------------------------% Oxygen saturation (by pulse oximetry)----% Platelet--------------------------------------------10*3/uL Sodium--------------------------------------------meq/L mmol/L Systolic blood pressure-----------------------mm[Hg] Temperature-------------------------------------Cel [degF] White blood cell count -----------------------{Cells}/uL 10*3/uL 10*9/L For each hospitalization please also submit the following Linking Variables: CMS Certification Number (CCN); National Provider Identifier (NPI) for MA patients; Medicare Beneficiary Identifier (MBI); Inpatient Admission Date; and Discharge Date. The initial population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home. This FHIR-based measure has been derived from the QDM-based measure: CMS844v5. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).
Effective Period 2025-07-01..2026-06-30
Use Context Venue = EH
Measure Developer Lantana Consulting Group: https://www.lantanagroup.com/
Measure Developer Yale New Haven Health Service Corporation/ Center for Outcomes Research and Evaluation: https://medicine.yale.edu/core/
Measure Steward Centers for Medicare & Medicaid Services (CMS)
Steward Contact Details https://www.cms.gov/
Copyright

Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. All rights reserved. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc.

Measure Metadata
Short Name Identifier CMS844FHIR
Version Independent Identifier urn:uuid:965255e9-dfeb-42d0-8416-2c4b7ecc5109
Version Specific Identifier urn:uuid:9a5510d6-6e1b-48a6-8aa3-7540ce826466
Publisher (CMS) Identifier 844FHIR
Identifier Endorser/3502 (use: official, )
Version Number 0.0.001
Measure Scoring Cohort
Rationale

The intent of this logic is to extract the FIRST set of clinical data elements from hospital electronic health records (EHRs) for all qualifying hospitalizations. The data will be linked with administrative claims to risk adjust the Hybrid HWM outcome measure. This work addresses stakeholder concerns that clinical data garnered from patients and used by clinicians to guide diagnostic decisions and treatment, are preferable to administrative claims data when profiling hospitals’ case mix. We are calling the list of data elements for extraction the "HWM-specific core clinical data elements" (CCDE). The CCDEs are the first set of vital signs and basic laboratory tests resulted from hospitalizations for adult Medicare FFS and MA patients, age 65 through 94 years (Initial Population), after they arrive at the hospital to which they are subsequently admitted. For example, this first set of data values are often captured in the emergency department or in the pre-operative area, sometimes hours before a patient is admitted to that same facility. Hospitalizations over the age of 94 years are not included to avoid holding hospitals responsible for the survival of the oldest elderly patients, who may be less likely to have survival as a primary goal. While we acknowledge that many elderly patients do have survival beyond 30 days as a primary goal for their hospitalization, with input from our Technical Expert Panel and work groups, we decided to only include hospitalizations between 65 and 94 years of age. These CCDEs were selected because they: 1. reflect patients' clinical status when they first present to the hospital; 2. are clinically and statistically relevant to patient outcomes; 3. are consistently obtained during adult inpatient hospitalizations based on current clinical practice; 4. are captured with a standard definition and recorded in a standard format across providers; and 5. are entered in structured fields that are feasibly retrieved from current EHR systems (YNHHSC/CORE, 2015). Additional data called Linking Variables are used to link EHR data files with administrative claims data for CMS to calculate results for the Hybrid HWM measure, which are: CMS Certification Number (CCN); National Provider Identifier (NPI) for MA patients; Medicare Beneficiary Identifier (MBI); Date of Birth; Sex; Inpatient Admission Date; and Discharge Date.

Clinical Recommendation Statement

The logic is not meant to guide or alter the care patients receive. The purpose of this CCDE logic is to extract clinical data that are already routinely captured in EHRs from hospitalizations for adult patients. It is not intended to require that clinical staff perform additional measurements or tests that are not needed for diagnostic assessment or treatment of patients.

Guidance

These specifications are for use for data with discharges that occur between July 1, 2025 and June 30, 2026. The associated Hospital Specific Report (HSR) is anticipated to be released in Spring 2027. This logic guides the user to extract the FIRST resulted HWM-specific CCDEs for all Medicare FFS and MA hospitalizations for patients aged 65 through 94 years (Initial Population) directly admitted to the hospital or admitted to the same facility after being treated in another area, such as the emergency department or hospital outpatient location. The logic supports extraction of the FIRST set of HWM-specific CCDEs in two different ways, depending on if the patient was a direct admission, meaning that the patient was admitted directly to an inpatient unit without first receiving care in the emergency department or other hospital outpatient locations within the same admitting facility: 1. If the patient was a direct admission, the logic supports extraction of the FIRST resulted vital signs (physical exams) within 2 hours (120 minutes) after the start of the inpatient admission, and the FIRST resulted laboratory tests within 24 hours (1440 minutes) after the start of the inpatient admission. 2. If the patient has values captured prior to admission, for example from the emergency department, pre-operative, or other outpatient area within the hospital, the logic supports extraction of the FIRST resulted vital signs and laboratory tests within 24 hours (1440 minutes) PRIOR to the start of the inpatient admission. All clinical systems used in inpatient and outpatient locations within the hospital facility should be queried when looking for core clinical data element values related to a patient who is subsequently admitted. Value sets for the laboratory tests are represented using Logical Observation Identifiers Names and Codes (LOINC) currently available for these tests. If the institution is using local codes to capture and store relevant laboratory test data, those sites should map that information to the LOINC code for reporting of the core clinical data elements. NOTE: It is recommended hospitals only report the FIRST resulted value for EACH core clinical data element collected in the appropriate timeframe, if available. Hospitals may also choose to report ALL values on an encounter during their entire admission; however, only the first resulted values are utilized in the logic for measure calculation. For each CCDE, it is recommended that hospitals report the below Unified Code for Units of Measure (UCUM) units, however, any unit may be submitted. Where the reported unit is not easily converted to the requested UCUM units, the value will be set to missing and multiple imputation will be used to impute a value based on the characteristics of the CCDE reported. CCDE UCUM Unit: Bicarbonate--------------------------------------meq/L mmol/L Creatinine-----------------------------------------mg/dL Heart rate-----------------------------------------{Beats}/min Hematocrit ---------------------------------------% Oxygen saturation (by pulse oximetry)----% Platelet--------------------------------------------103/uL Sodium--------------------------------------------meq/L mmol/L Systolic blood pressure-----------------------mm[Hg] Temperature-------------------------------------Cel [degF] White blood cell count -----------------------{Cells}/uL 103/uL 10*9/L For each hospitalization please also submit the following Linking Variables: CMS Certification Number (CCN); National Provider Identifier (NPI) for MA patients; Medicare Beneficiary Identifier (MBI); Inpatient Admission Date; and Discharge Date. The initial population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home. This FHIR-based measure has been derived from the QDM-based measure: CMS844v5. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).

Supplemental Data Guidance For hospitalizations in the Initial Population, report the FIRST value for vital signs (physical exams) resulted within the 24 hours prior to the inpatient admission. If no values were resulted in the 24 hours prior to the admission (for example, for patients directly admitted to the hospital) report the first value resulted within 2 hours after the start of the inpatient admission. The physical exam CCDEs are as follows:: Body Temperature Heart rate Oxygen saturation (by pulse oximetry) Systolic blood pressure For laboratory test results, report the FIRST value resulted within the 24 hours prior to admission. If there are no values in the 24 hours prior to admission, report the first value resulted within 24 hours after the start of the inpatient admission. The laboratory tests CCDEs are as follows: Bicarbonate (or carbon dioxide, see Bicarbonate Lab Test value set) Creatinine Hematocrit Platelet Sodium White blood cell count First values for the CCDEs may be resulted in the emergency department or other hospital outpatient locations within the hospital facility before a patient is subsequently admitted to the same hospital. First values for these data elements may also be resulted in an inpatient location for directly admitted patients who do not receive care in the emergency department or other hospital outpatient/same day surgery locations before admission. NOTE: Do not report ALL values on a hospitalization during the entire admission. Only report the FIRST resulted value for EACH CCDE collected in the appropriate timeframe, if available. For every patient in the Initial Population, also identify payer, race, ethnicity and sex.
Measure Population Criteria (ID: 6385011c4ba3d47c885c02aa)
Summary This logic is intended to extract electronic clinical data. This is not an electronic clinical quality measure and this logic will not produce measure results. Instead, it will produce a file containing the data that CMS will link with administrative claims to risk adjust the Hybrid HWM outcome measure. It is designed to extract the first resulted set of vital signs and basic laboratory results obtained from hospitalizations for adult Medicare Fee-For-Service (FFS) and Medicare Advantage (MA) patients admitted to acute care hospitals.
Initial Population ID: 24BB5BA9-820F-4958-B8AA-AA8962E9E398
Description:

All Medicare FFS and MA hospitalizations for patients aged 65 through 94 years at the start of an inpatient admission, where the length of stay is less than 365 days, and the hospitalization ends during the measurement period. NOTE: All Medicare FFS and MA hospitalizations meeting the above criteria should be included, regardless of whether Medicare FFS/MA is the primary, secondary, or tertiary payer.

Logic Definition: Initial Population
Population Basis Encounter
Scoring Cohort
Type Outcome
Rate Aggregation None
Improvement Notation decrease
Supplemental Data Elements
Supplemental Data Element ID: sde-ethnicity
Usage Code: Supplemental Data
Description: SDE Ethnicity
Logic Definition: SDE Ethnicity
Supplemental Data Element ID: sde-payer
Usage Code: Supplemental Data
Description: SDE Payer
Logic Definition: SDE Payer
Supplemental Data Element ID: sde-race
Usage Code: Supplemental Data
Description: SDE Race
Logic Definition: SDE Race
Supplemental Data Element ID: sde-sex
Usage Code: Supplemental Data
Description: SDE Sex
Logic Definition: SDE Sex
Supplemental Data Element ID: encounter-with-first-bicarbonate-lab-test
Usage Code: Supplemental Data
Description: Encounter with First Bicarbonate Lab Test
Logic Definition: Encounter with First Bicarbonate Lab Test
Supplemental Data Element ID: encounter-with-first-body-temperature
Usage Code: Supplemental Data
Description: Encounter with First Body Temperature
Logic Definition: Encounter with First Body Temperature
Supplemental Data Element ID: encounter-with-first-creatinine-lab-test
Usage Code: Supplemental Data
Description: Encounter with First Creatinine Lab Test
Logic Definition: Encounter with First Creatinine Lab Test
Supplemental Data Element ID: encounter-with-first-heart-rate
Usage Code: Supplemental Data
Description: Encounter with First Heart Rate
Logic Definition: Encounter with First Heart Rate
Supplemental Data Element ID: encounter-with-first-hematocrit-lab-test
Usage Code: Supplemental Data
Description: Encounter with First Hematocrit Lab Test
Logic Definition: Encounter with First Hematocrit Lab Test
Supplemental Data Element ID: encounter-with-first-oxygen-saturation
Usage Code: Supplemental Data
Description: Encounter with First Oxygen Saturation
Logic Definition: Encounter with First Oxygen Saturation
Supplemental Data Element ID: encounter-with-first-platelet-lab-test
Usage Code: Supplemental Data
Description: Encounter with First Platelet Lab Test
Logic Definition: Encounter with First Platelet Lab Test
Supplemental Data Element ID: encounter-with-first-sodium-lab-test
Usage Code: Supplemental Data
Description: Encounter with First Sodium Lab Test
Logic Definition: Encounter with First Sodium Lab Test
Supplemental Data Element ID: encounter-with-first-white-blood-cells-lab-test
Usage Code: Supplemental Data
Description: Encounter with First White Blood Cells Lab Test
Logic Definition: Encounter with First White Blood Cells Lab Test
Supplemental Data Element ID: qualifying-blood-pressure-reading
Usage Code: Supplemental Data
Description: Qualifying Blood Pressure Reading
Logic Definition: Qualifying Blood Pressure Reading
Supplemental Data Element ID: test2
Usage Code: Supplemental Data
Description: Test2
Logic Definition: Test2
Measure Logic
Primary Library HybridHospitalWideMortalityFHIR
Dependency Description: Library CQMCommon
Resource: Library/CQMCommon|2.2.000
Canonical URL: Library/CQMCommon|2.2.000
Dependency Description: Library FHIRHelpers
Resource: Library/FHIRHelpers|4.4.000
Canonical URL: Library/FHIRHelpers|4.4.000
Dependency Description: Library QICoreCommon
Resource: Library/QICoreCommon|2.1.000
Canonical URL: Library/QICoreCommon|2.1.000
Dependency Description: Library SDE
Resource: Library/SupplementalDataElements|3.5.000
Canonical URL: Library/SupplementalDataElements|3.5.000
Dependency Description: Code system AdministrativeGender
Resource: AdministrativeGender
Canonical URL: http://hl7.org/fhir/administrative-gender
Dependency Description: Value set Encounter Inpatient
Resource: Encounter Inpatient
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Dependency Description: Value set Medicare FFS payer
Resource: Medicare payer
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.10
Dependency Description: Value set Medicare Advantage payer
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.12
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.12
Dependency Description: Value set Observation Services
Resource: Observation Services
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Dependency Description: Value set Emergency Department Visit
Resource: Emergency Department Visit
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
Dependency Description: Value set Outpatient Surgery Service
Resource: Outpatient Surgery Service
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.38
Dependency Description: Value set Bicarbonate lab test
Resource: Bicarbonate lab test
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.139
Dependency Description: Value set White blood cells count lab test
Resource: White blood cells count lab test
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.129
Dependency Description: Value set Hematocrit lab test
Resource: Hematocrit lab test
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.114
Dependency Description: Value set Platelet count lab test
Resource: Platelet count lab test
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.127
Dependency Description: Value set Creatinine lab test
Resource: Creatinine lab test
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.2363
Dependency Description: Value set Payer Type
Resource: Payer
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Dependency Description: Value set Oxygen Saturation by Pulse Oximetry
Resource: Oxygen Saturation in Arterial Blood by Pulse Oximetry
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.151
Dependency Description: Value set Sodium lab test
Resource: Sodium lab test
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.119
Direct Reference Code Display: Male
Code: M
System: http://hl7.org/fhir/administrative-gender
Direct Reference Code Display: Female
Code: F
System: http://hl7.org/fhir/administrative-gender
Parameter Name: Measurement Period
Use: In
Min Cardinality: 0
Max Cardinality: 1
Type: Period
Parameter Name: Encounter with First Bicarbonate Lab Test
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Encounter with First Heart Rate
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Encounter with First White Blood Cells Lab Test
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Encounter with First Hematocrit Lab Test
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Encounter with First Platelet Lab Test
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: SDE Race
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Resource
Parameter Name: SDE Sex
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Coding
Parameter Name: Encounter with First Creatinine Lab Test
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Encounter with First Body Temperature
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: SDE Payer
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Initial Population
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: SDE Ethnicity
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: Resource
Parameter Name: Encounter with First Oxygen Saturation
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Parameter Name: Encounter with First Sodium Lab Test
Use: Out
Min Cardinality: 0
Max Cardinality: *
Type: Resource
Measure Logic Data Requirements
Data Requirement Type: Encounter
Profile(s): QICoreEncounter
Must Support Elements: type, status, status.value, period, id, id.value
Code Filter(s):
Path: type
ValueSet: Observation Services
Path: status.value
Code:
Data Requirement Type: Encounter
Profile(s): QICoreEncounter
Must Support Elements: type, status, status.value, period, id, id.value
Code Filter(s):
Path: type
ValueSet: Emergency Department Visit
Path: status.value
Code:
Data Requirement Type: Encounter
Profile(s): QICoreEncounter
Must Support Elements: type, period, id, id.value
Code Filter(s):
Path: type
ValueSet: Outpatient Surgery Service
Data Requirement Type: Encounter
Profile(s): QICoreEncounter
Must Support Elements: type, status, status.value, period, id, id.value
Code Filter(s):
Path: type
ValueSet: Encounter Inpatient
Path: status.value
Code:
Data Requirement Type: Patient
Profile(s): QICorePatient
Must Support Elements: race, ethnicity
Data Requirement Type: Coverage
Profile(s): QICoreCoverage
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: Medicare payer
Data Requirement Type: Coverage
Profile(s): QICoreCoverage
Must Support Elements: type
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.12
Data Requirement Type: Coverage
Profile(s): QICoreCoverage
Must Support Elements: type, period
Code Filter(s):
Path: type
ValueSet: Payer
Data Requirement Type: Observation
Profile(s): US Core Laboratory Result Observation Profile
Must Support Elements: code, issued, issued.value, status, status.value, value
Code Filter(s):
Path: code
ValueSet: Bicarbonate lab test
Data Requirement Type: Observation
Profile(s): US Core Laboratory Result Observation Profile
Must Support Elements: code, issued, issued.value, status, status.value, value
Code Filter(s):
Path: code
ValueSet: White blood cells count lab test
Data Requirement Type: Observation
Profile(s): US Core Laboratory Result Observation Profile
Must Support Elements: code, issued, issued.value, status, status.value, value
Code Filter(s):
Path: code
ValueSet: Hematocrit lab test
Data Requirement Type: Observation
Profile(s): US Core Laboratory Result Observation Profile
Must Support Elements: code, issued, issued.value, status, status.value, value
Code Filter(s):
Path: code
ValueSet: Platelet count lab test
Data Requirement Type: Observation
Profile(s): US Core Laboratory Result Observation Profile
Must Support Elements: code, issued, issued.value, status, status.value, value
Code Filter(s):
Path: code
ValueSet: Creatinine lab test
Data Requirement Type: Observation
Profile(s): US Core Laboratory Result Observation Profile
Must Support Elements: code, issued, issued.value, status, status.value, value
Code Filter(s):
Path: code
ValueSet: Sodium lab test
Data Requirement Type: Observation
Profile(s): Observation Heart Rate Profile
Must Support Elements: effective, status, status.value, value
Data Requirement Type: Observation
Profile(s): Observation Body Temperature Profile
Must Support Elements: effective, status, status.value, value
Data Requirement Type: Observation
Profile(s): QICoreObservation
Must Support Elements: code, effective, status, status.value, value
Code Filter(s):
Path: code
ValueSet: Oxygen Saturation in Arterial Blood by Pulse Oximetry
Measure Logic Definitions
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Inpatient Encounters":
  [Encounter: "Encounter Inpatient"] EncounterInpatient
    with ( [Coverage: "Medicare FFS payer"]
      union [Coverage: "Medicare Advantage payer"] ) MedicarePayer
      such that ( EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService ( ).lengthInDays ( ) ) < 365
        and EncounterInpatient.status = 'finished'
        and AgeInYearsAt(date from start of EncounterInpatient.period) in Interval[65, 94]
        and EncounterInpatient.period ends during day of "Measurement Period"
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Bicarbonate Lab Test":
  "Inpatient Encounters" EncounterInpatient
    let FirstBicarbonateLab: First(["USCoreLaboratoryResultObservationProfile": "Bicarbonate lab test"] BicarbonateLab
        where BicarbonateLab.issued.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 1440 minutes]
          and BicarbonateLab.status in { 'final', 'amended', 'corrected' }
          and BicarbonateLab.value is not null
        sort by issued.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstBicarbonateResult: FirstBicarbonateLab.value as Quantity,
      Timing: FirstBicarbonateLab.issued
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Heart Rate":
  "Inpatient Encounters" EncounterInpatient
    let FirstHeartRate: First(["observation-heartrate"] HeartRate
        where HeartRate.effective.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 120 minutes]
          and HeartRate.status in { 'final', 'amended', 'corrected' }
          and HeartRate.value is not null
        sort by effective.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstHeartRateResult: FirstHeartRate.value as Quantity,
      Timing: FirstHeartRate.effective.earliest ( )
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First White Blood Cells Lab Test":
  "Inpatient Encounters" EncounterInpatient
    let FirstWhiteBloodCellLab: First(["USCoreLaboratoryResultObservationProfile": "White blood cells count lab test"] WhiteBloodCellLab
        where WhiteBloodCellLab.issued.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 1440 minutes]
          and WhiteBloodCellLab.status in { 'final', 'amended', 'corrected' }
          and WhiteBloodCellLab.value is not null
        sort by issued.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstWhiteBloodCellResult: FirstWhiteBloodCellLab.value as Quantity,
      Timing: FirstWhiteBloodCellLab.issued
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Hematocrit Lab Test":
  "Inpatient Encounters" EncounterInpatient
    let FirstHematocritLab: First(["USCoreLaboratoryResultObservationProfile": "Hematocrit lab test"] HematocritLab
        where HematocritLab.issued.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 1440 minutes]
          and HematocritLab.status in { 'final', 'amended', 'corrected' }
          and HematocritLab.value is not null
        sort by issued.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstHematocritResult: FirstHematocritLab.value as Quantity,
      Timing: FirstHematocritLab.issued
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Platelet Lab Test":
  "Inpatient Encounters" EncounterInpatient
    let FirstPlateletLab: First(["USCoreLaboratoryResultObservationProfile": "Platelet count lab test"] PlateletLab
        where PlateletLab.issued.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 1440 minutes]
          and PlateletLab.status in { 'final', 'amended', 'corrected' }
          and PlateletLab.value is not null
        sort by issued.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstPlateletResult: FirstPlateletLab.value as Quantity,
      Timing: FirstPlateletLab.issued
    }
Logic Definition Library Name: SupplementalDataElements
define "SDE Race":
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "SDE Race":
  SDE."SDE Race"
Logic Definition Library Name: SupplementalDataElements
define "SDE Sex":
  case
    when Patient.gender = 'male' then "M"
    when Patient.gender = 'female' then "F"
    else null
  end
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "SDE Sex":
  SDE."SDE Sex"
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Creatinine Lab Test":
  "Inpatient Encounters" EncounterInpatient
    let FirstCreatinineLab: First(["USCoreLaboratoryResultObservationProfile": "Creatinine lab test"] CreatinineLab
        where CreatinineLab.issued.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 1440 minutes]
          and CreatinineLab.status in { 'final', 'amended', 'corrected' }
          and CreatinineLab.value is not null
        sort by issued.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstCreatinineResult: FirstCreatinineLab.value as Quantity,
      Timing: FirstCreatinineLab.issued
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Body Temperature":
  "Inpatient Encounters" EncounterInpatient
    let FirstTemperature: First(["observation-bodytemp"] temperature
        where temperature.effective.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 120 minutes]
          and temperature.status in { 'final', 'amended', 'corrected' }
          and temperature.value is not null
        sort by effective.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstTemperatureResult: FirstTemperature.value as Quantity,
      Timing: FirstTemperature.effective.earliest ( )
    }
Logic Definition Library Name: SupplementalDataElements
define "SDE Payer":
  [Coverage: type in "Payer Type"] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "SDE Payer":
  SDE."SDE Payer"
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Initial Population":
  "Inpatient Encounters"
Logic Definition Library Name: SupplementalDataElements
define "SDE Ethnicity":
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Oxygen Saturation":
  "Inpatient Encounters" EncounterInpatient
    let FirstOxygenSat: First([Observation: "Oxygen Saturation by Pulse Oximetry"] O2Saturation
        where O2Saturation.effective.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 120 minutes]
          and O2Saturation.status in { 'final', 'amended', 'corrected' }
          and O2Saturation.value is not null
        sort by effective.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstOxygenSatResult: FirstOxygenSat.value as Quantity,
      Timing: FirstOxygenSat.effective.earliest ( )
    }
Logic Definition Library Name: HybridHospitalWideMortalityFHIR
define "Encounter with First Sodium Lab Test":
  "Inpatient Encounters" EncounterInpatient
    let FirstSodiumLab: First(["USCoreLaboratoryResultObservationProfile": "Sodium lab test"] SodiumLab
        where SodiumLab.issued.earliest() during Interval[start of EncounterInpatient.hospitalizationWithObservationAndOutpatientSurgeryService() - 1440 minutes, start of EncounterInpatient.period + 1440 minutes]
          and SodiumLab.status in { 'final', 'amended', 'corrected' }
          and SodiumLab.value is not null
        sort by issued.earliest()
    )
    return {
      EncounterId: EncounterInpatient.id,
      FirstSodiumResult: FirstSodiumLab.value as Quantity,
      Timing: FirstSodiumLab.issued
    }
Logic Definition Library Name: CQMCommon
/*
@description: Calculates the difference in calendar days between the start and end of the given interval.
*/
define fluent function lengthInDays(Value Interval<DateTime> ):
  difference in days between start of Value and end of Value
Logic Definition Library Name: CQMCommon
/*
@description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.
*/
define fluent function hospitalizationWithObservationAndOutpatientSurgeryService(TheEncounter "Encounter" ):
  TheEncounter Visit
	  let ObsVisit: Last([Encounter: "Observation Services"] LastObs
		  	where LastObs.status = 'finished'
          and LastObs.period ends 1 hour or less on or before start of Visit.period
			  sort by	end of period
    	),
    	VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
    	EDVisit: Last([Encounter: "Emergency Department Visit"] LastED
			  where LastED.status = 'finished'
          and LastED.period ends 1 hour or less on or before VisitStart
			  sort by	end of period
    	),
    	VisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),
    	OutpatientSurgeryVisit: Last([Encounter: "Outpatient Surgery Service"] LastSurgeryOP
			  where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED
			  sort by	end of period
    	)
  	return Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]
Logic Definition Library Name: QICoreCommon
/*
@description: Given an interval, return the starting point if the interval has a starting boundary specified,
otherwise, return the ending point
*/
define fluent function earliest(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>> ):
  (choice.toInterval()) period
    return
      if (period."hasStart"()) then start of period
      else end of period
Logic Definition Library Name: FHIRHelpers
define function ToString(value uri): value.value
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }
Generated using version 0.4.6 of the sample-content-ig Liquid templates