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

<Measure xmlns="http://hl7.org/fhir">
  <id value="CMS1017FHIRHHFI"/>
  <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/ratio-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 - Falls with InjuryFHIR
</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">CMS1017FHIR</td>


</tr>



  
<tr>


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



<td class="content-container">urn:uuid:6425d5e9-a54b-40e0-a07d-e6e17137871c</td>


</tr>



  
<tr>


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



<td class="content-container">urn:uuid:fd45e28d-9c60-47b3-93df-1a9e96c17795</td>


</tr>



  
    
    
<tr>


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



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


</tr>

  


  
    
    
<tr>


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



<td class="content-container">4120e</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 ratio measure assesses the number of inpatient hospitalizations where at least one fall with a major or moderate injury occurs among the total qualifying inpatient hospital days for patients aged 18 years and older</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.</p>
<p>LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. 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>Inpatient falls are among the most common incidents reported in hospitals and can increase length of stay and patient costs. Due to the potential for serious harm associated with patient falls, &quot;patient death or serious injury associated with a fall while being cared for in a health care setting&quot; is considered a Serious Reportable Event by the National Quality Forum (NQF, 2019).</p>
<p>&lt;br /&gt;</p>
<p>Falls (including unplanned or unintended descents to the floor) can result in patient injury ranging from minor abrasion or bruising to death as a result of injuries sustained from a fall. While major injuries (e.g., fractures, closed head injuries, internal bleeding) (Mintz et al., 2022) have the biggest impact on patient outcomes, 2008-2021 data findings from the 2022 Network of Patient Safety Databases (NPSD) demonstrated that 41.8 % of falls resulted in moderate injuries such as skin tear, avulsion, hematoma, significant bruising, dislocations and lacerations requiring suturing (AHRQ, 2022). Moderate injury is, as defined by the National Database of Nursing Quality Indicators (NDNQI), that resulted in suturing, application of steri-strips or skin glue, splinting, or muscle/joint strain (NDNQI, 2020). NPSD findings also demonstrated that mild to moderate level of harm represent 24.2.%, 0.4% - severe harm, and 0.1% - death (AHRQ, 2022; WHO, 2009).</p>
<p>&lt;br /&gt;</p>
<p>By focusing on falls with major and moderate injuries, the goal of this hospital harm dQM is to raise awareness of fall rates and, ultimately, to improve patient safety by preventing falls with injury in all hospital patients. The purpose of measuring the rate of falls with major and moderate injury events is to improve hospitals' practices for monitoring patients at high risk for falls with injury and, in so doing, to reduce the frequency of patient falls with injury.</p>
</div></td>


</tr>


<tr>


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



<td class="content-container"><div><p>Certain protocols and prevention measures to reduce patient falls with injury include using fall risk assessment tools to gauge individual patient risk, implementing fall prevention protocols directed at individual patient risk factors, and implementing environmental rounds to assess and correct environmental fall hazards. Recommended clinical guidelines and practices to reduce falls and injuries from falls in hospitals support many prevention activities including implementing multifactorial interventions and tailoring interventions to individual patient's conditions and needs. The intent and desired outcome for this dQM is to work with existing and recommended falls prevention processes to track falls with injury, and aim to reduce rates of inpatient falls resulting in major injury.</p>
<p>&lt;br /&gt;</p>
<p>Recommended falls prevention guidelines are:</p>
<p>&lt;br /&gt;</p>
<ul>
<li>
<p>Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline (ACS NSQIP/AGS, 2016)</p>
</li>
<li>
<p>Falls in older people: assessing risk and prevention (NICE, 2013)</p>
</li>
<li>
<p>Preventing falls and reducing injury from falls (4th edition) (RNAO, 2017)</p>
</li>
<li>
<p>Fall prevention in hospitals and nursing homes: Clinical practice guideline (Schoberer et al., 2022)</p>
</li>
<li>
<p>World guidelines for falls prevention and management for older adults: a global initiative, (Montero-Odasso et al., 2022)</p>
</li>
</ul>
</div></td>


</tr>



<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Mintz, J., Duprey, M. S., Zullo, A. R., Lee, Y., Kiel, D. P., Daiello, L. A., Rodriguez, K. E., Venkatesh, A. K., &amp; Berry, S. D. (2022). Identification of Fall-Related Injuries in Nursing Home Residents Using Administrative Claims Data. The journals of gerontology. Series A, Biological sciences and medical sciences, 77(7), 1421-1429. https://doi.org/10.1093/gerona/glab274</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Mohanty, S., Rosenthal, R.A., Russell, M.M., Neuman, M.D., Ko, C.Y., &amp; Esnaola, N.F. (2016). Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline from ACS NSQIP/AGS. Journal of the American College of Surgeons 222(5), 930-947. doi: 10.1016/j.jamcollsurg.2015.12.026</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Montero-Odasso, M., van der Velde, N., Martin, F. C., Petrovic, M., Tan, M. P., Ryg, J., Aguilar-Navarro, S., Alexander, N. B., Becker, C., Blain, H., Bourke, R., Cameron, I. D., Camicioli, R., Clemson, L., Close, J., Delbaere, K., Duan, L., Duque, G., Dyer, S. M., ... Rixt Zijlstra, G. A. (2022). World guidelines for falls prevention and management for older adults: a global initiative. Age and Ageing, 51(9), 1-36. https://doi.org/10.1093/ageing/afac205</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>National Quality Forum. Serious Reportable Events. http://www.qualityforum.org/topics/sres/serious_reportable_events.aspx. Accessed July 24, 2019</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Network of Patient Safety Databases Chartbook, 2022. Rockville, MD: Agency for Healthcare Research and Quality; September 2022. AHRQ Pub. No. 22-0051</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>NICE. (2013). Falls in older people: assessing risk and prevention. London, UK</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Press Ganey Guidelines for Data Collection and Submission Patient Falls Indicator, January 2020</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>RNAO. (2017). Preventing falls and reducing injury from falls (4th edition). Toronto, ON</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Schoberer, D., Breimaier, H. E., Zuschnegg, J., Findling, T., Schaffer, S., &amp; Archan, T. (2022). Fall prevention in hospitals and nursing homes: Clinical practice guideline. Worldviews on Evidence-Based Nursing, Vol. 19. https://doi.org/10.1111/wvn.12571</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>WHO. (2009). Conceptual Framework for the International Classification for Patient Safety, Version 1.1. https://apps.who.int/iris/bitstream/handle/10665/70882/WHO_IER_PSP_2010.2_eng.pdf</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>







<tr>


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



<td class="content-container">Hospital days are measured in 24-hour periods starting from the time of arrival at the hospital (including time in the Emergency Department and or Observation). The number of days will be counted as whole numbers; any fractional periods are dropped. For example, an eligible encounter with a length of stay of 75 hours will be measured as 3 days (72 hours).

&lt;br /&gt;

This measure includes two measure observations used to calculate the ratio of the number of encounters with a fall over the total number of eligible hospital days. The ratio is reported as the rate of inpatient hospitalizations with falls with moderate or major injury per 1000 patient days.

&lt;br /&gt;

To express the rate of inpatient hospitalizations with falls with moderate or major injury per 1,000 patient days, the following calculation is applied post-production during implementation: (Total number of encounters with falls with moderate or major injury / Total number of eligible hospital days) x 1000 = rate. Example: 1 eligible encounter with a patient fall with moderate or major injury over 120 eligible days (1/120) x 1000 = 8.33.

&lt;br /&gt;

In ratio measures, both the Denominator and Numerator populations flow separately from the same Initial Population. Therefore, the same exclusion criteria must be applied to both the Denominator and Numerator to prevent excluded cases from being considered.

&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: CMS1017v2. 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">
    Ratio


</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">Inpatient hospitalizations for patients aged 18 years and older with a length of stay less than or equal to 120 days that ends during the measurement period
</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 where the patient has a fall diagnosis present on admission.
</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">Inpatient hospitalizations where the patient has a fall that results in a major or moderate injury during the encounter.

The diagnosis of a major or moderate injury must not be present on admission.
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-Numerator_1">Numerator</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: NumeratorExclusion_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Inpatient hospitalizations where the patient has a fall diagnosis present on admission
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-NumeratorExclusion_1">Numerator Exclusions</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_1_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Denominator Observation, associated with the Denominator: The total number of eligible days across all encounters which match the initial population/denominator criteria.
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-MeasureObservation_1_1">Denominator Observation</a> 
            
          
          
        
        
          <br/><em>Input Population</em>: Denominator_1
        
        
          <em>AggregateMethod</em>: Sum
        
      </td>
    </tr>
  

      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_1_2
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Numerator Observation, associated with the Numerator: The total number of inpatient hospitalizations where a fall with major or moderate injury occurred, across all eligible encounters.
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-MeasureObservation_1_2">Numerator Observation</a> 
            
          
          
        
        
          <br/><em>Input Population</em>: Numerator_1
        
        
          <em>AggregateMethod</em>: Count
        
      </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 being collected for the development of baseline risk adjustment model include encounters with:&lt;/p&gt;
&lt;p&gt;Medications active on admission such as:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;anticoagulants&lt;/li&gt;
 &lt;li&gt;antidepressants&lt;/li&gt;
 &lt;li&gt;antihypertensives&lt;/li&gt;
 &lt;li&gt;central nervous system depressant medications&lt;/li&gt;
 &lt;li&gt;diuretics&lt;/li&gt;
 &lt;li&gt;opioids&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Medications administered during the hospitalization, such as anticoagulants&lt;/p&gt;
