<?xml version="1.0" encoding="UTF-8"?>

<Measure xmlns="http://hl7.org/fhir">
  <id value="CMS1218FHIRHHRF"/>
  <meta>
    <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure"/>
    <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"/>
    <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm"/>
    <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm"/>
    <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm"/>
  </meta>
  <text>
    <status value="extensions"/><div xmlns="http://www.w3.org/1999/xhtml">
  <table class="narrative-table">
    <tbody>
<tr>


<th colspan="2" scope="row" class="row-header">Metadata</th>


</tr>

<tr>


<th scope="row" class="row-header">Title</th>



<td class="content-container">Hospital Harm - Postoperative Respiratory FailureFHIR
</td>


</tr>



<tr>


<th scope="row" class="row-header">Version</th>



<td class="content-container">1.0.000</td>


</tr>


  
<tr>


<th scope="row" class="row-header">Short Name</th>



<td class="content-container">CMS1218FHIR</td>


</tr>



  
<tr>


<th scope="row" class="row-header">GUID (Version Independent)</th>



<td class="content-container">urn:uuid:b6857e46-6412-432d-abc8-0508efc0d2d7</td>


</tr>



  
<tr>


<th scope="row" class="row-header">GUID (Version Specific)</th>



<td class="content-container">urn:uuid:fb07b5c1-50c3-45e7-b8c7-ca26409a0f48</td>


</tr>



  
    
    
<tr>


<th scope="row" class="row-header">CMS Identifier</th>



<td class="content-container">1218FHIR</td>


</tr>

  


  
    
    
<tr>


<th scope="row" class="row-header">CMS Consensus Based Entity Identifier</th>



<td class="content-container">4130e</td>


</tr>

  



  
    
    
<tr>


<th scope="row" class="row-header">Effective Period</th>



<td class="content-container">2026-01-01 through 2026-12-31</td>


</tr>

  















<tr>


<th scope="row" class="row-header">Steward (Publisher)</th>



<td class="content-container">Centers for Medicare &amp;amp; Medicaid Services (CMS)</td>


</tr>






<tr>


<th scope="row" class="row-header">Developer</th>



<td class="content-container">Mathematica</td>


</tr>






<tr>


<th scope="row" class="row-header">Description</th>



<td class="content-container"><div><p>This measure assesses the number of elective inpatient hospitalizations for patients aged 18 years and older without an obstetrical condition who have a procedure resulting in postoperative respiratory failure (PRF)</p>
</div></td>


</tr>



<tr>


<th scope="row" class="row-header">Copyright</th>



<td class="content-container"><div><p>Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.</p>
<p>This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.</p>
</div></td>


</tr>


<tr>


<th scope="row" class="row-header">Disclaimer</th>



<td class="content-container"><div><p>This performance measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.</p>
<p>THE MEASURES AND SPECIFICATIONS ARE PROVIDED &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" class="row-header">Rationale</th>



<td class="content-container"><div><p>Postoperative respiratory failure (PRF), defined as unplanned endotracheal reintubation, prolonged inability to wean from mechanical ventilation, or inadequate oxygenation and/or ventilation, is the most common serious postoperative pulmonary complication, with an incidence of up to 7.5% (the incidence of any postoperative pulmonary complication ranges from 10-40%) (Arozullah et al., 2000; Canet et al., 2015; Gupta et al., 2011; Kor et al., 2014). This measure addresses the prevalence of PRF and the variance between hospitals in the incidence of PRF. PRF is a serious complication that can increase the risk of morbidity and mortality, with in-hospital mortality resulting from PRF estimated at 25% to 40% (Arozullah et al., 2000; Canet &amp; Gallart, 2014). Surgical procedures complicated by PRF have 3.74 times higher adjusted odds of death than those not complicated by respiratory failure, 1.47 times higher odds of 90-day readmission, and 1.86 times higher odds of an outpatient visit with one of 44 postoperative conditions (e.g., bacterial infection, fluid and electrolyte disorder, abdominal hernia) within 90 days of hospital discharge (Miller et al., 2001; Romano et al, 2009). PRF is additionally associated with prolonged mechanical ventilation and the need for rehabilitation or skilled nursing facility placement upon discharge (Thompson &amp; Lisco, 2018).</p>
<p>The incidence of PRF varies by hospital, with higher reported rates of PRF in nonteaching hospitals than teaching hospitals (Rahman et al., 2013). Additionally, one study found that the odds of developing PRF increased by 6% for each level increase in hospital size from small to large (Rahman et al., 2013). This suggests that there remains room for improvement in hospitals reporting higher rates of PRF.</p>
<p>The most widely used current measures of PRF are based on either claims data (CMS Patient Safety Indicator (PSI) 11) or proprietary registry data (National Surgical Quality Improvement Program (NSQIP) of the American College of Surgeons). The dQM is closely modeled after the NSQIP measure of PRF, which has been widely adopted across American hospitals, and is intended to complement and eventually supplant CMS PSI 11.</p>
</div></td>


</tr>


<tr>


<th scope="row" class="row-header">Clinical Recommendation Statement</th>



<td class="content-container"><div><p>Recent studies and current clinical practice guidelines for PRF have identified enhanced recovery pathways, prophylactic mucolytics, postoperative continuous positive airway pressure ventilation, lung protective intraoperative ventilation, prophylactic respiratory physiotherapy, epidural analgesia, and goal directed hemodynamic therapy as evidence-based interventions to reduce the incidence of PRF. Yet, progress in reducing the incidence of PRF has been stymied by lack of consensus regarding the definition of PRF, which patients are most at-risk, which risk factors are potentially modifiable, and which patients are more likely to benefit from targeted interventions of a health care system's limited resources. This measure would address this gap in data.</p>
<p>Relevant clinical guidelines for preventing postoperative respiratory failure can be found in the following:</p>
<ul>
<li>
<p>Mohanty, et al. Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline from ACS NSQIP/AGS, 2016</p>
</li>
<li>
<p>Piraino, et al. AARC Clinical Practice Guideline: Management of Adult Patients with Oxygen in the Acute Care Setting, 2022</p>
</li>
</ul>
</div></td>


</tr>



<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Arozullah, A.M., Daley, J., Henderson, W.G., &amp; Khuri, S.F. (2000). Multifactorial risk index for predicting postoperative respiratory failure in men after major noncardiac surgery. The National Veterans Administration Surgical Quality Improvement Program. Annals of surgery. 232(2):242-253. doi: 10.1097/00000658-200008000-00015. PMID: 10903604; PMCID: PMC1421137.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Canet, J., &amp; Gallart, L. (2014). Postoperative respiratory failure: Pathogenesis, prediction, and prevention. Current Opinion in Critical Care. 20(1):56-62. doi: 10.1097/MCC.0000000000000045. PMID: 24240985.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Canet, J., Sabate, S., Mazo, V., Gallart, L., de Abreu, M.G., Belda, J., ... &amp; Pelosi, P. (2015). PERISCOPE group. Development and validation of a score to predict postoperative respiratory failure in a multicentre European cohort: A prospective, observational study. Eur J Anaesthesiol. 32(7):458-70. doi: 10.1097/EJA.0000000000000223. PMID: 26020123.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Gupta, H., Gupta, P.K., Fang, X., Miller, W.J., Cemaj, S., Forse, R.A., &amp; Morrow, L.E. (2011). Development and validation of a risk calculator predicting postoperative respiratory failure. Chest. 140(5):1207-1215. doi: 10.1378/chest.11-0466. Epub 2011 Jul 14. PMID: 21757571.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Kor, D.J., Lingineni, R.K., Gajic, O., Park, P.K., Blum, J.M., Hou, P.C., ... &amp; Talmor, D.S. (2014). Predicting risk of postoperative lung injury in high-risk surgical patients: a multicenter cohort study. Anesthesiology. 120(5):1168-81. doi: 10.1097/ALN.0000000000000216. PMID: 24755786; PMCID: PMC3999474.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Miller, M.R., Elixhauser, A., Zhan, C., &amp; Meyer, G.S. (2001). Patient Safety Indicators: using administrative data to identify potential patient safety concerns. Health Serv Res. 36(6 Pt 2):110-32. PMID: 16148964; PMCID: PMC1383610.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Rahman, M., Neal, D., Fargen, K.M., &amp; Hoh, B.L. (2013). Establishing standard performance measures for adult brain tumor patients: a Nationwide Inpatient Sample database study. Neuro Oncol. 15(11):1580-8. doi: 10.1093/neuonc/not108. Epub 2013 Sep 30. PMID: 24084409; PMCID: PMC3813415.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Romano, P.S., Mull, H.J., Rivard, P.E., Zhao, S., Henderson, W.G., Loveland, S., Tsilimingras, D., ... &amp; Rosen, A.K. (2009). Validity of selected AHRQ patient safety indicators based on VA National Surgical Quality Improvement Program data. Health Serv Res. 44(1):182-204. doi: 10.1111/j.1475-6773.2008.00905.x. Epub 2008 Sep 17. PMID: 18823449; PMCID: PMC2669628.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

<th scope="row" class="row-header">Citation</th>


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Thompson, S.L., &amp; Lisco, S.J. (2018). Postoperative respiratory failure. Int Anesthesiol Clin. 56(1):147-164. doi: 10.1097/AIA.0000000000000173. PMID: 29189437.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>







<tr>


<th scope="row" class="row-header">Guidance (Usage)</th>



<td class="content-container">PRF is evaluated using mechanical ventilation (MV) documentation or intubation and extubation documentation to allow for hospital documentation variances. Therefore, if MV documentation is not available, intubation and extubation can serve as a proxy for determining if MV occurred and its duration. To determine that an unplanned initiation of MV occurred, the logic looks for evidence of a non-invasive oxygen therapy assessment such as oxygen via 'nasal canula' or 'breathing room air' prior to the MV occurrence to verify that MV was newly initiated. Additionally, facility location codes are used to determine if MV was initiated outside of a procedural area (e.g., medical floor). Conversely, to determine MV duration, the logic looks for evidence that a non-invasive oxygen therapy assessment or another operating room procedure does not exist prior to the MV occurrence to verify that MV was continued without interruption from a procedural area.

&lt;br /&gt;

This dQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.

&lt;br /&gt;

This FHIR-based measure has been derived from the QDM-based measure: CMS1218v2. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6 (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
</td>


</tr>



  
  
  
    
    <tr>


<th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: Group_1)</th>


</tr>
  
  
  
  
<tr>


<th scope="row" class="row-header">Basis</th>



<td class="content-container">Encounter</td>


</tr>



  
<tr>


<th scope="row" class="row-header">Scoring</th>



<td class="content-container">
    Proportion


</td>


</tr>





  
<tr>


<th scope="row" class="row-header">Improvement Notation</th>



<td class="content-container">
    Decreased score indicates improvement


</td>


</tr>






<tr>


<th scope="row" class="row-header">Type</th>



<td class="content-container">
    Outcome


</td>


</tr>



  
<tr>


<th scope="row" class="row-header">Rate Aggregation</th>



<td class="content-container">None
</td>


</tr>



  
  

    
      
        
  
    
    
    <tr>
      
        

<th scope="row" class="row-header">Initial Population</th>


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Elective inpatient hospitalizations with no preceding emergency department visit that end during the measurement period for patients aged 18 and older without an obstetrical condition and at least one surgical procedure was performed within the first 3 days of the encounter
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-InitialPopulation_1">Initial Population</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
        
  
    
    
    <tr>
      
        

<th scope="row" class="row-header">Denominator</th>


      
      <td class="content-container">
        
        <em>ID</em>: Denominator_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Equals Initial Population
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-Denominator_1">Denominator</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
        
  
    
    
    <tr>
      
        

<th scope="row" class="row-header">Denominator Exclusion</th>


      
      <td class="content-container">
        
        <em>ID</em>: DenominatorExclusion_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Inpatient hospitalizations for patients:

With a diagnosis for a degenerative neurological disorder

With any selected head, neck, and thoracic surgery involving significant risk of airway compromise or requiring airway protection

Who have mechanical ventilation that starts more than one hour prior to the start of the first operating room (OR) procedure

With a diagnosis for a neuromuscular disorder

With arterial partial pressure of carbon dioxide (PaCO2)\&gt;50 mmHg combined with an arterial pH\&lt;7.30 within 48 hours or less prior to the start of the first OR procedure

With arterial partial pressure of oxygen (PaO2)\&lt;50 mmHg within 48 hours or less prior to the start of the first OR procedure

With a principal diagnosis for acute respiratory failure

With a diagnosis for acute respiratory failure present on admission

With any diagnosis present on admission for the existence of a tracheostomy

Where a tracheostomy is performed before or on the same day as the first OR procedure
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-DenominatorExclusion_1">Denominator Exclusions</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
    

    
      
        
  
    
    
    <tr>
      
        

<th scope="row" class="row-header">Numerator</th>


      
      <td class="content-container">
        
        <em>ID</em>: Numerator_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Elective inpatient hospitalizations for patients with postoperative respiratory failure as evidenced by any of the following:

Criterion A: Mechanical ventilation (MV) initiated within 30 days after first OR procedure, as evidenced by:

A.1. Intubation that occurs outside of a procedural area and within 30 days after the end of the first OR procedure of the encounter.

or

A.2. MV that occurs outside of a procedural area within 30 days after the end of the first OR procedure of the encounter and is preceded by a period of non-invasive oxygen therapy between the end of the OR procedure and the MV occurrence, and without a subsequent OR procedure between the non-invasive oxygen therapy and the MV occurrence.

or

Criterion B: MV with a duration of more than 48 hours after the first OR procedure, as evidenced by:

B.1. Extubation that occurs outside of a procedural area more than 48 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a period of non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the extubation occurrence.

or

B.2 Mechanical ventilation that occurs between 48 and 72 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the MV occurrence.
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-Numerator_1">Numerator</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
    

  


  







  
    
    
    
    
    
<tr>


<th scope="row" class="row-header"/>



<td class="content-container">&lt;p&gt;For every patient evaluated by this measure also identify payer, race, ethnicity and sex&lt;/p&gt;</td>


</tr>

  

  
    
    
    
    
    
<tr>


<th scope="row" class="row-header"/>



<td class="content-container">&lt;p&gt;Variables are collected for the development of baseline risk adjustment model&lt;/p&gt;
&lt;p&gt;Report the first resulted vital sign values during the encounter in the Unified Code for Units of Measure (UCUM) units specified:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;Body temperature: Cel, [degF]&lt;/li&gt;
 &lt;li&gt;Heart rate: {Beats}/min&lt;/li&gt;
 &lt;li&gt;Respiratory rate: {Breaths}/min&lt;/li&gt;
 &lt;li&gt;Systolic blood pressure: mm[Hg]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Report the first resulted laboratory test values during the encounter in UCUM units specified:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;Albumin: g/dL, umol/L&lt;/li&gt;
 &lt;li&gt;Aspartate aminotransferase (AST/SGOT): U/L, IU/L&lt;/li&gt;
 &lt;li&gt;Bicarbonate: mmol/L&lt;/li&gt;
 &lt;li&gt;Bilirubin: mg/dL, umol/L&lt;/li&gt;
 &lt;li&gt;Blood urea nitrogen (BUN): mg/dL, umol/L&lt;/li&gt;
 &lt;li&gt;Carbon dioxide (partial pressure): mm[Hg]&lt;/li&gt;
 &lt;li&gt;Creatinine: mg/dL, umol/L&lt;/li&gt;
 &lt;li&gt;Hematocrit: %&lt;/li&gt;
 &lt;li&gt;Hemoglobin: g/dL, mmol/L&lt;/li&gt;
 &lt;li&gt;Leukocyte count: {cells}/uL, 10&lt;em&gt;3/uL, 10&lt;/em&gt;9/L, /mm3&lt;/li&gt;
 &lt;li&gt;Oxygen (partial pressure): mm[Hg]&lt;/li&gt;
 &lt;li&gt;pH of arterial blood: [pH]&lt;/li&gt;
 &lt;li&gt;Platelet count: 10&lt;em&gt;3/uL, 10&lt;/em&gt;9/L, /mm3&lt;/li&gt;
 &lt;li&gt;Sodium: meq/L, mmol/L&lt;/li&gt;
 &lt;li&gt;White blood cell count: {cells}/uL, 10&lt;em&gt;3/uL, 10&lt;/em&gt;9/L, /mm3&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additional variables used for risk adjustment:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;American Society of Anesthesiologists (ASA) physical status class assessment that starts during the encounter&lt;/li&gt;
 &lt;li&gt;First Body mass index (BMI), reported using UCUM unit: kg/m2&lt;/li&gt;
 &lt;li&gt;Encounter diagnoses with their present on admission (POA) indicators&lt;/li&gt;
 &lt;li&gt;Most recent smoking status&lt;/li&gt;
 &lt;li&gt;Principal surgical procedures that start during the encounter&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please see the Hospital Harm - Postoperative Respiratory Failure Risk Adjustment Methodology Report on the dQM-specific page on the eCQI Resource Center website: https://ecqi.healthit.gov/&lt;/p&gt;</td>


</tr>

  




  <tr>


<th colspan="2" scope="row" class="row-header">Supplemental Data Elements</th>


</tr>


