FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: Measure/CMS1244FHIRECATHOQR

Packagegov.healthit.ecqi.ecqms
Resource TypeMeasure
IdCMS1244FHIRECATHOQR
FHIR VersionR4
Sourcehttp://ecqi.healthit.gov/ecqms/https://build.fhir.org/ig/cqframework/ecqm-content-qicore-2025/Measure-CMS1244FHIRECATHOQR.html
URLhttps://madie.cms.gov/Measure/CMS1244FHIRECATHOQR
Version0.4.001
Statusactive
Date2025-07-15T13:37:40+00:00
NameCMS1244FHIRECATHOQR
TitleEmergency Care Access & Timeliness (HOQR)FHIR
DescriptionThis measure assesses the variation in access and timeliness of emergency care to support hospital quality improvement for patients requiring emergency care in an emergency department (ED). This measure is designed to align with incentives to promote improved care both in EDs and the broader health system to help identify where patients do not receive timely access to emergency care. Emergency care access and timeliness gaps are inclusive of several concepts pertaining to boarding and crowding in an ED, including significantly longer ED wait times, higher left without being seen rates, longer boarding times, and longer total length of stay in the ED.
CopyrightLimited 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-2024 International Health Terminology Standards Development Organisation. All rights reserved. ICD-10 copyright 2024 World Health Organization. All Rights Reserved. CPT(R) contained in the Measure specifications is copyright 2004-2024 American Medical Association.

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Metadata
Title Emergency Care Access & Timeliness (HOQR)FHIR
Version 0.4.001
Short Name CMS1244FHIR
GUID (Version Independent) urn:uuid:1d711504-ebec-41de-81b0-d1993115eac2
GUID (Version Specific) urn:uuid:a91781e7-bf88-41a5-ae14-605b9243672e
CMS Identifier 1244FHIR
Effective Period 2027-01-01 through 2027-12-31
Steward (Publisher) Centers for Medicare & Medicaid Services (CMS)
Developer Acumen, LLC
Description

This measure assesses the variation in access and timeliness of emergency care to support hospital quality improvement for patients requiring emergency care in an emergency department (ED). This measure is designed to align with incentives to promote improved care both in EDs and the broader health system to help identify where patients do not receive timely access to emergency care.

Emergency care access and timeliness gaps are inclusive of several concepts pertaining to boarding and crowding in an ED, including significantly longer ED wait times, higher left without being seen rates, longer boarding times, and longer total length of stay in the ED.

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-2024 International Health Terminology Standards Development Organisation. All rights reserved.

ICD-10 copyright 2024 World Health Organization. All Rights Reserved.

CPT(R) contained in the Measure specifications is copyright 2004-2024 American Medical Association.

Disclaimer

These performance specifications are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.

THE MEASURES AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.

Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].

Rationale

This measure aims to reduce patient harm and improve outcomes for patients requiring emergency care in an ED by addressing the variation in emergency care and measuring access and timeliness of emergency care. There are long-standing concerns about parameters that impact access and timeliness of care in the ED. Currently, there are no national metrics to assess the proportion of patients impacted by access and timeliness of ED care.

Clinical Recommendation Statement

The goal of the Emergency Care Access & Timeliness (ECAT) measure is to assess and improve the safety of the 140 million ED visits that patients experience each year (Centers for Disease Control and Prevention [CDC], 2021). Limitations in access and timeliness of emergency care have been shown to be associated with harm, such as increases in mortality, delays in care, preventable errors, poor patient experience, and staff burnout. These quality limitations are also associated with increased costs of care. The ECAT measure under consideration is intended for use in CMS’s Hospital Outpatient Quality Reporting (HOQR) program. The numerator is comprised of all ED visits with a quality gap in access as defined in the numerator criteria. Challenges related to emergency care access and timeliness have been increasing and have prompted public calls for action. This measure improves upon previous efforts as it measures the mean instead of the median to highlight the presence of extreme quality gaps, and captures several indicators of quality gaps by using multiple numerator criteria. Implementation of this measure, which captures multiple components of access and timeliness, can help identify facilities where patients do not receive timely access to emergency care as defined in the numerator criteria. This measure, therefore, could positively impact millions of patients who seek treatment in the ED and help address long-standing disparities in emergency care, including for patients with mental health diagnoses.

Citation

Citation - American College of Emergency Physicians. (2018). Definition of Boarded Patient. Policy Statements. https://www.acep.org/patient-care/policy-statements/definition-of-boarded-patient

Citation

Citation - American Medical Association. (2022). What is Behavioral Health. https://www.ama-assn.org/delivering-care/public-health/what-behavioral-health

Citation

Citation - Centers for Disease Control and Prevention. (2021). Emergency Department Visits. https://www.cdc.gov/nchs/fastats/emergency-department.htm

Citation

Citation - eCQI Resource Center. (n.d). Median Admit Decision Time to ED Departure Time for Admitted Patients.

Definition Boarding: The practice of holding inpatients in the emergency department after admission to the hospital because no hospital inpatient bed is available. (American College of Emergency Physicians [ACEP], 2018).
Definition ED Observation: Observation stays are inclusive of both ED observation care in which a patient initially evaluated in the ED is cared for under observation status for an extended period of time in the ED or in a care area dedicated to observation care, as well as hospital observation stays in which a patient initially evaluated in the ED is cared for in observation status often in a hospital bed used for both inpatient or observation status admissions. Because these two forms of observation stays cannot be easily distinguished in a standardized fashion in existing electronic health record data ontologies, for the purposes of this quality measure all observation stays have been considered an exclusion from both numerator criteria 3 and 4.
Definition Left Without Being Seen (LWBS): Patients arrive to the ED for evaluation and leave before seeing a physician, advanced practice nurse, or physician’s assistant.
Definition Mental Health: Mental health generally refers to mental health diagnoses, life stressors and crises, and stress-related physical symptoms (American Medical Association [AMA], 2022). For this measure, mental health conditions will be defined separately from substance use disorders.
Guidance (Usage) Measure Score Calculation The measure score is first calculated at the individual ED level as the proportion of ED visits where any one of the four outcomes occurred, as defined by the numerator. Scores will be standardized z-scores by ED case volume strata (defined in ED visit volume bands of 20,000 visits). For CMS Certification Numbers (CCNs) with more than one ED, volume-adjusted z-scores are then combined as a weighted average for that CCN. A z-score of greater than zero means worse performance and less than zero means better performance, compared to like EDs. For the purposes of this measure, a decision to admit can be captured using any of the following: - an evaluation that results in a decision to admit - an order to admit to inpatient - an order for a bed assignment - start of inpatient admission This dQM is an episode-based measure. An episode is defined as an ED visit that ends during the measurement period. This FHIR-based measure has been derived from the QDM-based measure: CMS1244v1. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
Measure Group (Rate) (ID: Group_1)
Basis Encounter
Scoring Proportion
Type Outcome
Rate Aggregation None
Improvement Notation Decreased score indicates improvement
Initial Population ID: InitialPopulation_1
Description:

All ED visits that end during the measurement period for all patients

Logic Definition: Initial Population
Denominator ID: Denominator_1
Description:

Equals Initial Population

Logic Definition: Denominator
Numerator ID: Numerator_1
Description:

The numerator is comprised of ED visits meeting the denominator criteria and where the patient experiences any of the following quality gaps in access: 1. The patient waited longer than 60 minutes (1 hour) after arrival to the ED to be placed in a treatment room or dedicated treatment area that allows for audiovisual privacy during history-taking and physical examination, or 2. The patient left the ED without being evaluated, or 3. The patient boarded (time from Decision to Admit order to ED departure for admitted patients) in the ED for longer than 240 minutes (4 hours), or 4. The patient had an ED length of stay (LOS) (time from ED arrival to ED departure as defined by the ED departure timestamp indicating when the patient physically left the ED) of longer than 480 minutes (8 hours). ED encounters with ED observation stays are excluded from criteria #3 (boarding) and #4 (ED LOS). To clarify, patients who have a ‘decision to admit’ after an ED observation stay remain excluded from criteria #3 (boarded) calculations.