&lt;p&gt;Diagnoses present on admission which may increase the risk for a fall with injury, such as:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;abnormal weight loss or malnutrition&lt;/li&gt;
 &lt;li&gt;coagulation disorders&lt;/li&gt;
 &lt;li&gt;delirium, dementia, or other psychosis&lt;/li&gt;
 &lt;li&gt;depression&lt;/li&gt;
 &lt;li&gt;epilepsy&lt;/li&gt;
 &lt;li&gt;leukemia or lymphoma&lt;/li&gt;
 &lt;li&gt;liver disease (moderate to severe)&lt;/li&gt;
 &lt;li&gt;malignant bone disease&lt;/li&gt;
 &lt;li&gt;neurologic movement and related disorders&lt;/li&gt;
 &lt;li&gt;obesity&lt;/li&gt;
 &lt;li&gt;osteoporosis&lt;/li&gt;
 &lt;li&gt;peripheral neuropathy&lt;/li&gt;
 &lt;li&gt;stroke&lt;/li&gt;
 &lt;li&gt;suicide attempt&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Physical traits, such as body mass index (BMI)&lt;/p&gt;
&lt;p&gt;All encounter diagnoses along with their rank (e.g., 1 = principal, 2 = secondary) and present on admission (POA) indicators are being collected for the development of baseline risk adjustment model.&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="#cms1017fhirhhfi-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="#cms1017fhirhhfi-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="#cms1017fhirhhfi-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="#cms1017fhirhhfi-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-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="#cms1017fhirhhfi-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-all-encounter-diagnoses-with-rank-and-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 Rank and POA Indication

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-all-encounter-diagnoses-with-rank-and-poa-indication">Risk Variable All Encounter Diagnoses with Rank and 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-encounter-with-abnormal-weight-loss-or-malnutrition-present-on-admission
      
      <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 with Abnormal Weight Loss or Malnutrition Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-abnormal-weight-loss-or-malnutrition-present-on-admission">Risk Variable Encounter with Abnormal Weight Loss or Malnutrition Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-anticoagulant-active-at-admission
      
      <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 with Anticoagulant Active at Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-anticoagulant-active-at-admission">Risk Variable Encounter with Anticoagulant Active at Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-anticoagulant-administration-during-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 Encounter with Anticoagulant Administration During Encounter

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-anticoagulant-administration-during-encounter">Risk Variable Encounter with Anticoagulant Administration During Encounter</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-antidepressant-active-at-admission
      
      <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 with Antidepressant Active at Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-antidepressant-active-at-admission">Risk Variable Encounter with Antidepressant Active at Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-antihypertensive-active-at-admission
      
      <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 with Antihypertensive Active at Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-antihypertensive-active-at-admission">Risk Variable Encounter with Antihypertensive Active at Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-cns-depressant-active-at-admission
      
      <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 with CNS Depressant Active at Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-cns-depressant-active-at-admission">Risk Variable Encounter with CNS Depressant Active at Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-diuretic-active-at-admission
      
      <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 with Diuretic Active at Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-diuretic-active-at-admission">Risk Variable Encounter with Diuretic Active at Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-opioid-medication-active-at-admission
      
      <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 with Opioid Medication Active at Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-opioid-medication-active-at-admission">Risk Variable Encounter with Opioid Medication Active at Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-coagulation-disorder-present-on-admission
      
      <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 with Coagulation Disorder Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-coagulation-disorder-present-on-admission">Risk Variable Encounter with Coagulation Disorder Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-depression-present-on-admission
      
      <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 with Depression Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-depression-present-on-admission">Risk Variable Encounter with Depression Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-delirium-or-dementia-or-other-psychosis-present-on-admission
      
      <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 with Delirium or Dementia or Other Psychosis Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-delirium-or-dementia-or-other-psychosis-present-on-admission">Risk Variable Encounter with Delirium or Dementia or Other Psychosis Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-epilepsy-present-on-admission
      
      <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 with Epilepsy Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-epilepsy-present-on-admission">Risk Variable Encounter with Epilepsy Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-leukemia-or-lymphoma-present-on-admission
      
      <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 with Leukemia or Lymphoma Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-leukemia-or-lymphoma-present-on-admission">Risk Variable Encounter with Leukemia or Lymphoma Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-liver-disease-moderate-to-severe-present-on-admission
      
      <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 with Liver Disease Moderate to Severe Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-liver-disease-moderate-to-severe-present-on-admission">Risk Variable Encounter with Liver Disease Moderate to Severe Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-malignant-bone-disease-present-on-admission
      
      <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 with Malignant Bone Disease Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-malignant-bone-disease-present-on-admission">Risk Variable Encounter with Malignant Bone Disease Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-neurologic-disorder-present-on-admission
      
      <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 with Neurologic Disorder Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-neurologic-disorder-present-on-admission">Risk Variable Encounter with Neurologic Disorder Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-obesity-present-on-admission
      
      <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 with Obesity Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-obesity-present-on-admission">Risk Variable Encounter with Obesity Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-osteoporosis-present-on-admission
      
      <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 with Osteoporosis Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-osteoporosis-present-on-admission">Risk Variable Encounter with Osteoporosis Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-peripheral-neuropathy-present-on-admission
      
      <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 with Peripheral Neuropathy Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-peripheral-neuropathy-present-on-admission">Risk Variable Encounter with Peripheral Neuropathy Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-stroke-present-on-admission
      
      <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 with Stroke Present on Admission

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-stroke-present-on-admission">Risk Variable Encounter with Stroke Present on Admission</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: risk-variable-encounter-with-suicide-attempt
      
      <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 with Suicide Attempt

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms1017fhirhhfi-risk-variable-encounter-with-suicide-attempt">Risk Variable Encounter with Suicide Attempt</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/CMS1017FHIRHHFI</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;Qualifying Encounter&quot;</code></pre>
    
      
      <a href="#cms1017fhirhhfi-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="#cms1017fhirhhfi-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 A Fall Present On Admission&quot;</code></pre>
    
      
      <a href="#cms1017fhirhhfi-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 Where A Fall And Major Injury Occurred Not POA&quot;
    union &quot;Encounter Where A Fall And Moderate Injury Occurred Not POA&quot;</code></pre>
    
      
      <a href="#cms1017fhirhhfi-numerator"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

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

  <td>
    
    
    
    
      
      <a name="Group_1-NumeratorExclusion_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator Exclusions&quot;:
  &quot;Encounter With A Fall Present On Admission&quot;</code></pre>
    
      
      <a href="#cms1017fhirhhfi-numerator-exclusions"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

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

  <td>
    
    
    
    
      
      <a name="Group_1-MeasureObservation_1_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Denominator Observation&quot;(QualifyingEncounter Encounter):
  duration in days of QualifyingEncounter.hospitalizationWithObservation ( )</code></pre>
    
      
      <a href="#cms1017fhirhhfi-denominator-observation"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

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

  <td>
    
    
    
    
      
      <a name="Group_1-MeasureObservation_1_2"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Numerator Observation&quot;(QualifyingEncounter Encounter):
  Count(&quot;Numerator&quot; FallsEncounter
      where FallsEncounter.period ends during QualifyingEncounter.hospitalizationWithObservation()
  )</code></pre>
    
      
      <a href="#cms1017fhirhhfi-numerator-observation"><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> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-inpatient-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Inpatient Encounter&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.status = 'finished'
      and EncounterInpatient.period ends 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> CQMCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-lengthindays"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Calculates the difference in calendar days between the start and end of the given interval.
*/
define fluent function lengthInDays(Value Interval&lt;DateTime&gt; ):
  difference in days between start of Value and end of 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> 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-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> 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> USQualityCoreCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="usqualitycorecommon-getid"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the id of the given uri (i.e. everything after the last slash)
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cumulativemedicationduration-medicationrequestperiod"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Calculates the Medication Period for a single MedicationRequest.
MedicationRequest instances provided to this function are expected
to conform to the [MMEMedicationRequest](http://build.fhir.org/ig/cqframework/opioid-mme-r4/StructureDefinition-mmemedicationrequest.html)
profile, which expects:
* 1 and only 1 dosageInstruction, multiple dosageInstruction elements will result in an error
* 1 and only 1 doseAndRate, multiple doseAndRate elements will result in an error
* 1 timing with 1 repeat, missing timing or repeat elements will result in a null
* frequency, frequencyMax, defaulting to 1
* period, periodUnit, defaulting to 1 'd'
* timeOfDay
* doseQuantity or doseRange, missing doseQuantity and doseRange will result in a null
Note that MedicationRequest status is not considered by this calculation, as the
list of MedicationRequest instances provided to this function should already have
considered appropriate statuses, depending on the use case, typically `completed`.

NOTE: Updated return to use &quot;date from end of boundsPeriod&quot; to ensure result is Interval&lt;Date&gt;
*/
define fluent function medicationRequestPeriod(Request MedicationRequest):
  Request R
    let
      dosage: singleton from R.dosageInstruction,
      doseAndRate: singleton from dosage.doseAndRate,
      timing: dosage.timing,
      frequency: Coalesce(timing.repeat.frequencyMax, timing.repeat.frequency),
      period: Quantity(timing.repeat.period, timing.repeat.periodUnit),
      doseRange: doseAndRate.dose as FHIR.Range,
      doseQuantity: doseAndRate.dose as FHIR.SimpleQuantity,

      dose: Coalesce(end of doseRange, doseQuantity),
      dosesPerDay: Coalesce(ToDaily(frequency, period), Count(timing.repeat.timeOfDay), 1.0),
      boundsPeriod: timing.repeat.bounds as Period,
      // TODO: this isn't working as expected, convert results in null
      //daysSupply: (convert(R.dispenseRequest.expectedSupplyDuration) to days).value,
      daysSupply: (R.dispenseRequest.expectedSupplyDuration).value,
      quantity: R.dispenseRequest.quantity,
      refills: Coalesce(R.dispenseRequest.numberOfRepeatsAllowed, 0),
      startDate:
        Coalesce(
          date from start of boundsPeriod,
          date from R.authoredOn,
          date from start of R.dispenseRequest.validityPeriod
        ),
      totalDaysSupplied: Coalesce(daysSupply, quantity.value / (dose.value * dosesPerDay)) * (1 + refills)
    return
      if startDate is not null and totalDaysSupplied is not null then
        Interval[startDate, startDate + Quantity(totalDaysSupplied - 1, 'day') ]
      else if startDate is not null and boundsPeriod.&quot;end&quot; is not null then
        Interval[startDate, date from end of boundsPeriod]
      else
        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> CumulativeMedicationDuration</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cumulativemedicationduration-quantity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/**********************************************************************/
/* Functions in this region are copied from opioid-mme-r4             */
/**********************************************************************/

define function Quantity(value Decimal, unit String):
  if value is not null then
    System.Quantity { value: value, unit: unit }
  else
    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> CumulativeMedicationDuration</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cumulativemedicationduration-todaily"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
 Goal is to get to number of days
 Two broad approaches to the calculation:
  1) Based on supply and frequency, calculate the number of expected days the medication will cover/has covered
  2) Based on relevant period, determine a covered interval and calculate the length of that interval in days