<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: sde-ethnicity
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Ethnicity

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-sde-ethnicity">SDE Ethnicity</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: sde-payer
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Payer

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-sde-payer">SDE Payer</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: sde-race
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Race

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-sde-race">SDE Race</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: sde-sex
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Sex

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-sde-sex">SDE Sex</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-all-encounter-diagnoses-with-poa-indication
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable All Encounter Diagnoses With POA Indication

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-all-encounter-diagnoses-with-poa-indication">Risk Variable All Encounter Diagnoses With POA Indication</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-asa-physical-status-class
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable ASA Physical Status Class

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-asa-physical-status-class">Risk Variable ASA Physical Status Class</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-body-mass-index-(bmi)
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable Body Mass Index (BMI)

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-body-mass-index-(bmi)">Risk Variable Body Mass Index (BMI)</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-procedures
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable Encounter Procedures

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-encounter-procedures">Risk Variable Encounter Procedures</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-albumin-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Albumin In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-albumin-in-encounter">Risk Variable First Albumin In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-arterial-ph-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Arterial pH In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-arterial-ph-in-encounter">Risk Variable First Arterial pH In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-ast-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First AST In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-ast-in-encounter">Risk Variable First AST In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-bicarbonate-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Bicarbonate In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-bicarbonate-in-encounter">Risk Variable First Bicarbonate In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-bilirubin-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Bilirubin In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-bilirubin-in-encounter">Risk Variable First Bilirubin In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-blood-urea-nitrogen-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Blood Urea Nitrogen In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-blood-urea-nitrogen-in-encounter">Risk Variable First Blood Urea Nitrogen In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-bmi
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First BMI

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-bmi">Risk Variable First BMI</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-body-temperature-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Body Temperature In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-body-temperature-in-encounter">Risk Variable First Body Temperature In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-carbon-dioxide-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Carbon Dioxide In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-carbon-dioxide-in-encounter">Risk Variable First Carbon Dioxide In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-creatinine-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Creatinine In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-creatinine-in-encounter">Risk Variable First Creatinine In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-heart-rate-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Heart Rate In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-heart-rate-in-encounter">Risk Variable First Heart Rate In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-hematocrit-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Hematocrit In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-hematocrit-in-encounter">Risk Variable First Hematocrit In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-hemoglobin-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Hemoglobin In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-hemoglobin-in-encounter">Risk Variable First Hemoglobin In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-leukocyte-count-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Leukocyte Count In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-leukocyte-count-in-encounter">Risk Variable First Leukocyte Count In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-oxygen-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Oxygen In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-oxygen-in-encounter">Risk Variable First Oxygen In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-platelet-count-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Platelet Count In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-platelet-count-in-encounter">Risk Variable First Platelet Count In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-respiratory-rate-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Respiratory Rate In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-respiratory-rate-in-encounter">Risk Variable First Respiratory Rate In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-sodium-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Sodium In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-sodium-in-encounter">Risk Variable First Sodium In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-systolic-blood-pressure-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First Systolic Blood Pressure In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-systolic-blood-pressure-in-encounter">Risk Variable First Systolic Blood Pressure In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-first-white-blood-cell-count-in-encounter
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable First White Blood Cell Count In Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-first-white-blood-cell-count-in-encounter">Risk Variable First White Blood Cell Count In Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

<th scope="row" class="row-header">Supplemental Data Element</th>


  <td class="content-container">
    
      <em>ID</em>: risk-variable-principal-procedure
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Risk Variable Principal Procedure

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1218fhirhhrf-risk-variable-principal-procedure">Risk Variable Principal Procedure</a> 
        
      
    
  </td>
</tr>


<tr>


<th colspan="2" scope="row" class="row-header">Measure Logic</th>


</tr>

<tr>


<th scope="row" class="row-header">Primary Library</th>



<td class="content-container"><code>https://madie.cms.gov/Library/CMS1218FHIRHHRF</code></td>


</tr>




<tr>
  <th scope="row" class="row-header">Contents</th>
  <td class="content-container">
    <em><a href="#population-criteria">Population Criteria</a></em>
    <br/>
    <em><a href="#definitions">Logic Definitions</a></em>
    <br/>
    <em><a href="#terminology">Terminology</a></em>
    <br/>
    <em><a href="#dependencies">Dependencies</a></em>
    <br/>
    <em><a href="#data-requirements">Data Requirements</a></em>
    <br/>
    <em><a href="#parameters">Parameters</a></em>
    <br/>
  </td>
</tr>


  <tr>


<th colspan="2" scope="row" class="row-header"><a name="population-criteria"> </a>Population Criteria</th>


</tr>
  
  
  

  
  
  
    
    <tr>


<th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: Group_1)</th>


</tr>
  
  
  
  

    
      
          
    
      
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    
    
    
    
      
      <a name="Group_1-InitialPopulation_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot;</code></pre>
    
      
      <a href="#cms1218fhirhhrf-initial-population"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

    
      
          
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Denominator
    
  </th>
</tr>
<tr>

  <td>
    
    
    
    
      
      <a name="Group_1-Denominator_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Initial Population&quot;</code></pre>
    
      
      <a href="#cms1218fhirhhrf-denominator"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

    
      
          
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Denominator Exclusion
    
  </th>
</tr>
<tr>

  <td>
    
    
    
    
      
      <a name="Group_1-DenominatorExclusion_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
  &quot;Encounter With Degenerative Neurological Disorder&quot;
    union &quot;Encounter With High Risk To Airway Head Neck And Thoracic Surgery&quot;
    union &quot;Encounter With Mechanical Ventilation That Starts More Than One Hour Prior To Start Of First OR Procedure&quot;
    union &quot;Encounter With Neuromuscular Disorder&quot;
    union &quot;Encounter With PaCO2 Greater Than 50 And Arterial pH Less Than 7.30 Within 48 Hours Prior To Start Of First OR Procedure&quot;
    union &quot;Encounter With PaO2 Less Than 50 Within 48 Hours Prior To Start Of First OR Procedure&quot;
    union &quot;Encounter With Principal Diagnosis Of Acute Respiratory Failure&quot;
    union &quot;Encounter With Diagnosis Of Acute Respiratory Failure Present On Admission&quot;
    union &quot;Encounter With Tracheostomy Present On Admission&quot;
    union &quot;Encounter With Tracheostomy Prior To Or On The Same Day Of First OR Procedure&quot;</code></pre>
    
      
      <a href="#cms1218fhirhhrf-denominator-exclusions"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

    
      
    

    
      
          
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Numerator
    
  </th>
</tr>
<tr>

  <td>
    
    
    
    
      
      <a name="Group_1-Numerator_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Encounter With Intubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure&quot;
    union &quot;Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy&quot;
    union &quot;Encounter With Extubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure More Than 48 Hours After End Of Anesthesia&quot;
    union &quot;Encounter With Mechanical Ventilation Within 30 Days Of End Of First OR Procedure And Between 48 And 72 Hours After End Of OR Procedure And Not Preceded By Non Invasive Oxygen Therapy Or Anesthesia&quot;</code></pre>
    
      
      <a href="#cms1218fhirhhrf-numerator"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

    
      
    

  


  


  

  
  


  <tr>


<th colspan="2" scope="row" class="row-header"><a name="definitions"> </a>Logic Definitions</th>


</tr>
  
  
          
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="supplementaldataelements-sde-payer"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  [USQualityCore.Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="supplementaldataelements-sde-race"> </a>
    
    <pre style="border: none;" class="content-container 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 scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="supplementaldataelements-sde-sex"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  case
    when Patient.sex() = '248153007' then &quot;Male (finding)&quot;
    when Patient.sex() = '248152002' then &quot;Female (finding)&quot;
    else null
  end</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> SupplementalDataElements</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="supplementaldataelements-sde-ethnicity"> </a>
    
    <pre style="border: none;" class="content-container 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 scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value EncounterStatus): value.value</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tointerval"> </a>
    
    <pre style="border: none;" class="content-container 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 scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-toconcept"> </a>
    
    <pre style="border: none;" class="content-container 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 scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tocode"> </a>
    
    <pre style="border: none;" class="content-container 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 scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-todate"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDate(value date): value.value</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value string): value.value</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ProcedureStatus): value.value</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-todatetime"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value dateTime): value.value</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-todatetime"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value instant): value.value</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-toquantity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) 
value to a CQL Quantity
@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity
has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)
an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.
@seealso: ToCalendarUnit
*/
define function ToQuantity(quantity FHIR.Quantity):
    case
        when quantity is null then null
        when quantity.value is null then null
        when quantity.comparator is not null then
            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
        else
            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')
    end</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tocalendarunit"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts a UCUM definite duration unit to a CQL calendar duration
unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) 
topic of the CQL specification.
@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate
*/
define function ToCalendarUnit(unit System.String):
    case unit
        when 'ms' then 'millisecond'
        when 's' then 'second'
        when 'min' then 'minute'
        when 'h' then 'hour'
        when 'd' then 'day'
        when 'wk' then 'week'
        when 'mo' then 'month'
        when 'a' then 'year'
        else unit
    end</code></pre>
  </td>

</tr>



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ObservationStatus): value.value</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ClaimStatus): value.value</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value Use): value.value</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-references"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given reference is to the given resourceId
@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference FHIR.Reference, resourceId String):
  resourceId = Last(Split(reference.reference, '/'))</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-earliest"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Given an interval, return the starting point if the interval has a starting boundary specified,
otherwise, return the ending point
*/
define fluent function earliest(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Age, FHIR.Range&gt;):
  (choice.toInterval()) period
    return
      if (period.hasStart()) then start of period
      else end of period</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-tointerval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.

The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.

NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define fluent function toInterval(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range&gt;):
  case
    when choice is FHIR.dateTime then
      Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
    when choice is FHIR.Period then
      FHIRHelpers.ToInterval(choice as FHIR.Period)
    when choice is FHIR.instant then
      Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
    when choice is FHIR.Age then
      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
    when choice is FHIR.Range then
      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
    when choice is FHIR.Timing then
      Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')
    when choice is FHIR.string then
      Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
    else
      null as Interval&lt;DateTime&gt;
  end</code></pre>
  </td>

</tr>



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-hasstart"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Given an interval, return true if the interval has a starting boundary specified
(i.e. the start of the interval is not null and not the minimum DateTime value)
*/
define fluent function hasStart(period Interval&lt;DateTime&gt;):
  not ( start of period is null
      or start of period = minimum DateTime
  )</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-references"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if any of the given references are to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(references List&lt;FHIR.Reference&gt;, resource FHIR.Resource):
  exists (references R where R.references(resource))</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-references"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given reference is to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference FHIR.Reference, resource FHIR.Resource):
  resource.id = Last(Split(reference.reference, '/'))</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-ext"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the single extension (if present) on the given resource with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define fluent function ext(domainResource DomainResource, url String):
  singleton from domainResource.exts(url)</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-exts"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns any extensions defined on the given resource with the specified url
*/
define fluent function exts(domainResource DomainResource, url String):
  domainResource.extension E
    where E.url = url
    return E</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-exts"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns any extensions defined on the given element with the specified url.
*/
define fluent function exts(element Element, url String):
  element.extension E
    where E.url = url
    return E</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-ext"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the single extension (if present) on the given element with the specified url.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given element with the specified url.
*/
define fluent function ext(element Element, url String):
  singleton from element.exts(url)</code></pre>
  </td>

</tr>



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-latest"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Given an interval, returns the ending point if the interval has an ending boundary specified,
otherwise, returns the starting point
*/
define fluent function latest(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Age, FHIR.Range&gt;):
  (choice.toInterval()) period
    return
      if (period.hasEnd()) then end of period
      else start of period</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-hasend"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Given an interval, returns true if the interval has an ending boundary specified
(i.e. the end of the interval is not null and not the maximum DateTime value)
*/
define fluent function hasEnd(period Interval&lt;DateTime&gt;):
  not (
    end of period is null
      or end of period = maximum DateTime
  )</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-includescode"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given code is in the given codeList
@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.
*/
define fluent function includesCode(codeList List&lt;CodeableConcept&gt;, code Concept):
  exists (codeList C where C ~ code)</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> USCoreCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="uscorecommon-race"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function race(patient Patient):
  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E
    return {
      ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding,
      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
      text: E.ext('text').value as FHIR.string
    }</code></pre>
  </td>

</tr>



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> USCoreCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="uscorecommon-sex"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the sex element as defined for the USCore patient profile
*/
define fluent function sex(patient Patient):
  patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> USCoreCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="uscorecommon-ethnicity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function ethnicity(patient Patient):
  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E
    return {
      ombCategory: E.ext('ombCategory').value as FHIR.Coding,
      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
      text: E.ext('text').value as FHIR.string
    }</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-hospitalizationwithobservationandoutpatientsurgeryservice"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.
*/
define fluent function hospitalizationWithObservationAndOutpatientSurgeryService(TheEncounter &quot;Encounter&quot; ):
  TheEncounter Visit
	  let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs
		  	where LastObs.status = 'finished'
          and LastObs.period ends 1 hour or less on or before start of Visit.period
			  sort by	end of period
    	),
    	VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
    	EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED
			  where LastED.status = 'finished'
          and LastED.period ends 1 hour or less on or before VisitStart
			  sort by	end of period
    	),
    	VisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),
    	OutpatientSurgeryVisit: Last([Encounter: &quot;Outpatient Surgery Service&quot;] LastSurgeryOP
			  where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED
			  sort by	end of period
    	)
  	return Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-hospitalizationwithobservation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
*/
define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
  TheEncounter Visit
  		let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs
  				where LastObs.status = 'finished'
            and LastObs.period ends 1 hour or less on or before start of Visit.period
  				sort by end of period
  			),
  			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
  			EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED
  				where LastED.status = 'finished'
            and LastED.period ends 1 hour or less on or before VisitStart
  				sort by end of period
  			)
  		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-hasprincipaldiagnosisof"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
 @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet.
 @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
 */
 define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet System.ValueSet):
   (encounter.principalDiagnosis()) PD
     return PD.diagnosis in valueSet
       or PD.diagnosis.getCondition().code in valueSet</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-principaldiagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter
 @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
*/
define fluent function principalDiagnosis(encounter Encounter):
singleton from (
     (encounter.claimDiagnosis()) CD
       where CD.type.includesCode(&quot;Principal Diagnosis&quot;)
   )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-claimdiagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the claim diagnosis elements for the given encounter
@comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
*/
define fluent function claimDiagnosis(encounter Encounter):
  encounter E
    let 
      claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))),
      claimItem: (claim.item I where I.encounter.references(E))
    return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-getcondition"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the Condition resource for the given reference
*/
define fluent function getCondition(reference Reference):
  singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-isdiagnosispresentonadmission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
 @description: Returns true if the given diagnosis is present on admission, based on the given poaValueSet
 @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
 */
 define fluent function isDiagnosisPresentOnAdmission(encounter Encounter, diagnosisValueSet System.ValueSet, poaValueSet System.ValueSet):
   exists (
     (encounter.claimDiagnosis()) CD
       where CD.onAdmission in poaValueSet
         and (
           CD.diagnosis in diagnosisValueSet
             or CD.diagnosis.getCondition().code in diagnosisValueSet
         )
   )</code></pre>
  </td>