Logic Definition: Numerator
Stratifier ID: Stratification_1_1
Description: All patients aged less than 18 years seen in the ED who do not have an ED encounter principal diagnosis consistent with mental health diagnosis. Patients who have an ED encounter principal diagnosis consistent with substance use disorders will be included in this stratification.
Stratifier ID: Stratification_1_2
Description: All patients aged 18 years and older seen in the ED who do not have an ED encounter principal diagnosis consistent with mental health diagnosis. Patients who have an ED encounter principal diagnosis consistent with substance use disorders will be included in this stratification.
Stratifier ID: Stratification_1_3
Description: All patients aged less than 18 years seen in the ED who have an ED encounter principal diagnosis consistent with mental health diagnosis.
Stratifier ID: Stratification_1_4
Description: All patients aged 18 years and older seen in the ED who have an ED encounter principal diagnosis consistent with mental health diagnosis.
Supplemental Data Guidance For every patient evaluated by this measure also identify payer, race, ethnicity and sex
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
Measure Logic
Primary Library CMS1244FHIRECATHOQR
Contents Population Criteria
Logic Definitions
Terminology
Dependencies
Data Requirements
Population Criteria
Measure Group (Rate) (ID: Group_1)
Initial Population
define "Initial Population":
  "ED Evaluation and Management"
    union "ED Triage Excluding Those Prior To ED Encounters"
Initial Population
define "Initial Population":
  "ED Evaluation and Management"
    union "ED Triage Excluding Those Prior To ED Encounters"
Denominator
define "Denominator":
  "Initial Population"
Denominator
define "Denominator":
  "Initial Population"
Numerator
define "Numerator":
  "Time to Treatment Room Greater Than 60 Minutes"
    union "ED Arrival Left Without Being Seen"
    union "Boarded Time Greater Than 240 Minutes and No Observation Stay"
    union "ED Length of Stay Greater Than 480 Minutes and No Observation Stay"
Stratifier
define "Stratification 1":
  "Pediatric With No Mental Health Diagnosis"
Stratifier
define "Stratification 2":
  "Adult With No Mental Health Diagnosis"
Stratifier
define "Stratification 3":
  "Pediatric With Mental Health Diagnosis"
Stratifier
define "Stratification 4":
  "Adult With Mental Health Diagnosis"