This topic covers several use cases and illustrates how to calculate Cumulative
Medication Duration for each type of medication resource using the supply and
frequency approach.
*/

/*
  For the first approach, we need to get from frequency to a frequency/day
  So we define ToDaily
*/

/*
  Calculates daily frequency given frequency within a period
*/
define function ToDaily(frequency System.Integer, period System.Quantity):
  case period.unit
    when 'h' then frequency * (24.0 / period.value)
    when 'min' then frequency * (24.0 / period.value) * 60
    when 's' then frequency * (24.0 / period.value) * 60 * 60
    when 'd' then frequency * (24.0 / period.value) / 24
    when 'wk' then frequency * (24.0 / period.value) / (24 * 7)
    when 'mo' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */
    when 'a' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */
    when 'hour' then frequency * (24.0 / period.value)
    when 'minute' then frequency * (24.0 / period.value) * 60
    when 'second' then frequency * (24.0 / period.value) * 60 * 60
    when 'day' then frequency * (24.0 / period.value) / 24
    when 'week' then frequency * (24.0 / period.value) / (24 * 7)
    when 'month' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */
    when 'year' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */
    when 'hours' then frequency * (24.0 / period.value)
    when 'minutes' then frequency * (24.0 / period.value) * 60
    when 'seconds' then frequency * (24.0 / period.value) * 60 * 60
    when 'days' then frequency * (24.0 / period.value) / 24
    when 'weeks' then frequency * (24.0 / period.value) / (24 * 7)
    when 'months' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */
    when 'years' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */
    else Message(null, true, 'CMDLogic.ToDaily.UnknownUnit', ErrorLevel, 'Unknown unit ' &amp; period.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 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-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 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 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-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-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value MedicationRequestStatus): 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 MedicationRequestIntent): 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-todecimal"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDecimal(value decimal): 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 UnitsOfTime): 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 FHIR [Range](https://hl7.org/fhir/datatypes.html#Range) value to a CQL Interval of Quantity
*/
define function ToInterval(range FHIR.Range):
    if range is null then
        null
    else
        Interval[ToQuantity(range.low), ToQuantity(range.high)]</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-tointeger"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToInteger(value integer): 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-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value MedicationAdministrationStatus): 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 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 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 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-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-iscommunity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given MedicationRequest has a category of Community