</tr>



        



        




        
        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-elective-inpatient-encounter-with-age-18-and-older-without-ed-visit"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Elective Inpatient Encounter With Age 18 And Older Without ED Visit&quot;:
  [&quot;Encounter&quot;: &quot;Elective Inpatient Encounter&quot;] ElectiveEncounter
    where ElectiveEncounter.status = 'finished'
      and ElectiveEncounter.period ends during day of &quot;Measurement Period&quot;
      and ElectiveEncounter.priority is not null implies ElectiveEncounter.priority ~ &quot;Elective (qualifier value)&quot;
      and AgeInYearsAt(date from start of ElectiveEncounter.period) &gt;= 18
      and not exists ( [&quot;Encounter&quot;: &quot;Emergency Department Visit&quot;] EDVisit
          where EDVisit.status = 'finished'
            and EDVisit.period ends 1 hour or less before or on start of ElectiveEncounter.period
      )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-elective-inpatient-encounter-with-age-and-without-obstetrical-condition"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Elective Inpatient Encounter With Age And Without Obstetrical Condition&quot;:
  &quot;Elective Inpatient Encounter With Age 18 And Older Without ED Visit&quot; ElectiveEncounter
    where not ( ElectiveEncounter.reasonCode in &quot;Obstetrical Or Pregnancy Related Conditions&quot;
        or ElectiveEncounter.encounterReason ( ).code in &quot;Obstetrical Or Pregnancy Related Conditions&quot;
    )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-elective-inpatient-encounter-with-or-procedure-within-3-days"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot;:
  &quot;Elective Inpatient Encounter With Age And Without Obstetrical Condition&quot; ElectiveEncounter
    with [&quot;Procedure&quot;: &quot;General And Neuraxial Anesthesia&quot;] SurgeryWithAnesthesia
      such that SurgeryWithAnesthesia.status = 'completed'
        and SurgeryWithAnesthesia.performed.earliest ( ) during ElectiveEncounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )
        and SurgeryWithAnesthesia.performed.earliest ( ) 3 days or less after start of ElectiveEncounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-initial-population"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-respiratory-rate-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Respiratory Rate In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstRespiratoryRate: QualifyingEncounter.firstRespiratoryRate ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-albumin-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Albumin In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstAlbumin: QualifyingEncounter.firstAlbumin ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-arterial-ph-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Arterial pH In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstArterialpH: QualifyingEncounter.firstArterialpH ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-body-temperature-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Body Temperature In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstBodyTemp: QualifyingEncounter.firstBodyTemperature ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-carbon-dioxide-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Carbon Dioxide In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstCarbonDioxide: QualifyingEncounter.firstCarbonDioxide ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-hematocrit-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Hematocrit In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstHematocrit: QualifyingEncounter.firstHematocrit ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-heart-rate-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Heart Rate In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstHeartRate: QualifyingEncounter.firstHeartRate ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-bmi"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First BMI&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstBMI: QualifyingEncounter.firstBMI ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-hemoglobin-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Hemoglobin In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstHemoglobin: QualifyingEncounter.firstHemoglobin ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-all-encounter-diagnoses-with-poa-indication"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable All Encounter Diagnoses With POA Indication&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      diagnoses: QualifyingEncounter.claimDiagnosesWithPOA ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-sodium-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Sodium In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstSodium: QualifyingEncounter.firstSodium ( )
    }</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-sde-payer"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-creatinine-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Creatinine In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstCreatinine: QualifyingEncounter.firstCreatinine ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-white-blood-cell-count-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First White Blood Cell Count In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstWBCcount: QualifyingEncounter.firstWhiteBloodCellCount ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-asa-physical-status-class"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable ASA Physical Status Class&quot;:
  [&quot;ObservationScreeningAssessment&quot;: &quot;American society of anesthesiologists morbidity state&quot;] ASAclass
    with &quot;Initial Population&quot; QualifyingEncounter
      such that ASAclass.status in { 'final', 'amended', 'corrected' }
        and ASAclass.startsDuringHospitalization ( QualifyingEncounter )
        and ASAclass.value as CodeableConcept in &quot;ASA Physical Status Class&quot;
    return ASAclass.value as CodeableConcept</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-principal-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Principal Procedure&quot;:
  from
    [&quot;Procedure&quot;] TheProcedure,
    &quot;Initial Population&quot; QualifyingEncounter
    where TheProcedure.status = 'completed'
      and TheProcedure.rank ( QualifyingEncounter ) is not null
      and TheProcedure.startsDuringHospitalization ( QualifyingEncounter )
    return Tuple {
      encounterId: QualifyingEncounter.id,
      procedureId: TheProcedure.id,
      procedureCode: TheProcedure.code,
      procedureRank: TheProcedure.rank ( QualifyingEncounter ),
      procedureTime: TheProcedure.performed.toInterval ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-body-mass-index-(bmi)"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Body Mass Index (BMI)&quot;:
  [&quot;USCore.BMIProfile&quot;] BMI
    with &quot;Initial Population&quot; InpatientEncounter
      such that BMI.effective.toInterval ( ) starts during InpatientEncounter.hospitalizationWithObservation ( )
        and BMI.value is not null
        and BMI.status in { 'final', 'amended', 'corrected' }
    return BMI.value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-bicarbonate-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Bicarbonate In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstBicarbonate: QualifyingEncounter.firstBicarbonate ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-bilirubin-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Bilirubin In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstBilirubin: QualifyingEncounter.firstBilirubin ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-qualifying-systolic-blood-pressure-reading"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Qualifying Systolic Blood Pressure Reading&quot;:
  [&quot;USCore.BloodPressureProfile&quot;] BloodPressure
    where BloodPressure.effective.earliest ( ) during day of &quot;Measurement Period&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-systolic-blood-pressure-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Systolic Blood Pressure In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstSystolic: QualifyingEncounter.firstSystolicBloodPressure ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-oxygen-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Oxygen In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstOxygen: QualifyingEncounter.firstOxygen ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-leukocyte-count-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Leukocyte Count In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstLeukocyte: QualifyingEncounter.firstLeukocyte ( )
    }</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-sde-race"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-sde-sex"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-anesthesia-procedure-list"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Anesthesia Procedure List&quot;:
  [&quot;Procedure&quot;: &quot;General And Neuraxial Anesthesia&quot;] AnesthesiaProcedures
    where AnesthesiaProcedures.performed.latest ( ) during day of &quot;Measurement Period&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-general-anesthesia-and-mac"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;General Anesthesia And MAC&quot;:
  [&quot;Procedure&quot;: &quot;Anesthesia Requiring Monitored Care&quot;] MAC
    union [&quot;Procedure&quot;: &quot;General And Neuraxial Anesthesia&quot;]</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-intubation-during-general-anesthesia-and-mac"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Intubation During General Anesthesia And MAC&quot;:
  from
    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,
    [&quot;Procedure&quot;: &quot;Intubation&quot;] ProceduralIntubation,
    &quot;General Anesthesia And MAC&quot; Anesthesia
    where ProceduralIntubation.status = 'completed'
      and ProceduralIntubation.startsDuringHospitalization ( EncounterWithSurgery )
      and ProceduralIntubation.performed.toInterval ( ) starts during Anesthesia.performed.toInterval ( )
    return ProceduralIntubation</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-intubation-outside-of-procedural-area-within-30-days-of-end-of-first-or-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Intubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    with [&quot;Procedure&quot;: &quot;Intubation&quot;] EndotrachealTubeIn
      such that EndotrachealTubeIn.status = 'completed'
        and EndotrachealTubeIn.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )
        and EndotrachealTubeIn.startsDuringHospitalization ( EncounterWithSurgery )
        and EndotrachealTubeIn.performed.toInterval ( ) starts after end of EndotrachealTubeIn.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )
        and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( EndotrachealTubeIn.performed.toInterval ( ) )
        and not ( &quot;Intubation During General Anesthesia And MAC&quot;.id contains EndotrachealTubeIn.id )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-noninvasive-oxygen-therapy"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Noninvasive Oxygen Therapy&quot;:
  ( [&quot;Procedure&quot;: &quot;Non Invasive Oxygen Therapy By Nasal Cannula Or Mask&quot;] P
      where P.status = 'completed'
  )
    union ( [&quot;LaboratoryResultObservation&quot;: &quot;Non Invasive Oxygen Therapy&quot;] O
        where O.status in { 'final', 'amended', 'corrected' }
    )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-mechanical-ventilation-outside-of-procedural-area-within-30-days-of-end-of-first-or-procedure-and-preceded-by-non-invasive-oxygen-therapy"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy&quot;:
  from
    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,
    [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation,
    &quot;Noninvasive Oxygen Therapy&quot; OxygenSupport
    let VentilationInterval: Ventilation.performed.toInterval ( ),
    LatestAnesthesiaInterval: Ventilation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )
    where Ventilation.status = 'completed'
      and Ventilation.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )
      and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )
      and VentilationInterval starts after end of LatestAnesthesiaInterval
      and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesiaInterval, start of VentilationInterval]
      and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( VentilationInterval )
    return EncounterWithSurgery</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-extubation-with-preceding-noninvasive-oxygen"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Extubation With Preceding Noninvasive Oxygen&quot;:
  from
    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,
    [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation,
    &quot;Noninvasive Oxygen Therapy&quot; OxygenSupport
    let LatestAnesthesia: Extubation.latestGeneralAnesthesiaOrMAC ( )
    where Extubation.status = 'completed'
      and Extubation.startsDuringHospitalization ( EncounterWithSurgery )
      and Extubation.performed.toInterval ( ) starts after LatestAnesthesia.performed.toInterval ( )
      and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesia.performed.toInterval ( ), start of Extubation.performed.toInterval ( )]
    return Extubation</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-extubation-during-general-anesthesia"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Extubation During General Anesthesia&quot;:
  from
    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,
    [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation,
    &quot;General Anesthesia And MAC&quot; Anesthesia
    where Extubation.status = 'completed'
      and Extubation.startsDuringHospitalization ( EncounterWithSurgery )
      and Extubation.performed.toInterval ( ) starts during Anesthesia.performed.toInterval ( )
    return Extubation</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-extubation-outside-of-procedural-area-within-30-days-of-end-of-first-or-procedure-more-than-48-hours-after-end-of-anesthesia"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Extubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure More Than 48 Hours After End Of Anesthesia&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    with [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation
      such that Extubation.status = 'completed'
        and Extubation.isDuringHospitalization ( EncounterWithSurgery )
        and Extubation.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )
        and Extubation.performed.toInterval ( ) starts more than 48 hours after end of Extubation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )
        and not ( ( &quot;Extubation With Preceding Noninvasive Oxygen&quot;.id contains Extubation.id )
            and not ( &quot;Extubation During General Anesthesia&quot;.id contains Extubation.id )
        )
        and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-mechanical-ventilation-within-30-days-of-end-of-first-or-procedure-and-between-48-and-72-hours-after-end-of-or-procedure-and-not-preceded-by-non-invasive-oxygen-therapy-or-anesthesia"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Mechanical Ventilation Within 30 Days Of End Of First OR Procedure And Between 48 And 72 Hours After End Of OR Procedure And Not Preceded By Non Invasive Oxygen Therapy Or Anesthesia&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    with [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation
      such that Ventilation.status = 'completed'
        and Ventilation.performed.toInterval ( ) starts 48 hours or more after end of Ventilation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )
        and Ventilation.performed.toInterval ( ) starts 72 hours or less after end of Ventilation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )
        and Ventilation.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )
        and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )
        and not ( &quot;Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy&quot;.id contains EncounterWithSurgery.id )
        and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-numerator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Encounter With Intubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure&quot;
    union &quot;Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy&quot;
    union &quot;Encounter With Extubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure More Than 48 Hours After End Of Anesthesia&quot;
    union &quot;Encounter With Mechanical Ventilation Within 30 Days Of End Of First OR Procedure And Between 48 And 72 Hours After End Of OR Procedure And Not Preceded By Non Invasive Oxygen Therapy Or Anesthesia&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-denominator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Initial Population&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-encounter-procedures"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter Procedures&quot;:
  from
    [&quot;Procedure&quot;] TheProcedure,
    &quot;Initial Population&quot; QualifyingEncounter
    where TheProcedure.status = 'completed'
      and TheProcedure.startsDuringHospitalization ( QualifyingEncounter )
    return {
      encounterId: QualifyingEncounter.id,
      procedureId: TheProcedure.id,
      procedureCode: TheProcedure.code,
      procedureRank: TheProcedure.rank ( QualifyingEncounter ),
      procedureTime: TheProcedure.performed.toInterval ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-blood-urea-nitrogen-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Blood Urea Nitrogen In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstBUN: QualifyingEncounter.firstBloodUreaNitrogen ( )
    }</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-sde-ethnicity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-degenerative-neurological-disorder"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Degenerative Neurological Disorder&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    where EncounterWithSurgery.reasonCode in &quot;Degenerative Neurological Disorder&quot;
      or EncounterWithSurgery.encounterReason ( ).code in &quot;Degenerative Neurological Disorder&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-high-risk-to-airway-head-neck-and-thoracic-surgery"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With High Risk To Airway Head Neck And Thoracic Surgery&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    with [&quot;Procedure&quot;: &quot;Head, Neck, And Thoracic Surgeries With High Risk Airway Compromise&quot;] HeadNeckProcedures
      such that HeadNeckProcedures.status = 'completed'
        and HeadNeckProcedures.startsDuringHospitalization ( EncounterWithSurgery )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-mechanical-ventilation-that-starts-more-than-one-hour-prior-to-start-of-first-or-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Mechanical Ventilation That Starts More Than One Hour Prior To Start Of First OR Procedure&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    with [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation
      such that Ventilation.status = 'completed'
        and Ventilation.performed.toInterval ( ) starts more than 1 hour before start of EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( ).performed.toInterval ( )
        and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-neuromuscular-disorder"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Neuromuscular Disorder&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    where EncounterWithSurgery.reasonCode in &quot;Neuromuscular Disorder&quot;
      or EncounterWithSurgery.encounterReason ( ).code in &quot;Neuromuscular Disorder&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-paco2-greater-than-50-and-arterial-ph-less-than-7.30-within-48-hours-prior-to-start-of-first-or-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With PaCO2 Greater Than 50 And Arterial pH Less Than 7.30 Within 48 Hours Prior To Start Of First OR Procedure&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    let FirstProcedureTime: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( ).performed.toInterval ( )
    with [&quot;LaboratoryResultObservation&quot;: &quot;Carbon Dioxide Partial Pressure In Arterial Blood&quot;] CarbonDioxide
      such that CarbonDioxide.status in { 'final', 'amended', 'corrected' }
        and CarbonDioxide.effective.toInterval ( ) starts 48 hours or less before start of FirstProcedureTime
        and CarbonDioxide.value as Quantity &gt; 50 'mm[Hg]'
    with [&quot;LaboratoryResultObservation&quot;: &quot;Arterial Blood pH&quot;] BloodpH
      such that BloodpH.status in { 'final', 'amended', 'corrected' }
        and BloodpH.effective.toInterval ( ) starts 48 hours or less before start of FirstProcedureTime
        and BloodpH.value as Quantity &lt; 7.30 '[pH]'</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-pao2-less-than-50-within-48-hours-prior-to-start-of-first-or-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With PaO2 Less Than 50 Within 48 Hours Prior To Start Of First OR Procedure&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    let FirstProcedure: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( )
    with [&quot;LaboratoryResultObservation&quot;: &quot;Oxygen Partial Pressure In Arterial Blood&quot;] Oxygen
      such that Oxygen.status in { 'final', 'amended', 'corrected' }
        and Oxygen.effective.toInterval ( ) starts 48 hours or less before start of FirstProcedure.performed.toInterval ( )
        and Oxygen.value as Quantity &lt; 50 'mm[Hg]'</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-principal-diagnosis-of-acute-respiratory-failure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Principal Diagnosis Of Acute Respiratory Failure&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    where EncounterWithSurgery.hasPrincipalDiagnosisOf ( &quot;Acute Respiratory Failure&quot; )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-diagnosis-of-acute-respiratory-failure-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Diagnosis Of Acute Respiratory Failure Present On Admission&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    where EncounterWithSurgery.isDiagnosisPresentOnAdmission ( &quot;Acute Respiratory Failure&quot;, &quot;Present On Admission Or Clinically Undetermined&quot; )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-tracheostomy-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Tracheostomy Present On Admission&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    where EncounterWithSurgery.isDiagnosisPresentOnAdmission ( &quot;Tracheostomy Diagnoses&quot;, &quot;Present On Admission Or Clinically Undetermined&quot; )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-tracheostomy-before-day-of-first-or-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Tracheostomy Before Day Of First OR Procedure&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    let FirstProcedure: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( )
    with [&quot;Procedure&quot;: &quot;Tracheostomy Procedures&quot;] TracheostomySurgery
      such that TracheostomySurgery.status = 'completed'
        and TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )
        and TracheostomySurgery.performed.toInterval ( ) starts before day of FirstProcedure.performed.toInterval ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-tracheostomy-same-day-of-first-or-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Tracheostomy Same Day Of First OR Procedure&quot;:
  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery
    let FirstProcedure: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( )
    with [&quot;Procedure&quot;: &quot;Tracheostomy Procedures&quot;] TracheostomySurgery
      such that TracheostomySurgery.status = 'completed'
        and TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )
        and TracheostomySurgery.performed.toInterval ( ) starts during day of FirstProcedure.performed.toInterval ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounter-with-tracheostomy-prior-to-or-on-the-same-day-of-first-or-procedure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Tracheostomy Prior To Or On The Same Day Of First OR Procedure&quot;:
  &quot;Encounter With Tracheostomy Before Day Of First OR Procedure&quot;
    union &quot;Encounter With Tracheostomy Same Day Of First OR Procedure&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-denominator-exclusions"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
  &quot;Encounter With Degenerative Neurological Disorder&quot;
    union &quot;Encounter With High Risk To Airway Head Neck And Thoracic Surgery&quot;
    union &quot;Encounter With Mechanical Ventilation That Starts More Than One Hour Prior To Start Of First OR Procedure&quot;
    union &quot;Encounter With Neuromuscular Disorder&quot;
    union &quot;Encounter With PaCO2 Greater Than 50 And Arterial pH Less Than 7.30 Within 48 Hours Prior To Start Of First OR Procedure&quot;
    union &quot;Encounter With PaO2 Less Than 50 Within 48 Hours Prior To Start Of First OR Procedure&quot;
    union &quot;Encounter With Principal Diagnosis Of Acute Respiratory Failure&quot;
    union &quot;Encounter With Diagnosis Of Acute Respiratory Failure Present On Admission&quot;
    union &quot;Encounter With Tracheostomy Present On Admission&quot;
    union &quot;Encounter With Tracheostomy Prior To Or On The Same Day Of First OR Procedure&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-ast-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First AST In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstAST: QualifyingEncounter.firstAST ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-risk-variable-first-platelet-count-in-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable First Platelet Count In Encounter&quot;:
  &quot;Initial Population&quot; QualifyingEncounter
    return Tuple {
      encounterId: QualifyingEncounter.id,
      firstPlatelet: QualifyingEncounter.firstPlatelet ( )
    }</code></pre>
  </td>