Logic Definitions
Logic Definition Library Name: SupplementalDataElements
define "SDE Sex":
  case
    when Patient.sex = '248153007' then "Male (finding)"
    when Patient.sex = '248152002' then "Female (finding)"
    else null
  end
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: SupplementalDataElements
define "SDE Ethnicity":
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }
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: FHIRHelpers
define function ToString(value uri): value.value
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]
Logic Definition Library Name: FHIRHelpers
/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }
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
        }
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "SDE Sex":
  SDE."SDE Sex"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Evaluation and Management":
  [Encounter: "Emergency Department Evaluation and Management Visit"] EDEvalManagementVisit
    where EDEvalManagementVisit.period ends during day of "Measurement Period"
      and EDEvalManagementVisit.status = 'finished'
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Triage":
  ( [Encounter: "Triage"] EDTriage
      where EDTriage.period ends during day of "Measurement Period"
        and EDTriage.status in { 'finished', 'triaged' }
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Triage Excluding Those Prior To ED Encounters":
  "ED Triage" EDTriageinMP
    where not exists ( "ED Evaluation and Management" EDEvalManagementInMP
        where ( ( EDTriageinMP.period overlaps before EDEvalManagementInMP.period )
            or ( EDTriageinMP.period during EDEvalManagementInMP.period )
            or ( EDEvalManagementInMP.period during EDTriageinMP.period )
            or ( EDTriageinMP.period ends 120 minutes or less before start of EDEvalManagementInMP.period )
        )
    )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Initial Population":
  "ED Evaluation and Management"
    union "ED Triage Excluding Those Prior To ED Encounters"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Denominator":
  "Initial Population"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Triage Before Evaluation Management":
  "ED Triage" EDTriageinMP
    with "Denominator" EDEncounter
      such that ( ( EDTriageinMP.period overlaps before EDEncounter.period )
          or ( EDTriageinMP.period during EDEncounter.period )
          or ( EDEncounter.period during EDTriageinMP.period )
          or ( EDTriageinMP.period ends 120 minutes or less before start of EDEncounter.period )
      )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Triage and Evaluation Management":
  "Denominator"
    union "ED Triage Before Evaluation Management"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Time to Treatment Room Greater Than 60 Minutes":
  "ED Evaluation and Management" EDEvalManagementInMP
    where "EDArrivalTime"(EDEvalManagementInMP) 61 minutes or more before "EDTreatmentRoomTimeArrivalTime"(EDEvalManagementInMP)
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Arrival Left Without Being Seen":
  "Denominator" EDEncounter
    where EDEncounter.hospitalization.dischargeDisposition ~ "Patient left without being seen (finding)"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED To Inpatient Order":
  [ServiceRequest: "Decision to Admit to Hospital Inpatient"] AdmitIPOrder
    where AdmitIPOrder.status in { 'active', 'completed' }
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Decision to Admit Encounter Order":
  "Denominator" EDEncounter
    with CQMCommon."Inpatient Encounter" EncounterInpatient
      such that "AdmitDecisionUsingEncounterOrder"(EncounterInpatient) 241 minutes or more before "EDDepartureTime"(EDEncounter)
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Assessment In ED":
  ["ObservationClinicalResult": "Emergency Department Evaluation"]
    union ["SimpleObservation": "Emergency Department Evaluation"] ObsInED
      where ObsInED.value as Concept in "Admit Inpatient"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Decision to Admit Using Assessment":
  "Denominator" EDEncounter
    with CQMCommon."Inpatient Encounter" EncounterInpatient
      such that "AdmitDecisionUsingAssessment"(EncounterInpatient) 241 minutes or more before "EDDepartureTime"(EDEncounter)
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Inpatient Or Bed Assignment Encounter Order":
  ( [ServiceRequest: "Encounter Inpatient"]
    union [ServiceRequest: "Patient bed assigned (finding)"] ) IPRequest
    where IPRequest.status in { 'active', 'completed' }
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Time of Admit Order Or Bed Assignment to Departure Greater Than 241 Minutes":
  "Denominator" EDEncounter
    with CQMCommon."Inpatient Encounter" InpatientEncounter
      such that "AdmitInpatientOrBedAssignmentEncounterOrder"(InpatientEncounter) 241 minutes or more before "EDDepartureTime"(EDEncounter)
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Admitted to Inpatient 241 Minutes or More Before Departure":
  "Denominator" EDEncounter
    with CQMCommon."Inpatient Encounter" Inpatient
      such that "HoldingInEDAfterAdmission"(Inpatient) 241 minutes or more before "EDDepartureTime"(EDEncounter)
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Boarded Time Greater Than 240 Minutes":
  "Decision to Admit Encounter Order"
    union "Decision to Admit Using Assessment"
    union "Time of Admit Order Or Bed Assignment to Departure Greater Than 241 Minutes"
    union "Admitted to Inpatient 241 Minutes or More Before Departure"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Observation Status":
  [Encounter: "Observation Services"] EDObsEncounter
    with "Denominator" EDEncounter
      such that EDObsEncounter.period during EDEncounter.period
        and EDObsEncounter.status = 'finished'
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Boarded Time Greater Than 240 Minutes and No Observation Stay":
  ( "Boarded Time Greater Than 240 Minutes" Boarding
      where not exists ( "ED Observation Status" EDO
          where ( EDO.period during Boarding.period )
      )
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Length of Stay Greater Than 480 Minutes":
  "Denominator" EDEncounter
    where "EDArrivalTime"(EDEncounter) 481 minutes or more before "EDDepartureTime"(EDEncounter)
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Length of Stay Greater Than 480 Minutes and No Observation Stay":
  ( "ED Length of Stay Greater Than 480 Minutes" EDStay
      where not exists ( "ED Observation Status" EDObs
          where ( EDObs.period during EDStay.period )
      )
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Numerator":
  "Time to Treatment Room Greater Than 60 Minutes"
    union "ED Arrival Left Without Being Seen"
    union "Boarded Time Greater Than 240 Minutes and No Observation Stay"
    union "ED Length of Stay Greater Than 480 Minutes and No Observation Stay"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Encounter or Triage of Patients 18 Years and Older":
  "Denominator" EDEncounter
    where AgeInYearsAt(date from start of "Measurement Period") >= 18
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Adult With Mental Health Diagnosis":
  ( "ED Encounter or Triage of Patients 18 Years and Older" AdultEDEncounters
      where ( AdultEDEncounters.hasPrincipalDiagnosisOf ( "Mental Health Diagnosis without Substance Use Disorders" ) )
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Stratification 4":
  "Adult With Mental Health Diagnosis"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "ED Encounter or Triage of Patients Less Than 18 Years":
  "Denominator" EDEncounter
    where AgeInYearsAt(date from start of "Measurement Period") < 18
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Pediatric With Mental Health Diagnosis":
  ( "ED Encounter or Triage of Patients Less Than 18 Years" PediatricEDEncounters
      where ( PediatricEDEncounters.hasPrincipalDiagnosisOf ( "Mental Health Diagnosis without Substance Use Disorders" ) )
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Stratification 3":
  "Pediatric With Mental Health Diagnosis"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Adult With No Mental Health Diagnosis":
  ( "ED Encounter or Triage of Patients 18 Years and Older" AdultEDEncounters
      where not ( AdultEDEncounters.hasPrincipalDiagnosisOf ( "Mental Health Diagnosis without Substance Use Disorders" ) )
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Stratification 2":
  "Adult With No Mental Health Diagnosis"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Pediatric With No Mental Health Diagnosis":
  ( "ED Encounter or Triage of Patients Less Than 18 Years" PediatricEDEncounters
      where not ( PediatricEDEncounters.hasPrincipalDiagnosisOf ( "Mental Health Diagnosis without Substance Use Disorders" ) )
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Stratification 1":
  "Pediatric With No Mental Health Diagnosis"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Denominator":
  "Initial Population"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "SDE Payer":
  SDE."SDE Payer"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "Initial Population":
  "ED Evaluation and Management"
    union "ED Triage Excluding Those Prior To ED Encounters"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "SDE Ethnicity":
  SDE."SDE Ethnicity"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define "SDE Race":
  SDE."SDE Race"
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "EDArrivalTime"(EDEncounter Encounter):
  Last("ED Triage and Evaluation Management".location Location
      where Location.location.getLocation().type in "Emergency Department Location"
        and start of Location.period is not null
        and(Location.period ends 120 minutes or less before start of EDEncounter.period
            or Location.period overlaps before EDEncounter.period
            or EDEncounter.period overlaps before Location.period
            or Location.period starts same as start of EDEncounter.period
        )
      return start of Location.period
      sort ascending
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "EDTreatmentRoomTimeArrivalTime"(EDEncounter Encounter):
  First(EDEncounter.location Location
      where Location.location.getLocation().type in "Emergency Department Treatment Location"
        and start of Location.period is not null
      return start of Location.period
      sort ascending
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "AdmitDecisionUsingEncounterOrder"(EncounterInpatient Encounter):
  Last("ED To Inpatient Order" AdmitOrder
      let LastEDVisit: "LastEDEncounter"(EncounterInpatient)
      where AdmitOrder.authoredOn during LastEDVisit.period
        and AdmitOrder.intent ~ 'order'
      return AdmitOrder.authoredOn
      sort ascending
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "LastEDEncounter"(EncounterInpatient Encounter):
  Last("ED Evaluation and Management" EDEvalManagementInMP
      where EDEvalManagementInMP.period starts 1 day or less before or on start of EncounterInpatient.period
        and EDEvalManagementInMP.period starts before start of EncounterInpatient.period
        and EDEvalManagementInMP.period during day of "Measurement Period"
        and EDEvalManagementInMP.status = 'finished'
      sort by 
      end of period ascending
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "EDDepartureTime"(EDEncounter Encounter):
  Last("ED Triage and Evaluation Management".location Location
      where Location.location.getLocation().type in "Emergency Department Location"
        and 
        end of Location.period is not null
        and(Location.period ends 120 minutes or less before start of EDEncounter.period
            or Location.period overlaps before EDEncounter.period
            or EDEncounter.period overlaps before Location.period
            or Location.period starts same as start of EDEncounter.period
        )
      return 
      end of Location.period
      sort ascending
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "AdmitDecisionUsingAssessment"(EncounterInpatient Encounter):
  Last("Assessment In ED" EDEvaluation
      let LastEDVisit: "LastEDEncounter"(EncounterInpatient)
      where EDEvaluation.effective.toInterval() starts during LastEDVisit.period
        and EDEvaluation.status in { 'final', 'amended', 'corrected' }
      return start of EDEvaluation.effective.toInterval()
      sort ascending
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "AdmitInpatientOrBedAssignmentEncounterOrder"(Encounter Encounter):
  Last(("Inpatient Or Bed Assignment Encounter Order") AdmitInpatientOrder
      let LastEDVisit: "LastEDEncounter"(Encounter)
      where AdmitInpatientOrder.authoredOn during LastEDVisit.period
      return AdmitInpatientOrder.authoredOn
      sort ascending
  )
Logic Definition Library Name: CMS1244FHIRECATHOQR
define function "HoldingInEDAfterAdmission"(InpatientEncounter Encounter):
  Last(CQMCommon."Inpatient Encounter" AdmittedInpatient
      let LastEDVisit: "LastEDEncounter"(InpatientEncounter)
      where start of AdmittedInpatient.period during LastEDVisit.period
      return start of AdmittedInpatient.period
      sort ascending
  )
Logic Definition Library Name: CQMCommon
define "Inpatient Encounter":
  [Encounter: "Encounter Inpatient"] EncounterInpatient
    where EncounterInpatient.status = 'finished'
      and EncounterInpatient.period ends during day of "Measurement Period"
Logic Definition Library Name: CQMCommon
/*
@description: Returns the Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference):
  singleton from (
    [Location] L where reference.references(L)
  )
Logic Definition Library Name: CQMCommon
/*
 @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet.
 @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
 */
 define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet ValueSet):
   (encounter.principalDiagnosis()) PD
     return PD.diagnosis in valueSet
       or PD.diagnosis.getCondition().code in valueSet
Logic Definition Library Name: CQMCommon
/*
@description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter
 @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
*/
define fluent function principalDiagnosis(encounter Encounter):
singleton from (
     (encounter.claimDiagnosis()) CD
       where CD.type.includesCode("Principal Diagnosis")
   )
Logic Definition Library Name: CQMCommon
/*
@description: Returns the claim diagnosis elements for the given encounter
@comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
*/
define fluent function claimDiagnosis(encounter Encounter):
  encounter E
    let 
      claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))),
      claimItem: (claim.item I where I.encounter.references(E))
    return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence
Logic Definition Library Name: CQMCommon
/*
@description: Returns the Condition resource for the given reference
*/
define fluent function getCondition(reference Reference):
  singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))
Logic Definition Library Name: QICoreCommon
/*
@description: Returns true if the given reference is to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference Reference, resource Resource):
  resource.id = Last(Split(reference.reference, '/'))
Logic Definition Library Name: QICoreCommon
/*
@description: Returns true if any of the given references are to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(references List<Reference>, resource Resource):
  exists (references R where R.references(resource))
Logic Definition Library Name: QICoreCommon
/*
@description: Returns true if the given code is in the given codeList
@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.
*/
define fluent function includesCode(codeList List<Concept>, code Code):
  exists (codeList C where C ~ code)
Logic Definition Library Name: QICoreCommon
/*
@description: Returns true if the given reference is to the given resourceId
@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference Reference, resourceId String):
  resourceId = Last(Split(reference.reference, '/'))
Terminology
Code System Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
Code System Description: Code system SNOMEDCT
Resource: SNOMED CT (all versions)
Canonical URL: http://snomed.info/sct
Code System Description: Code system Diagnosis Type
Resource: Example Diagnosis Type Codes
Canonical URL: http://terminology.hl7.org/CodeSystem/ex-diagnosistype
Value Set Description: Value set Emergency Department Evaluation and Management Visit
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010
Value Set Description: Value set Triage
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279
Value Set Description: Value set Emergency Department Location
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.284
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.284
Value Set Description: Value set Emergency Department Treatment Location
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.278
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.278
Value Set Description: Value set Encounter Inpatient
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Value Set Description: Value set Decision to Admit to Hospital Inpatient
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.294
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.294
Value Set Description: Value set Emergency Department Evaluation
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.163
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.163
Value Set Description: Value set Admit Inpatient
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.164
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.164
Value Set Description: Value set Encounter Inpatient
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Value Set Description: Value set Observation Services
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Value Set Description: Value set Mental Health Diagnosis without Substance Use Disorders
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.285
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.285
Value Set Description: Value set Payer Type
Resource: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Direct Reference Code Display: Male (finding)
Code: 248153007
System: http://snomed.info/sct
Direct Reference Code Display: Female (finding)
Code: 248152002
System: http://snomed.info/sct
Direct Reference Code Display: Patient left without being seen (finding)
Code: 21541000119102
System: http://snomed.info/sct
Direct Reference Code Display: Patient bed assigned (finding)
Code: 5751000175101
System: http://snomed.info/sct
Direct Reference Code Display: Principal Diagnosis
Code: principal
System: http://terminology.hl7.org/CodeSystem/ex-diagnosistype
Dependencies
Dependency Description: Library SDE
Resource: Library/SupplementalDataElements|5.1.000
Canonical URL: Library/SupplementalDataElements|5.1.000
Dependency Description: Library FHIRHelpers
Resource: Library/FHIRHelpers|4.4.000
Canonical URL: Library/FHIRHelpers|4.4.000
Dependency Description: Library FHIRHelpers
Resource: Library/FHIRHelpers|4.4.000
Canonical URL: Library/FHIRHelpers|4.4.000
Dependency Description: Library CQMCommon
Resource: Library/CQMCommon|4.1.000
Canonical URL: Library/CQMCommon|4.1.000
Dependency Description: Library QICoreCommon
Resource: Library/QICoreCommon|4.0.000
Canonical URL: Library/QICoreCommon|4.0.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|4.0.000
Canonical URL: Library/QICoreCommon|4.0.000
Data Requirements
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type, period, status, status.value
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279
Data Requirement Type: Location
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-location
Data Requirement Type: ServiceRequest
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
Must Support Elements: code, status, status.value
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.294
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type, period, status, status.value
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010
Data Requirement Type: ServiceRequest
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
Must Support Elements: code, status, status.value, authoredOn, authoredOn.value, intent, intent.value
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.294
Data Requirement Type: Observation
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.163
Data Requirement Type: Observation
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-simple-observation
Must Support Elements: code, value
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.163
Data Requirement Type: ServiceRequest
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
Must Support Elements: code
Code Filter(s):
Path: code
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Data Requirement Type: ServiceRequest
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
Must Support Elements: code
Code Filter(s):
Path: code
Code(s): SNOMED CT 5751000175101: Patient bed assigned (finding)
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type, status, status.value, period
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
Data Requirement Type: Encounter
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
Must Support Elements: type, period, status, status.value
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
Data Requirement Type: Patient
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
Data Requirement Type: Claim
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-claim
Must Support Elements: status, status.value, use, use.value, item
Data Requirement Type: Condition
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis
Data Requirement Type: Condition
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
Data Requirement Type: Patient
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
Must Support Elements: url
Data Requirement Type: Coverage
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage
Must Support Elements: type, period
Code Filter(s):
Path: type
ValueSet: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
Data Requirement Type: Patient
Profile(s): http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
Must Support Elements: url, extension
Generated using version 0.4.8 of the sample-content-ig Liquid templates

Source

{
  "resourceType": "Measure",
  "id": "CMS1244FHIRECATHOQR",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure",
      "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",
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm",
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm",
      "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm"
    ]
  },
  "text": {
    "status": "extensions",
    "div": "<!-- snip (see above) -->"
  },
  "contained": [
    {
      "resourceType": "Library",
      "id": "effective-data-requirements",
      "extension": [
        {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "248153007",
            "display": "Male (finding)"
          }
        },
        {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "248152002",
            "display": "Female (finding)"
          }
        },
        {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "21541000119102",
            "display": "Patient left without being seen (finding)"
          }
        },
        {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "5751000175101",
            "display": "Patient bed assigned (finding)"
          }
        },
        {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype",
            "code": "principal",
            "display": "Principal Diagnosis"
          }
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "SupplementalDataElements"
            },
            {
              "url": "name",
              "valueString": "SDE Sex"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Sex\":\n  case\n    when Patient.sex = '248153007' then \"Male (finding)\"\n    when Patient.sex = '248152002' then \"Female (finding)\"\n    else null\n  end"
            },
            {
              "url": "displaySequence",
              "valueInteger": 0
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "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": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Evaluation and Management"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Evaluation and Management\":\n  [Encounter: \"Emergency Department Evaluation and Management Visit\"] EDEvalManagementVisit\n    where EDEvalManagementVisit.period ends during day of \"Measurement Period\"\n      and EDEvalManagementVisit.status = 'finished'"
            },
            {
              "url": "displaySequence",
              "valueInteger": 2
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Triage"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Triage\":\n  ( [Encounter: \"Triage\"] EDTriage\n      where EDTriage.period ends during day of \"Measurement Period\"\n        and EDTriage.status in { 'finished', 'triaged' }\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 3
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Triage Excluding Those Prior To ED Encounters"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Triage Excluding Those Prior To ED Encounters\":\n  \"ED Triage\" EDTriageinMP\n    where not exists ( \"ED Evaluation and Management\" EDEvalManagementInMP\n        where ( ( EDTriageinMP.period overlaps before EDEvalManagementInMP.period )\n            or ( EDTriageinMP.period during EDEvalManagementInMP.period )\n            or ( EDEvalManagementInMP.period during EDTriageinMP.period )\n            or ( EDTriageinMP.period ends 120 minutes or less before start of EDEvalManagementInMP.period )\n        )\n    )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 4
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Initial Population"
            },
            {
              "url": "statement",
              "valueString": "define \"Initial Population\":\n  \"ED Evaluation and Management\"\n    union \"ED Triage Excluding Those Prior To ED Encounters\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 5
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Denominator"
            },
            {
              "url": "statement",
              "valueString": "define \"Denominator\":\n  \"Initial Population\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 6
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Triage Before Evaluation Management"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Triage Before Evaluation Management\":\n  \"ED Triage\" EDTriageinMP\n    with \"Denominator\" EDEncounter\n      such that ( ( EDTriageinMP.period overlaps before EDEncounter.period )\n          or ( EDTriageinMP.period during EDEncounter.period )\n          or ( EDEncounter.period during EDTriageinMP.period )\n          or ( EDTriageinMP.period ends 120 minutes or less before start of EDEncounter.period )\n      )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 7
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Triage and Evaluation Management"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Triage and Evaluation Management\":\n  \"Denominator\"\n    union \"ED Triage Before Evaluation Management\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 8
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Time to Treatment Room Greater Than 60 Minutes"
            },
            {
              "url": "statement",
              "valueString": "define \"Time to Treatment Room Greater Than 60 Minutes\":\n  \"ED Evaluation and Management\" EDEvalManagementInMP\n    where \"EDArrivalTime\"(EDEvalManagementInMP) 61 minutes or more before \"EDTreatmentRoomTimeArrivalTime\"(EDEvalManagementInMP)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 9
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Arrival Left Without Being Seen"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Arrival Left Without Being Seen\":\n  \"Denominator\" EDEncounter\n    where EDEncounter.hospitalization.dischargeDisposition ~ \"Patient left without being seen (finding)\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 10
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CQMCommon"
            },
            {
              "url": "name",
              "valueString": "Inpatient Encounter"
            },
            {
              "url": "statement",
              "valueString": "define \"Inpatient Encounter\":\n  [Encounter: \"Encounter Inpatient\"] EncounterInpatient\n    where EncounterInpatient.status = 'finished'\n      and EncounterInpatient.period ends during day of \"Measurement Period\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 11
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED To Inpatient Order"
            },
            {
              "url": "statement",
              "valueString": "define \"ED To Inpatient Order\":\n  [ServiceRequest: \"Decision to Admit to Hospital Inpatient\"] AdmitIPOrder\n    where AdmitIPOrder.status in { 'active', 'completed' }"
            },
            {
              "url": "displaySequence",
              "valueInteger": 12
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Decision to Admit Encounter Order"
            },
            {
              "url": "statement",
              "valueString": "define \"Decision to Admit Encounter Order\":\n  \"Denominator\" EDEncounter\n    with CQMCommon.\"Inpatient Encounter\" EncounterInpatient\n      such that \"AdmitDecisionUsingEncounterOrder\"(EncounterInpatient) 241 minutes or more before \"EDDepartureTime\"(EDEncounter)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 13
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Assessment In ED"
            },
            {
              "url": "statement",
              "valueString": "define \"Assessment In ED\":\n  [\"ObservationClinicalResult\": \"Emergency Department Evaluation\"]\n    union [\"SimpleObservation\": \"Emergency Department Evaluation\"] ObsInED\n      where ObsInED.value as Concept in \"Admit Inpatient\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 14
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Decision to Admit Using Assessment"
            },
            {
              "url": "statement",
              "valueString": "define \"Decision to Admit Using Assessment\":\n  \"Denominator\" EDEncounter\n    with CQMCommon.\"Inpatient Encounter\" EncounterInpatient\n      such that \"AdmitDecisionUsingAssessment\"(EncounterInpatient) 241 minutes or more before \"EDDepartureTime\"(EDEncounter)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 15
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Inpatient Or Bed Assignment Encounter Order"
            },
            {
              "url": "statement",
              "valueString": "define \"Inpatient Or Bed Assignment Encounter Order\":\n  ( [ServiceRequest: \"Encounter Inpatient\"]\n    union [ServiceRequest: \"Patient bed assigned (finding)\"] ) IPRequest\n    where IPRequest.status in { 'active', 'completed' }"
            },
            {
              "url": "displaySequence",
              "valueInteger": 16
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Time of Admit Order Or Bed Assignment to Departure Greater Than 241 Minutes"
            },
            {
              "url": "statement",
              "valueString": "define \"Time of Admit Order Or Bed Assignment to Departure Greater Than 241 Minutes\":\n  \"Denominator\" EDEncounter\n    with CQMCommon.\"Inpatient Encounter\" InpatientEncounter\n      such that \"AdmitInpatientOrBedAssignmentEncounterOrder\"(InpatientEncounter) 241 minutes or more before \"EDDepartureTime\"(EDEncounter)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 17
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Admitted to Inpatient 241 Minutes or More Before Departure"
            },
            {
              "url": "statement",
              "valueString": "define \"Admitted to Inpatient 241 Minutes or More Before Departure\":\n  \"Denominator\" EDEncounter\n    with CQMCommon.\"Inpatient Encounter\" Inpatient\n      such that \"HoldingInEDAfterAdmission\"(Inpatient) 241 minutes or more before \"EDDepartureTime\"(EDEncounter)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 18
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Boarded Time Greater Than 240 Minutes"
            },
            {
              "url": "statement",
              "valueString": "define \"Boarded Time Greater Than 240 Minutes\":\n  \"Decision to Admit Encounter Order\"\n    union \"Decision to Admit Using Assessment\"\n    union \"Time of Admit Order Or Bed Assignment to Departure Greater Than 241 Minutes\"\n    union \"Admitted to Inpatient 241 Minutes or More Before Departure\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 19
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Observation Status"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Observation Status\":\n  [Encounter: \"Observation Services\"] EDObsEncounter\n    with \"Denominator\" EDEncounter\n      such that EDObsEncounter.period during EDEncounter.period\n        and EDObsEncounter.status = 'finished'"
            },
            {
              "url": "displaySequence",
              "valueInteger": 20
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Boarded Time Greater Than 240 Minutes and No Observation Stay"
            },
            {
              "url": "statement",
              "valueString": "define \"Boarded Time Greater Than 240 Minutes and No Observation Stay\":\n  ( \"Boarded Time Greater Than 240 Minutes\" Boarding\n      where not exists ( \"ED Observation Status\" EDO\n          where ( EDO.period during Boarding.period )\n      )\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 21
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Length of Stay Greater Than 480 Minutes"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Length of Stay Greater Than 480 Minutes\":\n  \"Denominator\" EDEncounter\n    where \"EDArrivalTime\"(EDEncounter) 481 minutes or more before \"EDDepartureTime\"(EDEncounter)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 22
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Length of Stay Greater Than 480 Minutes and No Observation Stay"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Length of Stay Greater Than 480 Minutes and No Observation Stay\":\n  ( \"ED Length of Stay Greater Than 480 Minutes\" EDStay\n      where not exists ( \"ED Observation Status\" EDObs\n          where ( EDObs.period during EDStay.period )\n      )\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 23
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Numerator"
            },
            {
              "url": "statement",
              "valueString": "define \"Numerator\":\n  \"Time to Treatment Room Greater Than 60 Minutes\"\n    union \"ED Arrival Left Without Being Seen\"\n    union \"Boarded Time Greater Than 240 Minutes and No Observation Stay\"\n    union \"ED Length of Stay Greater Than 480 Minutes and No Observation Stay\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 24
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Encounter or Triage of Patients 18 Years and Older"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Encounter or Triage of Patients 18 Years and Older\":\n  \"Denominator\" EDEncounter\n    where AgeInYearsAt(date from start of \"Measurement Period\") >= 18"
            },
            {
              "url": "displaySequence",
              "valueInteger": 25
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Adult With Mental Health Diagnosis"
            },
            {
              "url": "statement",
              "valueString": "define \"Adult With Mental Health Diagnosis\":\n  ( \"ED Encounter or Triage of Patients 18 Years and Older\" AdultEDEncounters\n      where ( AdultEDEncounters.hasPrincipalDiagnosisOf ( \"Mental Health Diagnosis without Substance Use Disorders\" ) )\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 26
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Stratification 4"
            },
            {
              "url": "statement",
              "valueString": "define \"Stratification 4\":\n  \"Adult With Mental Health Diagnosis\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 27
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "ED Encounter or Triage of Patients Less Than 18 Years"
            },
            {
              "url": "statement",
              "valueString": "define \"ED Encounter or Triage of Patients Less Than 18 Years\":\n  \"Denominator\" EDEncounter\n    where AgeInYearsAt(date from start of \"Measurement Period\") < 18"
            },
            {
              "url": "displaySequence",
              "valueInteger": 28
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Pediatric With Mental Health Diagnosis"
            },
            {
              "url": "statement",
              "valueString": "define \"Pediatric With Mental Health Diagnosis\":\n  ( \"ED Encounter or Triage of Patients Less Than 18 Years\" PediatricEDEncounters\n      where ( PediatricEDEncounters.hasPrincipalDiagnosisOf ( \"Mental Health Diagnosis without Substance Use Disorders\" ) )\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 29
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Stratification 3"
            },
            {
              "url": "statement",
              "valueString": "define \"Stratification 3\":\n  \"Pediatric With Mental Health Diagnosis\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 30
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Adult With No Mental Health Diagnosis"
            },
            {
              "url": "statement",
              "valueString": "define \"Adult With No Mental Health Diagnosis\":\n  ( \"ED Encounter or Triage of Patients 18 Years and Older\" AdultEDEncounters\n      where not ( AdultEDEncounters.hasPrincipalDiagnosisOf ( \"Mental Health Diagnosis without Substance Use Disorders\" ) )\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 31
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Stratification 2"
            },
            {
              "url": "statement",
              "valueString": "define \"Stratification 2\":\n  \"Adult With No Mental Health Diagnosis\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 32
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Pediatric With No Mental Health Diagnosis"
            },
            {
              "url": "statement",
              "valueString": "define \"Pediatric With No Mental Health Diagnosis\":\n  ( \"ED Encounter or Triage of Patients Less Than 18 Years\" PediatricEDEncounters\n      where not ( PediatricEDEncounters.hasPrincipalDiagnosisOf ( \"Mental Health Diagnosis without Substance Use Disorders\" ) )\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 33
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Stratification 1"
            },
            {
              "url": "statement",
              "valueString": "define \"Stratification 1\":\n  \"Pediatric With No Mental Health Diagnosis\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 34
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Denominator"
            },
            {
              "url": "statement",
              "valueString": "define \"Denominator\":\n  \"Initial Population\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 35
            }
          ],
          "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": 36
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "SDE Payer"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Payer\":\n  SDE.\"SDE Payer\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 37
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "Initial Population"
            },
            {
              "url": "statement",
              "valueString": "define \"Initial Population\":\n  \"ED Evaluation and Management\"\n    union \"ED Triage Excluding Those Prior To ED Encounters\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 38
            }
          ],
          "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": 39
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "SDE Ethnicity"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Ethnicity\":\n  SDE.\"SDE Ethnicity\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 40
            }
          ],
          "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": 41
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "SDE Race"
            },
            {
              "url": "statement",
              "valueString": "define \"SDE Race\":\n  SDE.\"SDE Race\""
            },
            {
              "url": "displaySequence",
              "valueInteger": 42
            }
          ],
          "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": 43
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToInterval"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.\"start\" is null then\n            Interval(period.\"start\".value, period.\"end\".value]\n        else\n            Interval[period.\"start\".value, period.\"end\".value]"
            },
            {
              "url": "displaySequence",
              "valueInteger": 44
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "EDArrivalTime"
            },
            {
              "url": "statement",
              "valueString": "define function \"EDArrivalTime\"(EDEncounter Encounter):\n  Last(\"ED Triage and Evaluation Management\".location Location\n      where Location.location.getLocation().type in \"Emergency Department Location\"\n        and start of Location.period is not null\n        and(Location.period ends 120 minutes or less before start of EDEncounter.period\n            or Location.period overlaps before EDEncounter.period\n            or EDEncounter.period overlaps before Location.period\n            or Location.period starts same as start of EDEncounter.period\n        )\n      return start of Location.period\n      sort ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 45
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CQMCommon"
            },
            {
              "url": "name",
              "valueString": "getLocation"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns the Location resource specified by the given reference.\n*/\ndefine fluent function getLocation(reference Reference):\n  singleton from (\n    [Location] L where reference.references(L)\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 46
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "QICoreCommon"
            },
            {
              "url": "name",
              "valueString": "references"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns true if the given reference is to the given resource\n@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(reference Reference, resource Resource):\n  resource.id = Last(Split(reference.reference, '/'))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 47
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "FHIRHelpers"
            },
            {
              "url": "name",
              "valueString": "ToConcept"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }"
            },
            {
              "url": "displaySequence",
              "valueInteger": 48
            }
          ],
          "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": 49
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "EDTreatmentRoomTimeArrivalTime"
            },
            {
              "url": "statement",
              "valueString": "define function \"EDTreatmentRoomTimeArrivalTime\"(EDEncounter Encounter):\n  First(EDEncounter.location Location\n      where Location.location.getLocation().type in \"Emergency Department Treatment Location\"\n        and start of Location.period is not null\n      return start of Location.period\n      sort ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 50
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "AdmitDecisionUsingEncounterOrder"
            },
            {
              "url": "statement",
              "valueString": "define function \"AdmitDecisionUsingEncounterOrder\"(EncounterInpatient Encounter):\n  Last(\"ED To Inpatient Order\" AdmitOrder\n      let LastEDVisit: \"LastEDEncounter\"(EncounterInpatient)\n      where AdmitOrder.authoredOn during LastEDVisit.period\n        and AdmitOrder.intent ~ 'order'\n      return AdmitOrder.authoredOn\n      sort ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 51
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "LastEDEncounter"
            },
            {
              "url": "statement",
              "valueString": "define function \"LastEDEncounter\"(EncounterInpatient Encounter):\n  Last(\"ED Evaluation and Management\" EDEvalManagementInMP\n      where EDEvalManagementInMP.period starts 1 day or less before or on start of EncounterInpatient.period\n        and EDEvalManagementInMP.period starts before start of EncounterInpatient.period\n        and EDEvalManagementInMP.period during day of \"Measurement Period\"\n        and EDEvalManagementInMP.status = 'finished'\n      sort by \n      end of period ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 52
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "EDDepartureTime"
            },
            {
              "url": "statement",
              "valueString": "define function \"EDDepartureTime\"(EDEncounter Encounter):\n  Last(\"ED Triage and Evaluation Management\".location Location\n      where Location.location.getLocation().type in \"Emergency Department Location\"\n        and \n        end of Location.period is not null\n        and(Location.period ends 120 minutes or less before start of EDEncounter.period\n            or Location.period overlaps before EDEncounter.period\n            or EDEncounter.period overlaps before Location.period\n            or Location.period starts same as start of EDEncounter.period\n        )\n      return \n      end of Location.period\n      sort ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 53
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "AdmitDecisionUsingAssessment"
            },
            {
              "url": "statement",
              "valueString": "define function \"AdmitDecisionUsingAssessment\"(EncounterInpatient Encounter):\n  Last(\"Assessment In ED\" EDEvaluation\n      let LastEDVisit: \"LastEDEncounter\"(EncounterInpatient)\n      where EDEvaluation.effective.toInterval() starts during LastEDVisit.period\n        and EDEvaluation.status in { 'final', 'amended', 'corrected' }\n      return start of EDEvaluation.effective.toInterval()\n      sort ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 54
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "AdmitInpatientOrBedAssignmentEncounterOrder"
            },
            {
              "url": "statement",
              "valueString": "define function \"AdmitInpatientOrBedAssignmentEncounterOrder\"(Encounter Encounter):\n  Last((\"Inpatient Or Bed Assignment Encounter Order\") AdmitInpatientOrder\n      let LastEDVisit: \"LastEDEncounter\"(Encounter)\n      where AdmitInpatientOrder.authoredOn during LastEDVisit.period\n      return AdmitInpatientOrder.authoredOn\n      sort ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 55
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CMS1244FHIRECATHOQR"
            },
            {
              "url": "name",
              "valueString": "HoldingInEDAfterAdmission"
            },
            {
              "url": "statement",
              "valueString": "define function \"HoldingInEDAfterAdmission\"(InpatientEncounter Encounter):\n  Last(CQMCommon.\"Inpatient Encounter\" AdmittedInpatient\n      let LastEDVisit: \"LastEDEncounter\"(InpatientEncounter)\n      where start of AdmittedInpatient.period during LastEDVisit.period\n      return start of AdmittedInpatient.period\n      sort ascending\n  )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 56
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CQMCommon"
            },
            {
              "url": "name",
              "valueString": "hasPrincipalDiagnosisOf"
            },
            {
              "url": "statement",
              "valueString": "/*\n @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet.\n @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information\n */\n define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet ValueSet):\n   (encounter.principalDiagnosis()) PD\n     return PD.diagnosis in valueSet\n       or PD.diagnosis.getCondition().code in valueSet"
            },
            {
              "url": "displaySequence",
              "valueInteger": 57
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CQMCommon"
            },
            {
              "url": "name",
              "valueString": "principalDiagnosis"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter\n @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information\n*/\ndefine fluent function principalDiagnosis(encounter Encounter):\nsingleton from (\n     (encounter.claimDiagnosis()) CD\n       where CD.type.includesCode(\"Principal Diagnosis\")\n   )"
            },
            {
              "url": "displaySequence",
              "valueInteger": 58
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CQMCommon"
            },
            {
              "url": "name",
              "valueString": "claimDiagnosis"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns the claim diagnosis elements for the given encounter\n@comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information\n*/\ndefine fluent function claimDiagnosis(encounter Encounter):\n  encounter E\n    let \n      claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))),\n      claimItem: (claim.item I where I.encounter.references(E))\n    return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence"
            },
            {
              "url": "displaySequence",
              "valueInteger": 59
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "QICoreCommon"
            },
            {
              "url": "name",
              "valueString": "references"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns true if any of the given references are to the given resource\n@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(references List<Reference>, resource Resource):\n  exists (references R where R.references(resource))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 60
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "QICoreCommon"
            },
            {
              "url": "name",
              "valueString": "includesCode"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns true if the given code is in the given codeList\n@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.\n*/\ndefine fluent function includesCode(codeList List<Concept>, code Code):\n  exists (codeList C where C ~ code)"
            },
            {
              "url": "displaySequence",
              "valueInteger": 61
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "CQMCommon"
            },
            {
              "url": "name",
              "valueString": "getCondition"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns the Condition resource for the given reference\n*/\ndefine fluent function getCondition(reference Reference):\n  singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 62
            }
          ],
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
        },
        {
          "extension": [
            {
              "url": "libraryName",
              "valueString": "QICoreCommon"
            },
            {
              "url": "name",
              "valueString": "references"
            },
            {
              "url": "statement",
              "valueString": "/*\n@description: Returns true if the given reference is to the given resourceId\n@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(reference Reference, resourceId String):\n  resourceId = Last(Split(reference.reference, '/'))"
            },
            {
              "url": "displaySequence",
              "valueInteger": 63
            }
          ],
          "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|5.1.000"
        },
        {
          "type": "depends-on",
          "display": "Library FHIRHelpers",
          "resource": "Library/FHIRHelpers|4.4.000"
        },
        {
          "type": "depends-on",
          "display": "Library FHIRHelpers",
          "resource": "Library/FHIRHelpers|4.4.000"
        },
        {
          "type": "depends-on",
          "display": "Library CQMCommon",
          "resource": "Library/CQMCommon|4.1.000"
        },
        {
          "type": "depends-on",
          "display": "Library QICoreCommon",
          "resource": "Library/QICoreCommon|4.0.000"
        },
        {
          "type": "depends-on",
          "display": "Library FHIRHelpers",
          "resource": "Library/FHIRHelpers|4.4.000"
        },
        {
          "type": "depends-on",
          "display": "Library QICoreCommon",
          "resource": "Library/QICoreCommon|4.0.000"
        },
        {
          "type": "depends-on",
          "display": "Code system SNOMEDCT",
          "resource": "http://snomed.info/sct"
        },
        {
          "type": "depends-on",
          "display": "Code system SNOMEDCT",
          "resource": "http://snomed.info/sct"
        },
        {
          "type": "depends-on",
          "display": "Code system Diagnosis Type",
          "resource": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype"
        },
        {
          "type": "depends-on",
          "display": "Value set Emergency Department Evaluation and Management Visit",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"
        },
        {
          "type": "depends-on",
          "display": "Value set Triage",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"
        },
        {
          "type": "depends-on",
          "display": "Value set Emergency Department Location",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.284"
        },
        {
          "type": "depends-on",
          "display": "Value set Emergency Department Treatment Location",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.278"
        },
        {
          "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 Decision to Admit to Hospital Inpatient",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.294"
        },
        {
          "type": "depends-on",
          "display": "Value set Emergency Department Evaluation",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.163"
        },
        {
          "type": "depends-on",
          "display": "Value set Admit Inpatient",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.164"
        },
        {
          "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 Mental Health Diagnosis without Substance Use Disorders",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.285"
        },
        {
          "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": "Stratification 4",
          "use": "out",
          "min": 0,
          "max": "*",
          "type": "Resource"
        },
        {
          "name": "Stratification 3",
          "use": "out",
          "min": 0,
          "max": "*",
          "type": "Resource"
        },
        {
          "name": "Stratification 2",
          "use": "out",
          "min": 0,
          "max": "*",
          "type": "Resource"
        },
        {
          "name": "Stratification 1",
          "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": "SDE Race",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "Resource"
        }
      ],
      "dataRequirement": [
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url",
            "value.value"
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url",
            "value.value"
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"
            }
          ]
        },
        {
          "type": "Location",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-location"
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"
            }
          ]
        },
        {
          "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.666.5.307"
            }
          ]
        },
        {
          "type": "ServiceRequest",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"
          ],
          "mustSupport": [
            "code",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.294"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"
            }
          ]
        },
        {
          "type": "ServiceRequest",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"
          ],
          "mustSupport": [
            "code",
            "status",
            "status.value",
            "authoredOn",
            "authoredOn.value",
            "intent",
            "intent.value"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.294"
            }
          ]
        },
        {
          "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.666.5.307"
            }
          ]
        },
        {
          "type": "Observation",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result"
          ],
          "mustSupport": [
            "code"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.163"
            }
          ]
        },
        {
          "type": "Observation",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-simple-observation"
          ],
          "mustSupport": [
            "code",
            "value"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.163"
            }
          ]
        },
        {
          "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.666.5.307"
            }
          ]
        },
        {
          "type": "ServiceRequest",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"
          ],
          "mustSupport": [
            "code"
          ],
          "codeFilter": [
            {
              "path": "code",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
            }
          ]
        },
        {
          "type": "ServiceRequest",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"
          ],
          "mustSupport": [
            "code"
          ],
          "codeFilter": [
            {
              "path": "code",
              "code": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "5751000175101",
                  "display": "Patient bed assigned (finding)"
                }
              ]
            }
          ]
        },
        {
          "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.666.5.307"
            }
          ]
        },
        {
          "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.666.5.307"
            }
          ]
        },
        {
          "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.666.5.307"
            }
          ]
        },
        {
          "type": "Encounter",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
          ],
          "mustSupport": [
            "type",
            "period",
            "status",
            "status.value"
          ],
          "codeFilter": [
            {
              "path": "type",
              "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
            }
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ]
        },
        {
          "type": "Claim",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-claim"
          ],
          "mustSupport": [
            "status",
            "status.value",
            "use",
            "use.value",
            "item"
          ]
        },
        {
          "type": "Claim",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-claim"
          ],
          "mustSupport": [
            "status",
            "status.value",
            "use",
            "use.value",
            "item"
          ]
        },
        {
          "type": "Condition",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"
          ]
        },
        {
          "type": "Condition",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"
          ]
        },
        {
          "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"
            }
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url"
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url",
            "extension"
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url"
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url",
            "extension"
          ]
        },
        {
          "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"
            }
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url",
            "extension"
          ]
        },
        {
          "type": "Patient",
          "profile": [
            "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
          ],
          "mustSupport": [
            "url",
            "extension"
          ]
        }
      ]
    }
  ],
  "extension": [
    {
      "id": "supplementalDataGuidance",
      "extension": [
        {
          "url": "guidance",
          "valueString": "For every patient evaluated by this measure also identify payer, race, ethnicity and sex"
        },
        {
          "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"
    },
    {
      "extension": [
        {
          "url": "term",
          "valueString": "Boarding"
        },
        {
          "url": "definition",
          "valueMarkdown": "The practice of holding inpatients in the emergency department after admission to the hospital because no hospital inpatient bed is available. (American College of Emergency Physicians [ACEP], 2018)."
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm"
    },
    {
      "extension": [
        {
          "url": "term",
          "valueString": "ED Observation"
        },
        {
          "url": "definition",
          "valueMarkdown": "Observation stays are inclusive of both ED observation care in which a patient initially evaluated in the ED is cared for under observation status for an extended period of time in the ED or in a care area dedicated to observation care, as well as hospital observation stays in which a patient initially evaluated in the ED is cared for in observation status often in a hospital bed used for both inpatient or observation status admissions. Because these two forms of observation stays cannot be easily distinguished in a standardized fashion in existing electronic health record data ontologies, for the purposes of this quality measure all observation stays have been considered an exclusion from both numerator criteria 3 and 4."
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm"
    },
    {
      "extension": [
        {
          "url": "term",
          "valueString": "Left Without Being Seen (LWBS)"
        },
        {
          "url": "definition",
          "valueMarkdown": "Patients arrive to the ED for evaluation and leave before seeing a physician, advanced practice nurse, or physician’s assistant."
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm"
    },
    {
      "extension": [
        {
          "url": "term",
          "valueString": "Mental Health"
        },
        {
          "url": "definition",
          "valueMarkdown": "Mental health generally refers to mental health diagnoses, life stressors and crises, and stress-related physical symptoms (American Medical Association [AMA], 2022). For this measure, mental health conditions will be defined separately from substance use disorders."
        }
      ],
      "url": "http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm"
    },
    {
      "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements",
      "valueReference": {
        "reference": "#effective-data-requirements"
      }
    },
    {
      "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/CMS1244FHIRECATHOQR",
  "identifier": [
    {
      "use": "usual",
      "type": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "short-name",
            "display": "Short Name"
          }
        ]
      },
      "system": "https://madie.cms.gov/measure/shortName",
      "value": "CMS1244FHIR"
    },
    {
      "use": "official",
      "type": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "version-independent",
            "display": "Version Independent"
          }
        ]
      },
      "system": "urn:ietf:rfc:3986",
      "value": "urn:uuid:1d711504-ebec-41de-81b0-d1993115eac2"
    },
    {
      "use": "official",
      "type": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "version-specific",
            "display": "Version Specific"
          }
        ]
      },
      "system": "urn:ietf:rfc:3986",
      "value": "urn:uuid:a91781e7-bf88-41a5-ae14-605b9243672e"
    },
    {
      "use": "official",
      "type": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "publisher",
            "display": "Publisher"
          }
        ]
      },
      "system": "https://madie.cms.gov/measure/cmsId",
      "value": "1244FHIR",
      "assigner": {
        "display": "CMS"
      }
    }
  ],
  "version": "0.4.001",
  "name": "CMS1244FHIRECATHOQR",
  "title": "Emergency Care Access & Timeliness (HOQR)FHIR",
  "status": "active",
  "experimental": false,
  "date": "2025-07-15T13:37:40+00:00",
  "publisher": "Centers for Medicare & Medicaid Services (CMS)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "https://www.cms.gov/"
        }
      ]
    }
  ],
  "description": "This measure assesses the variation in access and timeliness of emergency care to support hospital quality improvement for patients requiring emergency care in an emergency department (ED). This measure is designed to align with incentives to promote improved care both in EDs and the broader health system to help identify where patients do not receive timely access to emergency care.\n\nEmergency care access and timeliness gaps are inclusive of several concepts pertaining to boarding and crowding in an ED, including significantly longer ED wait times, higher left without being seen rates, longer boarding times, and longer total length of stay in the ED.",
  "usage": "Measure Score Calculation\nThe measure score is first calculated at the individual ED level as the proportion of ED visits where any one of the four outcomes occurred, as defined by the numerator. Scores will be standardized z-scores by ED case volume strata (defined in ED visit volume bands of 20,000 visits). For CMS Certification Numbers (CCNs) with more than one ED, volume-adjusted z-scores are then combined as a weighted average for that CCN. A z-score of greater than zero means worse performance and less than zero means better performance, compared to like EDs.\n\nFor the purposes of this measure, a decision to admit can be captured using any of the following: \n  - an evaluation that results in a decision to admit\n  - an order to admit to inpatient\n  - an order for a bed assignment\n  - start of inpatient admission\n\nThis dQM is an episode-based measure. An episode is defined as an ED visit that ends during the measurement period. \n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS1244v1. \n\nPlease refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).",
  "copyright": "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.\n\nThis material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. All rights reserved.\n\nICD-10 copyright 2024 World Health Organization. All Rights Reserved.\n\nCPT(R) contained in the Measure specifications is copyright 2004-2024 American Medical Association.",
  "effectivePeriod": {
    "start": "2027-01-01",
    "end": "2027-12-31"
  },
  "author": [
    {
      "name": "Acumen, LLC",
      "telecom": [
        {
          "system": "url",
          "value": "https://www.acumenllc.com/"
        }
      ]
    }
  ],
  "relatedArtifact": [
    {
      "type": "citation",
      "citation": "Citation - American College of Emergency Physicians. (2018). Definition of Boarded Patient. Policy Statements. https://www.acep.org/patient-care/policy-statements/definition-of-boarded-patient\n"
    },
    {
      "type": "citation",
      "citation": "Citation - American Medical Association. (2022). What is Behavioral Health. https://www.ama-assn.org/delivering-care/public-health/what-behavioral-health\n"
    },
    {
      "type": "citation",
      "citation": "Citation - Centers for Disease Control and Prevention. (2021). Emergency Department Visits. https://www.cdc.gov/nchs/fastats/emergency-department.htm \n"
    },
    {
      "type": "citation",
      "citation": "Citation - eCQI Resource Center. (n.d). Median Admit Decision Time to ED Departure Time for Admitted Patients.\n"
    }
  ],
  "library": [
    "https://madie.cms.gov/Library/CMS1244FHIRECATHOQR"
  ],
  "disclaimer": "These performance specifications are not clinical guidelines, do not establish a standard of medical care, and have 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].",
  "rationale": "This measure aims to reduce patient harm and improve outcomes for patients requiring emergency care in an ED by addressing the variation in emergency care and measuring access and timeliness of emergency care. There are long-standing concerns about parameters that impact access and timeliness of care in the ED. Currently, there are no national metrics to assess the proportion of patients impacted by access and timeliness of ED care.",
  "clinicalRecommendationStatement": "The goal of the Emergency Care Access & Timeliness (ECAT) measure is to assess and improve the safety of the 140 million ED visits that patients experience each year (Centers for Disease Control and Prevention [CDC], 2021). Limitations in access and timeliness of emergency care have been shown to be associated with harm, such as increases in mortality, delays in care, preventable errors, poor patient experience, and staff burnout. These quality limitations are also associated with increased costs of care. The ECAT measure under consideration is intended for use in CMS’s Hospital Outpatient Quality Reporting (HOQR) program. The numerator is comprised of all ED visits with a quality gap in access as defined in the numerator criteria. Challenges related to emergency care access and timeliness have been increasing and have prompted public calls for action. This measure improves upon previous efforts as it measures the mean instead of the median to highlight the presence of extreme quality gaps, and captures several indicators of quality gaps by using multiple numerator criteria. Implementation of this measure, which captures multiple components of access and timeliness, can help identify facilities where patients do not receive timely access to emergency care as defined in the numerator criteria. This measure, therefore, could positively impact millions of patients who seek treatment in the ED and help address long-standing disparities in emergency care, including for patients with mental health diagnoses.",
  "group": [
    {
      "id": "Group_1",
      "extension": [
        {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-scoring",
                "code": "proportion",
                "display": "Proportion"
              }
            ]
          }
        },
        {
          "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": "Decreased score indicates improvement"
              }
            ]
          }
        }
      ],
      "population": [
        {
          "id": "InitialPopulation_1",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              }
            ]
          },
          "description": "All ED visits that end during the measurement period for all patients",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Initial Population"
          }
        },
        {
          "id": "Denominator_1",
          "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": "Numerator_1",
          "code": {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              }
            ]
          },
          "description": "The numerator is comprised of ED visits meeting the denominator criteria and where the patient experiences any of the following quality gaps in access:\n1. The patient waited longer than 60 minutes (1 hour) after arrival to the ED to be placed in a treatment room or dedicated treatment area that allows for audiovisual privacy during history-taking and physical examination, or \n2. The patient left the ED without being evaluated, or  \n3. The patient boarded (time from Decision to Admit order to ED departure for admitted patients) in the ED for longer than 240 minutes (4 hours), or\n4. The patient had an ED length of stay (LOS) (time from ED arrival to ED departure as defined by the ED departure timestamp indicating when the patient physically left the ED) of longer than 480 minutes (8 hours).\n\nED encounters with ED observation stays are excluded from criteria #3 (boarding) and #4 (ED LOS). To clarify, patients who have a ‘decision to admit’ after an ED observation stay remain excluded from criteria #3 (boarded) calculations. ",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Numerator"
          }
        }
      ],
      "stratifier": [
        {
          "id": "Stratification_1_1",
          "extension": [
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "initial-population",
                    "display": "Initial Population"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "denominator",
                    "display": "Denominator"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "numerator",
                    "display": "Numerator"
                  }
                ]
              }
            }
          ],
          "description": "All patients aged less than 18 years seen in the ED who do not have an ED encounter principal diagnosis consistent with mental health diagnosis.  Patients who have an ED encounter principal diagnosis consistent with substance use disorders will be included in this stratification.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 1"
          }
        },
        {
          "id": "Stratification_1_2",
          "extension": [
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "initial-population",
                    "display": "Initial Population"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "denominator",
                    "display": "Denominator"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "numerator",
                    "display": "Numerator"
                  }
                ]
              }
            }
          ],
          "description": "All patients aged 18 years and older seen in the ED who do not have an ED encounter principal diagnosis consistent with mental health diagnosis.  Patients who have an ED encounter principal diagnosis consistent with substance use disorders will be included in this stratification.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 2"
          }
        },
        {
          "id": "Stratification_1_3",
          "extension": [
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "initial-population",
                    "display": "Initial Population"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "denominator",
                    "display": "Denominator"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "numerator",
                    "display": "Numerator"
                  }
                ]
              }
            }
          ],
          "description": "All patients aged less than 18 years seen in the ED who have an ED encounter principal diagnosis consistent with mental health diagnosis.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 3"
          }
        },
        {
          "id": "Stratification_1_4",
          "extension": [
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "initial-population",
                    "display": "Initial Population"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "denominator",
                    "display": "Denominator"
                  }
                ]
              }
            },
            {
              "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code": "numerator",
                    "display": "Numerator"
                  }
                ]
              }
            }
          ],
          "description": "All patients aged 18 years and older seen in the ED who have an ED encounter principal diagnosis consistent with mental health diagnosis.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 4"
          }
        }
      ]
    }
  ],
  "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"
      }
    }
  ]
}