eCQM QICore Content Implementation Guide
2024.0.0 - CI Build

eCQM QICore Content Implementation Guide, published by cqframework. This guide is not an authorized publication; it is the continuous build for version 2024.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/ecqm-content-qicore-2024/ and changes regularly. See the Directory of published versions

: Emergency Care Capacity and Quality (REHQR) FHIR - XML Representation

Active as of 2026-03-13

Raw xml | Download


<Measure xmlns="http://hl7.org/fhir">
  <id value="CMS1264ECCQREHQRFHIR"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm"/>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
    <table class="grid dict">
        
            <tr>
                <th scope="row"><b>Title: </b></th>
                <td style="padding-left: 4px;">Emergency Care Capacity and Quality (REHQR) FHIR</td>
            </tr>
        

        

        
            <tr>
                <th scope="row"><b>Id: </b></th>
                <td style="padding-left: 4px;">CMS1264ECCQREHQRFHIR</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Version: </b></th>
                <td style="padding-left: 4px;">0.3.001</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Url: </b></th>
                <td style="padding-left: 4px;"><a href="Measure-CMS1264ECCQREHQRFHIR.html">Emergency Care Capacity and Quality (REHQR) FHIR</a></td>
            </tr>
        

        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                Short Name Identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>CMS1264FHIR</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                Version Independent Identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>urn:uuid:eb3e269b-97ef-4548-9e87-c89b25789184</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                Version Specific Identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>urn:uuid:2074450c-e3eb-49a0-bc87-0f63344a1962</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                Publisher (CMS) Identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>1264FHIR</span>
                        </p>
                    
                </td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Effective Period: </b></th>
                <td style="padding-left: 4px;">2026-01-01..2026-12-31</td>
            </tr>
        

        

        

        
            <tr>
                <th scope="row"><b>Publisher: </b></th>
                <td style="padding-left: 4px;">Centers for Medicare &amp; Medicaid Services (CMS)</td>
            </tr>
        

        
        <tr>
            <th scope="row"><b>Author: </b></th>
            <td style="padding-left: 4px;">Acumen, LLC</td>
        </tr>
        

        

        
            <tr>
                <th scope="row"><b>Description: </b></th>
                <td style="padding-left: 4px;"><div><p>This measure assesses the variation in capacity and quality of emergency care to support rural emergency hospital (REH) 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 appropriate or timely access to emergency care.</p>
<p>Emergency care capacity and quality 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.</p>
</div></td>
            </tr>
        

        

        

        

        

        

        
            <tr>
                <th scope="row"><b>Purpose: </b></th>
                <td style="padding-left: 4px;"><div><p>UNKNOWN</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Copyright: </b></th>
                <td style="padding-left: 4px;"><div><p>Limited proprietary coding is contained in these specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets.</p>
<p>This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. All rights reserved.</p>
<p>ICD-10 copyright 2024 World Health Organization. All Rights Reserved.</p>
<p>CPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association.</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Disclaimer: </b></th>
                <td style="padding-left: 4px;"><div><p>These performance specifications are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.</p>
<p>THE MEASURES AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.</p>
<p>Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</p>
</div></td>
            </tr>
        

        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Rationale: </b></th>
            <td style="padding-left: 4px;"><div><p>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 the capacity and quality of emergency care. There are long-standing concerns about parameters that impact the quality and timeliness of care in the ED. Currently, there are no national metrics to assess the proportion of patients impacted by the quality of timely ED care.</p>
</div></td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Clinical recommendation statement: </b></th>
            <td style="padding-left: 4px;"><div><p>Changes in care provision and workflow are anticipated from implementing this Emergency Care Capacity and Quality (ECCQ) REH eCQM. To improve time to place a patient in a treatment space (as defined by the numerator below), changes in care may include improving patient flow processes, triaging interventions (such as inclusion of predictive models or different clinical deployment), or increased availability and access to outpatient clinical and social services. Other changes in care may include increases in local healthcare capacity including mental health care (mental health liaisons, co-located mental health services, or specialist psychiatry services), and use of ‘hospital home’ care models. Furthermore, changes to the following may also be considered: staffing models, ED observation units, diagnostic testing and imaging processes, or physical changes to ED layout.</p>
<p>Such changes may result in the following: decreased waiting room time, decreased door to provider times, higher proportion of patients seen within 1 hour, decrease in proportion of patients who leave without being evaluated, better management of mental health diagnoses, reduced length of stay in the ED, decreased turnaround time for diagnostic tests and imaging, improved time to treatment, and decreased ambulance diversion.</p>
<p>Changes in clinician or patient-reported outcomes and costs may include the following: improved patient experience, decrease in morbidity and mortality, increased ED revenue, and improved patient outcomes.</p>
</div></td>
        </tr>
        

        

        
            <tr>
                <th scope="row"><b>Guidance (Usage): </b></th>
                <td style="padding-left: 4px;">Measure Score Calculation
The measure score is 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. For CMS Certification Numbers (CCNs) with more than one ED, scores are combined as a weighted average for that CCN. 