*/
define fluent function isCommunity(medicationRequest MedicationRequest):
  exists (medicationRequest.category C
    where C ~ Community
  )</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-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> 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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-qualifying-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Qualifying Encounter&quot;:
  CQMCommon.&quot;Inpatient Encounter&quot; InpatientEncounter
    where InpatientEncounter.hospitalizationWithObservation ( ).lengthInDays ( ) &lt;= 120
      and AgeInYearsAt(date from start of InpatientEncounter.period) &gt;= 18</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-osteoporosis-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Osteoporosis Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Osteoporosis&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-coagulation-disorder-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Coagulation Disorder Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Coagulation Disorders&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-antidepressant-active-at-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Antidepressant Active at Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [&quot;MedicationRequest&quot;: &quot;Antidepressants&quot;] AntidepressantMed
      such that AntidepressantMed.status in { 'active', 'completed' }
        and ( AntidepressantMed.intent = 'order'
            or ( AntidepressantMed.intent = 'plan'
                and AntidepressantMed.subject.reference.getId ( ) = Patient.id
            )
        )
        and AntidepressantMed.isCommunity ( )
        and AntidepressantMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-all-encounter-diagnoses-with-rank-and-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 Rank and POA Indication&quot;:
  from
    &quot;Qualifying Encounter&quot; InpatientEncounter
    let claim: ( [Claim] C
        where C.status = 'active'
          and C.use = 'claim'
          and exists ( C.item ClaimItem
              where ClaimItem.encounter.references ( InpatientEncounter )
          )
    ),
    claimItem: ( claim.item ClaimItem
        where ClaimItem.encounter.references ( InpatientEncounter )
    )
    return Tuple {
      encounterId: InpatientEncounter.id,
      diagnosis: claim.diagnosis,
      rank: claim.diagnosis.sequence,
      POA: claim.diagnosis Diag
        where Diag.onAdmission in &quot;Present on Admission or Clinically Undetermined&quot;
          or Diag.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-leukemia-or-lymphoma-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Leukemia or Lymphoma Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Leukemia or Lymphoma&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-obesity-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Obesity Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Obesity&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-peripheral-neuropathy-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Peripheral Neuropathy Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Peripheral Neuropathy&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-delirium-or-dementia-or-other-psychosis-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Delirium or Dementia or Other Psychosis Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Delirium, Dementia, and Other Psychoses&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-suicide-attempt"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Suicide Attempt&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.encountersDiagnosis ( ).code in &quot;Suicide Attempt&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-liver-disease-moderate-to-severe-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Liver Disease Moderate to Severe Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Liver Disease Moderate to Severe&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-initial-population"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  &quot;Qualifying Encounter&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-anticoagulant-administration-during-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Anticoagulant Administration During Encounter&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [&quot;MedicationAdministration&quot;: &quot;Anticoagulants for All Indications&quot;] Anticoagulants
      such that Anticoagulants.effective.toInterval ( ) starts during InpatientEncounter.hospitalizationWithObservation ( )
        and Anticoagulants.status in { 'in-progress', 'completed' }</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-neurologic-disorder-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Neurologic Disorder Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Neurologic Movement and Related Disorders&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-abnormal-weight-loss-or-malnutrition-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Abnormal Weight Loss or Malnutrition Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Abnormal Weight Loss&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )
      or InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Malnutrition&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-anticoagulant-active-at-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Anticoagulant Active at Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [&quot;MedicationRequest&quot;: &quot;Anticoagulants for All Indications&quot;] Anticoagulants
      such that Anticoagulants.status in { 'active', 'completed' }
        and ( Anticoagulants.intent = 'order'
            or ( Anticoagulants.intent = 'plan'
                and Anticoagulants.subject.reference.getId ( ) = Patient.id
            )
        )
        and Anticoagulants.isCommunity ( )
        and Anticoagulants.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-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;:
  from
    [&quot;USCore.BMIProfile&quot;] BMI
    with &quot;Qualifying Encounter&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-depression-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Depression Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Depression&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-epilepsy-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Epilepsy Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Epilepsy&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-diuretic-active-at-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Diuretic Active at Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [&quot;MedicationRequest&quot;: &quot;Diuretics&quot;] DiureticMed
      such that DiureticMed.status in { 'active', 'completed' }
        and ( DiureticMed.intent = 'order'
            or ( DiureticMed.intent = 'plan'
                and DiureticMed.subject.reference.getId ( ) = Patient.id
            )
        )
        and DiureticMed.isCommunity ( )
        and DiureticMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-cns-depressant-active-at-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with CNS Depressant Active at Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [&quot;MedicationRequest&quot;: &quot;Central Nervous System Depressants&quot;] CNSMed
      such that CNSMed.status in { 'active', 'completed' }
        and ( CNSMed.intent = 'order'
            or ( CNSMed.intent = 'plan'
                and CNSMed.subject.reference.getId ( ) = Patient.id
            )
        )
        and CNSMed.isCommunity ( )
        and CNSMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-malignant-bone-disease-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Malignant Bone Disease Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Malignant Bone Disease&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-antihypertensive-active-at-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Antihypertensive Active at Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [&quot;MedicationRequest&quot;: &quot;Antihypertensives&quot;] BPMed
      such that BPMed.status in { 'active', 'completed' }
        and ( BPMed.intent = 'order'
            or ( BPMed.intent = 'plan'
                and BPMed.subject.reference.getId ( ) = Patient.id
            )
        )
        and BPMed.isCommunity ( )
        and BPMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-opioid-medication-active-at-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Opioid Medication Active at Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [&quot;MedicationRequest&quot;: &quot;Opioids&quot;] OpioidMed
      such that OpioidMed.status in { 'active', 'completed' }
        and ( OpioidMed.intent = 'order'
            or ( OpioidMed.intent = 'plan'
                and OpioidMed.subject.reference.getId ( ) = Patient.id
            )
        )
        and OpioidMed.isCommunity ( )
        and OpioidMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encounter-with-a-fall-diagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With A Fall Diagnosis&quot;:
  &quot;Qualifying Encounter&quot; QualifyingFall
    where QualifyingFall.reasonCode in &quot;Inpatient Falls&quot;
      or QualifyingFall.encountersDiagnosis ( ).code in &quot;Inpatient Falls&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encounter-with-a-fall-event"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With A Fall Event&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    with [AdverseEvent: &quot;Inpatient Falls&quot;] FallsDocumentation
      such that Coalesce(FallsDocumentation.date, FallsDocumentation.recordedDate) during InpatientEncounter.hospitalizationWithObservation ( )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encounter-where-a-fall-occurred"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter Where A Fall Occurred&quot;:
  &quot;Encounter With A Fall Diagnosis&quot; EncounterFallDiagnosis
    union &quot;Encounter With A Fall Event&quot; EncounterFallEvent</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encounter-with-a-fall-not-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With A Fall Not Present On Admission&quot;:
  &quot;Encounter Where A Fall Occurred&quot; EncounterFallDiagnosis
    where EncounterFallDiagnosis.hasDiagnosisNotPresentOnAdmissionOrNull ( &quot;Inpatient Falls&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encounter-where-a-fall-and-major-injury-occurred-not-poa"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter Where A Fall And Major Injury Occurred Not POA&quot;:
  &quot;Encounter With A Fall Not Present On Admission&quot; FallOccurred
    where exists ( ( FallOccurred.claimDiagnosis ( ) ) MajorFallOccurred
        where ( MajorFallOccurred.onAdmission is null
            or MajorFallOccurred.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&quot;
        )
          and ( MajorFallOccurred.diagnosis in &quot;Major Injuries&quot;
              or MajorFallOccurred.diagnosis.getCondition ( ).code in &quot;Major Injuries&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encounter-where-a-fall-and-moderate-injury-occurred-not-poa"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter Where A Fall And Moderate Injury Occurred Not POA&quot;:
  &quot;Encounter With A Fall Not Present On Admission&quot; FallOccurred
    where exists ( ( FallOccurred.claimDiagnosis ( ) ) ModerateFallOccurred
        where ( ModerateFallOccurred.onAdmission is null
            or ModerateFallOccurred.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&quot;
        )
          and ( ModerateFallOccurred.diagnosis in &quot;Moderate Injuries&quot;
              or ModerateFallOccurred.diagnosis.getCondition ( ).code in &quot;Moderate Injuries&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-numerator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Encounter Where A Fall And Major Injury Occurred Not POA&quot;
    union &quot;Encounter Where A Fall And Moderate Injury Occurred Not POA&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encounter-with-a-fall-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With A Fall Present On Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Inpatient Falls&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-numerator-exclusions"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator Exclusions&quot;:
  &quot;Encounter With A Fall Present On Admission&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-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 A Fall Present On Admission&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-risk-variable-encounter-with-stroke-present-on-admission"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Risk Variable Encounter with Stroke Present on Admission&quot;:
  &quot;Qualifying Encounter&quot; InpatientEncounter
    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Stroke&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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-encountersdiagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function encountersDiagnosis(Encounter Encounter):
  Encounter.reasonReference EncDiag
    return singleton from ( ( [ConditionEncounterDiagnosis] ConditionED
        union [ConditionProblemsHealthConcerns] ConditionPHC ) Cond
        where EncDiag.references ( Cond.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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-denominator-observation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Denominator Observation&quot;(QualifyingEncounter Encounter):
  duration in days of QualifyingEncounter.hospitalizationWithObservation ( )</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-hasdiagnosisnotpresentonadmissionornull"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function hasDiagnosisNotPresentOnAdmissionOrNull(encounter Encounter, diagnosisValueSet System.ValueSet):
  exists ( [Claim] C
      where C.status = 'active'
        and C.use = 'claim'
        and exists ( C.item I
            where I.encounter.references ( encounter )
        )
      return C.diagnosis D
        where exists ( C.item I
            where I.encounter.references ( encounter )
              and D.sequence in I.diagnosisSequence
        )
          and ( D.onAdmission is null
              or D.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&quot;
          )
          and D.diagnosis as FHIR.CodeableConcept 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> CMS1017FHIRHHFI</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms1017fhirhhfi-numerator-observation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Numerator Observation&quot;(QualifyingEncounter Encounter):
  Count(&quot;Numerator&quot; FallsEncounter
      where FallsEncounter.period ends during QualifyingEncounter.hospitalizationWithObservation()
  )</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 MedicationRequestCategory
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-medicationrequest-category.html">MedicationRequest Category Codes</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
    
  </td>
</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">Value Set</th>


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Encounter Inpatient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307</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 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 Osteoporosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1200.147/expansion">Osteoporosis</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1200.147</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 Coagulation Disorders
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.23/expansion">Coagulation Disorders</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.23</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


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


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Not Present On Admission or Documentation Insufficient to Determine
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1147.198/expansion">Not Present On Admission or Documentation Insufficient to Determine</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.198</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Delirium, Dementia, and Other Psychoses
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.168/expansion">Delirium or Dementia and Other Psychoses</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.168</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Suicide Attempt
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.130/expansion">Suicide Attempt</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.130</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 Liver Disease Moderate to Severe
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1248.137/expansion">Liver Disease Moderate to Severe</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.137</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Abnormal Weight Loss
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://tx.fhir.org/r4/ValueSet/2.16.840.1.113762.1.4.1258.2-20241012">Abnormal Weight Loss</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1258.2</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Malnutrition
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://tx.fhir.org/r4/ValueSet/2.16.840.1.113762.1.4.1272.1-20241012">Malnutrition</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1272.1</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


<tr>
  
  

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


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


  
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Community
        <br/>
      
      <em>Code</em>: community
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</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 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 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 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 USQualityCoreCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-USQualityCoreCommon.html">US Quality Core Common</a> version: 0.1.0-cibuild
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library CMD
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/us/cql/2026May/Library-CumulativeMedicationDuration.html">http://hl7.org/fhir/us/cql/Library/CumulativeMedicationDuration|2.0.0-ballot</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/cql/Library/CumulativeMedicationDuration|2.0.0-ballot</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>: 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, onAdmission, diagnosis, diagnosis.code
    <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, onAdmission, diagnosis, diagnosis.code
    <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, status, period, onAdmission, diagnosis, diagnosis.code, id, reasonCode
    <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.666.5.307/expansion">Encounter Inpatient</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>: 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>: id, ombCategory, detailed, text
    <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, diagnosis
    <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>: 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>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <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.163/expansion">Antidepressants</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <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.22/expansion">Anticoagulants for All Indications</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <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.170/expansion">Diuretics</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <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.134/expansion">Central Nervous System Depressants</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <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.164/expansion">Antihypertensives</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <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.120/expansion">Opioids</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.expectedSupplyDuration.value, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, authoredOn, dispenseRequest.validityPeriod, status, intent, subject, subject.reference
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</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.163/expansion">Antidepressants</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.expectedSupplyDuration.value, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, authoredOn, dispenseRequest.validityPeriod, status, intent, subject, subject.reference
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</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.22/expansion">Anticoagulants for All Indications</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.expectedSupplyDuration.value, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, authoredOn, dispenseRequest.validityPeriod, status, intent, subject, subject.reference
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</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.170/expansion">Diuretics</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.expectedSupplyDuration.value, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, authoredOn, dispenseRequest.validityPeriod, status, intent, subject, subject.reference
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</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.134/expansion">Central Nervous System Depressants</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.expectedSupplyDuration.value, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, authoredOn, dispenseRequest.validityPeriod, status, intent, subject, subject.reference
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</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.164/expansion">Antihypertensives</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication.reference, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.expectedSupplyDuration.value, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, authoredOn, dispenseRequest.validityPeriod, status, intent, subject, subject.reference
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.expectedSupplyDuration.value, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, authoredOn, dispenseRequest.validityPeriod, status, intent, subject, subject.reference
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</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.120/expansion">Opioids</a>
    <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>: 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>: MedicationAdministration
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication.reference, effective, status
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationAdministration
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, effective, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</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.22/expansion">Anticoagulants for All Indications</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-bmi.html">US Core BMI Profile</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: effective, value, status
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: AdverseEvent
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/adverseevent.html">AdverseEvent</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: event, date, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: event</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.1147.171/expansion">Inpatient Falls</a>
    <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>ErrorLevel</td>
          <td>In</td>
          <td>0..1</td>
          <td>string</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Osteoporosis Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Coagulation Disorder Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Antidepressant Active at Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable All Encounter Diagnoses with Rank and POA Indication</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Leukemia or Lymphoma Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Obesity Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Peripheral Neuropathy Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Delirium or Dementia or Other Psychosis Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Suicide Attempt</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Payer</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Liver Disease Moderate to Severe Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Initial Population</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Anticoagulant Administration During Encounter</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Neurologic Disorder Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Abnormal Weight Loss or Malnutrition Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Anticoagulant Active at Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</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 Encounter with Depression Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Epilepsy Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Diuretic Active at Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with CNS Depressant Active at Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Race</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Malignant Bone Disease Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Sex</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Coding</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Antihypertensive Active at Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Risk Variable Encounter with Opioid Medication Active at Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</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>Numerator Exclusions</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</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 Encounter with Stroke Present on Admission</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</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://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
          <code value="community"/>
          <display value="Community"/>
        </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-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="Inpatient Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Inpatient Encounter&quot;:&#xA;  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient&#xA;    where EncounterInpatient.status = 'finished'&#xA;      and EncounterInpatient.period ends during day of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Qualifying Encounter&quot;:&#xA;  CQMCommon.&quot;Inpatient Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.hospitalizationWithObservation ( ).lengthInDays ( ) &lt;= 120&#xA;      and AgeInYearsAt(date from start of InpatientEncounter.period) &gt;= 18"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Osteoporosis Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Osteoporosis Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Osteoporosis&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Coagulation Disorder Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Coagulation Disorder Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Coagulation Disorders&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Antidepressant Active at Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Antidepressant Active at Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [&quot;MedicationRequest&quot;: &quot;Antidepressants&quot;] AntidepressantMed&#xA;      such that AntidepressantMed.status in { 'active', 'completed' }&#xA;        and ( AntidepressantMed.intent = 'order'&#xA;            or ( AntidepressantMed.intent = 'plan'&#xA;                and AntidepressantMed.subject.reference.getId ( ) = Patient.id&#xA;            )&#xA;        )&#xA;        and AntidepressantMed.isCommunity ( )&#xA;        and AntidepressantMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable All Encounter Diagnoses with Rank and POA Indication"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable All Encounter Diagnoses with Rank and POA Indication&quot;:&#xA;  from&#xA;    &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    let claim: ( [Claim] C&#xA;        where C.status = 'active'&#xA;          and C.use = 'claim'&#xA;          and exists ( C.item ClaimItem&#xA;              where ClaimItem.encounter.references ( InpatientEncounter )&#xA;          )&#xA;    ),&#xA;    claimItem: ( claim.item ClaimItem&#xA;        where ClaimItem.encounter.references ( InpatientEncounter )&#xA;    )&#xA;    return Tuple {&#xA;      encounterId: InpatientEncounter.id,&#xA;      diagnosis: claim.diagnosis,&#xA;      rank: claim.diagnosis.sequence,&#xA;      POA: claim.diagnosis Diag&#xA;        where Diag.onAdmission in &quot;Present on Admission or Clinically Undetermined&quot;&#xA;          or Diag.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&quot;&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Leukemia or Lymphoma Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Leukemia or Lymphoma Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Leukemia or Lymphoma&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Obesity Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Obesity Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Obesity&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Peripheral Neuropathy Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Peripheral Neuropathy Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Peripheral Neuropathy&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Delirium or Dementia or Other Psychosis Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Delirium or Dementia or Other Psychosis Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Delirium, Dementia, and Other Psychoses&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Suicide Attempt"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Suicide Attempt&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.encountersDiagnosis ( ).code in &quot;Suicide Attempt&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </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="11"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </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="12"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Liver Disease Moderate to Severe Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Liver Disease Moderate to Severe Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Liver Disease Moderate to Severe&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Initial Population&quot;:&#xA;  &quot;Qualifying Encounter&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Anticoagulant Administration During Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Anticoagulant Administration During Encounter&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [&quot;MedicationAdministration&quot;: &quot;Anticoagulants for All Indications&quot;] Anticoagulants&#xA;      such that Anticoagulants.effective.toInterval ( ) starts during InpatientEncounter.hospitalizationWithObservation ( )&#xA;        and Anticoagulants.status in { 'in-progress', 'completed' }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Neurologic Disorder Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Neurologic Disorder Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Neurologic Movement and Related Disorders&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Abnormal Weight Loss or Malnutrition Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Abnormal Weight Loss or Malnutrition Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Abnormal Weight Loss&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )&#xA;      or InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Malnutrition&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Anticoagulant Active at Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Anticoagulant Active at Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [&quot;MedicationRequest&quot;: &quot;Anticoagulants for All Indications&quot;] Anticoagulants&#xA;      such that Anticoagulants.status in { 'active', 'completed' }&#xA;        and ( Anticoagulants.intent = 'order'&#xA;            or ( Anticoagulants.intent = 'plan'&#xA;                and Anticoagulants.subject.reference.getId ( ) = Patient.id&#xA;            )&#xA;        )&#xA;        and Anticoagulants.isCommunity ( )&#xA;        and Anticoagulants.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </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;  from&#xA;    [&quot;USCore.BMIProfile&quot;] BMI&#xA;    with &quot;Qualifying Encounter&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="19"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Depression Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Depression Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Depression&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Epilepsy Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Epilepsy Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Epilepsy&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Diuretic Active at Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Diuretic Active at Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [&quot;MedicationRequest&quot;: &quot;Diuretics&quot;] DiureticMed&#xA;      such that DiureticMed.status in { 'active', 'completed' }&#xA;        and ( DiureticMed.intent = 'order'&#xA;            or ( DiureticMed.intent = 'plan'&#xA;                and DiureticMed.subject.reference.getId ( ) = Patient.id&#xA;            )&#xA;        )&#xA;        and DiureticMed.isCommunity ( )&#xA;        and DiureticMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with CNS Depressant Active at Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with CNS Depressant Active at Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [&quot;MedicationRequest&quot;: &quot;Central Nervous System Depressants&quot;] CNSMed&#xA;      such that CNSMed.status in { 'active', 'completed' }&#xA;        and ( CNSMed.intent = 'order'&#xA;            or ( CNSMed.intent = 'plan'&#xA;                and CNSMed.subject.reference.getId ( ) = Patient.id&#xA;            )&#xA;        )&#xA;        and CNSMed.isCommunity ( )&#xA;        and CNSMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </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="24"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </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="25"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Malignant Bone Disease Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Malignant Bone Disease Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Malignant Bone Disease&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </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="27"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </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="28"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Antihypertensive Active at Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Antihypertensive Active at Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [&quot;MedicationRequest&quot;: &quot;Antihypertensives&quot;] BPMed&#xA;      such that BPMed.status in { 'active', 'completed' }&#xA;        and ( BPMed.intent = 'order'&#xA;            or ( BPMed.intent = 'plan'&#xA;                and BPMed.subject.reference.getId ( ) = Patient.id&#xA;            )&#xA;        )&#xA;        and BPMed.isCommunity ( )&#xA;        and BPMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Opioid Medication Active at Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Opioid Medication Active at Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [&quot;MedicationRequest&quot;: &quot;Opioids&quot;] OpioidMed&#xA;      such that OpioidMed.status in { 'active', 'completed' }&#xA;        and ( OpioidMed.intent = 'order'&#xA;            or ( OpioidMed.intent = 'plan'&#xA;                and OpioidMed.subject.reference.getId ( ) = Patient.id&#xA;            )&#xA;        )&#xA;        and OpioidMed.isCommunity ( )&#xA;        and OpioidMed.medicationRequestPeriod ( ) overlaps before day of InpatientEncounter.period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With A Fall Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With A Fall Diagnosis&quot;:&#xA;  &quot;Qualifying Encounter&quot; QualifyingFall&#xA;    where QualifyingFall.reasonCode in &quot;Inpatient Falls&quot;&#xA;      or QualifyingFall.encountersDiagnosis ( ).code in &quot;Inpatient Falls&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With A Fall Event"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With A Fall Event&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    with [AdverseEvent: &quot;Inpatient Falls&quot;] FallsDocumentation&#xA;      such that Coalesce(FallsDocumentation.date, FallsDocumentation.recordedDate) during InpatientEncounter.hospitalizationWithObservation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter Where A Fall Occurred"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter Where A Fall Occurred&quot;:&#xA;  &quot;Encounter With A Fall Diagnosis&quot; EncounterFallDiagnosis&#xA;    union &quot;Encounter With A Fall Event&quot; EncounterFallEvent"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="33"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With A Fall Not Present On Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With A Fall Not Present On Admission&quot;:&#xA;  &quot;Encounter Where A Fall Occurred&quot; EncounterFallDiagnosis&#xA;    where EncounterFallDiagnosis.hasDiagnosisNotPresentOnAdmissionOrNull ( &quot;Inpatient Falls&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter Where A Fall And Major Injury Occurred Not POA"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter Where A Fall And Major Injury Occurred Not POA&quot;:&#xA;  &quot;Encounter With A Fall Not Present On Admission&quot; FallOccurred&#xA;    where exists ( ( FallOccurred.claimDiagnosis ( ) ) MajorFallOccurred&#xA;        where ( MajorFallOccurred.onAdmission is null&#xA;            or MajorFallOccurred.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&quot;&#xA;        )&#xA;          and ( MajorFallOccurred.diagnosis in &quot;Major Injuries&quot;&#xA;              or MajorFallOccurred.diagnosis.getCondition ( ).code in &quot;Major Injuries&quot;&#xA;          )&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter Where A Fall And Moderate Injury Occurred Not POA"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter Where A Fall And Moderate Injury Occurred Not POA&quot;:&#xA;  &quot;Encounter With A Fall Not Present On Admission&quot; FallOccurred&#xA;    where exists ( ( FallOccurred.claimDiagnosis ( ) ) ModerateFallOccurred&#xA;        where ( ModerateFallOccurred.onAdmission is null&#xA;            or ModerateFallOccurred.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&quot;&#xA;        )&#xA;          and ( ModerateFallOccurred.diagnosis in &quot;Moderate Injuries&quot;&#xA;              or ModerateFallOccurred.diagnosis.getCondition ( ).code in &quot;Moderate Injuries&quot;&#xA;          )&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Numerator&quot;:&#xA;  &quot;Encounter Where A Fall And Major Injury Occurred Not POA&quot;&#xA;    union &quot;Encounter Where A Fall And Moderate Injury Occurred Not POA&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </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="38"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With A Fall Present On Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With A Fall Present On Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Inpatient Falls&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator Exclusions"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Numerator Exclusions&quot;:&#xA;  &quot;Encounter With A Fall Present On Admission&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="40"/>
        </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="41"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </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="42"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusions"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator Exclusions&quot;:&#xA;  &quot;Encounter With A Fall Present On Admission&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="43"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Risk Variable Encounter with Stroke Present on Admission"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Risk Variable Encounter with Stroke Present on Admission&quot;:&#xA;  &quot;Qualifying Encounter&quot; InpatientEncounter&#xA;    where InpatientEncounter.isDiagnosisPresentOnAdmission ( &quot;Stroke&quot;, &quot;Present on Admission or Clinically Undetermined&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="44"/>
        </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="45"/>
        </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="46"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="lengthInDays"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Calculates the difference in calendar days between the start and end of the given interval.&#xA;*/&#xA;define fluent function lengthInDays(Value Interval&lt;DateTime&gt; ):&#xA;  difference in days between start of Value and end of Value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="47"/>
        </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="48"/>
        </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="49"/>
        </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="50"/>
        </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="51"/>
        </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="52"/>
        </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="53"/>
        </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="54"/>
        </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="55"/>
        </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="56"/>
        </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="57"/>
        </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="58"/>
        </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="59"/>
        </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="60"/>
        </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 MedicationRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="61"/>
        </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 MedicationRequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="62"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="USQualityCoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getId"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the id of the given uri (i.e. everything after the last slash)&#xA;*/&#xA;define fluent function getId(uri String):&#xA;  Last(Split(uri, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="63"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isCommunity"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given MedicationRequest has a category of Community&#xA;*/&#xA;define fluent function isCommunity(medicationRequest MedicationRequest):&#xA;  exists (medicationRequest.category C&#xA;    where C ~ Community&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="64"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CumulativeMedicationDuration"/>
        </extension>
        <extension url="name">
          <valueString value="medicationRequestPeriod"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;Calculates the Medication Period for a single MedicationRequest.&#xA;MedicationRequest instances provided to this function are expected&#xA;to conform to the [MMEMedicationRequest](http://build.fhir.org/ig/cqframework/opioid-mme-r4/StructureDefinition-mmemedicationrequest.html)&#xA;profile, which expects:&#xA;* 1 and only 1 dosageInstruction, multiple dosageInstruction elements will result in an error&#xA;* 1 and only 1 doseAndRate, multiple doseAndRate elements will result in an error&#xA;* 1 timing with 1 repeat, missing timing or repeat elements will result in a null&#xA;* frequency, frequencyMax, defaulting to 1&#xA;* period, periodUnit, defaulting to 1 'd'&#xA;* timeOfDay&#xA;* doseQuantity or doseRange, missing doseQuantity and doseRange will result in a null&#xA;Note that MedicationRequest status is not considered by this calculation, as the&#xA;list of MedicationRequest instances provided to this function should already have&#xA;considered appropriate statuses, depending on the use case, typically `completed`.&#xA;&#xA;NOTE: Updated return to use &quot;date from end of boundsPeriod&quot; to ensure result is Interval&lt;Date&gt;&#xA;*/&#xA;define fluent function medicationRequestPeriod(Request MedicationRequest):&#xA;  Request R&#xA;    let&#xA;      dosage: singleton from R.dosageInstruction,&#xA;      doseAndRate: singleton from dosage.doseAndRate,&#xA;      timing: dosage.timing,&#xA;      frequency: Coalesce(timing.repeat.frequencyMax, timing.repeat.frequency),&#xA;      period: Quantity(timing.repeat.period, timing.repeat.periodUnit),&#xA;      doseRange: doseAndRate.dose as FHIR.Range,&#xA;      doseQuantity: doseAndRate.dose as FHIR.SimpleQuantity,&#xA;&#xA;      dose: Coalesce(end of doseRange, doseQuantity),&#xA;      dosesPerDay: Coalesce(ToDaily(frequency, period), Count(timing.repeat.timeOfDay), 1.0),&#xA;      boundsPeriod: timing.repeat.bounds as Period,&#xA;      // TODO: this isn't working as expected, convert results in null&#xA;      //daysSupply: (convert(R.dispenseRequest.expectedSupplyDuration) to days).value,&#xA;      daysSupply: (R.dispenseRequest.expectedSupplyDuration).value,&#xA;      quantity: R.dispenseRequest.quantity,&#xA;      refills: Coalesce(R.dispenseRequest.numberOfRepeatsAllowed, 0),&#xA;      startDate:&#xA;        Coalesce(&#xA;          date from start of boundsPeriod,&#xA;          date from R.authoredOn,&#xA;          date from start of R.dispenseRequest.validityPeriod&#xA;        ),&#xA;      totalDaysSupplied: Coalesce(daysSupply, quantity.value / (dose.value * dosesPerDay)) * (1 + refills)&#xA;    return&#xA;      if startDate is not null and totalDaysSupplied is not null then&#xA;        Interval[startDate, startDate + Quantity(totalDaysSupplied - 1, 'day') ]&#xA;      else if startDate is not null and boundsPeriod.&quot;end&quot; is not null then&#xA;        Interval[startDate, date from end of boundsPeriod]&#xA;      else&#xA;        null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="65"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CumulativeMedicationDuration"/>
        </extension>
        <extension url="name">
          <valueString value="Quantity"/>
        </extension>
        <extension url="statement">
          <valueString value="/**********************************************************************/&#xA;/* Functions in this region are copied from opioid-mme-r4             */&#xA;/**********************************************************************/&#xA;&#xA;define function Quantity(value Decimal, unit String):&#xA;  if value is not null then&#xA;    System.Quantity { value: value, unit: unit }&#xA;  else&#xA;    null"/>
        </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="ToDecimal"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDecimal(value decimal): 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="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value UnitsOfTime): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="68"/>
        </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 FHIR [Range](https://hl7.org/fhir/datatypes.html#Range) value to a CQL Interval of Quantity&#xA;*/&#xA;define function ToInterval(range FHIR.Range):&#xA;    if range is null then&#xA;        null&#xA;    else&#xA;        Interval[ToQuantity(range.low), ToQuantity(range.high)]"/>
        </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="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="70"/>
        </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="71"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CumulativeMedicationDuration"/>
        </extension>
        <extension url="name">
          <valueString value="ToDaily"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA; Goal is to get to number of days&#xA; Two broad approaches to the calculation:&#xA;  1) Based on supply and frequency, calculate the number of expected days the medication will cover/has covered&#xA;  2) Based on relevant period, determine a covered interval and calculate the length of that interval in days&#xA;&#xA;This topic covers several use cases and illustrates how to calculate Cumulative&#xA;Medication Duration for each type of medication resource using the supply and&#xA;frequency approach.&#xA;*/&#xA;&#xA;/*&#xA;  For the first approach, we need to get from frequency to a frequency/day&#xA;  So we define ToDaily&#xA;*/&#xA;&#xA;/*&#xA;  Calculates daily frequency given frequency within a period&#xA;*/&#xA;define function ToDaily(frequency System.Integer, period System.Quantity):&#xA;  case period.unit&#xA;    when 'h' then frequency * (24.0 / period.value)&#xA;    when 'min' then frequency * (24.0 / period.value) * 60&#xA;    when 's' then frequency * (24.0 / period.value) * 60 * 60&#xA;    when 'd' then frequency * (24.0 / period.value) / 24&#xA;    when 'wk' then frequency * (24.0 / period.value) / (24 * 7)&#xA;    when 'mo' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */&#xA;    when 'a' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */&#xA;    when 'hour' then frequency * (24.0 / period.value)&#xA;    when 'minute' then frequency * (24.0 / period.value) * 60&#xA;    when 'second' then frequency * (24.0 / period.value) * 60 * 60&#xA;    when 'day' then frequency * (24.0 / period.value) / 24&#xA;    when 'week' then frequency * (24.0 / period.value) / (24 * 7)&#xA;    when 'month' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */&#xA;    when 'year' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */&#xA;    when 'hours' then frequency * (24.0 / period.value)&#xA;    when 'minutes' then frequency * (24.0 / period.value) * 60&#xA;    when 'seconds' then frequency * (24.0 / period.value) * 60 * 60&#xA;    when 'days' then frequency * (24.0 / period.value) / 24&#xA;    when 'weeks' then frequency * (24.0 / period.value) / (24 * 7)&#xA;    when 'months' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */&#xA;    when 'years' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */&#xA;    else Message(null, true, 'CMDLogic.ToDaily.UnknownUnit', ErrorLevel, 'Unknown unit ' &amp; period.unit)&#xA;  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="72"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToInteger"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToInteger(value integer): value.value"/>
        </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="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="encountersDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function encountersDiagnosis(Encounter Encounter):&#xA;  Encounter.reasonReference EncDiag&#xA;    return singleton from ( ( [ConditionEncounterDiagnosis] ConditionED&#xA;        union [ConditionProblemsHealthConcerns] ConditionPHC ) Cond&#xA;        where EncDiag.references ( Cond.id )&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="75"/>
        </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="76"/>
        </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="77"/>
        </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 MedicationAdministrationStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="78"/>
        </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="79"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Observation"/>
        </extension>
        <extension url="statement">
          <valueString value="define function &quot;Denominator Observation&quot;(QualifyingEncounter Encounter):&#xA;  duration in days of QualifyingEncounter.hospitalizationWithObservation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="80"/>
        </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="81"/>
        </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="82"/>
        </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="83"/>
        </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="84"/>
        </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="85"/>
        </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="86"/>
        </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="87"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="hasDiagnosisNotPresentOnAdmissionOrNull"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function hasDiagnosisNotPresentOnAdmissionOrNull(encounter Encounter, diagnosisValueSet System.ValueSet):&#xA;  exists ( [Claim] C&#xA;      where C.status = 'active'&#xA;        and C.use = 'claim'&#xA;        and exists ( C.item I&#xA;            where I.encounter.references ( encounter )&#xA;        )&#xA;      return C.diagnosis D&#xA;        where exists ( C.item I&#xA;            where I.encounter.references ( encounter )&#xA;              and D.sequence in I.diagnosisSequence&#xA;        )&#xA;          and ( D.onAdmission is null&#xA;              or D.onAdmission in &quot;Not Present On Admission or Documentation Insufficient to Determine&quot;&#xA;          )&#xA;          and D.diagnosis as FHIR.CodeableConcept in diagnosisValueSet&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="88"/>
        </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="89"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS1017FHIRHHFI"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator Observation"/>
        </extension>
        <extension url="statement">
          <valueString value="define function &quot;Numerator Observation&quot;(QualifyingEncounter Encounter):&#xA;  Count(&quot;Numerator&quot; FallsEncounter&#xA;      where FallsEncounter.period ends during QualifyingEncounter.hospitalizationWithObservation()&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="90"/>
        </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 CQMCommon"/>
        <resource value="https://madie.cms.gov/Library/CQMCommon|5.1.000"/>
      </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 USQualityCoreCommon"/>
        <resource value="https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library CMD"/>
        <resource value="http://hl7.org/fhir/us/cql/Library/CumulativeMedicationDuration|2.0.0-ballot"/>
      </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 MedicationRequestCategory"/>
        <resource value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
      </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="Value set Encounter Inpatient"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
      </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 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 Osteoporosis"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1200.147"/>
      </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 Coagulation Disorders"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.23"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Antidepressants"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.163"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Not Present On Admission or Documentation Insufficient to Determine"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.198"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Leukemia or Lymphoma"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.136"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Obesity"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.162"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Peripheral Neuropathy"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.175"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Delirium, Dementia, and Other Psychoses"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.168"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Suicide Attempt"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.130"/>
      </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 Liver Disease Moderate to Severe"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.137"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Anticoagulants for All Indications"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.22"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Neurologic Movement and Related Disorders"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.174"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Abnormal Weight Loss"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1258.2"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Malnutrition"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1272.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Depression"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.169"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Epilepsy"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.171"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Diuretics"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.170"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Central Nervous System Depressants"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.134"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Malignant Bone Disease"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.24"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Antihypertensives"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.164"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Opioids"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.120"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Inpatient Falls"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.171"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Major Injuries"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.120"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Moderate Injuries"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.205"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Stroke"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.176"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="ErrorLevel"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Osteoporosis Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Coagulation Disorder Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Antidepressant Active at Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable All Encounter Diagnoses with Rank and POA Indication"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Leukemia or Lymphoma Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Obesity Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Peripheral Neuropathy Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Delirium or Dementia or Other Psychosis Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Suicide Attempt"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Liver Disease Moderate to Severe Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Anticoagulant Administration During Encounter"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Neurologic Disorder Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Abnormal Weight Loss or Malnutrition Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Anticoagulant Active at Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </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 Encounter with Depression Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Epilepsy Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Diuretic Active at Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with CNS Depressant Active at Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Malignant Bone Disease Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Antihypertensive Active at Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Risk Variable Encounter with Opioid Medication Active at Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </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="Numerator Exclusions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </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 Encounter with Stroke Present on Admission"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </parameter>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="onAdmission"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <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="onAdmission"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <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="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="onAdmission"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="id"/>
        <mustSupport value="reasonCode"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient"/>
        <mustSupport value="id"/>
        <mustSupport value="ombCategory"/>
        <mustSupport value="detailed"/>
        <mustSupport value="text"/>
      </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"/>
        <mustSupport value="diagnosis"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="use"/>
          <code>
            <code value="claim"/>
          </code>
        </codeFilter>
      </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="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.163"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <extension url="http://hl7.org/fhir/StructureDefinition/cqf-relatedRequirement">
          <extension url="targetId">
            <valueString value="1722"/>
          </extension>
          <extension url="targetProperty">
            <valueString value="medication"/>
          </extension>
        </extension>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.22"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.22"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.170"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.134"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.164"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.120"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration.value"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="subject"/>
        <mustSupport value="subject.reference"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.163"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration.value"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="subject"/>
        <mustSupport value="subject.reference"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.22"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration.value"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="subject"/>
        <mustSupport value="subject.reference"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.170"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration.value"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="subject"/>
        <mustSupport value="subject.reference"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.134"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration.value"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="subject"/>
        <mustSupport value="subject.reference"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.164"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication.reference"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration.value"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="subject"/>
        <mustSupport value="subject.reference"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration.value"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="subject"/>
        <mustSupport value="subject.reference"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.120"/>
        </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="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
        <mustSupport value="birthDate"/>
      </dataRequirement>
      <dataRequirement id="1722">
        <type value="MedicationAdministration"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
        <mustSupport value="medication.reference"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationAdministration"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
        <mustSupport value="medication"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1248.22"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-bmi"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <mustSupport value="status"/>
      </dataRequirement>
      <dataRequirement>
        <type value="AdverseEvent"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/AdverseEvent"/>
        <mustSupport value="event"/>
        <mustSupport value="date"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="event"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1147.171"/>
        </codeFilter>
      </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 being collected for the development of baseline risk adjustment model include encounters with:&lt;/p&gt;&#xA;&lt;p&gt;Medications active on admission such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA; &lt;li&gt;anticoagulants&lt;/li&gt;&#xA; &lt;li&gt;antidepressants&lt;/li&gt;&#xA; &lt;li&gt;antihypertensives&lt;/li&gt;&#xA; &lt;li&gt;central nervous system depressant medications&lt;/li&gt;&#xA; &lt;li&gt;diuretics&lt;/li&gt;&#xA; &lt;li&gt;opioids&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Medications administered during the hospitalization, such as anticoagulants&lt;/p&gt;&#xA;&lt;p&gt;Diagnoses present on admission which may increase the risk for a fall with injury, such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA; &lt;li&gt;abnormal weight loss or malnutrition&lt;/li&gt;&#xA; &lt;li&gt;coagulation disorders&lt;/li&gt;&#xA; &lt;li&gt;delirium, dementia, or other psychosis&lt;/li&gt;&#xA; &lt;li&gt;depression&lt;/li&gt;&#xA; &lt;li&gt;epilepsy&lt;/li&gt;&#xA; &lt;li&gt;leukemia or lymphoma&lt;/li&gt;&#xA; &lt;li&gt;liver disease (moderate to severe)&lt;/li&gt;&#xA; &lt;li&gt;malignant bone disease&lt;/li&gt;&#xA; &lt;li&gt;neurologic movement and related disorders&lt;/li&gt;&#xA; &lt;li&gt;obesity&lt;/li&gt;&#xA; &lt;li&gt;osteoporosis&lt;/li&gt;&#xA; &lt;li&gt;peripheral neuropathy&lt;/li&gt;&#xA; &lt;li&gt;stroke&lt;/li&gt;&#xA; &lt;li&gt;suicide attempt&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Physical traits, such as body mass index (BMI)&lt;/p&gt;&#xA;&lt;p&gt;All encounter diagnoses along with their rank (e.g., 1 = principal, 2 = secondary) and present on admission (POA) indicators are being collected for the development of baseline risk adjustment model.&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/CMS1017FHIRHHFI"/>
  <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="CMS1017FHIR"/>
  </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:6425d5e9-a54b-40e0-a07d-e6e17137871c"/>
  </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:fd45e28d-9c60-47b3-93df-1a9e96c17795"/>
  </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="4120e"/>
    <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="1017FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="1.0.000"/>
  <name value="CMS1017FHIRHHFI"/>
  <title value="Hospital Harm - Falls with InjuryFHIR&#xA;"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2026-01-16T18:18:11+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 ratio measure assesses the number of inpatient hospitalizations where at least one fall with a major or moderate injury occurs among the total qualifying inpatient hospital days for patients aged 18 years and older&#xA;"/>
  <usage value="Hospital days are measured in 24-hour periods starting from the time of arrival at the hospital (including time in the Emergency Department and or Observation). The number of days will be counted as whole numbers; any fractional periods are dropped. For example, an eligible encounter with a length of stay of 75 hours will be measured as 3 days (72 hours).&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;This measure includes two measure observations used to calculate the ratio of the number of encounters with a fall over the total number of eligible hospital days. The ratio is reported as the rate of inpatient hospitalizations with falls with moderate or major injury per 1000 patient days.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;To express the rate of inpatient hospitalizations with falls with moderate or major injury per 1,000 patient days, the following calculation is applied post-production during implementation: (Total number of encounters with falls with moderate or major injury / Total number of eligible hospital days) x 1000 = rate. Example: 1 eligible encounter with a patient fall with moderate or major injury over 120 eligible days (1/120) x 1000 = 8.33.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;In ratio measures, both the Denominator and Numerator populations flow separately from the same Initial Population. Therefore, the same exclusion criteria must be applied to both the Denominator and Numerator to prevent excluded cases from being considered.&#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: CMS1017v2. 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.&#xA;&#xA;LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. 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="Mintz, J., Duprey, M. S., Zullo, A. R., Lee, Y., Kiel, D. P., Daiello, L. A., Rodriguez, K. E., Venkatesh, A. K., \&amp; Berry, S. D. (2022). Identification of Fall-Related Injuries in Nursing Home Residents Using Administrative Claims Data. The journals of gerontology. Series A, Biological sciences and medical sciences, 77(7), 1421-1429. https://doi.org/10.1093/gerona/glab274&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Mohanty, S., Rosenthal, R.A., Russell, M.M., Neuman, M.D., Ko, C.Y., \&amp; Esnaola, N.F. (2016). Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline from ACS NSQIP/AGS. Journal of the American College of Surgeons 222(5), 930-947. doi: 10.1016/j.jamcollsurg.2015.12.026&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Montero-Odasso, M., van der Velde, N., Martin, F. C., Petrovic, M., Tan, M. P., Ryg, J., Aguilar-Navarro, S., Alexander, N. B., Becker, C., Blain, H., Bourke, R., Cameron, I. D., Camicioli, R., Clemson, L., Close, J., Delbaere, K., Duan, L., Duque, G., Dyer, S. M., ... Rixt Zijlstra, G. A. (2022). World guidelines for falls prevention and management for older adults: a global initiative. Age and Ageing, 51(9), 1-36. https://doi.org/10.1093/ageing/afac205&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="National Quality Forum. Serious Reportable Events. http://www.qualityforum.org/topics/sres/serious_reportable_events.aspx. Accessed July 24, 2019&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Network of Patient Safety Databases Chartbook, 2022. Rockville, MD: Agency for Healthcare Research and Quality; September 2022. AHRQ Pub. No. 22-0051&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="NICE. (2013). Falls in older people: assessing risk and prevention. London, UK&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Press Ganey Guidelines for Data Collection and Submission Patient Falls Indicator, January 2020&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="RNAO. (2017). Preventing falls and reducing injury from falls (4th edition). Toronto, ON&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Schoberer, D., Breimaier, H. E., Zuschnegg, J., Findling, T., Schaffer, S., \&amp; Archan, T. (2022). Fall prevention in hospitals and nursing homes: Clinical practice guideline. Worldviews on Evidence-Based Nursing, Vol. 19. https://doi.org/10.1111/wvn.12571&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="WHO. (2009). Conceptual Framework for the International Classification for Patient Safety, Version 1.1. https://apps.who.int/iris/bitstream/handle/10665/70882/WHO_IER_PSP_2010.2_eng.pdf&#xA;"/>
  </relatedArtifact>
  <library value="https://madie.cms.gov/Library/CMS1017FHIRHHFI"/>
  <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="Inpatient falls are among the most common incidents reported in hospitals and can increase length of stay and patient costs. Due to the potential for serious harm associated with patient falls, &quot;patient death or serious injury associated with a fall while being cared for in a health care setting&quot; is considered a Serious Reportable Event by the National Quality Forum (NQF, 2019).&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;Falls (including unplanned or unintended descents to the floor) can result in patient injury ranging from minor abrasion or bruising to death as a result of injuries sustained from a fall. While major injuries (e.g., fractures, closed head injuries, internal bleeding) (Mintz et al., 2022) have the biggest impact on patient outcomes, 2008-2021 data findings from the 2022 Network of Patient Safety Databases (NPSD) demonstrated that 41.8 % of falls resulted in moderate injuries such as skin tear, avulsion, hematoma, significant bruising, dislocations and lacerations requiring suturing (AHRQ, 2022). Moderate injury is, as defined by the National Database of Nursing Quality Indicators (NDNQI), that resulted in suturing, application of steri-strips or skin glue, splinting, or muscle/joint strain (NDNQI, 2020). NPSD findings also demonstrated that mild to moderate level of harm represent 24.2.%, 0.4% - severe harm, and 0.1% - death (AHRQ, 2022; WHO, 2009).&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;By focusing on falls with major and moderate injuries, the goal of this hospital harm dQM is to raise awareness of fall rates and, ultimately, to improve patient safety by preventing falls with injury in all hospital patients. The purpose of measuring the rate of falls with major and moderate injury events is to improve hospitals' practices for monitoring patients at high risk for falls with injury and, in so doing, to reduce the frequency of patient falls with injury.&#xA;"/>
  <clinicalRecommendationStatement value="Certain protocols and prevention measures to reduce patient falls with injury include using fall risk assessment tools to gauge individual patient risk, implementing fall prevention protocols directed at individual patient risk factors, and implementing environmental rounds to assess and correct environmental fall hazards. Recommended clinical guidelines and practices to reduce falls and injuries from falls in hospitals support many prevention activities including implementing multifactorial interventions and tailoring interventions to individual patient's conditions and needs. The intent and desired outcome for this dQM is to work with existing and recommended falls prevention processes to track falls with injury, and aim to reduce rates of inpatient falls resulting in major injury.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;Recommended falls prevention guidelines are:&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;* Optimal Perioperative Management of the Geriatric Patient: Best Practices Guideline (ACS NSQIP/AGS, 2016)&#xA;&#xA;* Falls in older people: assessing risk and prevention (NICE, 2013)&#xA;&#xA;* Preventing falls and reducing injury from falls (4th edition) (RNAO, 2017)&#xA;&#xA;* Fall prevention in hospitals and nursing homes: Clinical practice guideline (Schoberer et al., 2022)&#xA;&#xA;* World guidelines for falls prevention and management for older adults: a global initiative, (Montero-Odasso et al., 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="ratio"/>
          <display value="Ratio"/>
        </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="Inpatient hospitalizations for patients aged 18 years and older with a length of stay less than or equal to 120 days that ends during the measurement period&#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 where the patient has a fall diagnosis present on admission.&#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="Inpatient hospitalizations where the patient has a fall that results in a major or moderate injury during the encounter.&#xA;&#xA;The diagnosis of a major or moderate injury must not be present on admission.&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <population id="NumeratorExclusion_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator-exclusion"/>
          <display value="Numerator Exclusion"/>
        </coding>
      </code>
      <description value="Inpatient hospitalizations where the patient has a fall diagnosis present on admission&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator Exclusions"/>
      </criteria>
    </population>
    <population id="MeasureObservation_1_1">
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod">
        <valueString value="Sum"/>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference">
        <valueString value="Denominator_1"/>
      </extension>
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-observation"/>
          <display value="Measure Observation"/>
        </coding>
      </code>
      <description value="Denominator Observation, associated with the Denominator: The total number of eligible days across all encounters which match the initial population/denominator criteria.&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Observation"/>
      </criteria>
    </population>
    <population id="MeasureObservation_1_2">
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod">
        <valueString value="Count"/>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference">
        <valueString value="Numerator_1"/>
      </extension>
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-observation"/>
          <display value="Measure Observation"/>
        </coding>
      </code>
      <description value="Numerator Observation, associated with the Numerator: The total number of inpatient hospitalizations where a fall with major or moderate injury occurred, across all eligible encounters.&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator Observation"/>
      </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-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-all-encounter-diagnoses-with-rank-and-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 Rank and POA Indication&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable All Encounter Diagnoses with Rank and POA Indication"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-abnormal-weight-loss-or-malnutrition-present-on-admission">
    <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 with Abnormal Weight Loss or Malnutrition Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Abnormal Weight Loss or Malnutrition Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-anticoagulant-active-at-admission">
    <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 with Anticoagulant Active at Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Anticoagulant Active at Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-anticoagulant-administration-during-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 Encounter with Anticoagulant Administration During Encounter&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Anticoagulant Administration During Encounter"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-antidepressant-active-at-admission">
    <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 with Antidepressant Active at Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Antidepressant Active at Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-antihypertensive-active-at-admission">
    <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 with Antihypertensive Active at Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Antihypertensive Active at Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-cns-depressant-active-at-admission">
    <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 with CNS Depressant Active at Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with CNS Depressant Active at Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-diuretic-active-at-admission">
    <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 with Diuretic Active at Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Diuretic Active at Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-opioid-medication-active-at-admission">
    <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 with Opioid Medication Active at Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Opioid Medication Active at Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-coagulation-disorder-present-on-admission">
    <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 with Coagulation Disorder Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Coagulation Disorder Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-depression-present-on-admission">
    <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 with Depression Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Depression Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-delirium-or-dementia-or-other-psychosis-present-on-admission">
    <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 with Delirium or Dementia or Other Psychosis Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Delirium or Dementia or Other Psychosis Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-epilepsy-present-on-admission">
    <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 with Epilepsy Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Epilepsy Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-leukemia-or-lymphoma-present-on-admission">
    <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 with Leukemia or Lymphoma Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Leukemia or Lymphoma Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-liver-disease-moderate-to-severe-present-on-admission">
    <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 with Liver Disease Moderate to Severe Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Liver Disease Moderate to Severe Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-malignant-bone-disease-present-on-admission">
    <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 with Malignant Bone Disease Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Malignant Bone Disease Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-neurologic-disorder-present-on-admission">
    <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 with Neurologic Disorder Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Neurologic Disorder Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-obesity-present-on-admission">
    <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 with Obesity Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Obesity Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-osteoporosis-present-on-admission">
    <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 with Osteoporosis Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Osteoporosis Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-peripheral-neuropathy-present-on-admission">
    <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 with Peripheral Neuropathy Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Peripheral Neuropathy Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-stroke-present-on-admission">
    <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 with Stroke Present on Admission&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Stroke Present on Admission"/>
    </criteria>
  </supplementalData>
  <supplementalData id="risk-variable-encounter-with-suicide-attempt">
    <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 with Suicide Attempt&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="Risk Variable Encounter with Suicide Attempt"/>
    </criteria>
  </supplementalData>
</Measure>