</tr>



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-encounterreason"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function encounterReason(Encounter Encounter):
  Encounter.reasonReference D
    return singleton from ( ( [ConditionEncounterDiagnosis] cA
        union [ConditionProblemsHealthConcerns] cB ) C
        where D.references ( C.id )
    )</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstrespiratoryrate"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstRespiratoryRate(QualifyingEncounter Encounter):
  First([USCore.RespiratoryRateProfile: &quot;Respiratory rate&quot;] FirstRespiration
      where FirstRespiration.status in { 'final', 'amended', 'corrected' }
        and FirstRespiration.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()
        and FirstRespiration.value is not null
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstalbumin"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstAlbumin(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Albumin Lab Test&quot;] FirstAlbuminTest
      where FirstAlbuminTest.status in { 'final', 'amended', 'corrected' }
        and FirstAlbuminTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-isearliestduringhospitalization"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isEarliestDuringHospitalization(choice Choice&lt;Procedure, LaboratoryResultObservation&gt;, encounter Encounter):
  case
    when choice is Procedure then ( choice as Procedure ).earliestIsDuringHospitalization ( encounter )
    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).earliestOccursDuringHospitalization ( encounter ) 
    else false end</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-earliestisduringhospitalization"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function earliestIsDuringHospitalization(procedure Procedure, encounter Encounter):
  procedure.performed.earliest ( ) during encounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )
    and procedure.partOf is not null</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-earliestoccursduringhospitalization"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function earliestOccursDuringHospitalization(observation LaboratoryResultObservation, encounter Encounter):
  observation.effective.earliest ( ) during encounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )
    and observation.value is not null</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstarterialph"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstArterialpH(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Arterial Blood pH&quot;] FirstArterialpHTest
      where FirstArterialpHTest.status in { 'final', 'amended', 'corrected' }
        and FirstArterialpHTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstbodytemperature"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstBodyTemperature(QualifyingEncounter Encounter):
  First([&quot;USCore.BodyTemperatureProfile&quot;: &quot;Body temperature&quot;] FirstTemperature
      where FirstTemperature.status in { 'final', 'amended', 'corrected' }
        and FirstTemperature.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()
        and FirstTemperature.value is not null
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstcarbondioxide"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstCarbonDioxide(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Carbon Dioxide Partial Pressure In Arterial Blood&quot;] FirstCarbonDioxideTest
      where FirstCarbonDioxideTest.status in { 'final', 'amended', 'corrected' }
        and FirstCarbonDioxideTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firsthematocrit"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstHematocrit(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Hematocrit Lab Test&quot;] FirstHematocritTest
      where FirstHematocritTest.status in { 'final', 'amended', 'corrected' }
        and FirstHematocritTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstheartrate"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstHeartRate(QualifyingEncounter Encounter):
  First([&quot;USCore.HeartRateProfile&quot;: &quot;Heart rate&quot;] FirstHeartBeats
      where FirstHeartBeats.status in { 'final', 'amended', 'corrected' }
        and FirstHeartBeats.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()
        and FirstHeartBeats.value is not null
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstbmi"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstBMI(QualifyingEncounter Encounter):
  First([USCore.BMIProfile] FirstBodyMass
      where FirstBodyMass.status in { 'final', 'amended', 'corrected' }
        and FirstBodyMass.effective.toInterval() starts during QualifyingEncounter.hospitalizationWithObservation()
        and FirstBodyMass.value is not null
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firsthemoglobin"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstHemoglobin(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Hemoglobin Lab Test&quot;] FirstHemoglobinTest
      where FirstHemoglobinTest.status in { 'final', 'amended', 'corrected' }
        and FirstHemoglobinTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-claimdiagnoseswithpoa"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function claimDiagnosesWithPOA(encounter Encounter):
  encounter E
    let claim: ( [Claim] C
        where C.status = 'active'
          and C.use = 'claim'
          and exists ( C.item I
              where I.encounter.references ( E )
          )
    ),
    claimItem: ( claim.item I
        where I.encounter.references ( E )
    )
    return claim.diagnosis D
      where D.sequence in claimItem.diagnosisSequence
        and D.onAdmission is not null</code></pre>
  </td>

</tr>



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstsodium"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstSodium(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Sodium Lab Test&quot;] FirstSodiumTest
      where FirstSodiumTest.status in { 'final', 'amended', 'corrected' }
        and FirstSodiumTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstcreatinine"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstCreatinine(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Creatinine Lab Test&quot;] FirstCreatinineTest
      where FirstCreatinineTest.status in { 'final', 'amended', 'corrected' }
        and FirstCreatinineTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstwhitebloodcellcount"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstWhiteBloodCellCount(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;White Blood Cells Count Lab Test&quot;] FirstWBCCount
      where FirstWBCCount.status in { 'final', 'amended', 'corrected' }
        and FirstWBCCount.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-startsduringhospitalization"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function startsDuringHospitalization(choice Choice&lt;Procedure, LaboratoryResultObservation, ObservationScreeningAssessment&gt;, enc Encounter):
  case
    when choice is Procedure then ( choice as Procedure ).performed.toInterval ( ) starts during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )
    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).effective.toInterval ( ) starts during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )
    when choice is ObservationScreeningAssessment then ( choice as ObservationScreeningAssessment ).effective.toInterval ( ) starts during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( ) 
    else false end</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-rank"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function rank(targetProcedure Procedure, parentEncounter Encounter):
  singleton from ( targetProcedure P
      let claim: ( [Claim] C
          where C.status = 'active'
            and C.use = 'claim'
            and exists ( C.item I
                where I.encounter.references ( parentEncounter )
            )
      ),
      claimProc: ( claim.procedure proc
          where proc.procedure.references ( P )
      )
      return claimProc.sequence R
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstbicarbonate"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstBicarbonate(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Bicarbonate Lab Test&quot;] FirstBicarbonateTest
      where FirstBicarbonateTest.status in { 'final', 'amended', 'corrected' }
        and FirstBicarbonateTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstbilirubin"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstBilirubin(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Bilirubin Lab Test&quot;] FirstBilirubinTest
      where FirstBilirubinTest.status in { 'final', 'amended', 'corrected' }
        and FirstBilirubinTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstsystolicbloodpressure"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function &quot;firstSystolicBloodPressure&quot;(QualifyingEncounter Encounter):
  First(&quot;Qualifying Systolic Blood Pressure Reading&quot; SBPReading
      where SBPReading.status in { 'final', 'amended', 'corrected' }
        and SBPReading.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()
      return singleton from(SBPReading.component SBPComponent
          where SBPComponent.code ~ &quot;Systolic blood pressure&quot;
          return SBPComponent.value as Quantity
      )
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstoxygen"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstOxygen(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Oxygen Partial Pressure In Arterial Blood&quot;] FirstOxygenTest
      where FirstOxygenTest.status in { 'final', 'amended', 'corrected' }
        and FirstOxygenTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstleukocyte"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstLeukocyte(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Leukocyte Count Lab Test&quot;] FirstLeukocyteCount
      where FirstLeukocyteCount.status in { 'final', 'amended', 'corrected' }
        and FirstLeukocyteCount.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-starts30daysorlessafterfirstanesthesia"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function starts30DaysOrLessAfterFirstAnesthesia(procedure Procedure, encounter Encounter):
  procedure.performed.toInterval ( ) starts 30 days or less after end of encounter.firstAnesthesiaDuringHospitalization ( ).performed.toInterval ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstanesthesiaduringhospitalization"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function &quot;firstAnesthesiaDuringHospitalization&quot;(QualifyingEncounter Encounter):
  First(&quot;Anesthesia Procedure List&quot; anesthesia
      where anesthesia.status = 'completed'
        and anesthesia.startsDuringHospitalization(QualifyingEncounter)
      sort by start of performed.toInterval()
  )</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-latestgeneralanesthesiaormac"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function latestGeneralAnesthesiaOrMAC(event Procedure):
  Last(&quot;General Anesthesia And MAC&quot; ProcedureList
      where ProcedureList.status = 'completed'
        and ProcedureList.performed.toInterval() ends before start of event.performed.toInterval()
      sort by start of performed.toInterval()
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-isnotatproceduralhospitallocationduring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isNotAtProceduralHospitalLocationDuring(encounter Encounter, intrvl Interval&lt;DateTime&gt;):
  not exists ( encounter.location EncounterLocation
      with [Location] Location
        such that EncounterLocation.location.references ( Location )
          and Location.type.includesCode ( &quot;ER&quot; )
          and EncounterLocation.period starts during intrvl
  )</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-interval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function interval(choice Choice&lt;Procedure, LaboratoryResultObservation, Encounter&gt;):
  case
    when choice is Procedure then ( choice as Procedure ).performed.toInterval ( )
    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).effective.toInterval ( )
    when choice is Encounter then ( choice as Encounter ).period.toInterval ( ) 
    else null as Interval&lt;DateTime&gt;end</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-isduringhospitalization"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isDuringHospitalization(choice Choice&lt;Procedure, LaboratoryResultObservation&gt;, enc Encounter):
  case
    when choice is Procedure then ( choice as Procedure ).performed.toInterval ( ) during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )
    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).effective.toInterval ( ) during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( ) 
    else false end</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-isnotatproceduralhospitallocation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isNotAtProceduralHospitalLocation(encounter Encounter):
  not exists ( encounter.location EncounterLocation
      with [Location] Location
        such that EncounterLocation.location.references ( Location )
          and Location.type.includesCode ( &quot;ER&quot; )
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstbloodureanitrogen"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstBloodUreaNitrogen(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Blood Urea Nitrogen Lab Test&quot;] FirstBUN
      where FirstBUN.status in { 'final', 'amended', 'corrected' }
        and FirstBUN.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstast"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstAST(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Aspartate transaminase Lab Test&quot;] FirstASTTest
      where FirstASTTest.status in { 'final', 'amended', 'corrected' }
        and FirstASTTest.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS1218FHIRHHRF</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1218fhirhhrf-firstplatelet"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function firstPlatelet(QualifyingEncounter Encounter):
  First([LaboratoryResultObservation: &quot;Platelet Count Lab Test&quot;] FirstPlateletCount
      where FirstPlateletCount.status in { 'final', 'amended', 'corrected' }
        and FirstPlateletCount.isEarliestDuringHospitalization(QualifyingEncounter)
      sort by effective.earliest()
  ).value as Quantity</code></pre>
  </td>

</tr>





  
  


  <tr>


<th colspan="2" scope="row" class="row-header"><a name="terminology"> </a>Terminology</th>


</tr>
  
  
  

 

 

 

 

 

 

 

 


<tr>
  
  
  

<th scope="row" class="row-header">Code System</th>


  
  <td class="content-container">
    
    <em>Description</em>: Code system SNOMEDCT
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">SNOMED CT (all versions)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

<th scope="row" class="row-header">Code System</th>


  
  <td class="content-container">
    
    <em>Description</em>: Code system LOINC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-v3-loinc.html">Logical Observation Identifiers, Names and Codes (LOINC)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://loinc.org</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

<th scope="row" class="row-header">Code System</th>


  
  <td class="content-container">
    
    <em>Description</em>: Code system LocationRoles
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-v3-RoleCode.html">RoleCode</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-RoleCode</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

<th scope="row" class="row-header">Code System</th>


  
  <td class="content-container">
    
    <em>Description</em>: Code system Diagnosis Type
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-ex-diagnosistype.html">Example Diagnosis Type Codes</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/ex-diagnosistype</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Elective Inpatient Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.85/expansion">Elective Inpatient Encounter</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Emergency Department Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Obstetrical Or Pregnancy Related Conditions
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.263/expansion">Obstetrical or Pregnancy Related Conditions</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set General And Neuraxial Anesthesia
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion">General and Neuraxial Anesthesia</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Observation Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Outpatient Surgery Service
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.38/expansion">Outpatient Surgery Service</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.38</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Albumin Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.221/expansion">Albumin lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.221</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Arterial Blood pH
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.96/expansion">Arterial Blood pH</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Carbon Dioxide Partial Pressure In Arterial Blood
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.95/expansion">Carbon Dioxide Partial Pressure in Arterial Blood</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hematocrit Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.114/expansion">Hematocrit lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.114</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hemoglobin Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.219/expansion">Hemoglobin lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.219</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Sodium Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.119/expansion">Sodium lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.119</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Payer Type
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Creatinine Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.2363/expansion">Creatinine lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.2363</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set White Blood Cells Count Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.129/expansion">White blood cells count lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.129</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set ASA Physical Status Class
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.217/expansion">ASA physical status class</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.217</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Bicarbonate Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.139/expansion">Bicarbonate lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.139</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Bilirubin Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.223/expansion">Bilirubin lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.223</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Oxygen Partial Pressure In Arterial Blood
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.94/expansion">Oxygen Partial Pressure in Arterial Blood</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Leukocyte Count Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.222/expansion">Leukocyte count lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.222</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Intubation
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.179/expansion">Intubation</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Anesthesia Requiring Monitored Care
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.255/expansion">Anesthesia Requiring Monitored Care</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Mechanical Ventilation
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.107/expansion">Mechanical Ventilation</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Non Invasive Oxygen Therapy By Nasal Cannula Or Mask
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.209/expansion">Non Invasive Oxygen Therapy by Nasal Cannula or Mask</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Non Invasive Oxygen Therapy
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.213/expansion">Non Invasive Oxygen Therapy</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Blood Urea Nitrogen Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.218/expansion">Blood urea nitrogen lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.218</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Degenerative Neurological Disorder
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.241/expansion">Degenerative Neurological Disorder</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.241</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Head, Neck, And Thoracic Surgeries With High Risk Airway Compromise
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.251/expansion">Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Neuromuscular Disorder
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.239/expansion">Neuromuscular Disorder</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.239</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Acute Respiratory Failure
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.88/expansion">Acute Respiratory Failure</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.88</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Present On Admission Or Clinically Undetermined
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1147.197/expansion">Present on Admission or Clinically Undetermined</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.197</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Tracheostomy Diagnoses
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.89/expansion">Tracheostomy Diagnoses</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.89</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Tracheostomy Procedures
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.181/expansion">Tracheostomy Procedures</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Aspartate transaminase Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.224/expansion">Aspartate transaminase lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.224</tt>
    
  </td>
</tr>
 


<tr>
  
  

<th scope="row" class="row-header">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Platelet Count Lab Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.127/expansion">Platelet count lab test</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.127</tt>
    
  </td>
</tr>
 


  
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Elective (qualifier value)
        <br/>
      
      <em>Code</em>: 103390000
      <br/>
      <em>System</em>: <tt>http://snomed.info/sct</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Respiratory rate
        <br/>
      
      <em>Code</em>: 9279-1
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Body temperature
        <br/>
      
      <em>Code</em>: 8310-5
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Heart rate
        <br/>
      
      <em>Code</em>: 8867-4
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: American society of anesthesiologists morbidity state
        <br/>
      
      <em>Code</em>: 97816-3
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Systolic blood pressure
        <br/>
      
      <em>Code</em>: 8480-6
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Male (finding)
        <br/>
      
      <em>Code</em>: 248153007
      <br/>
      <em>System</em>: <tt>http://snomed.info/sct</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Female (finding)
        <br/>
      
      <em>Code</em>: 248152002
      <br/>
      <em>System</em>: <tt>http://snomed.info/sct</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Emergency room
        <br/>
      
      <em>Code</em>: ER
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-RoleCode</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Removal of endotracheal tube (procedure)
        <br/>
      
      <em>Code</em>: 271280005
      <br/>
      <em>System</em>: <tt>http://snomed.info/sct</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Principal Diagnosis
        <br/>
      
      <em>Code</em>: principal
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/ex-diagnosistype</tt>
    </td>
  </tr>

  
  


  <tr>


<th colspan="2" scope="row" class="row-header"><a name="dependencies"> </a>Dependencies</th>


</tr>
  
  
  


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: USQualityCore model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild</tt>
    
  </td>
</tr>
 


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: USCore model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/us/cql/2026May/Library-USCore-ModelInfo.html">http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived</tt>
    
  </td>
</tr>
 


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: FHIR model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIR-ModelInfo.html">http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</tt>
    
  </td>
</tr>
 


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: Library FHIRHelpers
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIRHelpers.html">http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</tt>
    
  </td>
</tr>
 


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: Library FHIRCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIRCommon.html">http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0</tt>
    
  </td>
</tr>
 


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: Library CQMCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-CQMCommon.html">CQMCommon</a> version: 5.1.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/CQMCommon|5.1.000</tt>
    
  </td>
</tr>
 


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: Library SDE
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-SupplementalDataElements.html">SupplementalDataElements</a> version: 6.1.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/SupplementalDataElements|6.1.000</tt>
    
  </td>
</tr>
 


<tr>
  

<th scope="row" class="row-header">Dependency</th>


  <td class="content-container">
    
    <em>Description</em>: Library USCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/us/cql/2026May/Library-USCoreCommon.html">http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot</tt>
    
  </td>
</tr>
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


  
  






  <tr>


<th colspan="2" scope="row" class="row-header"><a name="data-requirements"> </a>Data Requirements</th>


</tr>
  
  
  
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: ombCategory, detailed, text
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period, id, location, reasonCode, diagnosis, diagnosis.code, onAdmission
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: finished (finished)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, id, location, reasonCode, diagnosis, diagnosis.code, onAdmission
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.38/expansion">Outpatient Surgery Service</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period, priority, id, location, reasonCode, diagnosis, diagnosis.code, onAdmission
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.85/expansion">Elective Inpatient Encounter</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period, id, location, reasonCode, diagnosis, diagnosis.code, onAdmission
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: finished (finished)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period, id, location, reasonCode, diagnosis, diagnosis.code, onAdmission
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: finished (finished)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: period, id, location, reasonCode, type, diagnosis, diagnosis.code, onAdmission
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis</code>
    <br/>        
  
   
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns</code>
    <br/>        
  
   
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: birthDate
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion">General and Neuraxial Anesthesia</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, status, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion">General and Neuraxial Anesthesia</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, status, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion">General and Neuraxial Anesthesia</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.255/expansion">Anesthesia Requiring Monitored Care</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.208/expansion">General and Neuraxial Anesthesia</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.179/expansion">Intubation</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.209/expansion">Non Invasive Oxygen Therapy by Nasal Cannula or Mask</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, status, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.107/expansion">Mechanical Ventilation</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="http://snomed.info/id/271280005">SNOMED CT: 271280005</a> (Removal of endotracheal tube (procedure))
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="http://snomed.info/id/271280005">SNOMED CT: 271280005</a> (Removal of endotracheal tube (procedure))
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.107/expansion">Mechanical Ventilation</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: status, id, code, performed
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.251/expansion">Head, Neck, and Thoracic Surgeries with High Risk Airway Compromise</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.107/expansion">Mechanical Ventilation</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: performed, status, id, partOf
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed, id
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.181/expansion">Tracheostomy Procedures</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-respiratory-rate.html">US Core Respiratory Rate Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: status, effective, value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-respiratory-rate.html">US Core Respiratory Rate Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.221/expansion">Albumin lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.96/expansion">Arterial Blood pH</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.95/expansion">Carbon Dioxide Partial Pressure in Arterial Blood</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.114/expansion">Hematocrit lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.219/expansion">Hemoglobin lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.119/expansion">Sodium lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.2363/expansion">Creatinine lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.129/expansion">White blood cells count lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.139/expansion">Bicarbonate lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.223/expansion">Bilirubin lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.222/expansion">Leukocyte count lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.213/expansion">Non Invasive Oxygen Therapy</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.218/expansion">Blood urea nitrogen lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, effective, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.95/expansion">Carbon Dioxide Partial Pressure in Arterial Blood</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, effective, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.96/expansion">Arterial Blood pH</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, effective, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.94/expansion">Oxygen Partial Pressure in Arterial Blood</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.224/expansion">Aspartate transaminase lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1045.127/expansion">Platelet count lab test</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: effective, value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-body-temperature.html">US Core Body Temperature Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: status, effective, value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-body-temperature.html">US Core Body Temperature Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-heart-rate.html">US Core Heart Rate Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: status, effective, value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-heart-rate.html">US Core Heart Rate Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-bmi.html">US Core BMI Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: status, effective, value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Resource
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/resource.html">Resource</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Claim
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/claim.html">Claim</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: status, use, item
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: active (active)
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: use</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: claim (claim)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Coverage
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: effective
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/97816-3">LOINC: 97816-3</a> (American society of anesthesiologists morbidity state)
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: value</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.217/expansion">ASA physical status class</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-blood-pressure.html">US Core Blood Pressure Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: effective, status, component
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Location
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/location.html">Location</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type
    <br/>
   
   
  </td>
</tr>

  
  


  <tr>


<th colspan="2" scope="row" class="row-header"><a name="parameters"> </a>Parameters</th>


</tr>
  
  
  <tr>
  

<th scope="row" class="row-header"/>


  <td class="content-container">
    <table>
      <thead>
        <tr>
          <td><em>Name</em></td>
          <td><em>Use</em></td>
          <td><em>Card.</em></td>
          <td><em>Type</em></td>
          <td><em>Documentation</em></td>
        </tr>
      </thead>
      <tbody>
      
        <tr>
          <td>Measurement Period</td>
          <td>In</td>
          <td>0..1</td>
          <td>Period</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Respiratory Rate In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Albumin In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Arterial pH In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Body Temperature In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Carbon Dioxide In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Hematocrit In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Heart Rate In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First BMI</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Hemoglobin In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable All Encounter Diagnoses With POA Indication</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Sodium In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Payer</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Initial Population</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Creatinine In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First White Blood Cell Count In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable ASA Physical Status Class</td>
          <td>Out</td>
          <td>0..*</td>
          <td>CodeableConcept</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Principal Procedure</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Body Mass Index (BMI)</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Quantity</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Bicarbonate In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Bilirubin In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Systolic Blood Pressure In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Oxygen In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Leukocyte Count In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Race</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Sex</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Coding</td>
          <td/>
        </tr>
      
        <tr>
          <td>Numerator</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Denominator</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter Procedures</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Blood Urea Nitrogen In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Ethnicity</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Denominator Exclusions</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First AST In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable First Platelet Count In Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
      </tbody>
    </table>
  </td>
</tr>

  
  

<tr>
  <th colspan="2" scope="row" class="row-header">Generated using version 0.5.4 of the sample-content-ig Liquid templates</th>
</tr>

    </tbody>
  </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="103390000"/>
          <display value="Elective (qualifier value)"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="9279-1"/>
          <display value="Respiratory rate"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="8310-5"/>
          <display value="Body temperature"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="8867-4"/>
          <display value="Heart rate"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="97816-3"/>
          <display value="American society of anesthesiologists morbidity state"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="8480-6"/>
          <display value="Systolic blood pressure"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248153007"/>
          <display value="Male (finding)"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248152002"/>
          <display value="Female (finding)"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-RoleCode"/>
          <code value="ER"/>
          <display value="Emergency room"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="271280005"/>
          <display value="Removal of endotracheal tube (procedure)"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/ex-diagnosistype"/>
          <code value="principal"/>
          <display value="Principal Diagnosis"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Elective Inpatient Encounter With Age 18 And Older Without ED Visit"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Elective Inpatient Encounter With Age 18 And Older Without ED Visit&quot;:&#xA;  [&quot;Encounter&quot;: &quot;Elective Inpatient Encounter&quot;] ElectiveEncounter&#xA;    where ElectiveEncounter.status = 'finished'&#xA;      and ElectiveEncounter.period ends during day of &quot;Measurement Period&quot;&#xA;      and ElectiveEncounter.priority is not null implies ElectiveEncounter.priority ~ &quot;Elective (qualifier value)&quot;&#xA;      and AgeInYearsAt(date from start of ElectiveEncounter.period) &gt;= 18&#xA;      and not exists ( [&quot;Encounter&quot;: &quot;Emergency Department Visit&quot;] EDVisit&#xA;          where EDVisit.status = 'finished'&#xA;            and EDVisit.period ends 1 hour or less before or on start of ElectiveEncounter.period&#xA;      )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Elective Inpatient Encounter With Age And Without Obstetrical Condition"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Elective Inpatient Encounter With Age And Without Obstetrical Condition&quot;:&#xA;  &quot;Elective Inpatient Encounter With Age 18 And Older Without ED Visit&quot; ElectiveEncounter&#xA;    where not ( ElectiveEncounter.reasonCode in &quot;Obstetrical Or Pregnancy Related Conditions&quot;&#xA;        or ElectiveEncounter.encounterReason ( ).code in &quot;Obstetrical Or Pregnancy Related Conditions&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Elective Inpatient Encounter With OR Procedure Within 3 Days"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot;:&#xA;  &quot;Elective Inpatient Encounter With Age And Without Obstetrical Condition&quot; ElectiveEncounter&#xA;    with [&quot;Procedure&quot;: &quot;General And Neuraxial Anesthesia&quot;] SurgeryWithAnesthesia&#xA;      such that SurgeryWithAnesthesia.status = 'completed'&#xA;        and SurgeryWithAnesthesia.performed.earliest ( ) during ElectiveEncounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )&#xA;        and SurgeryWithAnesthesia.performed.earliest ( ) 3 days or less after start of ElectiveEncounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Initial Population&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Respiratory Rate In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Respiratory Rate In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstRespiratoryRate: QualifyingEncounter.firstRespiratoryRate ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Albumin In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Albumin In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstAlbumin: QualifyingEncounter.firstAlbumin ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Arterial pH In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Arterial pH In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstArterialpH: QualifyingEncounter.firstArterialpH ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Body Temperature In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Body Temperature In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstBodyTemp: QualifyingEncounter.firstBodyTemperature ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Carbon Dioxide In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Carbon Dioxide In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstCarbonDioxide: QualifyingEncounter.firstCarbonDioxide ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Hematocrit In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Hematocrit In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstHematocrit: QualifyingEncounter.firstHematocrit ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Heart Rate In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Heart Rate In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstHeartRate: QualifyingEncounter.firstHeartRate ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First BMI"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First BMI&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstBMI: QualifyingEncounter.firstBMI ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Hemoglobin In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Hemoglobin In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstHemoglobin: QualifyingEncounter.firstHemoglobin ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable All Encounter Diagnoses With POA Indication"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable All Encounter Diagnoses With POA Indication&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      diagnoses: QualifyingEncounter.claimDiagnosesWithPOA ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Sodium In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Sodium In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstSodium: QualifyingEncounter.firstSodium ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-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;:&#xA;  [USQualityCore.Coverage: type in &quot;Payer Type&quot;] Payer&#xA;    return {&#xA;      code: Payer.type,&#xA;      period: Payer.period&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Payer&quot;:&#xA;  SDE.&quot;SDE Payer&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Creatinine In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Creatinine In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstCreatinine: QualifyingEncounter.firstCreatinine ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First White Blood Cell Count In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First White Blood Cell Count In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstWBCcount: QualifyingEncounter.firstWhiteBloodCellCount ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable ASA Physical Status Class"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable ASA Physical Status Class&quot;:&#xA;  [&quot;ObservationScreeningAssessment&quot;: &quot;American society of anesthesiologists morbidity state&quot;] ASAclass&#xA;    with &quot;Initial Population&quot; QualifyingEncounter&#xA;      such that ASAclass.status in { 'final', 'amended', 'corrected' }&#xA;        and ASAclass.startsDuringHospitalization ( QualifyingEncounter )&#xA;        and ASAclass.value as CodeableConcept in &quot;ASA Physical Status Class&quot;&#xA;    return ASAclass.value as CodeableConcept"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Principal Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Principal Procedure&quot;:&#xA;  from&#xA;    [&quot;Procedure&quot;] TheProcedure,&#xA;    &quot;Initial Population&quot; QualifyingEncounter&#xA;    where TheProcedure.status = 'completed'&#xA;      and TheProcedure.rank ( QualifyingEncounter ) is not null&#xA;      and TheProcedure.startsDuringHospitalization ( QualifyingEncounter )&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      procedureId: TheProcedure.id,&#xA;      procedureCode: TheProcedure.code,&#xA;      procedureRank: TheProcedure.rank ( QualifyingEncounter ),&#xA;      procedureTime: TheProcedure.performed.toInterval ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Body Mass Index (BMI)"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Body Mass Index (BMI)&quot;:&#xA;  [&quot;USCore.BMIProfile&quot;] BMI&#xA;    with &quot;Initial Population&quot; InpatientEncounter&#xA;      such that BMI.effective.toInterval ( ) starts during InpatientEncounter.hospitalizationWithObservation ( )&#xA;        and BMI.value is not null&#xA;        and BMI.status in { 'final', 'amended', 'corrected' }&#xA;    return BMI.value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Bicarbonate In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Bicarbonate In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstBicarbonate: QualifyingEncounter.firstBicarbonate ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Bilirubin In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Bilirubin In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstBilirubin: QualifyingEncounter.firstBilirubin ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Systolic Blood Pressure Reading"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Qualifying Systolic Blood Pressure Reading&quot;:&#xA;  [&quot;USCore.BloodPressureProfile&quot;] BloodPressure&#xA;    where BloodPressure.effective.earliest ( ) during day of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Systolic Blood Pressure In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Systolic Blood Pressure In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstSystolic: QualifyingEncounter.firstSystolicBloodPressure ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Oxygen In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Oxygen In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstOxygen: QualifyingEncounter.firstOxygen ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Leukocyte Count In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Leukocyte Count In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstLeukocyte: QualifyingEncounter.firstLeukocyte ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-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;:&#xA;  (Patient.race()) R&#xA;    return Tuple {&#xA;      codes: R.ombCategory union R.detailed,&#xA;      display: R.text&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Race&quot;:&#xA;  SDE.&quot;SDE Race&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-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;:&#xA;  case&#xA;    when Patient.sex() = '248153007' then &quot;Male (finding)&quot;&#xA;    when Patient.sex() = '248152002' then &quot;Female (finding)&quot;&#xA;    else null&#xA;  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Sex&quot;:&#xA;  SDE.&quot;SDE Sex&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Anesthesia Procedure List"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Anesthesia Procedure List&quot;:&#xA;  [&quot;Procedure&quot;: &quot;General And Neuraxial Anesthesia&quot;] AnesthesiaProcedures&#xA;    where AnesthesiaProcedures.performed.latest ( ) during day of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="General Anesthesia And MAC"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;General Anesthesia And MAC&quot;:&#xA;  [&quot;Procedure&quot;: &quot;Anesthesia Requiring Monitored Care&quot;] MAC&#xA;    union [&quot;Procedure&quot;: &quot;General And Neuraxial Anesthesia&quot;]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="33"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Intubation During General Anesthesia And MAC"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Intubation During General Anesthesia And MAC&quot;:&#xA;  from&#xA;    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,&#xA;    [&quot;Procedure&quot;: &quot;Intubation&quot;] ProceduralIntubation,&#xA;    &quot;General Anesthesia And MAC&quot; Anesthesia&#xA;    where ProceduralIntubation.status = 'completed'&#xA;      and ProceduralIntubation.startsDuringHospitalization ( EncounterWithSurgery )&#xA;      and ProceduralIntubation.performed.toInterval ( ) starts during Anesthesia.performed.toInterval ( )&#xA;    return ProceduralIntubation"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Intubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Intubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    with [&quot;Procedure&quot;: &quot;Intubation&quot;] EndotrachealTubeIn&#xA;      such that EndotrachealTubeIn.status = 'completed'&#xA;        and EndotrachealTubeIn.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )&#xA;        and EndotrachealTubeIn.startsDuringHospitalization ( EncounterWithSurgery )&#xA;        and EndotrachealTubeIn.performed.toInterval ( ) starts after end of EndotrachealTubeIn.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )&#xA;        and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( EndotrachealTubeIn.performed.toInterval ( ) )&#xA;        and not ( &quot;Intubation During General Anesthesia And MAC&quot;.id contains EndotrachealTubeIn.id )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Noninvasive Oxygen Therapy"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Noninvasive Oxygen Therapy&quot;:&#xA;  ( [&quot;Procedure&quot;: &quot;Non Invasive Oxygen Therapy By Nasal Cannula Or Mask&quot;] P&#xA;      where P.status = 'completed'&#xA;  )&#xA;    union ( [&quot;LaboratoryResultObservation&quot;: &quot;Non Invasive Oxygen Therapy&quot;] O&#xA;        where O.status in { 'final', 'amended', 'corrected' }&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy&quot;:&#xA;  from&#xA;    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,&#xA;    [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation,&#xA;    &quot;Noninvasive Oxygen Therapy&quot; OxygenSupport&#xA;    let VentilationInterval: Ventilation.performed.toInterval ( ),&#xA;    LatestAnesthesiaInterval: Ventilation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )&#xA;    where Ventilation.status = 'completed'&#xA;      and Ventilation.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )&#xA;      and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )&#xA;      and VentilationInterval starts after end of LatestAnesthesiaInterval&#xA;      and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesiaInterval, start of VentilationInterval]&#xA;      and EncounterWithSurgery.isNotAtProceduralHospitalLocationDuring ( VentilationInterval )&#xA;    return EncounterWithSurgery"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Extubation With Preceding Noninvasive Oxygen"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Extubation With Preceding Noninvasive Oxygen&quot;:&#xA;  from&#xA;    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,&#xA;    [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation,&#xA;    &quot;Noninvasive Oxygen Therapy&quot; OxygenSupport&#xA;    let LatestAnesthesia: Extubation.latestGeneralAnesthesiaOrMAC ( )&#xA;    where Extubation.status = 'completed'&#xA;      and Extubation.startsDuringHospitalization ( EncounterWithSurgery )&#xA;      and Extubation.performed.toInterval ( ) starts after LatestAnesthesia.performed.toInterval ( )&#xA;      and OxygenSupport.interval ( ) starts during Interval[end of LatestAnesthesia.performed.toInterval ( ), start of Extubation.performed.toInterval ( )]&#xA;    return Extubation"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="38"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Extubation During General Anesthesia"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Extubation During General Anesthesia&quot;:&#xA;  from&#xA;    &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery,&#xA;    [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation,&#xA;    &quot;General Anesthesia And MAC&quot; Anesthesia&#xA;    where Extubation.status = 'completed'&#xA;      and Extubation.startsDuringHospitalization ( EncounterWithSurgery )&#xA;      and Extubation.performed.toInterval ( ) starts during Anesthesia.performed.toInterval ( )&#xA;    return Extubation"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Extubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure More Than 48 Hours After End Of Anesthesia"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Extubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure More Than 48 Hours After End Of Anesthesia&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    with [&quot;Procedure&quot;: &quot;Removal of endotracheal tube (procedure)&quot;] Extubation&#xA;      such that Extubation.status = 'completed'&#xA;        and Extubation.isDuringHospitalization ( EncounterWithSurgery )&#xA;        and Extubation.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )&#xA;        and Extubation.performed.toInterval ( ) starts more than 48 hours after end of Extubation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )&#xA;        and not ( ( &quot;Extubation With Preceding Noninvasive Oxygen&quot;.id contains Extubation.id )&#xA;            and not ( &quot;Extubation During General Anesthesia&quot;.id contains Extubation.id )&#xA;        )&#xA;        and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="40"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Mechanical Ventilation Within 30 Days Of End Of First OR Procedure And Between 48 And 72 Hours After End Of OR Procedure And Not Preceded By Non Invasive Oxygen Therapy Or Anesthesia"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Mechanical Ventilation Within 30 Days Of End Of First OR Procedure And Between 48 And 72 Hours After End Of OR Procedure And Not Preceded By Non Invasive Oxygen Therapy Or Anesthesia&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    with [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation&#xA;      such that Ventilation.status = 'completed'&#xA;        and Ventilation.performed.toInterval ( ) starts 48 hours or more after end of Ventilation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )&#xA;        and Ventilation.performed.toInterval ( ) starts 72 hours or less after end of Ventilation.latestGeneralAnesthesiaOrMAC ( ).performed.toInterval ( )&#xA;        and Ventilation.starts30DaysOrLessAfterFirstAnesthesia ( EncounterWithSurgery )&#xA;        and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )&#xA;        and not ( &quot;Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy&quot;.id contains EncounterWithSurgery.id )&#xA;        and EncounterWithSurgery.isNotAtProceduralHospitalLocation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="41"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Numerator&quot;:&#xA;  &quot;Encounter With Intubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure&quot;&#xA;    union &quot;Encounter With Mechanical Ventilation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure And Preceded By Non Invasive Oxygen Therapy&quot;&#xA;    union &quot;Encounter With Extubation Outside Of Procedural Area Within 30 Days Of End Of First OR Procedure More Than 48 Hours After End Of Anesthesia&quot;&#xA;    union &quot;Encounter With Mechanical Ventilation Within 30 Days Of End Of First OR Procedure And Between 48 And 72 Hours After End Of OR Procedure And Not Preceded By Non Invasive Oxygen Therapy Or Anesthesia&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="42"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator&quot;:&#xA;  &quot;Initial Population&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="43"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter Procedures"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter Procedures&quot;:&#xA;  from&#xA;    [&quot;Procedure&quot;] TheProcedure,&#xA;    &quot;Initial Population&quot; QualifyingEncounter&#xA;    where TheProcedure.status = 'completed'&#xA;      and TheProcedure.startsDuringHospitalization ( QualifyingEncounter )&#xA;    return {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      procedureId: TheProcedure.id,&#xA;      procedureCode: TheProcedure.code,&#xA;      procedureRank: TheProcedure.rank ( QualifyingEncounter ),&#xA;      procedureTime: TheProcedure.performed.toInterval ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="44"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Blood Urea Nitrogen In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Blood Urea Nitrogen In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstBUN: QualifyingEncounter.firstBloodUreaNitrogen ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="45"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-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;:&#xA;  (Patient.ethnicity()) E&#xA;    return Tuple {&#xA;      codes: { E.ombCategory } union E.detailed,&#xA;      display: E.text&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="46"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Ethnicity&quot;:&#xA;  SDE.&quot;SDE Ethnicity&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="47"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Degenerative Neurological Disorder"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Degenerative Neurological Disorder&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    where EncounterWithSurgery.reasonCode in &quot;Degenerative Neurological Disorder&quot;&#xA;      or EncounterWithSurgery.encounterReason ( ).code in &quot;Degenerative Neurological Disorder&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="48"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With High Risk To Airway Head Neck And Thoracic Surgery"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With High Risk To Airway Head Neck And Thoracic Surgery&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    with [&quot;Procedure&quot;: &quot;Head, Neck, And Thoracic Surgeries With High Risk Airway Compromise&quot;] HeadNeckProcedures&#xA;      such that HeadNeckProcedures.status = 'completed'&#xA;        and HeadNeckProcedures.startsDuringHospitalization ( EncounterWithSurgery )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="49"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Mechanical Ventilation That Starts More Than One Hour Prior To Start Of First OR Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Mechanical Ventilation That Starts More Than One Hour Prior To Start Of First OR Procedure&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    with [&quot;Procedure&quot;: &quot;Mechanical Ventilation&quot;] Ventilation&#xA;      such that Ventilation.status = 'completed'&#xA;        and Ventilation.performed.toInterval ( ) starts more than 1 hour before start of EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( ).performed.toInterval ( )&#xA;        and Ventilation.startsDuringHospitalization ( EncounterWithSurgery )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="50"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Neuromuscular Disorder"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Neuromuscular Disorder&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    where EncounterWithSurgery.reasonCode in &quot;Neuromuscular Disorder&quot;&#xA;      or EncounterWithSurgery.encounterReason ( ).code in &quot;Neuromuscular Disorder&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="51"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With PaCO2 Greater Than 50 And Arterial pH Less Than 7.30 Within 48 Hours Prior To Start Of First OR Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With PaCO2 Greater Than 50 And Arterial pH Less Than 7.30 Within 48 Hours Prior To Start Of First OR Procedure&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    let FirstProcedureTime: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( ).performed.toInterval ( )&#xA;    with [&quot;LaboratoryResultObservation&quot;: &quot;Carbon Dioxide Partial Pressure In Arterial Blood&quot;] CarbonDioxide&#xA;      such that CarbonDioxide.status in { 'final', 'amended', 'corrected' }&#xA;        and CarbonDioxide.effective.toInterval ( ) starts 48 hours or less before start of FirstProcedureTime&#xA;        and CarbonDioxide.value as Quantity &gt; 50 'mm[Hg]'&#xA;    with [&quot;LaboratoryResultObservation&quot;: &quot;Arterial Blood pH&quot;] BloodpH&#xA;      such that BloodpH.status in { 'final', 'amended', 'corrected' }&#xA;        and BloodpH.effective.toInterval ( ) starts 48 hours or less before start of FirstProcedureTime&#xA;        and BloodpH.value as Quantity &lt; 7.30 '[pH]'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="52"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With PaO2 Less Than 50 Within 48 Hours Prior To Start Of First OR Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With PaO2 Less Than 50 Within 48 Hours Prior To Start Of First OR Procedure&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    let FirstProcedure: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( )&#xA;    with [&quot;LaboratoryResultObservation&quot;: &quot;Oxygen Partial Pressure In Arterial Blood&quot;] Oxygen&#xA;      such that Oxygen.status in { 'final', 'amended', 'corrected' }&#xA;        and Oxygen.effective.toInterval ( ) starts 48 hours or less before start of FirstProcedure.performed.toInterval ( )&#xA;        and Oxygen.value as Quantity &lt; 50 'mm[Hg]'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="53"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Principal Diagnosis Of Acute Respiratory Failure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Principal Diagnosis Of Acute Respiratory Failure&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    where EncounterWithSurgery.hasPrincipalDiagnosisOf ( &quot;Acute Respiratory Failure&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="54"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Diagnosis Of Acute Respiratory Failure Present On Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Diagnosis Of Acute Respiratory Failure Present On Admission&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    where EncounterWithSurgery.isDiagnosisPresentOnAdmission ( &quot;Acute Respiratory Failure&quot;, &quot;Present On Admission Or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="55"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Tracheostomy Present On Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Tracheostomy Present On Admission&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    where EncounterWithSurgery.isDiagnosisPresentOnAdmission ( &quot;Tracheostomy Diagnoses&quot;, &quot;Present On Admission Or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="56"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Tracheostomy Before Day Of First OR Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Tracheostomy Before Day Of First OR Procedure&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    let FirstProcedure: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( )&#xA;    with [&quot;Procedure&quot;: &quot;Tracheostomy Procedures&quot;] TracheostomySurgery&#xA;      such that TracheostomySurgery.status = 'completed'&#xA;        and TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )&#xA;        and TracheostomySurgery.performed.toInterval ( ) starts before day of FirstProcedure.performed.toInterval ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="57"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Tracheostomy Same Day Of First OR Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Tracheostomy Same Day Of First OR Procedure&quot;:&#xA;  &quot;Elective Inpatient Encounter With OR Procedure Within 3 Days&quot; EncounterWithSurgery&#xA;    let FirstProcedure: EncounterWithSurgery.firstAnesthesiaDuringHospitalization ( )&#xA;    with [&quot;Procedure&quot;: &quot;Tracheostomy Procedures&quot;] TracheostomySurgery&#xA;      such that TracheostomySurgery.status = 'completed'&#xA;        and TracheostomySurgery.startsDuringHospitalization ( EncounterWithSurgery )&#xA;        and TracheostomySurgery.performed.toInterval ( ) starts during day of FirstProcedure.performed.toInterval ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="58"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Tracheostomy Prior To Or On The Same Day Of First OR Procedure"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Tracheostomy Prior To Or On The Same Day Of First OR Procedure&quot;:&#xA;  &quot;Encounter With Tracheostomy Before Day Of First OR Procedure&quot;&#xA;    union &quot;Encounter With Tracheostomy Same Day Of First OR Procedure&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="59"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusions"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator Exclusions&quot;:&#xA;  &quot;Encounter With Degenerative Neurological Disorder&quot;&#xA;    union &quot;Encounter With High Risk To Airway Head Neck And Thoracic Surgery&quot;&#xA;    union &quot;Encounter With Mechanical Ventilation That Starts More Than One Hour Prior To Start Of First OR Procedure&quot;&#xA;    union &quot;Encounter With Neuromuscular Disorder&quot;&#xA;    union &quot;Encounter With PaCO2 Greater Than 50 And Arterial pH Less Than 7.30 Within 48 Hours Prior To Start Of First OR Procedure&quot;&#xA;    union &quot;Encounter With PaO2 Less Than 50 Within 48 Hours Prior To Start Of First OR Procedure&quot;&#xA;    union &quot;Encounter With Principal Diagnosis Of Acute Respiratory Failure&quot;&#xA;    union &quot;Encounter With Diagnosis Of Acute Respiratory Failure Present On Admission&quot;&#xA;    union &quot;Encounter With Tracheostomy Present On Admission&quot;&#xA;    union &quot;Encounter With Tracheostomy Prior To Or On The Same Day Of First OR Procedure&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="60"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First AST In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First AST In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstAST: QualifyingEncounter.firstAST ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="61"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable First Platelet Count In Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable First Platelet Count In Encounter&quot;:&#xA;  &quot;Initial Population&quot; QualifyingEncounter&#xA;    return Tuple {&#xA;      encounterId: QualifyingEncounter.id,&#xA;      firstPlatelet: QualifyingEncounter.firstPlatelet ( )&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="62"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value EncounterStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="63"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)&#xA;value to a CQL DateTime Interval&#xA;@comment: If the start value of the given period is unspecified, the starting&#xA;boundary of the resulting interval will be open (meaning the start of the interval&#xA;is unknown, as opposed to interpreted as the beginning of time).&#xA;*/&#xA;define function ToInterval(period FHIR.Period):&#xA;    if period is null then&#xA;        null&#xA;    else&#xA;        if period.&quot;start&quot; is null then&#xA;            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]&#xA;        else&#xA;            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="64"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToConcept"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.&#xA;*/&#xA;define function ToConcept(concept FHIR.CodeableConcept):&#xA;    if concept is null then&#xA;        null&#xA;    else&#xA;        System.Concept {&#xA;            codes: concept.coding C return ToCode(C),&#xA;            display: concept.text.value&#xA;        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="65"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCode"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.&#xA;*/&#xA;define function ToCode(coding FHIR.Coding):&#xA;    if coding is null then&#xA;        null&#xA;    else&#xA;        System.Code {&#xA;          code: coding.code.value,&#xA;          system: coding.system.value,&#xA;          version: coding.version.value,&#xA;          display: coding.display.value&#xA;        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="66"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDate"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDate(value date): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="67"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="encounterReason"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function encounterReason(Encounter Encounter):&#xA;  Encounter.reasonReference D&#xA;    return singleton from ( ( [ConditionEncounterDiagnosis] cA&#xA;        union [ConditionProblemsHealthConcerns] cB ) C&#xA;        where D.references ( C.id )&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="68"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="references"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given reference is to the given resourceId&#xA;@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.&#xA;NOTE: This function assumes resources from the same source server.&#xA;*/&#xA;define fluent function references(reference FHIR.Reference, resourceId String):&#xA;  resourceId = Last(Split(reference.reference, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="69"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value string): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="70"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ProcedureStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="71"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="earliest"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Given an interval, return the starting point if the interval has a starting boundary specified,&#xA;otherwise, return the ending point&#xA;*/&#xA;define fluent function earliest(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Age, FHIR.Range&gt;):&#xA;  (choice.toInterval()) period&#xA;    return&#xA;      if (period.hasStart()) then start of period&#xA;      else end of period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="72"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval&#xA;@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types&#xA;to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible&#xA;representations for timing-valued elements in FHIR, allowing this function to be used across any resource.&#xA;&#xA;The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.&#xA;The intent of this function is to provide a clear and concise mechanism to treat single&#xA;elements that have multiple possible representations as intervals so that logic doesn't have to account&#xA;for the variability. More complex calculations (such as medication request period or dispense period&#xA;calculation) need specific guidance and consideration. That guidance may make use of this function, but&#xA;the focus of this function is on single element calculations where the semantics are unambiguous.&#xA;If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.&#xA;If the input is a Period, the result is a DateTime Interval.&#xA;If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.&#xA;If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.&#xA;If the input is a string, an error is raised indicating a single interval cannot be computed from a string.&#xA;If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,&#xA;and ending immediately prior to when the patient was the given Age plus one year.&#xA;If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given&#xA;by the low end of the Range, and ending immediately prior to when the patient was the Age given by the&#xA;high end of the Range plus one year.&#xA;&#xA;NOTE: Due to the&#xA;complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used&#xA;with a Timing or String.&#xA;*/&#xA;define fluent function toInterval(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range&gt;):&#xA;  case&#xA;    when choice is FHIR.dateTime then&#xA;      Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]&#xA;    when choice is FHIR.Period then&#xA;      FHIRHelpers.ToInterval(choice as FHIR.Period)&#xA;    when choice is FHIR.instant then&#xA;      Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]&#xA;    when choice is FHIR.Age then&#xA;      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),&#xA;        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)&#xA;    when choice is FHIR.Range then&#xA;      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),&#xA;        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)&#xA;    when choice is FHIR.Timing then&#xA;      Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')&#xA;    when choice is FHIR.string then&#xA;      Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')&#xA;    else&#xA;      null as Interval&lt;DateTime&gt;&#xA;  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="73"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDateTime(value dateTime): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="74"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDateTime(value instant): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="75"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToQuantity"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) &#xA;value to a CQL Quantity&#xA;@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity&#xA;has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)&#xA;an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.&#xA;@seealso: ToCalendarUnit&#xA;*/&#xA;define function ToQuantity(quantity FHIR.Quantity):&#xA;    case&#xA;        when quantity is null then null&#xA;        when quantity.value is null then null&#xA;        when quantity.comparator is not null then&#xA;            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')&#xA;        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'&#xA;              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then&#xA;            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }&#xA;        else&#xA;            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')&#xA;    end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="76"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCalendarUnit"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts a UCUM definite duration unit to a CQL calendar duration&#xA;unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) &#xA;topic of the CQL specification.&#xA;@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate&#xA;*/&#xA;define function ToCalendarUnit(unit System.String):&#xA;    case unit&#xA;        when 'ms' then 'millisecond'&#xA;        when 's' then 'second'&#xA;        when 'min' then 'minute'&#xA;        when 'h' then 'hour'&#xA;        when 'd' then 'day'&#xA;        when 'wk' then 'week'&#xA;        when 'mo' then 'month'&#xA;        when 'a' then 'year'&#xA;        else unit&#xA;    end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="77"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hasStart"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Given an interval, return true if the interval has a starting boundary specified&#xA;(i.e. the start of the interval is not null and not the minimum DateTime value)&#xA;*/&#xA;define fluent function hasStart(period Interval&lt;DateTime&gt;):&#xA;  not ( start of period is null&#xA;      or start of period = minimum DateTime&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="78"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hospitalizationWithObservationAndOutpatientSurgeryService"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Hospitalization with Observation and Outpatient Surgery Service returns the total interval from the start of any immediately prior emergency department visit, outpatient surgery visit or observation visit to the discharge of the given encounter.&#xA;*/&#xA;define fluent function hospitalizationWithObservationAndOutpatientSurgeryService(TheEncounter &quot;Encounter&quot; ):&#xA;  TheEncounter Visit&#xA;&#x9;  let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs&#xA;&#x9;&#x9;  &#x9;where LastObs.status = 'finished'&#xA;          and LastObs.period ends 1 hour or less on or before start of Visit.period&#xA;&#x9;&#x9;&#x9;  sort by&#x9;end of period&#xA;    &#x9;),&#xA;    &#x9;VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),&#xA;    &#x9;EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED&#xA;&#x9;&#x9;&#x9;  where LastED.status = 'finished'&#xA;          and LastED.period ends 1 hour or less on or before VisitStart&#xA;&#x9;&#x9;&#x9;  sort by&#x9;end of period&#xA;    &#x9;),&#xA;    &#x9;VisitStartWithED: Coalesce(start of EDVisit.period, VisitStart),&#xA;    &#x9;OutpatientSurgeryVisit: Last([Encounter: &quot;Outpatient Surgery Service&quot;] LastSurgeryOP&#xA;&#x9;&#x9;&#x9;  where LastSurgeryOP.period ends 1 hour or less on or before VisitStartWithED&#xA;&#x9;&#x9;&#x9;  sort by&#x9;end of period&#xA;    &#x9;)&#xA;  &#x9;return Interval[Coalesce(start of OutpatientSurgeryVisit.period, VisitStartWithED), end of Visit.period]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="79"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstRespiratoryRate"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstRespiratoryRate(QualifyingEncounter Encounter):&#xA;  First([USCore.RespiratoryRateProfile: &quot;Respiratory rate&quot;] FirstRespiration&#xA;      where FirstRespiration.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstRespiration.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()&#xA;        and FirstRespiration.value is not null&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="80"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ObservationStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="81"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hospitalizationWithObservation"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter&#xA;*/&#xA;define fluent function hospitalizationWithObservation(TheEncounter Encounter ):&#xA;  TheEncounter Visit&#xA;  &#x9;&#x9;let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs&#xA;  &#x9;&#x9;&#x9;&#x9;where LastObs.status = 'finished'&#xA;            and LastObs.period ends 1 hour or less on or before start of Visit.period&#xA;  &#x9;&#x9;&#x9;&#x9;sort by end of period&#xA;  &#x9;&#x9;&#x9;),&#xA;  &#x9;&#x9;&#x9;VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),&#xA;  &#x9;&#x9;&#x9;EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED&#xA;  &#x9;&#x9;&#x9;&#x9;where LastED.status = 'finished'&#xA;            and LastED.period ends 1 hour or less on or before VisitStart&#xA;  &#x9;&#x9;&#x9;&#x9;sort by end of period&#xA;  &#x9;&#x9;&#x9;)&#xA;  &#x9;&#x9;return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="82"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstAlbumin"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstAlbumin(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Albumin Lab Test&quot;] FirstAlbuminTest&#xA;      where FirstAlbuminTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstAlbuminTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="83"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="isEarliestDuringHospitalization"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isEarliestDuringHospitalization(choice Choice&lt;Procedure, LaboratoryResultObservation&gt;, encounter Encounter):&#xA;  case&#xA;    when choice is Procedure then ( choice as Procedure ).earliestIsDuringHospitalization ( encounter )&#xA;    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).earliestOccursDuringHospitalization ( encounter ) &#xA;    else false end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="84"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="earliestIsDuringHospitalization"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function earliestIsDuringHospitalization(procedure Procedure, encounter Encounter):&#xA;  procedure.performed.earliest ( ) during encounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )&#xA;    and procedure.partOf is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="85"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="earliestOccursDuringHospitalization"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function earliestOccursDuringHospitalization(observation LaboratoryResultObservation, encounter Encounter):&#xA;  observation.effective.earliest ( ) during encounter.hospitalizationWithObservationAndOutpatientSurgeryService ( )&#xA;    and observation.value is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="86"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstArterialpH"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstArterialpH(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Arterial Blood pH&quot;] FirstArterialpHTest&#xA;      where FirstArterialpHTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstArterialpHTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="87"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstBodyTemperature"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstBodyTemperature(QualifyingEncounter Encounter):&#xA;  First([&quot;USCore.BodyTemperatureProfile&quot;: &quot;Body temperature&quot;] FirstTemperature&#xA;      where FirstTemperature.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstTemperature.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()&#xA;        and FirstTemperature.value is not null&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="88"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstCarbonDioxide"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstCarbonDioxide(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Carbon Dioxide Partial Pressure In Arterial Blood&quot;] FirstCarbonDioxideTest&#xA;      where FirstCarbonDioxideTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstCarbonDioxideTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="89"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstHematocrit"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstHematocrit(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Hematocrit Lab Test&quot;] FirstHematocritTest&#xA;      where FirstHematocritTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstHematocritTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="90"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstHeartRate"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstHeartRate(QualifyingEncounter Encounter):&#xA;  First([&quot;USCore.HeartRateProfile&quot;: &quot;Heart rate&quot;] FirstHeartBeats&#xA;      where FirstHeartBeats.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstHeartBeats.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()&#xA;        and FirstHeartBeats.value is not null&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="91"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstBMI"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstBMI(QualifyingEncounter Encounter):&#xA;  First([USCore.BMIProfile] FirstBodyMass&#xA;      where FirstBodyMass.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstBodyMass.effective.toInterval() starts during QualifyingEncounter.hospitalizationWithObservation()&#xA;        and FirstBodyMass.value is not null&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="92"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstHemoglobin"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstHemoglobin(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Hemoglobin Lab Test&quot;] FirstHemoglobinTest&#xA;      where FirstHemoglobinTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstHemoglobinTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="93"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="claimDiagnosesWithPOA"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function claimDiagnosesWithPOA(encounter Encounter):&#xA;  encounter E&#xA;    let claim: ( [Claim] C&#xA;        where C.status = 'active'&#xA;          and C.use = 'claim'&#xA;          and exists ( C.item I&#xA;              where I.encounter.references ( E )&#xA;          )&#xA;    ),&#xA;    claimItem: ( claim.item I&#xA;        where I.encounter.references ( E )&#xA;    )&#xA;    return claim.diagnosis D&#xA;      where D.sequence in claimItem.diagnosisSequence&#xA;        and D.onAdmission is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="94"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ClaimStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="95"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value Use): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="96"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="references"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if any of the given references are to the given resource&#xA;@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.&#xA;NOTE: This function assumes resources from the same source server.&#xA;*/&#xA;define fluent function references(references List&lt;FHIR.Reference&gt;, resource FHIR.Resource):&#xA;  exists (references R where R.references(resource))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="97"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="references"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given reference is to the given resource&#xA;@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.&#xA;NOTE: This function assumes resources from the same source server.&#xA;*/&#xA;define fluent function references(reference FHIR.Reference, resource FHIR.Resource):&#xA;  resource.id = Last(Split(reference.reference, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="98"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstSodium"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstSodium(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Sodium Lab Test&quot;] FirstSodiumTest&#xA;      where FirstSodiumTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstSodiumTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="99"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstCreatinine"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstCreatinine(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Creatinine Lab Test&quot;] FirstCreatinineTest&#xA;      where FirstCreatinineTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstCreatinineTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="100"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstWhiteBloodCellCount"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstWhiteBloodCellCount(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;White Blood Cells Count Lab Test&quot;] FirstWBCCount&#xA;      where FirstWBCCount.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstWBCCount.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="101"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="startsDuringHospitalization"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function startsDuringHospitalization(choice Choice&lt;Procedure, LaboratoryResultObservation, ObservationScreeningAssessment&gt;, enc Encounter):&#xA;  case&#xA;    when choice is Procedure then ( choice as Procedure ).performed.toInterval ( ) starts during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )&#xA;    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).effective.toInterval ( ) starts during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )&#xA;    when choice is ObservationScreeningAssessment then ( choice as ObservationScreeningAssessment ).effective.toInterval ( ) starts during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( ) &#xA;    else false end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="102"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="rank"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function rank(targetProcedure Procedure, parentEncounter Encounter):&#xA;  singleton from ( targetProcedure P&#xA;      let claim: ( [Claim] C&#xA;          where C.status = 'active'&#xA;            and C.use = 'claim'&#xA;            and exists ( C.item I&#xA;                where I.encounter.references ( parentEncounter )&#xA;            )&#xA;      ),&#xA;      claimProc: ( claim.procedure proc&#xA;          where proc.procedure.references ( P )&#xA;      )&#xA;      return claimProc.sequence R&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="103"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstBicarbonate"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstBicarbonate(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Bicarbonate Lab Test&quot;] FirstBicarbonateTest&#xA;      where FirstBicarbonateTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstBicarbonateTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="104"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstBilirubin"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstBilirubin(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Bilirubin Lab Test&quot;] FirstBilirubinTest&#xA;      where FirstBilirubinTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstBilirubinTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="105"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstSystolicBloodPressure"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function &quot;firstSystolicBloodPressure&quot;(QualifyingEncounter Encounter):&#xA;  First(&quot;Qualifying Systolic Blood Pressure Reading&quot; SBPReading&#xA;      where SBPReading.status in { 'final', 'amended', 'corrected' }&#xA;        and SBPReading.effective.earliest() during QualifyingEncounter.hospitalizationWithObservation()&#xA;      return singleton from(SBPReading.component SBPComponent&#xA;          where SBPComponent.code ~ &quot;Systolic blood pressure&quot;&#xA;          return SBPComponent.value as Quantity&#xA;      )&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="106"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstOxygen"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstOxygen(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Oxygen Partial Pressure In Arterial Blood&quot;] FirstOxygenTest&#xA;      where FirstOxygenTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstOxygenTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="107"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstLeukocyte"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstLeukocyte(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Leukocyte Count Lab Test&quot;] FirstLeukocyteCount&#xA;      where FirstLeukocyteCount.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstLeukocyteCount.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="108"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="USCoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="race"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function race(patient Patient):&#xA;  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E&#xA;    return {&#xA;      ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding,&#xA;      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,&#xA;      text: E.ext('text').value as FHIR.string&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="109"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ext"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the single extension (if present) on the given resource with the specified url.&#xA;@comment: This function uses singleton from to ensure that a run-time exception is thrown if there&#xA;is more than one extension on the given resource with the specified url.&#xA;*/&#xA;define fluent function ext(domainResource DomainResource, url String):&#xA;  singleton from domainResource.exts(url)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="110"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="exts"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns any extensions defined on the given resource with the specified url&#xA;*/&#xA;define fluent function exts(domainResource DomainResource, url String):&#xA;  domainResource.extension E&#xA;    where E.url = url&#xA;    return E"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="111"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-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="112"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="exts"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns any extensions defined on the given element with the specified url.&#xA;*/&#xA;define fluent function exts(element Element, url String):&#xA;  element.extension E&#xA;    where E.url = url&#xA;    return E"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="113"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ext"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the single extension (if present) on the given element with the specified url.&#xA;@comment: This function uses singleton from to ensure that a run-time exception is thrown if there&#xA;is more than one extension on the given element with the specified url.&#xA;*/&#xA;define fluent function ext(element Element, url String):&#xA;  singleton from element.exts(url)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="114"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="USCoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="sex"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the sex element as defined for the USCore patient profile&#xA;*/&#xA;define fluent function sex(patient Patient):&#xA;  patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="115"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="starts30DaysOrLessAfterFirstAnesthesia"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function starts30DaysOrLessAfterFirstAnesthesia(procedure Procedure, encounter Encounter):&#xA;  procedure.performed.toInterval ( ) starts 30 days or less after end of encounter.firstAnesthesiaDuringHospitalization ( ).performed.toInterval ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="116"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstAnesthesiaDuringHospitalization"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function &quot;firstAnesthesiaDuringHospitalization&quot;(QualifyingEncounter Encounter):&#xA;  First(&quot;Anesthesia Procedure List&quot; anesthesia&#xA;      where anesthesia.status = 'completed'&#xA;        and anesthesia.startsDuringHospitalization(QualifyingEncounter)&#xA;      sort by start of performed.toInterval()&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="117"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="latest"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Given an interval, returns the ending point if the interval has an ending boundary specified,&#xA;otherwise, returns the starting point&#xA;*/&#xA;define fluent function latest(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Age, FHIR.Range&gt;):&#xA;  (choice.toInterval()) period&#xA;    return&#xA;      if (period.hasEnd()) then end of period&#xA;      else start of period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="118"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hasEnd"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Given an interval, returns true if the interval has an ending boundary specified&#xA;(i.e. the end of the interval is not null and not the maximum DateTime value)&#xA;*/&#xA;define fluent function hasEnd(period Interval&lt;DateTime&gt;):&#xA;  not (&#xA;    end of period is null&#xA;      or end of period = maximum DateTime&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="119"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="latestGeneralAnesthesiaOrMAC"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function latestGeneralAnesthesiaOrMAC(event Procedure):&#xA;  Last(&quot;General Anesthesia And MAC&quot; ProcedureList&#xA;      where ProcedureList.status = 'completed'&#xA;        and ProcedureList.performed.toInterval() ends before start of event.performed.toInterval()&#xA;      sort by start of performed.toInterval()&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="120"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="isNotAtProceduralHospitalLocationDuring"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isNotAtProceduralHospitalLocationDuring(encounter Encounter, intrvl Interval&lt;DateTime&gt;):&#xA;  not exists ( encounter.location EncounterLocation&#xA;      with [Location] Location&#xA;        such that EncounterLocation.location.references ( Location )&#xA;          and Location.type.includesCode ( &quot;ER&quot; )&#xA;          and EncounterLocation.period starts during intrvl&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="121"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="includesCode"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given code is in the given codeList&#xA;@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.&#xA;*/&#xA;define fluent function includesCode(codeList List&lt;CodeableConcept&gt;, code Concept):&#xA;  exists (codeList C where C ~ code)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="122"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="interval"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function interval(choice Choice&lt;Procedure, LaboratoryResultObservation, Encounter&gt;):&#xA;  case&#xA;    when choice is Procedure then ( choice as Procedure ).performed.toInterval ( )&#xA;    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).effective.toInterval ( )&#xA;    when choice is Encounter then ( choice as Encounter ).period.toInterval ( ) &#xA;    else null as Interval&lt;DateTime&gt;end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="123"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="isDuringHospitalization"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isDuringHospitalization(choice Choice&lt;Procedure, LaboratoryResultObservation&gt;, enc Encounter):&#xA;  case&#xA;    when choice is Procedure then ( choice as Procedure ).performed.toInterval ( ) during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( )&#xA;    when choice is LaboratoryResultObservation then ( choice as LaboratoryResultObservation ).effective.toInterval ( ) during enc.hospitalizationWithObservationAndOutpatientSurgeryService ( ) &#xA;    else false end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="124"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="isNotAtProceduralHospitalLocation"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isNotAtProceduralHospitalLocation(encounter Encounter):&#xA;  not exists ( encounter.location EncounterLocation&#xA;      with [Location] Location&#xA;        such that EncounterLocation.location.references ( Location )&#xA;          and Location.type.includesCode ( &quot;ER&quot; )&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="125"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstBloodUreaNitrogen"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstBloodUreaNitrogen(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Blood Urea Nitrogen Lab Test&quot;] FirstBUN&#xA;      where FirstBUN.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstBUN.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="126"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="USCoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function ethnicity(patient Patient):&#xA;  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E&#xA;    return {&#xA;      ombCategory: E.ext('ombCategory').value as FHIR.Coding,&#xA;      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,&#xA;      text: E.ext('text').value as FHIR.string&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="127"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hasPrincipalDiagnosisOf"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA; @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet.&#xA; @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information&#xA; */&#xA; define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet System.ValueSet):&#xA;   (encounter.principalDiagnosis()) PD&#xA;     return PD.diagnosis in valueSet&#xA;       or PD.diagnosis.getCondition().code in valueSet"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="128"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="principalDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter&#xA; @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information&#xA;*/&#xA;define fluent function principalDiagnosis(encounter Encounter):&#xA;singleton from (&#xA;     (encounter.claimDiagnosis()) CD&#xA;       where CD.type.includesCode(&quot;Principal Diagnosis&quot;)&#xA;   )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="129"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="claimDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the claim diagnosis elements for the given encounter&#xA;@comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information&#xA;*/&#xA;define fluent function claimDiagnosis(encounter Encounter):&#xA;  encounter E&#xA;    let &#xA;      claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))),&#xA;      claimItem: (claim.item I where I.encounter.references(E))&#xA;    return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="130"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getCondition"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the Condition resource for the given reference&#xA;*/&#xA;define fluent function getCondition(reference Reference):&#xA;  singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="131"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isDiagnosisPresentOnAdmission"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA; @description: Returns true if the given diagnosis is present on admission, based on the given poaValueSet&#xA; @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information&#xA; */&#xA; define fluent function isDiagnosisPresentOnAdmission(encounter Encounter, diagnosisValueSet System.ValueSet, poaValueSet System.ValueSet):&#xA;   exists (&#xA;     (encounter.claimDiagnosis()) CD&#xA;       where CD.onAdmission in poaValueSet&#xA;         and (&#xA;           CD.diagnosis in diagnosisValueSet&#xA;             or CD.diagnosis.getCondition().code in diagnosisValueSet&#xA;         )&#xA;   )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="132"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstAST"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstAST(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Aspartate transaminase Lab Test&quot;] FirstASTTest&#xA;      where FirstASTTest.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstASTTest.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="133"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1218FHIRHHRF"/>
        </extension>
        <extension url="name">
          <valueString value="firstPlatelet"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function firstPlatelet(QualifyingEncounter Encounter):&#xA;  First([LaboratoryResultObservation: &quot;Platelet Count Lab Test&quot;] FirstPlateletCount&#xA;      where FirstPlateletCount.status in { 'final', 'amended', 'corrected' }&#xA;        and FirstPlateletCount.isEarliestDuringHospitalization(QualifyingEncounter)&#xA;      sort by effective.earliest()&#xA;  ).value as Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="134"/>
        </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="USQualityCore model information"/>
        <resource value="https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="USCore model information"/>
        <resource value="http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="FHIR model information"/>
        <resource value="http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRCommon"/>
        <resource value="http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library CQMCommon"/>
        <resource value="https://madie.cms.gov/Library/CQMCommon|5.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource value="https://madie.cms.gov/Library/SupplementalDataElements|6.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library USCommon"/>
        <resource value="http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot"/>
      </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 LOINC"/>
        <resource value="http://loinc.org"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system LocationRoles"/>
        <resource value="http://terminology.hl7.org/CodeSystem/v3-RoleCode"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system Diagnosis Type"/>
        <resource value="http://terminology.hl7.org/CodeSystem/ex-diagnosistype"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Elective Inpatient Encounter"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Emergency Department Visit"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Obstetrical Or Pregnancy Related Conditions"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.263"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set General And Neuraxial Anesthesia"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Observation Services"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Outpatient Surgery Service"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.38"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Albumin Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.221"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Arterial Blood pH"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Carbon Dioxide Partial Pressure In Arterial Blood"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hematocrit Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.114"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hemoglobin Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.219"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Sodium Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.119"/>
      </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>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Creatinine Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.2363"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set White Blood Cells Count Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.129"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set ASA Physical Status Class"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.217"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Bicarbonate Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.139"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Bilirubin Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.223"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Oxygen Partial Pressure In Arterial Blood"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Leukocyte Count Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.222"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Intubation"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Anesthesia Requiring Monitored Care"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Mechanical Ventilation"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Non Invasive Oxygen Therapy By Nasal Cannula Or Mask"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Non Invasive Oxygen Therapy"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Blood Urea Nitrogen Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.218"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Degenerative Neurological Disorder"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.241"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Head, Neck, And Thoracic Surgeries With High Risk Airway Compromise"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Neuromuscular Disorder"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.239"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Acute Respiratory Failure"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.88"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Present On Admission Or Clinically Undetermined"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.197"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Tracheostomy Diagnoses"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.89"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Tracheostomy Procedures"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Aspartate transaminase Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.224"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Platelet Count Lab Test"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.127"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Respiratory Rate In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Albumin In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Arterial pH In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Body Temperature In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Carbon Dioxide In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Hematocrit In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Heart Rate In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First BMI"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Hemoglobin In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable All Encounter Diagnoses With POA Indication"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Sodium In Encounter"/>
        <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="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Creatinine In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First White Blood Cell Count In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable ASA Physical Status Class"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="CodeableConcept"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Principal Procedure"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Body Mass Index (BMI)"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Quantity"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Bicarbonate In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Bilirubin In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Systolic Blood Pressure In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Oxygen In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Leukocyte Count In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <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="Encounter"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter Procedures"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Blood Urea Nitrogen In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Denominator Exclusions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First AST In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable First Platelet Count In Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient"/>
        <mustSupport value="ombCategory"/>
        <mustSupport value="detailed"/>
        <mustSupport value="text"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="location"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="onAdmission"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="location"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="onAdmission"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.38"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="priority"/>
        <mustSupport value="id"/>
        <mustSupport value="location"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="onAdmission"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.85"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="location"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="onAdmission"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="location"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="onAdmission"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="location"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="type"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="onAdmission"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
        <mustSupport value="birthDate"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208"/>
        </codeFilter>
        <dateFilter>
          <path value="performed"/>
          <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="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="performed"/>
          <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="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.255"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.208"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.179"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.209"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://snomed.info/sct"/>
            <code value="271280005"/>
            <display value="Removal of endotracheal tube (procedure)"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://snomed.info/sct"/>
            <code value="271280005"/>
            <display value="Removal of endotracheal tube (procedure)"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="performed"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString value="Error attempting to determine filter value: toFhirValue not implemented for Add"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="status"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.251"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.107"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="performed"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="id"/>
        <mustSupport value="partOf"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <mustSupport value="id"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.181"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.221"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.114"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.219"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.119"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.2363"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.129"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.139"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.223"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.222"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.213"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.218"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.95"/>
        </codeFilter>
        <dateFilter>
          <path value="effective"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.96"/>
        </codeFilter>
        <dateFilter>
          <path value="effective"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.94"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.224"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1045.127"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-lab"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-temperature"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-bmi"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Resource"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Claim"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Claim"/>
        <mustSupport value="status"/>
        <mustSupport value="use"/>
        <mustSupport value="item"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="use"/>
          <code>
            <code value="claim"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-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>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment"/>
        <mustSupport value="effective"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-screening-assessment"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="97816-3"/>
            <display value="American society of anesthesiologists morbidity state"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="value"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.217"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="component"/>
        <dateFilter>
          <path value="effective"/>
          <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="Location"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Location"/>
        <mustSupport value="type"/>
      </dataRequirement>
    </Library>
  </contained>
  <extension id="supplementalDataGuidance" url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance">
    <extension url="guidance">
      <valueString value="&lt;p&gt;For every patient evaluated by this measure also identify payer, race, ethnicity and sex&lt;/p&gt;"/>
    </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 id="riskAdjustmentVariableGuidance" url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance">
    <extension url="guidance">
      <valueString value="&lt;p&gt;Variables are collected for the development of baseline risk adjustment model&lt;/p&gt;&#xA;&lt;p&gt;Report the first resulted vital sign values during the encounter in the Unified Code for Units of Measure (UCUM) units specified:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA; &lt;li&gt;Body temperature: Cel, [degF]&lt;/li&gt;&#xA; &lt;li&gt;Heart rate: {Beats}/min&lt;/li&gt;&#xA; &lt;li&gt;Respiratory rate: {Breaths}/min&lt;/li&gt;&#xA; &lt;li&gt;Systolic blood pressure: mm[Hg]&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Report the first resulted laboratory test values during the encounter in UCUM units specified:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA; &lt;li&gt;Albumin: g/dL, umol/L&lt;/li&gt;&#xA; &lt;li&gt;Aspartate aminotransferase (AST/SGOT): U/L, IU/L&lt;/li&gt;&#xA; &lt;li&gt;Bicarbonate: mmol/L&lt;/li&gt;&#xA; &lt;li&gt;Bilirubin: mg/dL, umol/L&lt;/li&gt;&#xA; &lt;li&gt;Blood urea nitrogen (BUN): mg/dL, umol/L&lt;/li&gt;&#xA; &lt;li&gt;Carbon dioxide (partial pressure): mm[Hg]&lt;/li&gt;&#xA; &lt;li&gt;Creatinine: mg/dL, umol/L&lt;/li&gt;&#xA; &lt;li&gt;Hematocrit: %&lt;/li&gt;&#xA; &lt;li&gt;Hemoglobin: g/dL, mmol/L&lt;/li&gt;&#xA; &lt;li&gt;Leukocyte count: {cells}/uL, 10&lt;em&gt;3/uL, 10&lt;/em&gt;9/L, /mm3&lt;/li&gt;&#xA; &lt;li&gt;Oxygen (partial pressure): mm[Hg]&lt;/li&gt;&#xA; &lt;li&gt;pH of arterial blood: [pH]&lt;/li&gt;&#xA; &lt;li&gt;Platelet count: 10&lt;em&gt;3/uL, 10&lt;/em&gt;9/L, /mm3&lt;/li&gt;&#xA; &lt;li&gt;Sodium: meq/L, mmol/L&lt;/li&gt;&#xA; &lt;li&gt;White blood cell count: {cells}/uL, 10&lt;em&gt;3/uL, 10&lt;/em&gt;9/L, /mm3&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Additional variables used for risk adjustment:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA; &lt;li&gt;American Society of Anesthesiologists (ASA) physical status class assessment that starts during the encounter&lt;/li&gt;&#xA; &lt;li&gt;First Body mass index (BMI), reported using UCUM unit: kg/m2&lt;/li&gt;&#xA; &lt;li&gt;Encounter diagnoses with their present on admission (POA) indicators&lt;/li&gt;&#xA; &lt;li&gt;Most recent smoking status&lt;/li&gt;&#xA; &lt;li&gt;Principal surgical procedures that start during the encounter&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Please see the Hospital Harm - Postoperative Respiratory Failure Risk Adjustment Methodology Report on the dQM-specific page on the eCQI Resource Center website: https://ecqi.healthit.gov/&lt;/p&gt;"/>
    </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="Risk Adjustment Variable Guidance"/>
      </valueCodeableConcept>
    </extension>
  </extension>
  <extension url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem">
    <valueReference>
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <extension url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <url value="https://madie.cms.gov/Measure/CMS1218FHIRHHRF"/>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="short-name"/>
        <display value="Short Name"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/shortName"/>
    <value value="CMS1218FHIR"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-independent"/>
        <display value="Version Independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:b6857e46-6412-432d-abc8-0508efc0d2d7"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-specific"/>
        <display value="Version Specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:fb07b5c1-50c3-45e7-b8c7-ca26409a0f48"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="endorser"/>
        <display value="Endorser"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cbeId"/>
    <value value="4130e"/>
    <assigner>
      <display value="CMS Consensus Based Entity"/>
    </assigner>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="publisher"/>
        <display value="Publisher"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cmsId"/>
    <value value="1218FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="1.0.000"/>
  <name value="CMS1218FHIRHHRF"/>
  <title value="Hospital Harm - Postoperative Respiratory FailureFHIR&#xA;"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2026-01-16T18:18:12+00:00"/>
  <publisher value="Centers for Medicare &amp;amp; Medicaid Services (CMS)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.cms.gov/"/>
    </telecom>
  </contact>
  <description value="This measure assesses the number of elective inpatient hospitalizations for patients aged 18 years and older without an obstetrical condition who have a procedure resulting in postoperative respiratory failure (PRF)&#xA;"/>
  <usage value="PRF is evaluated using mechanical ventilation (MV) documentation or intubation and extubation documentation to allow for hospital documentation variances. Therefore, if MV documentation is not available, intubation and extubation can serve as a proxy for determining if MV occurred and its duration. To determine that an unplanned initiation of MV occurred, the logic looks for evidence of a non-invasive oxygen therapy assessment such as oxygen via 'nasal canula' or 'breathing room air' prior to the MV occurrence to verify that MV was newly initiated. Additionally, facility location codes are used to determine if MV was initiated outside of a procedural area (e.g., medical floor). Conversely, to determine MV duration, the logic looks for evidence that a non-invasive oxygen therapy assessment or another operating room procedure does not exist prior to the MV occurrence to verify that MV was continued without interruption from a procedural area.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;This dQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;This FHIR-based measure has been derived from the QDM-based measure: CMS1218v2. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6 (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).&#xA;"/>
  <copyright value="Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc.&#xA;&#xA;This material contains SNOMED Clinical Terms(R) (SNOMED CT\[R\]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.&#xA;"/>
  <effectivePeriod>
    <start value="2026-01-01"/>
    <end value="2026-12-31"/>
  </effectivePeriod>
  <author>
    <name value="Mathematica"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.mathematica.org/"/>
    </telecom>
  </author>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Arozullah, A.M., Daley, J., Henderson, W.G., \&amp; Khuri, S.F. (2000). Multifactorial risk index for predicting postoperative respiratory failure in men after major noncardiac surgery. The National Veterans Administration Surgical Quality Improvement Program. Annals of surgery. 232(2):242-253. doi: 10.1097/00000658-200008000-00015. PMID: 10903604; PMCID: PMC1421137.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Canet, J., \&amp; Gallart, L. (2014). Postoperative respiratory failure: Pathogenesis, prediction, and prevention. Current Opinion in Critical Care. 20(1):56-62. doi: 10.1097/MCC.0000000000000045. PMID: 24240985.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Canet, J., Sabate, S., Mazo, V., Gallart, L., de Abreu, M.G., Belda, J., ... \&amp; Pelosi, P. (2015). PERISCOPE group. Development and validation of a score to predict postoperative respiratory failure in a multicentre European cohort: A prospective, observational study. Eur J Anaesthesiol. 32(7):458-70. doi: 10.1097/EJA.0000000000000223. PMID: 26020123.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Gupta, H., Gupta, P.K., Fang, X., Miller, W.J., Cemaj, S., Forse, R.A., \&amp; Morrow, L.E. (2011). Development and validation of a risk calculator predicting postoperative respiratory failure. Chest. 140(5):1207-1215. doi: 10.1378/chest.11-0466. Epub 2011 Jul 14. PMID: 21757571.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Kor, D.J., Lingineni, R.K., Gajic, O., Park, P.K., Blum, J.M., Hou, P.C., ... \&amp; Talmor, D.S. (2014). Predicting risk of postoperative lung injury in high-risk surgical patients: a multicenter cohort study. Anesthesiology. 120(5):1168-81. doi: 10.1097/ALN.0000000000000216. PMID: 24755786; PMCID: PMC3999474.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Miller, M.R., Elixhauser, A., Zhan, C., \&amp; Meyer, G.S. (2001). Patient Safety Indicators: using administrative data to identify potential patient safety concerns. Health Serv Res. 36(6 Pt 2):110-32. PMID: 16148964; PMCID: PMC1383610.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Rahman, M., Neal, D., Fargen, K.M., \&amp; Hoh, B.L. (2013). Establishing standard performance measures for adult brain tumor patients: a Nationwide Inpatient Sample database study. Neuro Oncol. 15(11):1580-8. doi: 10.1093/neuonc/not108. Epub 2013 Sep 30. PMID: 24084409; PMCID: PMC3813415.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Romano, P.S., Mull, H.J., Rivard, P.E., Zhao, S., Henderson, W.G., Loveland, S., Tsilimingras, D., ... \&amp; Rosen, A.K. (2009). Validity of selected AHRQ patient safety indicators based on VA National Surgical Quality Improvement Program data. Health Serv Res. 44(1):182-204. doi: 10.1111/j.1475-6773.2008.00905.x. Epub 2008 Sep 17. PMID: 18823449; PMCID: PMC2669628.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Thompson, S.L., \&amp; Lisco, S.J. (2018). Postoperative respiratory failure. Int Anesthesiol Clin. 56(1):147-164. doi: 10.1097/AIA.0000000000000173. PMID: 29189437.&#xA;"/>
  </relatedArtifact>
  <library value="https://madie.cms.gov/Library/CMS1218FHIRHHRF"/>
  <disclaimer value="This performance measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.&#xA;&#xA;THE MEASURES AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.&#xA;&#xA;Due to technical limitations, registered trademarks are indicated by (R) or \[R\] and unregistered trademarks are indicated by (TM) or \[TM\].&#xA;"/>
  <rationale value="Postoperative respiratory failure (PRF), defined as unplanned endotracheal reintubation, prolonged inability to wean from mechanical ventilation, or inadequate oxygenation and/or ventilation, is the most common serious postoperative pulmonary complication, with an incidence of up to 7.5% (the incidence of any postoperative pulmonary complication ranges from 10-40%) (Arozullah et al., 2000; Canet et al., 2015; Gupta et al., 2011; Kor et al., 2014). This measure addresses the prevalence of PRF and the variance between hospitals in the incidence of PRF. PRF is a serious complication that can increase the risk of morbidity and mortality, with in-hospital mortality resulting from PRF estimated at 25% to 40% (Arozullah et al., 2000; Canet \&amp; Gallart, 2014). Surgical procedures complicated by PRF have 3.74 times higher adjusted odds of death than those not complicated by respiratory failure, 1.47 times higher odds of 90-day readmission, and 1.86 times higher odds of an outpatient visit with one of 44 postoperative conditions (e.g., bacterial infection, fluid and electrolyte disorder, abdominal hernia) within 90 days of hospital discharge (Miller et al., 2001; Romano et al, 2009). PRF is additionally associated with prolonged mechanical ventilation and the need for rehabilitation or skilled nursing facility placement upon discharge (Thompson \&amp; Lisco, 2018).&#xA;&#xA;The incidence of PRF varies by hospital, with higher reported rates of PRF in nonteaching hospitals than teaching hospitals (Rahman et al., 2013). Additionally, one study found that the odds of developing PRF increased by 6% for each level increase in hospital size from small to large (Rahman et al., 2013). This suggests that there remains room for improvement in hospitals reporting higher rates of PRF.&#xA;&#xA;The most widely used current measures of PRF are based on either claims data (CMS Patient Safety Indicator (PSI) 11) or proprietary registry data (National Surgical Quality Improvement Program (NSQIP) of the American College of Surgeons). The dQM is closely modeled after the NSQIP measure of PRF, which has been widely adopted across American hospitals, and is intended to complement and eventually supplant CMS PSI 11.&#xA;"/>
  <clinicalRecommendationStatement value="Recent studies and current clinical practice guidelines for PRF have identified enhanced recovery pathways, prophylactic mucolytics, postoperative continuous positive airway pressure ventilation, lung protective intraoperative ventilation, prophylactic respiratory physiotherapy, epidural analgesia, and goal directed hemodynamic therapy as evidence-based interventions to reduce the incidence of PRF. Yet, progress in reducing the incidence of PRF has been stymied by lack of consensus regarding the definition of PRF, which patients are most at-risk, which risk factors are potentially modifiable, and which patients are more likely to benefit from targeted interventions of a health care system's limited resources. This measure would address this gap in data.&#xA;&#xA;Relevant clinical guidelines for preventing postoperative respiratory failure can be found in the following:&#xA;&#xA;* Mohanty, et al. Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline from ACS NSQIP/AGS, 2016&#xA;&#xA;* Piraino, et al. AARC Clinical Practice Guideline: Management of Adult Patients with Oxygen in the Acute Care Setting, 2022&#xA;&#xA;"/>
  <group id="Group_1">
    <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">
      <valueString value="None&#xA;"/>
    </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>
    <population id="InitialPopulation_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description value="Elective inpatient hospitalizations with no preceding emergency department visit that end during the measurement period for patients aged 18 and older without an obstetrical condition and at least one surgical procedure was performed within the first 3 days of the encounter&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="Denominator_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description value="Equals Initial Population&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="DenominatorExclusion_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exclusion"/>
          <display value="Denominator Exclusion"/>
        </coding>
      </code>
      <description value="Inpatient hospitalizations for patients:&#xA;&#xA;With a diagnosis for a degenerative neurological disorder&#xA;&#xA;With any selected head, neck, and thoracic surgery involving significant risk of airway compromise or requiring airway protection&#xA;&#xA;Who have mechanical ventilation that starts more than one hour prior to the start of the first operating room (OR) procedure&#xA;&#xA;With a diagnosis for a neuromuscular disorder&#xA;&#xA;With arterial partial pressure of carbon dioxide (PaCO2)\&gt;50 mmHg combined with an arterial pH\&lt;7.30 within 48 hours or less prior to the start of the first OR procedure&#xA;&#xA;With arterial partial pressure of oxygen (PaO2)\&lt;50 mmHg within 48 hours or less prior to the start of the first OR procedure&#xA;&#xA;With a principal diagnosis for acute respiratory failure&#xA;&#xA;With a diagnosis for acute respiratory failure present on admission&#xA;&#xA;With any diagnosis present on admission for the existence of a tracheostomy&#xA;&#xA;Where a tracheostomy is performed before or on the same day as the first OR procedure&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exclusions"/>
      </criteria>
    </population>
    <population id="Numerator_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description value="Elective inpatient hospitalizations for patients with postoperative respiratory failure as evidenced by any of the following:&#xA;&#xA;Criterion A: Mechanical ventilation (MV) initiated within 30 days after first OR procedure, as evidenced by:&#xA;&#xA;A.1. Intubation that occurs outside of a procedural area and within 30 days after the end of the first OR procedure of the encounter.&#xA;&#xA;or&#xA;&#xA;A.2. MV that occurs outside of a procedural area within 30 days after the end of the first OR procedure of the encounter and is preceded by a period of non-invasive oxygen therapy between the end of the OR procedure and the MV occurrence, and without a subsequent OR procedure between the non-invasive oxygen therapy and the MV occurrence.&#xA;&#xA;or&#xA;&#xA;Criterion B: MV with a duration of more than 48 hours after the first OR procedure, as evidenced by:&#xA;&#xA;B.1. Extubation that occurs outside of a procedural area more than 48 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a period of non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the extubation occurrence.&#xA;&#xA;or&#xA;&#xA;B.2 Mechanical ventilation that occurs between 48 and 72 hours after the end of an OR procedure and within 30 days after the end of the first OR procedure, and is not preceded by a non-invasive oxygen therapy or a subsequent OR procedure between the end of the OR procedure and the MV occurrence.&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
  </group>
  <supplementalData id="sde-ethnicity">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Ethnicity&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-payer">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Payer&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Race&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-sex">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Sex&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-all-encounter-diagnoses-with-poa-indication">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable All Encounter Diagnoses With POA Indication&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable All Encounter Diagnoses With POA Indication"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-asa-physical-status-class">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable ASA Physical Status Class&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable ASA Physical Status Class"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-body-mass-index-(bmi)">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable Body Mass Index (BMI)&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Body Mass Index (BMI)"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-procedures">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable Encounter Procedures&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter Procedures"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-albumin-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Albumin In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Albumin In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-arterial-ph-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Arterial pH In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Arterial pH In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-ast-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First AST In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First AST In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-bicarbonate-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Bicarbonate In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Bicarbonate In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-bilirubin-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Bilirubin In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Bilirubin In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-blood-urea-nitrogen-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Blood Urea Nitrogen In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Blood Urea Nitrogen In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-bmi">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First BMI&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First BMI"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-body-temperature-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Body Temperature In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Body Temperature In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-carbon-dioxide-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Carbon Dioxide In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Carbon Dioxide In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-creatinine-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Creatinine In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Creatinine In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-heart-rate-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Heart Rate In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Heart Rate In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-hematocrit-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Hematocrit In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Hematocrit In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-hemoglobin-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Hemoglobin In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Hemoglobin In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-leukocyte-count-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Leukocyte Count In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Leukocyte Count In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-oxygen-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Oxygen In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Oxygen In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-platelet-count-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Platelet Count In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Platelet Count In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-respiratory-rate-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Respiratory Rate In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Respiratory Rate In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-sodium-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Sodium In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Sodium In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-systolic-blood-pressure-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First Systolic Blood Pressure In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First Systolic Blood Pressure In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-first-white-blood-cell-count-in-encounter">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable First White Blood Cell Count In Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable First White Blood Cell Count In Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-principal-procedure">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="individual"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="subject-list"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="summary"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-includeInReportType">
      <valueCode value="data-collection"/>
    </extension>
    <usage>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Risk Variable Principal Procedure&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Principal Procedure"/>
    </criteria>
  </supplementalData>
</Measure>