This eCQM 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: CMS1264v1. 

Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</td>
            </tr>
        

        
            
                <tr>
                    <th scope="row"><b>Population Criteria: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <table class="grid-dict">
                                
                                    <tr>
                                        <th><b>6758b76046b6174510cfef6e</b></th>
                                    </tr>
                                
                                
                                    <tr>
                                        <td>Initial Population:</td>

                                        
                                            
                                                <td>All ED visits at REHs that end during the measurement period for all patients.</td>
                                            
                                        

                                    </tr>
                                
                                    <tr>
                                        <td>Denominator:</td>

                                        
                                            
                                                <td>Equals Initial Population</td>
                                            
                                        

                                    </tr>
                                
                                    <tr>
                                        <td>Numerator:</td>

                                        
                                            
                                                <td>The numerator is comprised of any ED visit in the denominator with any quality gap in access; if the patient experiences any of the following during a visit, the visit is included in the numerator:
1. The patient waited longer than 60 minutes (1 hour) after arrival to 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, if transferred, boarded 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 (boarded) and #4 (ED LOS)</td>
                                            
                                        

                                    </tr>
                                
                                
                                  <tr><b>Stratifier Criteria: </b></tr>
                                    
                                        <tr>
                                            
                                                <td>Stratum:</td>
                                            

                                            
                                                <td>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.</td>
                                            
                                        </tr>
                                    
                                        <tr>
                                            
                                                <td>Stratum:</td>
                                            

                                            
                                                <td>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.</td>
                                            
                                        </tr>
                                    
                                        <tr>
                                            
                                                <td>Stratum:</td>
                                            

                                            
                                                <td>All patients aged less than 18 years seen in the ED who have an ED encounter principal diagnosis consistent with mental health diagnosis.</td>
                                            
                                        </tr>
                                    
                                        <tr>
                                            
                                                <td>Stratum:</td>
                                            

                                            
                                                <td>All patients aged 18 years and older seen in the ED who have an ED encounter principal diagnosis consistent with mental health diagnosis.</td>
                                            
                                        </tr>
                                    
                                
                            </table>
                        
                    </td>
                </tr>
            
        

        
            <tr>
                <th scope="row"><b> Supplemental Data Elements: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            
                                <p>SDE Ethnicity</p>
                            
                        
                    
                        
                            
                                <p>SDE Payer</p>
                            
                        
                    
                        
                            
                                <p>SDE Race</p>
                            
                        
                    
                        
                            
                                <p>SDE Sex</p>
                            
                        
                    
                        
                            
                                <p>SDE Address</p>
                            
                        
                    
                </td>
            </tr>
        

        

        
            <tr>
                <th scope="row">
                    <b> Supplemental Data Guidance
                        : </b></th>
                <td style="padding-left: 4px;"> For every patient evaluated by this measure also identify payer, race, ethnicity and sex </td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Libraries: </b></th>
                <td style="padding-left: 4px;">
                    <table class="grid-dict">
                        
                            <tr>
                                <td><a href="Library-CMS1264ECCQREHQRFHIR.html">CMS1264ECCQREHQRFHIR</a></td>
                            </tr>
                        
                    </table>
                </td>
            </tr>
        

        

        
            
                <tr>
                    <th scope="row"><b>Terminology and Other Dependencies: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <li><code>Library/SupplementalDataElements|3.5.000</code></li>
                        
                            <li><code>Library/FHIRHelpers|4.4.000</code></li>
                        
                            <li><code>Library/CQMCommon|2.2.000</code></li>
                        
                            <li><code>Library/QICoreCommon|2.1.000</code></li>
                        
                            <li><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">AdministrativeGender</a></li>
                        
                            <li><a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">SNOMED CT (all versions)</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-diagnosis-role.html">Diagnosis Role</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1010/expansion">Emergency Department Visit</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.279/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.284/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.284</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.278/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.278</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.286/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.286</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1170.22/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.22</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.285/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.285</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></li>
                        
                    </td>
                </tr>
                <tr>
                    <th scope="row"><b>Parameters:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr>
                                <th><b>name</b></th>
                                <th><b>use</b></th>
                                <th><b>min</b></th>
                                <th><b>max</b></th>
                                <th><b>type</b></th>
                            </tr>
                            
                                <tr>
                                    <td>Measurement Period</td>
                                    <td>In</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Period</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Sex</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Coding</td>
                                </tr>
                            
                                <tr>
                                    <td>Numerator</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratification 1: Pediatric With No Mental Health Diagnosis</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Denominator</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratification 4: Adult With Mental Health Diagnosis</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratification 2: Adult With No Mental Health Diagnosis</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Payer</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Initial Population</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Stratification 3: Pediatric With Mental Health Diagnosis</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Ethnicity</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Race</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Resource</td>
                                </tr>
                            
                        </table>
                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>DataRequirements:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr>
                                <th><b>Resource Type</b></th>
                                <th><b>Resource Elements</b></th>
                                <th><b>Valueset Name</b></th>
                                <th><b>Valueset</b></th>
                            </tr>
                            
                                <tr>
                                    <td>Patient(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html">QICorePatient</a>)</td>
                                    <td>
                                        
                                            ethnicity
                                        
                                            race
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            location
                                        
                                            location.type
                                        
                                            status
                                        
                                            status.value
                                        
                                            rank
                                        
                                            rank.value
                                        
                                            use
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Emergency Department Evaluation and Management Visit
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1010/expansion">Emergency Department Visit</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            location
                                        
                                            location.type
                                        
                                            status
                                        
                                            status.value
                                        
                                            rank
                                        
                                            rank.value
                                        
                                            use
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Triage
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.279/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            hospitalization
                                        
                                            hospitalization.dischargeDisposition
                                        
                                            location
                                        
                                            location.type
                                        
                                            status
                                        
                                            status.value
                                        
                                            rank
                                        
                                            rank.value
                                        
                                            use
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Triage
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.279/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            status
                                        
                                            status.value
                                        
                                            location
                                        
                                            location.type
                                        
                                            rank
                                        
                                            rank.value
                                        
                                            use
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Emergency Department Evaluation and Management Visit
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1010/expansion">Emergency Department Visit</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            status
                                        
                                            status.value
                                        
                                            location
                                        
                                            location.type
                                        
                                            rank
                                        
                                            rank.value
                                        
                                            use
                                        
                                            condition
                                        
                                            condition.reference
                                        
                                            condition.reference.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Emergency Department Observation
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1170.22/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.22</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Location(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-location.html">QICoreLocation</a>)</td>
                                    <td>
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>ServiceRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-servicerequest.html">QICoreServiceRequest</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            authoredOn
                                        
                                            authoredOn.value
                                        
                                            intent
                                        
                                            intent.value
                                        
                                            status
                                        
                                            status.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Decision to Transfer
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.286/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.286</a></td>
                                </tr>
                            
                                <tr>
                                    <td>ServiceRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-servicerequest.html">QICoreServiceRequest</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            authoredOn
                                        
                                            authoredOn.value
                                        
                                            status
                                        
                                            status.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Emergency Department Observation
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1170.22/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.22</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Coverage(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html">QICoreCoverage</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Payer Type
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></td>
                                </tr>
                            
                        </table>
                    </td>
                </tr>

                
                    <tr>
                        <th scope="row"><b>Direct Reference Codes:</b></th>
                        <td style="padding-left: 4px;">
                            <table class="grid-dict">
                                <tr>
                                    <th><b>display</b></th>
                                    <th><b>code</b></th>
                                    <th><b>system</b></th>
                                </tr>
                                
                                    <tr>
                                        <td>Male</td>
                                        <td>M</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Female</td>
                                        <td>F</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Patient left without being seen (finding)</td>
                                        <td>21541000119102</td>
                                        <td><a href="https://browser.ihtsdotools.org/">http://snomed.info/sct</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Billing</td>
                                        <td>billing</td>
                                        <td><a href="http://terminology.hl7.org/5.5.0/CodeSystem-diagnosis-role.html">http://terminology.hl7.org/CodeSystem/diagnosis-role</a></td>
                                    </tr>
                                
                            </table>
                        </td>
                    </tr>
                

                
                <tr>
                    <th scope="row"><b>Logic Definitions:</b></th>
                    <td style="padding-left: 4px;">
                        
                        <table class="grid-dict">
                            <tr>
                                <th><b>Group</b></th>
                                <th><b>Scoring</b></th>
                                <th><b>Population Criteria</b></th>
                                <th><b>Expression</b></th>
                            </tr>
                            <tr>
                                
                                <td> 6758b76046b6174510cfef6e </td>
                                <td colspan="3" style="padding-left: 4px;">
                                    
                                        <b>Group scoring:</b>
                                        
                                            <span>  proportion </span>
                                        
                                    

                                    

                                    

                                    

                                    
                                        <tr>
                                        
                                            <th scope="row"><b>Type: </b></th>
                                            <td style="padding-left: 4px;">
                                                
                                                    
                                                        <p style="margin-bottom: 5px;">
                                                            <span>Outcome </span>
                                                        </p>
                                                    
                                                
                                                
                                            </td>
                                        
                                        </tr>
                                    

                                    

                                    
                                    <tr>
                                        <th scope="row"><b>Rate Aggregation: </b></th>
                                        <td colspan="3" style="padding-left: 4px;">None</td>
                                    </tr>
                                    

                                    
                                        <tr>
                                            <th scope="row"><b>Improvement Notation: </b></th>
                                            <td style="padding-left: 4px;">
                                            
                                                
                                                    
                                                        <p style="margin-bottom: 5px;">
                                                            <span>Decreased score indicates improvement </span>
                                                        </p>
                                                    
                                                
                                                
                                            
                                            </td>
                                        </tr>
                                    

                                    

                                </td>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Initial Population</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Initial Population&quot;:
  &quot;ED Encounter&quot;
    union &quot;ED Triage&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Denominator</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Initial Population&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Numerator</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Time to Treatment Room Greater Than 60 Minutes&quot;
    union &quot;ED Arrival Left Without Being Seen&quot;
    union &quot;Boarded Time Greater Than 240 Minutes and No Observation Stay&quot;
    union &quot;ED Length of Stay Greater Than 480 Minutes and No Observation Stay&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><code class="language-cql"/></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><code class="language-cql"/></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><code class="language-cql"/></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td/>
                                    <td>
                                        
                                            <pre><code class="language-cql"/></pre>
                                        
                                    </td>
                                </tr>
                                
                            
                            </tr>
                        </table>
                

                <table class="grid-dict">
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Sex</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>SDE Sex</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Encounter</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Encounter&quot;:
  [Encounter: &quot;Emergency Department Evaluation and Management Visit&quot;] EDEncounter
    where EDEncounter.period ends during day of &quot;Measurement Period&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Triage</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Triage&quot;:
  [Encounter: &quot;Triage&quot;] EDTriage
    where EDTriage.period ends during day of &quot;Measurement Period&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Initial Population</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  &quot;ED Encounter&quot;
    union &quot;ED Triage&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Denominator</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Initial Population&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Time to Treatment Room Greater Than 60 Minutes</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Time to Treatment Room Greater Than 60 Minutes&quot;:
  &quot;Denominator&quot; EDEncounter
    where &quot;EDArrivalTime&quot;(EDEncounter) 61 minutes or more before &quot;EDTreatmentRoomTimeArrivalTime&quot;(EDEncounter)</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Arrival Left Without Being Seen</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Arrival Left Without Being Seen&quot;:
  &quot;ED Triage&quot; EDTriage
    where EDTriage.hospitalization.dischargeDisposition ~ &quot;Patient left without being seen (finding)&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Boarded Time Greater Than 240 Minutes</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Boarded Time Greater Than 240 Minutes&quot;:
  &quot;Denominator&quot; EDEncounter
    where &quot;TransferDecisionUsingOrder&quot;() 241 minutes or more before &quot;EDDepartureTime&quot;(EDEncounter)</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Observation Encounter Status</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Observation Encounter Status&quot;:
  [Encounter: &quot;Emergency Department Observation&quot;] EDObsEncounter
    with &quot;Denominator&quot; EDEncounter
      such that start of EDObsEncounter.period during EDEncounter.period
        and EDEncounter.status = 'finished'
        and EDObsEncounter.status = 'finished'</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Observation Order Status</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Observation Order Status&quot;:
  [ServiceRequest: code in &quot;Emergency Department Observation&quot;] EDObsOrder
    with &quot;Denominator&quot; EDEncounter
      such that EDObsOrder.authoredOn during EDEncounter.period
        and EDEncounter.status = 'finished'
        and EDObsOrder.status = 'active'</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Observation Status</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Observation Status&quot;:
  ( &quot;ED Observation Encounter Status&quot;
    union &quot;ED Observation Order Status&quot; ) EDObservation
    with &quot;Denominator&quot; EDStay
      such that EDObservation.period during EDStay.period
        or ( EDObservation.authoredOn during EDStay.period )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Boarded Time Greater Than 240 Minutes and No Observation Stay</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Boarded Time Greater Than 240 Minutes and No Observation Stay&quot;:
  ( &quot;Boarded Time Greater Than 240 Minutes&quot; Boarding
      where not exists ( &quot;ED Observation Status&quot; EDO
          where ( EDO.period starts during Boarding.period
              or EDO.authoredOn during Boarding.period
          )
      )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Length of Stay Greater Than 480 Minutes</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Length of Stay Greater Than 480 Minutes&quot;:
  &quot;Denominator&quot; EDEncounter
    where &quot;EDArrivalTime&quot;(EDEncounter) 481 minutes or more before &quot;EDDepartureTime&quot;(EDEncounter)</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Length of Stay Greater Than 480 Minutes and No Observation Stay</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Length of Stay Greater Than 480 Minutes and No Observation Stay&quot;:
  ( &quot;ED Length of Stay Greater Than 480 Minutes&quot; EDStay
      where not exists ( &quot;ED Observation Status&quot; EDO
          where ( EDO.period starts during EDStay.period
              or EDO.authoredOn during EDStay.period
          )
      )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Numerator</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Time to Treatment Room Greater Than 60 Minutes&quot;
    union &quot;ED Arrival Left Without Being Seen&quot;
    union &quot;Boarded Time Greater Than 240 Minutes and No Observation Stay&quot;
    union &quot;ED Length of Stay Greater Than 480 Minutes and No Observation Stay&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Encounter or Triage of Patients Less Than 18 Years</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Encounter or Triage of Patients Less Than 18 Years&quot;:
  &quot;Denominator&quot; EDEncounter
    where AgeInYearsAt(date from start of EDEncounter.period) &lt; 18</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Stratification 1: Pediatric With No Mental Health Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Stratification 1: Pediatric With No Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients Less Than 18 Years&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where not ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>ED Encounter or Triage of Patients 18 Years and Older</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;ED Encounter or Triage of Patients 18 Years and Older&quot;:
  &quot;Denominator&quot; EDEncounter
    where AgeInYearsAt(date from start of EDEncounter.period) &gt;= 18</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Stratification 4: Adult With Mental Health Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Stratification 4: Adult With Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients 18 Years and Older&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Stratification 2: Adult With No Mental Health Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Stratification 2: Adult With No Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients 18 Years and Older&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where not ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Payer</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>SDE Payer</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>Stratification 3: Pediatric With Mental Health Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Stratification 3: Pediatric With Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients Less Than 18 Years&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Ethnicity</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>SDE Ethnicity</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Race</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>SDE Race</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToInterval</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period.&quot;start&quot; is null then
            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]
        else
            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>EDArrivalTime</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define function &quot;EDArrivalTime&quot;(EDEncounter Encounter):
  Last(EDEncounter.location Location
      where Location.location.getLocation().type in &quot;Emergency Department Location&quot;
        and start of Location.period is not null
      return start of Location.period
      sort ascending
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CQMCommon</td>
                            
                            
                                <td>getLocation</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns the Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference ):
  singleton from (
    [Location] L where L.id = reference.reference.getId()
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>getId</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
@comment: This function can be used to determine the logical id of a given resource. It can be used in
a single-server environment to trace references. However, this function does not attempt to resolve
or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToConcept</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToCode</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>EDTreatmentRoomTimeArrivalTime</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define function &quot;EDTreatmentRoomTimeArrivalTime&quot;(EDEncounter Encounter):
  Last(EDEncounter.location Location
      where Location.location.getLocation().type in &quot;Emergency Department Treatment Location&quot;
        and start of Location.period is not null
      return start of Location.period
      sort ascending
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>TransferDecisionUsingOrder</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define function &quot;TransferDecisionUsingOrder&quot;():
  Last([ServiceRequest: code in &quot;Decision to Transfer&quot;] TransferOrder
      with [Encounter: &quot;Emergency Department Evaluation and Management Visit&quot;] EDVisit
        such that TransferOrder.authoredOn during EDVisit.period
          and TransferOrder.intent = 'order'
          and TransferOrder.status = 'completed'
          and EDVisit.status = 'finished'
      return TransferOrder.authoredOn
      sort ascending
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CMS1264ECCQREHQRFHIR</td>
                            
                            
                                <td>EDDepartureTime</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define function &quot;EDDepartureTime&quot;(EDEncounter Encounter):
  Last(EDEncounter.location Location
      where Location.location.getLocation().type in &quot;Emergency Department Location&quot;
        and 
        end of Location.period is not null
      return 
      end of Location.period
      sort ascending
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>CQMCommon</td>
                            
                            
                                <td>principalDiagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns the condition that is specified as the principal diagnosis for the encounter
*/
define fluent function principalDiagnosis(Encounter Encounter ):
	singleton from ((Encounter.diagnosis D where D.rank = 1 and D.use ~ &quot;Billing&quot;) PD
      return singleton from ([Condition] C where C.id = PD.condition.reference.getId())
	)</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToString</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
                                </td>
                            
                        </tr>
                    
                    </table>
                </td>
            </tr>
            
        
    

    </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="M"/>
          <display value="Male"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="F"/>
          <display value="Female"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="21541000119102"/>
          <display value="Patient left without being seen (finding)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/diagnosis-role"/>
          <code value="billing"/>
          <display value="Billing"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="ED Encounter"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Encounter&quot;:
  [Encounter: &quot;Emergency Department Evaluation and Management Visit&quot;] EDEncounter
    where EDEncounter.period ends during day of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="ED Triage"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Triage&quot;:
  [Encounter: &quot;Triage&quot;] EDTriage
    where EDTriage.period ends during day of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Initial Population&quot;:
  &quot;ED Encounter&quot;
    union &quot;ED Triage&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator&quot;:
  &quot;Initial Population&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Time to Treatment Room Greater Than 60 Minutes"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Time to Treatment Room Greater Than 60 Minutes&quot;:
  &quot;Denominator&quot; EDEncounter
    where &quot;EDArrivalTime&quot;(EDEncounter) 61 minutes or more before &quot;EDTreatmentRoomTimeArrivalTime&quot;(EDEncounter)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="ED Arrival Left Without Being Seen"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Arrival Left Without Being Seen&quot;:
  &quot;ED Triage&quot; EDTriage
    where EDTriage.hospitalization.dischargeDisposition ~ &quot;Patient left without being seen (finding)&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Boarded Time Greater Than 240 Minutes"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Boarded Time Greater Than 240 Minutes&quot;:
  &quot;Denominator&quot; EDEncounter
    where &quot;TransferDecisionUsingOrder&quot;() 241 minutes or more before &quot;EDDepartureTime&quot;(EDEncounter)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="ED Observation Encounter Status"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Observation Encounter Status&quot;:
  [Encounter: &quot;Emergency Department Observation&quot;] EDObsEncounter
    with &quot;Denominator&quot; EDEncounter
      such that start of EDObsEncounter.period during EDEncounter.period
        and EDEncounter.status = 'finished'
        and EDObsEncounter.status = 'finished'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="ED Observation Order Status"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Observation Order Status&quot;:
  [ServiceRequest: code in &quot;Emergency Department Observation&quot;] EDObsOrder
    with &quot;Denominator&quot; EDEncounter
      such that EDObsOrder.authoredOn during EDEncounter.period
        and EDEncounter.status = 'finished'
        and EDObsOrder.status = 'active'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="ED Observation Status"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Observation Status&quot;:
  ( &quot;ED Observation Encounter Status&quot;
    union &quot;ED Observation Order Status&quot; ) EDObservation
    with &quot;Denominator&quot; EDStay
      such that EDObservation.period during EDStay.period
        or ( EDObservation.authoredOn during EDStay.period )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Boarded Time Greater Than 240 Minutes and No Observation Stay"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Boarded Time Greater Than 240 Minutes and No Observation Stay&quot;:
  ( &quot;Boarded Time Greater Than 240 Minutes&quot; Boarding
      where not exists ( &quot;ED Observation Status&quot; EDO
          where ( EDO.period starts during Boarding.period
              or EDO.authoredOn during Boarding.period
          )
      )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="ED Length of Stay Greater Than 480 Minutes"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Length of Stay Greater Than 480 Minutes&quot;:
  &quot;Denominator&quot; EDEncounter
    where &quot;EDArrivalTime&quot;(EDEncounter) 481 minutes or more before &quot;EDDepartureTime&quot;(EDEncounter)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="ED Length of Stay Greater Than 480 Minutes and No Observation Stay"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Length of Stay Greater Than 480 Minutes and No Observation Stay&quot;:
  ( &quot;ED Length of Stay Greater Than 480 Minutes&quot; EDStay
      where not exists ( &quot;ED Observation Status&quot; EDO
          where ( EDO.period starts during EDStay.period
              or EDO.authoredOn during EDStay.period
          )
      )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Numerator&quot;:
  &quot;Time to Treatment Room Greater Than 60 Minutes&quot;
    union &quot;ED Arrival Left Without Being Seen&quot;
    union &quot;Boarded Time Greater Than 240 Minutes and No Observation Stay&quot;
    union &quot;ED Length of Stay Greater Than 480 Minutes and No Observation Stay&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="ED Encounter or Triage of Patients Less Than 18 Years"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Encounter or Triage of Patients Less Than 18 Years&quot;:
  &quot;Denominator&quot; EDEncounter
    where AgeInYearsAt(date from start of EDEncounter.period) &lt; 18"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Stratification 1: Pediatric With No Mental Health Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratification 1: Pediatric With No Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients Less Than 18 Years&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where not ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="ED Encounter or Triage of Patients 18 Years and Older"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;ED Encounter or Triage of Patients 18 Years and Older&quot;:
  &quot;Denominator&quot; EDEncounter
    where AgeInYearsAt(date from start of EDEncounter.period) &gt;= 18"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Stratification 4: Adult With Mental Health Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratification 4: Adult With Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients 18 Years and Older&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Stratification 2: Adult With No Mental Health Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratification 2: Adult With No Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients 18 Years and Older&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where not ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Stratification 3: Pediatric With Mental Health Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Stratification 3: Pediatric With Mental Health Diagnosis&quot;:
  ( &quot;ED Encounter or Triage of Patients Less Than 18 Years&quot; EDEncounter
      let ConditionCode: EDEncounter.principalDiagnosis ( ).code
      where ( ConditionCode in &quot;Mental Health Diagnosis without Substance Use Disorders&quot; )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period.&quot;start&quot; is null then
            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]
        else
            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="EDArrivalTime"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;EDArrivalTime&quot;(EDEncounter Encounter):
  Last(EDEncounter.location Location
      where Location.location.getLocation().type in &quot;Emergency Department Location&quot;
        and start of Location.period is not null
      return start of Location.period
      sort ascending
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getLocation"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns the Location resource specified by the given reference.
*/
define fluent function getLocation(reference Reference ):
  singleton from (
    [Location] L where L.id = reference.reference.getId()
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getId"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
@comment: This function can be used to determine the logical id of a given resource. It can be used in
a single-server environment to trace references. However, this function does not attempt to resolve
or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToConcept"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCode"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="33"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="EDTreatmentRoomTimeArrivalTime"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;EDTreatmentRoomTimeArrivalTime&quot;(EDEncounter Encounter):
  Last(EDEncounter.location Location
      where Location.location.getLocation().type in &quot;Emergency Department Treatment Location&quot;
        and start of Location.period is not null
      return start of Location.period
      sort ascending
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="TransferDecisionUsingOrder"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;TransferDecisionUsingOrder&quot;():
  Last([ServiceRequest: code in &quot;Decision to Transfer&quot;] TransferOrder
      with [Encounter: &quot;Emergency Department Evaluation and Management Visit&quot;] EDVisit
        such that TransferOrder.authoredOn during EDVisit.period
          and TransferOrder.intent = 'order'
          and TransferOrder.status = 'completed'
          and EDVisit.status = 'finished'
      return TransferOrder.authoredOn
      sort ascending
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1264ECCQREHQRFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="EDDepartureTime"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;EDDepartureTime&quot;(EDEncounter Encounter):
  Last(EDEncounter.location Location
      where Location.location.getLocation().type in &quot;Emergency Department Location&quot;
        and 
        end of Location.period is not null
      return 
      end of Location.period
      sort ascending
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="principalDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns the condition that is specified as the principal diagnosis for the encounter
*/
define fluent function principalDiagnosis(Encounter Encounter ):
	singleton from ((Encounter.diagnosis D where D.rank = 1 and D.use ~ &quot;Billing&quot;) PD
      return singleton from ([Condition] C where C.id = PD.condition.reference.getId())
	)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value uri): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="38"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource value="Library/SupplementalDataElements|3.5.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library CQMCommon"/>
        <resource value="Library/CQMCommon|2.2.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource value="Library/QICoreCommon|2.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system AdministrativeGender"/>
        <resource value="http://hl7.org/fhir/administrative-gender"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system SNOMEDCT"/>
        <resource value="http://snomed.info/sct"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system DiagnosisRole"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/diagnosis-role"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Emergency Department Evaluation and Management Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Triage"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Emergency Department Location"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.284"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Emergency Department Treatment Location"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.278"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Decision to Transfer"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.286"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Emergency Department Observation"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.22"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Mental Health Diagnosis without Substance Use Disorders"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.285"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Payer Type"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name
              value="Stratification 1: Pediatric With No Mental Health Diagnosis"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Stratification 4: Adult With Mental Health Diagnosis"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name
              value="Stratification 2: Adult With No Mental Health Diagnosis"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name
              value="Stratification 3: Pediatric With Mental Health Diagnosis"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
        <mustSupport value="ethnicity"/>
        <mustSupport value="race"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="location"/>
        <mustSupport value="location.type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="rank"/>
        <mustSupport value="rank.value"/>
        <mustSupport value="use"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="location"/>
        <mustSupport value="location.type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="rank"/>
        <mustSupport value="rank.value"/>
        <mustSupport value="use"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <mustSupport value="location"/>
        <mustSupport value="location.type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="rank"/>
        <mustSupport value="rank.value"/>
        <mustSupport value="use"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.279"/>
        </codeFilter>
        <codeFilter>
          <path value="hospitalization.dischargeDisposition"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension
                       url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-relatedRequirement">
          <extension url="targetId">
            <valueString value="1049"/>
          </extension>
          <extension url="targetProperty">
            <valueString value="authoredOn.value"/>
          </extension>
        </extension>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="location"/>
        <mustSupport value="location.type"/>
        <mustSupport value="rank"/>
        <mustSupport value="rank.value"/>
        <mustSupport value="use"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="location"/>
        <mustSupport value="location.type"/>
        <mustSupport value="rank"/>
        <mustSupport value="rank.value"/>
        <mustSupport value="use"/>
        <mustSupport value="condition"/>
        <mustSupport value="condition.reference"/>
        <mustSupport value="condition.reference.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.22"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Location"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-location"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
      </dataRequirement>
      <dataRequirement id="1049">
        <type value="ServiceRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"/>
        <mustSupport value="code"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.286"/>
        </codeFilter>
        <codeFilter>
          <path value="intent.value"/>
          <code>
            <code value="order"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="ServiceRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"/>
        <mustSupport value="code"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="authoredOn.value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1170.22"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="active"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
    <extension url="guidance">
      <valueString
                   value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex"/>
    </extension>
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
          <display value="Supplemental Data"/>
        </coding>
        <text value="Supplemental Data Guidance"/>
      </valueCodeableConcept>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
    <valueReference>
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <url value="https://madie.cms.gov/Measure/CMS1264ECCQREHQRFHIR"/>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="short-name"/>
        <display value="Short Name"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/shortName"/>
    <value value="CMS1264FHIR"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-independent"/>
        <display value="Version Independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:eb3e269b-97ef-4548-9e87-c89b25789184"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-specific"/>
        <display value="Version Specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:2074450c-e3eb-49a0-bc87-0f63344a1962"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="publisher"/>
        <display value="Publisher"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cmsId"/>
    <value value="1264FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="0.3.001"/>
  <name value="CMS1264ECCQREHQRFHIR"/>
  <title value="Emergency Care Capacity and Quality (REHQR) FHIR"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2026-03-13T01:50:40+00:00"/>
  <publisher value="Centers for Medicare &amp; Medicaid Services (CMS)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.cms.gov/"/>
    </telecom>
  </contact>
  <description
               value="This measure assesses the variation in capacity and quality of emergency care to support rural emergency hospital (REH) 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 appropriate or timely access to emergency care.

Emergency care capacity and quality 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."/>
  <purpose value="UNKNOWN"/>
  <usage
         value="Measure Score Calculation
The measure score is 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. For CMS Certification Numbers (CCNs) with more than one ED, scores are combined as a weighted average for that CCN. 

This eCQM 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: CMS1264v1. 

Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html)."/>
  <copyright
             value="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."/>
  <effectivePeriod>
    <start value="2026-01-01"/>
    <end value="2026-12-31"/>
  </effectivePeriod>
  <author>
    <name value="Acumen, LLC"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.acumenllc.com/"/>
    </telecom>
  </author>
  <library value="https://madie.cms.gov/Library/CMS1264ECCQREHQRFHIR"/>
  <disclaimer
              value="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 &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.

Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM]."/>
  <rationale
             value="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 the capacity and quality of emergency care. There are long-standing concerns about parameters that impact the quality and timeliness of care in the ED. Currently, there are no national metrics to assess the proportion of patients impacted by the quality of timely ED care."/>
  <clinicalRecommendationStatement
                                   value="Changes in care provision and workflow are anticipated from implementing this Emergency Care Capacity and Quality (ECCQ) REH eCQM. To improve time to place a patient in a treatment space (as defined by the numerator below), changes in care may include improving patient flow processes, triaging interventions (such as inclusion of predictive models or different clinical deployment), or increased availability and access to outpatient clinical and social services. Other changes in care may include increases in local healthcare capacity including mental health care (mental health liaisons, co-located mental health services, or specialist psychiatry services), and use of ‘hospital home’ care models. Furthermore, changes to the following may also be considered: staffing models, ED observation units, diagnostic testing and imaging processes, or physical changes to ED layout.

Such changes may result in the following: decreased waiting room time, decreased door to provider times, higher proportion of patients seen within 1 hour, decrease in proportion of patients who leave without being evaluated, better management of mental health diagnoses, reduced length of stay in the ED, decreased turnaround time for diagnostic tests and imaging, improved time to treatment, and decreased ambulance diversion.

Changes in clinician or patient-reported outcomes and costs may include the following: improved patient experience, decrease in morbidity and mortality, increased ED revenue, and improved patient outcomes."/>
  <guidance
            value="Measure Score Calculation
The measure score is 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. For CMS Certification Numbers (CCNs) with more than one ED, scores are combined as a weighted average for that CCN. 

This eCQM 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: CMS1264v1. 

Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html)."/>
  <group id="6758b76046b6174510cfef6e">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="proportion"/>
          <display value="Proportion"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
      <valueCode value="Encounter"/>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
          <code value="outcome"/>
          <display value="Outcome"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation">
      <valueCode value="None"/>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
          <code value="decrease"/>
          <display value="Decreased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description
                 value="All ED visits at REHs that end during the measurement period for all patients
"/>
    <population id="6dc9f78d-4414-4061-90ed-1a273b9b3d80">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="All ED visits at REHs that end during the measurement period for all patients."/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="6ae6be7a-71f6-4fcd-9b1c-7c81d820cdd5">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description value="Equals Initial Population"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="f8b1cc23-8916-49a6-bfa3-dba7e8d11dd9">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description
                   value="The numerator is comprised of any ED visit in the denominator with any quality gap in access; if the patient experiences any of the following during a visit, the visit is included in the numerator:
1. The patient waited longer than 60 minutes (1 hour) after arrival to 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, if transferred, boarded 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 (boarded) and #4 (ED LOS)"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <stratifier id="3f3836fb-fbd2-4550-a00b-c51be90d2ebc">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="initial-population"/>
            <display value="Initial Population"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="denominator"/>
            <display value="Denominator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator"/>
            <display value="Numerator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator-exclusion"/>
            <display value="Numerator Exclusion"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <description
                   value="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 value="text/cql-identifier"/>
        <expression
                    value="Stratification 1: Pediatric With No Mental Health Diagnosis"/>
      </criteria>
    </stratifier>
    <stratifier id="f82a67d5-c742-48ae-8856-30cf58beb32a">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="initial-population"/>
            <display value="Initial Population"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="denominator"/>
            <display value="Denominator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator"/>
            <display value="Numerator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator-exclusion"/>
            <display value="Numerator Exclusion"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <description
                   value="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 value="text/cql-identifier"/>
        <expression
                    value="Stratification 2: Adult With No Mental Health Diagnosis"/>
      </criteria>
    </stratifier>
    <stratifier id="74fdbfd2-6ae1-4616-b9b2-06a7eda78ef3">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="initial-population"/>
            <display value="Initial Population"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="denominator"/>
            <display value="Denominator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator"/>
            <display value="Numerator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator-exclusion"/>
            <display value="Numerator Exclusion"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <description
                   value="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 value="text/cql-identifier"/>
        <expression
                    value="Stratification 3: Pediatric With Mental Health Diagnosis"/>
      </criteria>
    </stratifier>
    <stratifier id="f90fb136-7389-4e52-a40f-569216643f64">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="initial-population"/>
            <display value="Initial Population"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="denominator"/>
            <display value="Denominator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator"/>
            <display value="Numerator"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo">
        <valueCodeableConcept>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-population"/>
            <code value="numerator-exclusion"/>
            <display value="Numerator Exclusion"/>
          </coding>
        </valueCodeableConcept>
      </extension>
      <description
                   value="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 value="text/cql-identifier"/>
        <expression
                    value="Stratification 4: Adult With Mental Health Diagnosis"/>
      </criteria>
    </stratifier>
  </group>
  <supplementalData id="sde-ethnicity">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Ethnicity"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-payer">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Payer"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Race"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-sex">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Sex"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-address">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Address"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Address"/>
    </criteria>
  </supplementalData>
</Measure>