dQM QICore Content Implementation Guide
2025.0.0 - CI Build

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

: Malnutrition Care ScoreFHIR - XML Representation

Active as of 2025-08-25

Raw xml | Download


<Measure xmlns="http://hl7.org/fhir">
  <id value="CMS986FHIRMalnutritionScore"/>
  <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/cv-measure-cqfm"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml" class="col-12">
  <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">Malnutrition Care ScoreFHIR</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">CMS986FHIR</td>
</tr>



  
<tr>


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


<td class="content-container">urn:uuid:eed68e80-b466-4369-be87-166ada45f7c5</td>
</tr>



  
<tr>


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


<td class="content-container">urn:uuid:dc5bae2c-8700-487a-b2a2-7cb56f7fa43d</td>
</tr>



  
    
    
<tr>


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


<td class="content-container">986FHIR</td>
</tr>

  


  
    
    
<tr>


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


<td class="content-container">3592e</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">Academy of Nutrition and Dietetics</td>
</tr>






<tr>


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


<td class="content-container">Academy of Nutrition and Dietetics</td>
</tr>






<tr>


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


<td class="content-container">This measure assesses the percentage of eligible encounters of adults aged 18 years and older at the start of the eligible encounter during the measurement period, with a length of stay equal to or greater than 24 hours, who received optimal malnutrition care where care performed was appropriate to the patient's level of malnutrition risk and severity. Malnutrition care best practices recommend that for each eligible encounter, adult inpatients are (1) screened for malnutrition risk or for a dietitian referral order to be placed, (2) assessed by a registered dietitian (RD) or registered dietitian nutritionist (RDN) to confirm findings of malnutrition risk, and if identified with a &quot;moderate&quot; or &quot;severe&quot; malnutrition status in the current performed nutrition assessment, (3) receive a &quot;moderate&quot; or &quot;severe&quot; malnutrition diagnosis by a physician or eligible clinician as defined by the Centers for Medicare &amp; Medicaid Services (CMS), and (4) have a current nutrition care plan performed by an RD/RDN.</td>
</tr>



<tr>


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


<td class="content-container">Percentage of hospitalizations where a patient 18 years of age or older, admitted for 24-hours or more, received optimal malnutrition care</td>
</tr>



<tr>


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


<td class="content-container">Copyright (C) Academy of Nutrition and Dietetics 2025 Limited proprietary coding is contained in the measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. ICD-10 copyright 2024 World Health Organization. This material contains SNOMED Clinical Terms (R) (SNOMED CT [R]) copyright 2004-2024. International Health Terminology Standards Development Organisation. All Rights Reserved.</td>
</tr>


<tr>


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


<td class="content-container">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. THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, copyright is indicated by (C) or [C], registered trademarks are indicated by (R) or [R], and unregistered trademarks are indicated by (TM) or [TM].</td>
</tr>











<tr>


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


<td class="content-container">Malnutrition has been documented in approximately one-third of patients in developed countries upon admission to the hospital, and, if left untreated, can significantly impact important clinical outcomes (Mogensen et al., 2019). Adult patients with malnutrition have a significantly longer hospital length of stay (LOS) (Hudson, Chittams, Griffith, &amp; Compher, 2018 and Mosquera et al., 2016) and significantly more patients with malnutrition have a LOS of greater than 7 days when compared to their well-nourished counterparts. Additionally, both higher rates of 30-day readmission and a significantly higher likelihood of 30-day readmission are observed in these patients (Mogensen et al., 2019; Hiller, Shaw, &amp; Fabri, 2016; Mosquera et al., 2016). Lastly, hospitalized adults with malnutrition have an increased likelihood of death within 90 days of discharge (Hiller, Shaw, &amp; Fabri, 2016). These consequences demonstrate the importance of addressing malnutrition in hospitalized patients to improve outcomes. The components of this measure are supported by clinical guidance that recommends (1) malnutrition screening for patients admitted into the acute inpatient care setting; (2) nutrition assessment for patients identified at risk for malnutrition or with a dietitian referral order to form the basis for appropriate nutrition interventions; (3) appropriate recognition, diagnosis, and documentation of the nutrition status of a patient in order to (4) address their condition with an appropriate plan of care and communicate patient needs to other care providers (Academy of Nutrition and Dietetics, 2017). The process for risk identification, assessment, diagnosis, and treatment of malnutrition necessitates a multi-disciplinary care team that begins with the identification of an initial risk population for a more thorough assessment by the RD/RDN. The RD/RDN, in turn, provides the necessary treatment recommendations to address nutrition problems utilizing a nutrition diagnosis and care plan, along with the clinical indicators that inform a medical diagnosis of malnutrition completed by a physician or eligible clinician as defined by CMS. The four measure observations individually provide a portion of the necessary information on the quality of care for patients at risk for or with malnutrition. Therefore, the four components are summed and averaged according to a patient's degree of malnutrition and/or malnutrition risk to determine an encounter-level Malnutrition Care Score. High performance on this measure requires malnutrition risk screening and/or referral to RDNs for appropriate nutrition assessment for identified patients during the current hospitalization. For patients identified with moderate or severe malnutrition by the nutrition assessment, best practice also recommends a medical diagnosis by a physician or other eligible clinician and the execution of the nutrition care plan by an RD/RDN. Evidence demonstrates that implementing a standardized protocol for screening, assessment, diagnosis, and care planning results in better identification of patients with malnutrition and subsequent improvements in rates of associated nutrition interventions. Outcomes modeling demonstrates benefits to patient outcomes, including reduced risk of 30-day readmissions, length of hospital stays, and complications, as well as improved quality of life after hospitalization (Sriram et al., 2016).</td>
</tr>


<tr>


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


<td class="content-container">American Society for Parenteral and Enteral Nutrition (ASPEN) clinical guidelines on nutrition screening, assessment, and intervention in adults indicate that screening for nutrition risk is suggested for hospitalized patients (Mueller, Compher, Druyan, &amp; ASPEN Board of Directors, 2011). This guideline places nutrition assessment and screening in the context of intervention as part of nutrition care. Screening those individuals at risk for malnutrition is the first step in nutrition care as risk for malnutrition, identified by nutrition screening, is associated with longer length of hospital stay, complications, and mortality. Malnutrition screening is also a predictor of mortality risk. Malnourished patients, identified by nutrition assessment tools, have more complications and longer hospitalizations than do patients with optimal nutrition status. Such patients, identified by nutrition assessment tools, have more infectious and noninfectious complications, longer hospital length of stay, and greater mortality. Nutrition intervention is recommended for patients identified by assessment as at risk for malnutrition or malnourished. Nutrition intervention with associated monitoring and evaluation plans in patients identified as at risk for malnutrition or malnourished improves clinical outcomes. Nutrition interventions and their associated monitoring and evaluation plans in malnourished patients are associated with improved nutrition status, nutrient intake, physical function, and quality of life. Hospital readmissions, inpatient length of stay, and complications were reduced with increased nutrition support interventions.</td>
</tr>




<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    Academy of Nutrition and Dietetics. (2017). The Nutrition Care Process Model. Retrieved June 12, 2023 from https://www.ncpro.org/pubs/2020-encpt-en/ncp-model
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    Hiller, L.D., Shaw, R.F., &amp; Fabri, P.J. (2017) Difference in composite end point of readmission and death between malnourished and nonmalnourished veterans assessed using Academy of Nutrition and Dietetics/American Society for Parenteral and Enteral Nutrition clinical characteristics. Journal of Parenteral and Enteral Nutrition, 41(8), 1316-1324. https://doi.org/10.1177/0148607116668523
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    Hudson, L., Chittams, J., Griffith, C., &amp; Compher, C. (2018) Malnutrition identified by Academy of Nutrition and Dietetics/American Society for Parenteral and Enteral Nutrition is associated with more 30-day readmissions, greater hospital mortality, and longer hospital stays: a retrospective analysis of nutrition assessment data in a major medical center. Journal of Parenteral and Enteral Nutrition, 42(5), 892-897. https://doi.org/10.1002/jpen.1021
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    Mogensen, K.M., Malone, A., Becker, P., Cutrell, S., Frank, L., Gonzales, K., Hudson, L., Miller, S., Guenter, P. (2019) Academy of Nutrition and Dietetics/American Society for Parenteral and Enteral Nutrition Consensus Malnutrition Characteristics: Usability and Association With Outcomes. Nutrition in Clinical Practice, 34 (5), 657-665. https://doi.org/10.1002/ncp.10310
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    Mosquera, C., Koutlas, N.J., Edwards, K.C., Strickland, A., Vohra, N. A., Zervos, E.E., &amp; Fitzgerald, T.L. (2016). Impact of malnutrition on gastrointestinal surgical patients. Journal of Surgical Research. 205(1), 95-101. https://doi.org/10.1016/j.jss.2016.05.030
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    Mueller, C., Compher, C., Druyan, M.E., &amp; the ASPEN Board of Directors. (2011). ASPEN clinical guidelines on nutrition screening, assessment, and intervention in adults: Journal of Parenteral and Enteral Nutrition, 35(1), 16-24. https://doi.org/10.1177/0148607110389335
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    Sriram, K., Sulo, S., VanDerBosc,h .G, Partridge, J., Feldstein, J., Hegazi, R.A., Summerfelt, W.T. (2016) A comprehensive nutrition-focused quality improvement program reduces 30-day readmissions and length of stay in hospitalized patients. Journal of Parenteral and Enteral Nutrition, 41(3), 384-391. https://doi.org/10.1177/0148607116681468
    
    
    
    
    
  </td>
</tr>






  
  
<tr>


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


<td class="content-container">Malnutrition Diagnosis: A documented diagnosis that identifies and describes a specific nutrition problem(s) that can be resolved or improved through nutrition intervention(s), monitoring, and evaluation. For the inpatient or acute care setting, the Malnutrition Diagnosis is identified by the physician or other eligible clinician as defined by CMS based on the scope of practice regulations within the respective state, commonwealth, or territory of care delivery.</td>
</tr>


  
  
<tr>


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


<td class="content-container">Malnutrition Risk Screening: The process of identifying and referring those individuals and populations who are at risk for nutrition-related problems, are appropriate for nutrition care services, and would benefit from nutrition interventions. For the inpatient or acute care setting, the Malnutrition Risk Screening can be completed by any eligible healthcare clinician as defined by local, state and federal guidelines.</td>
</tr>


  
  
<tr>


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


<td class="content-container">Nutrition Assessment: A systematic approach for collecting, classifying, and synthesizing important and relevant data to describe nutritional status related nutritional problems, and their causes. This assessment includes review of the &quot;whole&quot; patient and evaluates the anthropometrics (i.e., body measurements and proportions), biochemical data (i.e., laboratory findings), clinical observations, and diet history (also known as 'ABCD'). For the inpatient or acute care setting, the Nutrition Assessment is performed by a RD or RDN.</td>
</tr>


  
  
<tr>


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


<td class="content-container">Nutrition Care Plan: A documented plan based on information collected during the Nutrition Assessment of individualized nutrition recommendations, interventions, and monitoring and evaluation plans that are directed toward resolving the Malnutrition Diagnosis by altering or eliminating the nutrition etiology. The Nutrition Care Plan may encompass the interventions of Food and Nutrient Delivery, Nutrition Education, Nutrition Counseling, Coordination of Nutrition Care, and Population Based Nutrition Action, along with a plan for monitoring and evaluation, and is documented by the RD or RDN.</td>
</tr>



<tr>


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


<td class="content-container"><p>This measure is constructed of four clinically eligible components that are aggregated as an arithmetic average of eligible encounters and expressed as a percentage. The four populations used to calculate the four components may differ and the measure observations for the four components do not need to be performed sequentially. This dQM is an episode-based measure. An episode is defined as each eligible encounter with a length of stay of greater than or equal to 24 hours among individuals 18 years of age and older at the start of the inpatient encounter. This FHIR-based measure has been derived from the QDM-based measure: CMS986v5. Please refer to the HL7 QI-Core Implementation Guide (<em>https://hl7.org/fhir/us/qicore/STU6/</em>) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (<em>https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html</em>).</p></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">Summary</th>


<td class="content-container"><p>Population Criteria 1</p></td>
</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">[http://terminology.hl7.org/CodeSystem/measure-scoring#continuous-variable: 'Continuous Variable']</td>
</tr>







  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#intermediate-outcome: 'Intermediate Outcome']</td>
</tr>





  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</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"><p>Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulation_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population">Measure Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulationExclusion_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population-exclusion">Measure Population Exclusion</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Component Measure 1: Eligible encounters for patients with a current &quot;Malnutrition Risk Screening&quot; performed by an eligible healthcare clinician or with a Dietitian Referral.</p>
<p>&quot;Measure Observation 1&quot; is Encounters with Malnutrition Risk Screening or with a Dietitian Referral.</p>
<p>Measure Observation 1 identifies eligible encounters where a &quot;Malnutrition Risk Screening&quot; was performed during the encounter (including associated observation or emergency department encounters) with an identified Malnutrition Screening Finding of Not At Risk or At Risk Result. It also identifies an eligible encounter where there is a Dietitian Referral, whether there is a Malnutrition Risk Screening performed or not.</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-observation-1">Measure Observation 1</a> 
          
        
      </td>
    </tr>
  

  

  
    
    <tr>


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


</tr>
  
  
    
<tr>


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


<td class="content-container"><p>Nutrition Assessment</p></td>
</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">[http://terminology.hl7.org/CodeSystem/measure-scoring#continuous-variable: 'Continuous Variable']</td>
</tr>







  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#intermediate-outcome: 'Intermediate Outcome']</td>
</tr>





  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>
</tr>


  
  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_2
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulation_2
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population">Measure Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulationExclusion_2
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population-exclusion">Measure Population Exclusion</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_2
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Component Measure 2: Eligible encounters for patients with a documented &quot;Nutrition Assessment&quot; performed by an RD/RDN, after a Malnutrition Screening Finding of At Risk Result or a Dietitian Referral order from a physician or eligible clinician during the current encounter. Measure Observation 2 includes Encounter With Most Recent Nutrition Assessment and Identified Status if the Encounter also contains Completed Malnutrition Risk Screening or Dietitian Referral Measure Observation 2 identifies eligible encounters in which a malnutrition risk screening with an At Risk result or a dietitian referral was completed during the encounter (or associated observation or emergency department encounters) and a Nutrition Assessment was subsequently completed with an identified Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished, Nutrition Assessment Status Finding of Moderately Malnourished, or Nutrition Assessment Status Finding of Severely Malnourished.</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-observation-2">Measure Observation 2</a> 
          
        
      </td>
    </tr>
  

  

  
    
    <tr>


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


</tr>
  
  
    
<tr>


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


<td class="content-container"><p>Malnutrition Diagnosis</p></td>
</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">[http://terminology.hl7.org/CodeSystem/measure-scoring#continuous-variable: 'Continuous Variable']</td>
</tr>







  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#intermediate-outcome: 'Intermediate Outcome']</td>
</tr>





  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>
</tr>


  
  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_3
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulation_3
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population">Measure Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulationExclusion_3
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population-exclusion">Measure Population Exclusion</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_3
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Component Measure 3: Eligible encounters for patients with a documented &quot;Malnutrition Diagnosis&quot; based on the most recent Nutrition Assessment finding of Moderately Malnourished or Severely Malnourished. Measure Observation 3 includes Encounters with a most recent Nutrition Assessment and Identified Status of Moderately Malnourished or Severely Malnourished, that also identified an active medical malnutrition diagnosis during the encounter (including preceding observation or emergency department encounters) and a Malnutrition Risk Screening At Risk result or with a Dietitian Referral</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-observation-3">Measure Observation 3</a> 
          
        
      </td>
    </tr>
  

  

  
    
    <tr>


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


</tr>
  
  
    
<tr>


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


<td class="content-container"><p>Nutrition Care Plan</p></td>
</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">[http://terminology.hl7.org/CodeSystem/measure-scoring#continuous-variable: 'Continuous Variable']</td>
</tr>







  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#intermediate-outcome: 'Intermediate Outcome']</td>
</tr>





  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>
</tr>


  
  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_4
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulation_4
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population">Measure Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulationExclusion_4
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population-exclusion">Measure Population Exclusion</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_4
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Component Measure 4: Eligible encounters for patients with a documented &quot;Nutrition Care Plan&quot; based on the most recent Nutrition Assessment finding of Moderately Malnourished or Severely Malnourished. Measure Observation 4 identifies Encounters with a most recent Nutrition Assessment and Identified Status of Moderately Malnourished or Severely Malnourished, that also include a documented Nutrition Care Plan and a Malnutrition Risk Screening At Risk result or with a Dietitian Referral. &quot;Measure Observation 4&quot; identifies eligible encounters where a &quot;Nutrition Care Plan&quot; was performed during the encounter (including preceding observation or emergency department encounters).</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-observation-4">Measure Observation 4</a> 
          
        
      </td>
    </tr>
  

  

  
    
    <tr>


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


</tr>
  
  
    
<tr>


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


<td class="content-container"><p>Total Malnutrition Care Components</p></td>
</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">[http://terminology.hl7.org/CodeSystem/measure-scoring#continuous-variable: 'Continuous Variable']</td>
</tr>







  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#intermediate-outcome: 'Intermediate Outcome']</td>
</tr>





  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>
</tr>


  
  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_5
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulation_5
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population">Measure Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulationExclusion_5
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population-exclusion">Measure Population Exclusion</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_5
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Population 5 &quot;Measure Observation Total Malnutrition Components Score&quot; Calculations-For each eligible encounter, Population Criteria 5 represents the subtotal of Measure Observations performed for Population Criteria 1, 2, 3, and 4. Possible values may be 0, 1, 2, 3, or 4. Population 5 &quot;Measure Observation Total Malnutrition Components Score&quot; is (&quot;Measure Observation 1&quot; plus &quot;Measure Observation 2&quot; plus &quot;Measure Observation 3&quot; plus &quot;Measure Observation 4&quot;)</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-observation-total-malnutrition-components-score">Measure Observation Total Malnutrition Components Score</a> 
          
        
      </td>
    </tr>
  

  

  
    
    <tr>


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


</tr>
  
  
    
<tr>


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


<td class="content-container"><p>Encounter Malnutrition Care Score</p></td>
</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">[http://terminology.hl7.org/CodeSystem/measure-scoring#continuous-variable: 'Continuous Variable']</td>
</tr>







  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#intermediate-outcome: 'Intermediate Outcome']</td>
</tr>





  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>
</tr>


  
  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_6
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulation_6
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population">Measure Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasurePopulationExclusion_6
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-population-exclusion">Measure Population Exclusion</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: MeasureObservation_6
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Population 6 &quot;Measure Observation Total Malnutrition Care Score as Percentage&quot; Calculations:-For each eligible encounter, Population Criteria 6 represents the sum of performed Measure Observations 1, 2, 3, and 4 divided by the number of clinically eligible occurrences. Population 6 &quot;Measure Observation Total Malnutrition Care Score as Percentage&quot; is 100 multiplied by (&quot;Measure Observation Total Malnutrition Components Score&quot; divided by &quot;Total Malnutrition Care Score Eligible Occurrences&quot;). Possible values may be 0, 50, 75, or 100 percent. &quot;Total Malnutrition Care Score Eligible Occurrences&quot; is always 4 except in the following instances: -The &quot;Total Malnutrition Care Score Eligible Occurrences&quot; is 1 if ---A &quot;Malnutrition Risk Screening&quot; was performed and a Malnutrition Screening Finding of Not At Risk was identified and &quot;Dietitian Referral&quot; was not ordered. - The &quot;Total Malnutrition Care Score Eligible Occurrences&quot; is 2 ---If the most recent &quot;Nutrition Assessment&quot; performed has a result of Not or Mildly Malnourished. And, --- A &quot;Malnutrition Risk Screening&quot; was performed and a Malnutrition Screening Finding of At Risk was identified or a &quot;Dietitian Referral&quot; was ordered or a Dietitian Referral was ordered but a Nutrition Assessment was not performed.</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms986fhirmalnutritionscore-measure-observation-total-malnutrition-care-score-as-percentage">Measure Observation Total Malnutrition Care Score as Percentage</a> 
          
        
      </td>
    </tr>
  

  


  
    
<tr>


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


<td class="content-container">For every patient evaluated by this measure also identify payer, race, ethnicity and sex</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-payer-type
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Payer Type
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms986fhirmalnutritionscore-sde-payer-type">SDE Payer Type</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>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Race
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms986fhirmalnutritionscore-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-ethnicity
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Ethnicity
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms986fhirmalnutritionscore-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-sex
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Sex
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms986fhirmalnutritionscore-sde-sex">SDE Sex</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">https://madie.cms.gov/Library/CMS986FHIRMalnutritionScore</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/>
  </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">
    
      
      <a name="primary-cms986fhirmalnutritionscore-initial-population"> </a>
    
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population"> </a>
    
    
    Measure Population
    
  </th>
</tr>
<tr>

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

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population-exclusion"> </a>
    
    
    Measure Population Exclusion
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-observation-1"> </a>
    
    
    Measure Observation
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 1&quot;(MalnutritionRiskScreening Encounter):
  if &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot; contains MalnutritionRiskScreening then 1 
    else 0</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
  

  
    
    <tr>


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


</tr>
  
  
  
  
    
      
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-initial-population"> </a>
    
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population"> </a>
    
    
    Measure Population
    
  </th>
</tr>
<tr>

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

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population-exclusion"> </a>
    
    
    Measure Population Exclusion
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-observation-2"> </a>
    
    
    Measure Observation
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 2&quot;(NutritionAssessment Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains NutritionAssessment then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains NutritionAssessment then if &quot;Encounter With Most Recent Nutrition Assessment And Identified Status&quot; contains NutritionAssessment then 1 
    else 0 
    else 0</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
  

  
    
    <tr>


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


</tr>
  
  
  
  
    
      
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-initial-population"> </a>
    
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population"> </a>
    
    
    Measure Population
    
  </th>
</tr>
<tr>

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

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population-exclusion"> </a>
    
    
    Measure Population Exclusion
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-observation-3"> </a>
    
    
    Measure Observation
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 3&quot;(MalnutritionDiagnosis Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains MalnutritionDiagnosis then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains MalnutritionDiagnosis then if &quot;Encounters with Malnutrition Diagnosis&quot; contains MalnutritionDiagnosis then if &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains MalnutritionDiagnosis then 0 
    else if &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot; contains MalnutritionDiagnosis then 1 
    else 0 
    else 0 
    else 0</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
  

  
    
    <tr>


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


</tr>
  
  
  
  
    
      
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-initial-population"> </a>
    
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population"> </a>
    
    
    Measure Population
    
  </th>
</tr>
<tr>

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

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population-exclusion"> </a>
    
    
    Measure Population Exclusion
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-observation-4"> </a>
    
    
    Measure Observation
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 4&quot;(NutritionCarePlan Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains NutritionCarePlan then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains NutritionCarePlan then if &quot;Encounters with Nutrition Care Plan&quot; contains NutritionCarePlan then if &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains NutritionCarePlan then 0 
    else if &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot; contains NutritionCarePlan then 1 
    else 0 
    else 0 
    else 0</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
      
    
  

  
  

  
    
    <tr>


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


</tr>
  
  
  
  
    
      
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-initial-population"> </a>
    
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population"> </a>
    
    
    Measure Population
    
  </th>
</tr>
<tr>

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

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population-exclusion"> </a>
    
    
    Measure Population Exclusion
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-observation-total-malnutrition-components-score"> </a>
    
    
    Measure Observation
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation Total Malnutrition Components Score&quot;(QualifyingEncounter Encounter):
  Sum({ &quot;Measure Observation 1&quot;(QualifyingEncounter), &quot;Measure Observation 2&quot;(QualifyingEncounter), &quot;Measure Observation 3&quot;(QualifyingEncounter), &quot;Measure Observation 4&quot;(QualifyingEncounter) })</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
  

  
    
    <tr>


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


</tr>
  
  
  
  
    
      
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-initial-population"> </a>
    
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population"> </a>
    
    
    Measure Population
    
  </th>
</tr>
<tr>

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

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-population-exclusion"> </a>
    
    
    Measure Population Exclusion
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms986fhirmalnutritionscore-measure-observation-total-malnutrition-care-score-as-percentage"> </a>
    
    
    Measure Observation
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation Total Malnutrition Care Score as Percentage&quot;(QualifyingEncounter Encounter):
  100 * ( &quot;Measure Observation Total Malnutrition Components Score&quot;(QualifyingEncounter) / &quot;Total Malnutrition Care Score Eligible Occurrences&quot;(QualifyingEncounter) )</code></pre>
  </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">
    
      
      <a name="supplementaldataelements-sde-race"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="supplementaldataelements-sde-sex"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="supplementaldataelements-sde-payer"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="supplementaldataelements-sde-ethnicity"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="fhirhelpers-tointerval"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="fhirhelpers-tostring"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="fhirhelpers-tocode"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="fhirhelpers-toconcept"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="status-verified"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">//This library contains functions used to constrain FHIR resource elements for measures authored by NCQA, based on QICore 6.0.0 resources including IG and authoring patterns. The functions may appear similar to some QICoreCommon functions but differ in that they have constraints that are relevant for measures authored by NCQA.

//Condition
//Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential
define fluent function verified(conditions List&lt;Choice&lt;ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis&gt;&gt;):
  conditions C
    where C.verificationStatus is not null implies
      (C.verificationStatus ~ &quot;confirmed&quot;
        or C.verificationStatus ~ &quot;unconfirmed&quot;
        or C.verificationStatus ~ &quot;provisional&quot;
        or C.verificationStatus ~ &quot;differential&quot;
      )</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="cqmcommon-encounterdiagnosis"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*  
@description: Returns the Condition resources referenced by the diagnosis element of the Encounter  
*/
define fluent function encounterDiagnosis(Encounter Encounter ):
  Encounter.reasonReference D
    return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))</code></pre>
  </td>

</tr>



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    <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 DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; 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 QICore, allowing this function to be used across any resource.
The input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.
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 Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
If the input is a DateTime Interval, the result is the input.
If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
*/
define fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):
  case
	  when choice is DateTime then
    	Interval[choice as DateTime, choice as DateTime]
		when choice is Interval&lt;DateTime&gt; then
  		choice as Interval&lt;DateTime&gt;
		when choice is Quantity then
		  Interval[Patient.birthDate + (choice as Quantity),
			  Patient.birthDate + (choice as Quantity) + 1 year)
		when choice is Interval&lt;Quantity&gt; then
		  Interval[Patient.birthDate + (choice.low as Quantity),
			  Patient.birthDate + (choice.high as Quantity) + 1 year)
		when choice is Timing then
      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;
		else
			null as Interval&lt;DateTime&gt;
	end</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        


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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
if condition.clinicalStatus ~ &quot;active&quot;
  or condition.clinicalStatus ~ &quot;recurrence&quot;
  or condition.clinicalStatus ~ &quot;relapse&quot; then
  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
    (end of condition.abatementInterval()) abatementDate
    return if abatementDate is null then
      Interval[start of condition.onset.toInterval(), abatementDate)
    else
      Interval[start of condition.onset.toInterval(), abatementDate]</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized abatement of a given Condition.
@comment: If the abatement element of the Condition is represented as a DateTime, the result
is an interval beginning and ending on that DateTime.
If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
result is an interval from the date the patient turned that age to immediately before one year later.
If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
before one year later than the date the patient turned the ending age of the quantity interval.
*/
define fluent function abatementInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
	if condition.abatement is DateTime then
	  Interval[condition.abatement as DateTime, condition.abatement as DateTime]
	else if condition.abatement is Quantity then
		Interval[Patient.birthDate + (condition.abatement as Quantity),
			Patient.birthDate + (condition.abatement as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;Quantity&gt; then
	  Interval[Patient.birthDate + (condition.abatement.low as Quantity),
		  Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;DateTime&gt; then
	  Interval[condition.abatement.low, condition.abatement.high)
	else null as Interval&lt;DateTime&gt;</code></pre>
  </td>

</tr>



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    <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 Reference, resourceId String):
  resourceId = Last(Split(reference.reference, '/'))</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        




        
        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-initial-population"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-measure-population"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-discharge-for-hospice-care"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Discharge for Hospice Care&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    where QualifyingEncounter.hospitalization.dischargeDisposition in &quot;Hospice Care Referral or Admission&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-intervention-hospice-care"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Intervention Hospice Care&quot;:
  ( [&quot;ServiceRequest&quot;: &quot;Hospice Status&quot;] HospiceStatusOrder
      where HospiceStatusOrder.status in { 'active', 'completed', 'on-hold' }
        and HospiceStatusOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
  )
    union ( [&quot;Procedure&quot;: &quot;Hospice Status&quot;] HospiceStatusPerformed
        where HospiceStatusPerformed.status in { 'completed', 'in-progress' }
    )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-hospice-during-eligible-encounter"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Hospice during Eligible Encounter&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with &quot;Intervention Hospice Care&quot; HospiceStatus
      such that Coalesce(start of HospiceStatus.performed.toInterval(), HospiceStatus.authoredOn) during day of QualifyingEncounter.hospitalizationWithObservation ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-measure-population-exclusion"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-sde-race"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="cms986fhirmalnutritionscore-sde-sex"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-malnutrition-risk-screening-not-at-risk"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Malnutrition Risk Screening&quot;] MalnutritionRiskScreening
      such that MalnutritionRiskScreening.status in { 'final', 'amended', 'corrected' }
        and MalnutritionRiskScreening.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
        and ( MalnutritionRiskScreening.value as Concept in &quot;Malnutrition Screening Finding of Not At Risk Result&quot; )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-malnutrition-risk-screening-at-risk"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Malnutrition Risk Screening At Risk&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Malnutrition Risk Screening&quot;] MalnutritionRiskScreening
      such that MalnutritionRiskScreening.status in { 'final', 'amended', 'corrected' }
        and MalnutritionRiskScreening.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
        and ( MalnutritionRiskScreening.value as Concept in &quot;Malnutrition Screening Finding of At Risk Result&quot; )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-malnutrition-risk-screening"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Malnutrition Risk Screening&quot;:
  &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot;
    union &quot;Encounters with Malnutrition Risk Screening At Risk&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-intervention-dietitian-referral"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Intervention Dietitian Referral&quot;:
  ( [&quot;ServiceRequest&quot;: &quot;Dietitian Referral&quot;] DietitianReferralOrder
      where DietitianReferralOrder.status in { 'active', 'completed', 'on-hold' }
        and DietitianReferralOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
  )
    union ( [&quot;Procedure&quot;: &quot;Dietitian Referral&quot;] DietitianReferralPerformed
        where DietitianReferralPerformed.status in { 'completed', 'in-progress' }
    )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-dietitian-referral"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Dietitian Referral&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with &quot;Intervention Dietitian Referral&quot; DietitianReferral
      such that Coalesce(start of DietitianReferral.performed.toInterval(), DietitianReferral.authoredOn) during day of QualifyingEncounter.hospitalizationWithObservation ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-malnutrition-risk-screening-or-with-dietitian-referral"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot;:
  &quot;Encounters with Malnutrition Risk Screening&quot;
    union &quot;Encounters with Dietitian Referral&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-malnutrition-not-at-risk-screening-and-without-dietitian-referral"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot;:
  &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot;
    except &quot;Encounters with Dietitian Referral&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-malnutrition-risk-screening-at-risk-or-with-dietitian-referral"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot;:
  &quot;Encounters with Malnutrition Risk Screening At Risk&quot;
    union &quot;Encounters with Dietitian Referral&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-nutrition-assessment-performed"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Nutrition Assessment Performed&quot;:
  from
    &quot;Measure Population&quot; QualifyingEncounter,
    [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
    where NutritionAssessment.status in { 'final', 'amended', 'corrected' }
      and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
      and NutritionAssessment.value is not null
    return Tuple {
      HospEncId: QualifyingEncounter.id,
      NutrAssessTimingLatest: NutritionAssessment.effective.latest ( )
    }</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounter-with-most-recent-nutrition-assessment-and-identified-status"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Most Recent Nutrition Assessment And Identified Status&quot;:
  &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
      such that ( NutritionAssessment.status in { 'final', 'amended', 'corrected' }
          and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
          and ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished&quot;
              or ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Moderately Malnourished&quot; )
              or ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Severely Malnourished&quot; )
          )
          and NutritionAssessment.effective.latest ( ) same day as &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter)
      )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-has-malnutrition-diagnosis"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Malnutrition Diagnosis&quot;:
  [ConditionProblemsHealthConcerns: &quot;Malnutrition Diagnosis&quot;] MalnutritionDiagnosis
    where MalnutritionDiagnosis.prevalenceInterval ( ) overlaps &quot;Measurement Period&quot;
      and MalnutritionDiagnosis.isVerified ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-encounter-diagnosis-of-malnutrition-diagnosis"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters With Encounter Diagnosis Of Malnutrition Diagnosis&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    where QualifyingEncounter.reasonCode in &quot;Malnutrition Diagnosis&quot;
      or QualifyingEncounter.encounterDiagnosis ( ).verified ( ).code in &quot;Malnutrition Diagnosis&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-malnutrition-diagnosis"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Malnutrition Diagnosis&quot;:
  ( &quot;Measure Population&quot; QualifyingEncounter
      where exists ( &quot;Has Malnutrition Diagnosis&quot; MalnutritionDiagnosis
          where MalnutritionDiagnosis.prevalenceInterval ( ) overlaps day of QualifyingEncounter.hospitalizationWithObservation ( )
      )
  )
    union &quot;Encounters With Encounter Diagnosis Of Malnutrition Diagnosis&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounter-with-most-recent-nutrition-assessment-status-of-not-or-mildly-malnourished"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
      such that ( NutritionAssessment.status in { 'final', 'amended', 'corrected' }
          and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
          and ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished&quot; )
          and NutritionAssessment.effective.latest ( ) same day as &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter)
      )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounter-with-most-recent-nutrition-assessment-status-of-moderately-or-severely-malnourished"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
      such that NutritionAssessment.status in { 'final', 'amended', 'corrected' }
        and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
        and ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Moderately Malnourished&quot;
            or NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Severely Malnourished&quot;
        )
        and NutritionAssessment.effective.latest ( ) same day as &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter)</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-encounters-with-nutrition-care-plan"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounters with Nutrition Care Plan&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;Procedure&quot;: &quot;Nutrition Care Plan&quot;] NutritionCarePlan
      such that NutritionCarePlan.status in { 'completed', 'in-progress' }
        and NutritionCarePlan.performed.earliest ( ) during QualifyingEncounter.hospitalizationWithObservation ( )</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-sde-payer-type"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-sde-ethnicity"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="cms986fhirmalnutritionscore-measure-observation-1"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 1&quot;(MalnutritionRiskScreening Encounter):
  if &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot; contains MalnutritionRiskScreening then 1 
    else 0</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-measure-observation-total-malnutrition-components-score"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation Total Malnutrition Components Score&quot;(QualifyingEncounter Encounter):
  Sum({ &quot;Measure Observation 1&quot;(QualifyingEncounter), &quot;Measure Observation 2&quot;(QualifyingEncounter), &quot;Measure Observation 3&quot;(QualifyingEncounter), &quot;Measure Observation 4&quot;(QualifyingEncounter) })</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-measure-observation-2"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 2&quot;(NutritionAssessment Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains NutritionAssessment then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains NutritionAssessment then if &quot;Encounter With Most Recent Nutrition Assessment And Identified Status&quot; contains NutritionAssessment then 1 
    else 0 
    else 0</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-last-nutrition-assessment-day-during-encounter"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter Encounter):
  Max(&quot;Nutrition Assessment Performed&quot; NutritionAssessmentTuple
      where NutritionAssessmentTuple.HospEncId = QualifyingEncounter.id
      return NutritionAssessmentTuple.NutrAssessTimingLatest
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-measure-observation-3"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 3&quot;(MalnutritionDiagnosis Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains MalnutritionDiagnosis then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains MalnutritionDiagnosis then if &quot;Encounters with Malnutrition Diagnosis&quot; contains MalnutritionDiagnosis then if &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains MalnutritionDiagnosis then 0 
    else if &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot; contains MalnutritionDiagnosis then 1 
    else 0 
    else 0 
    else 0</code></pre>
  </td>

</tr>



        



        



        


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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isVerified(condition Choice&lt;QICore.ConditionProblemsHealthConcerns, QICore.ConditionEncounterDiagnosis&gt;):
  condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon.&quot;confirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;unconfirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;provisional&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;differential&quot;
  )</code></pre>
  </td>

</tr>



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-measure-observation-4"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation 4&quot;(NutritionCarePlan Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains NutritionCarePlan then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains NutritionCarePlan then if &quot;Encounters with Nutrition Care Plan&quot; contains NutritionCarePlan then if &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains NutritionCarePlan then 0 
    else if &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot; contains NutritionCarePlan then 1 
    else 0 
    else 0 
    else 0</code></pre>
  </td>

</tr>



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-measure-observation-total-malnutrition-care-score-as-percentage"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Measure Observation Total Malnutrition Care Score as Percentage&quot;(QualifyingEncounter Encounter):
  100 * ( &quot;Measure Observation Total Malnutrition Components Score&quot;(QualifyingEncounter) / &quot;Total Malnutrition Care Score Eligible Occurrences&quot;(QualifyingEncounter) )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms986fhirmalnutritionscore-total-malnutrition-care-score-eligible-occurrences"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function &quot;Total Malnutrition Care Score Eligible Occurrences&quot;(QualifyingEncounter Encounter):
  if &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot; contains QualifyingEncounter
    and &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot; contains QualifyingEncounter
    and not ( &quot;Encounters with Dietitian Referral&quot; contains QualifyingEncounter ) then 1 
    else if ( &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot; contains QualifyingEncounter
      and &quot;Encounters with Malnutrition Risk Screening At Risk&quot; contains QualifyingEncounter
      or &quot;Encounters with Dietitian Referral&quot; contains QualifyingEncounter
  )
    and &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains QualifyingEncounter
    or not ( &quot;Encounter With Most Recent Nutrition Assessment And Identified Status&quot; contains QualifyingEncounter ) then 2 
    else 4</code></pre>
  </td>

</tr>





  
  


  <tr>


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


</tr>
  
  
  

 

 

 

 

 

 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system SNOMEDCT
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://snomed.info/sct
    <br/>
    <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system ConditionClinicalStatusCodes
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://terminology.hl7.org/CodeSystem/condition-clinical
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system ConditionVerificationStatusCodes
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://terminology.hl7.org/CodeSystem/condition-ver-status
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</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>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
    <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 Hospice Care Referral or Admission
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1116.365
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1116.365</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hospice Status
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.101
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.101</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>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
    <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>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
    <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 Malnutrition Risk Screening
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.92
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.92</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Malnutrition Screening Finding of Not At Risk Result
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.34
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.34</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Malnutrition Screening Finding of At Risk Result
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.89
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.89</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Dietitian Referral
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.91
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.91</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Nutrition Assessment
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.21
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.21</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.96
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.96</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Nutrition Assessment Status Finding of Moderately Malnourished
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.47
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.47</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Nutrition Assessment Status Finding of Severely Malnourished
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.43
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.43</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Malnutrition Diagnosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.55
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.55</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Nutrition Care Plan
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.93
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.93</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>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
    <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">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Male (finding)
        <br/>
      
      <em>Code</em>: 248153007
      <br/>
      <em>System</em>: <tt>http://snomed.info/sct</tt>
    </td>
  </tr>

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

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Active
        <br/>
      
      <em>Code</em>: active
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Recurrence
        <br/>
      
      <em>Code</em>: recurrence
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Relapse
        <br/>
      
      <em>Code</em>: relapse
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Confirmed
        <br/>
      
      <em>Code</em>: confirmed
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Unconfirmed
        <br/>
      
      <em>Code</em>: unconfirmed
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Provisional
        <br/>
      
      <em>Code</em>: provisional
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Differential
        <br/>
      
      <em>Code</em>: differential
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</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>: QICore model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://hl7.org/fhir/Library/QICore-ModelInfo
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/Library/QICore-ModelInfo</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>: https://madie.cms.gov/Library/FHIRHelpers|4.4.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/FHIRHelpers|4.4.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library QICoreCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: https://madie.cms.gov/Library/QICoreCommon|4.0.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/QICoreCommon|4.0.000</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>: https://madie.cms.gov/Library/CQMCommon|4.1.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/CQMCommon|4.1.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


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


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library Status
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: https://madie.cms.gov/Library/Status|1.15.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/Status|1.15.000</tt>
    
  </td>
</tr>
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


  
  


  <tr>


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


</tr>
  
  
  
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
    <br/>        
  
   
   
    <em>Must Support Elements</em>: birthDate, birthDate.value, url, extension
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, status.value, 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, status.value, 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, period, id.value
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status, status.value, hospitalization, hospitalization.dischargeDisposition, id, id.value, 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: ServiceRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, status.value, intent, intent.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.101
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: ServiceRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, status.value, intent, intent.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.91
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.101
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.91
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, status.value, performed
    <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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.93
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, status.value, effective, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.92
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, status.value, effective, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.21
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
    <br/>        
  
   
   
    <em>Must Support Elements</em>: 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.55
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage
    <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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
    <br/> 
  
  
  
   
  </td>
</tr>

  
  

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

    </tbody>
  </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248153007"/>
          <display value="Male (finding)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248152002"/>
          <display value="Female (finding)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="active"/>
          <display value="Active"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="recurrence"/>
          <display value="Recurrence"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="relapse"/>
          <display value="Relapse"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="confirmed"/>
          <display value="Confirmed"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="unconfirmed"/>
          <display value="Unconfirmed"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="provisional"/>
          <display value="Provisional"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="differential"/>
          <display value="Differential"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Initial Population&quot;:
  [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient
    where EncounterInpatient.period ends during day of &quot;Measurement Period&quot;
      and AgeInYearsAt(date from start of EncounterInpatient.period) &gt;= 18
      and ( duration in hours of EncounterInpatient.period &gt;= 24 )
      and EncounterInpatient.status = 'finished'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Measure Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Measure Population&quot;:
  &quot;Initial Population&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Encounters with Discharge for Hospice Care"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Discharge for Hospice Care&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    where QualifyingEncounter.hospitalization.dischargeDisposition in &quot;Hospice Care Referral or Admission&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Intervention Hospice Care"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Intervention Hospice Care&quot;:
  ( [&quot;ServiceRequest&quot;: &quot;Hospice Status&quot;] HospiceStatusOrder
      where HospiceStatusOrder.status in { 'active', 'completed', 'on-hold' }
        and HospiceStatusOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
  )
    union ( [&quot;Procedure&quot;: &quot;Hospice Status&quot;] HospiceStatusPerformed
        where HospiceStatusPerformed.status in { 'completed', 'in-progress' }
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounters with Hospice during Eligible Encounter"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Hospice during Eligible Encounter&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with &quot;Intervention Hospice Care&quot; HospiceStatus
      such that Coalesce(start of HospiceStatus.performed.toInterval(), HospiceStatus.authoredOn) during day of QualifyingEncounter.hospitalizationWithObservation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Measure Population Exclusion"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Measure Population Exclusion&quot;:
  &quot;Encounters with Discharge for Hospice Care&quot;
    union &quot;Encounters with Hospice during Eligible Encounter&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </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;:
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </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;:
  case
    when Patient.sex = '248153007' then &quot;Male (finding)&quot;
    when Patient.sex = '248152002' then &quot;Female (finding)&quot;
    else null
  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounters with Malnutrition Risk Screening Not At Risk"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Malnutrition Risk Screening&quot;] MalnutritionRiskScreening
      such that MalnutritionRiskScreening.status in { 'final', 'amended', 'corrected' }
        and MalnutritionRiskScreening.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
        and ( MalnutritionRiskScreening.value as Concept in &quot;Malnutrition Screening Finding of Not At Risk Result&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounters with Malnutrition Risk Screening At Risk"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Malnutrition Risk Screening At Risk&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Malnutrition Risk Screening&quot;] MalnutritionRiskScreening
      such that MalnutritionRiskScreening.status in { 'final', 'amended', 'corrected' }
        and MalnutritionRiskScreening.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
        and ( MalnutritionRiskScreening.value as Concept in &quot;Malnutrition Screening Finding of At Risk Result&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Encounters with Malnutrition Risk Screening"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Malnutrition Risk Screening&quot;:
  &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot;
    union &quot;Encounters with Malnutrition Risk Screening At Risk&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Intervention Dietitian Referral"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Intervention Dietitian Referral&quot;:
  ( [&quot;ServiceRequest&quot;: &quot;Dietitian Referral&quot;] DietitianReferralOrder
      where DietitianReferralOrder.status in { 'active', 'completed', 'on-hold' }
        and DietitianReferralOrder.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
  )
    union ( [&quot;Procedure&quot;: &quot;Dietitian Referral&quot;] DietitianReferralPerformed
        where DietitianReferralPerformed.status in { 'completed', 'in-progress' }
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Encounters with Dietitian Referral"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Dietitian Referral&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with &quot;Intervention Dietitian Referral&quot; DietitianReferral
      such that Coalesce(start of DietitianReferral.performed.toInterval(), DietitianReferral.authoredOn) during day of QualifyingEncounter.hospitalizationWithObservation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounters with Malnutrition Risk Screening or with Dietitian Referral"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot;:
  &quot;Encounters with Malnutrition Risk Screening&quot;
    union &quot;Encounters with Dietitian Referral&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot;:
  &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot;
    except &quot;Encounters with Dietitian Referral&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot;:
  &quot;Encounters with Malnutrition Risk Screening At Risk&quot;
    union &quot;Encounters with Dietitian Referral&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Nutrition Assessment Performed"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Nutrition Assessment Performed&quot;:
  from
    &quot;Measure Population&quot; QualifyingEncounter,
    [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
    where NutritionAssessment.status in { 'final', 'amended', 'corrected' }
      and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
      and NutritionAssessment.value is not null
    return Tuple {
      HospEncId: QualifyingEncounter.id,
      NutrAssessTimingLatest: NutritionAssessment.effective.latest ( )
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounter With Most Recent Nutrition Assessment And Identified Status"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounter With Most Recent Nutrition Assessment And Identified Status&quot;:
  &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
      such that ( NutritionAssessment.status in { 'final', 'amended', 'corrected' }
          and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
          and ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished&quot;
              or ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Moderately Malnourished&quot; )
              or ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Severely Malnourished&quot; )
          )
          and NutritionAssessment.effective.latest ( ) same day as &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter)
      )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Has Malnutrition Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Malnutrition Diagnosis&quot;:
  [ConditionProblemsHealthConcerns: &quot;Malnutrition Diagnosis&quot;] MalnutritionDiagnosis
    where MalnutritionDiagnosis.prevalenceInterval ( ) overlaps &quot;Measurement Period&quot;
      and MalnutritionDiagnosis.isVerified ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounters With Encounter Diagnosis Of Malnutrition Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters With Encounter Diagnosis Of Malnutrition Diagnosis&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    where QualifyingEncounter.reasonCode in &quot;Malnutrition Diagnosis&quot;
      or QualifyingEncounter.encounterDiagnosis ( ).verified ( ).code in &quot;Malnutrition Diagnosis&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Encounters with Malnutrition Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Malnutrition Diagnosis&quot;:
  ( &quot;Measure Population&quot; QualifyingEncounter
      where exists ( &quot;Has Malnutrition Diagnosis&quot; MalnutritionDiagnosis
          where MalnutritionDiagnosis.prevalenceInterval ( ) overlaps day of QualifyingEncounter.hospitalizationWithObservation ( )
      )
  )
    union &quot;Encounters With Encounter Diagnosis Of Malnutrition Diagnosis&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
      such that ( NutritionAssessment.status in { 'final', 'amended', 'corrected' }
          and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
          and ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished&quot; )
          and NutritionAssessment.effective.latest ( ) same day as &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter)
      )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;ObservationScreeningAssessment&quot;: &quot;Nutrition Assessment&quot;] NutritionAssessment
      such that NutritionAssessment.status in { 'final', 'amended', 'corrected' }
        and NutritionAssessment.effective.toInterval ( ) during QualifyingEncounter.hospitalizationWithObservation ( )
        and ( NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Moderately Malnourished&quot;
            or NutritionAssessment.value as Concept in &quot;Nutrition Assessment Status Finding of Severely Malnourished&quot;
        )
        and NutritionAssessment.effective.latest ( ) same day as &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Encounters with Nutrition Care Plan"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Encounters with Nutrition Care Plan&quot;:
  &quot;Measure Population&quot; QualifyingEncounter
    with [&quot;Procedure&quot;: &quot;Nutrition Care Plan&quot;] NutritionCarePlan
      such that NutritionCarePlan.status in { 'completed', 'in-progress' }
        and NutritionCarePlan.performed.earliest ( ) during QualifyingEncounter.hospitalizationWithObservation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </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;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer Type"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer Type&quot;:
  SDE.&quot;SDE Payer&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </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="/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period.&quot;start&quot; is null then
            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]
        else
            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; 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 QICore, allowing this function to be used across any resource.
The input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.
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 Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
If the input is a DateTime Interval, the result is the input.
If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
*/
define fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):
  case
	  when choice is DateTime then
    	Interval[choice as DateTime, choice as DateTime]
		when choice is Interval&lt;DateTime&gt; then
  		choice as Interval&lt;DateTime&gt;
		when choice is Quantity then
		  Interval[Patient.birthDate + (choice as Quantity),
			  Patient.birthDate + (choice as Quantity) + 1 year)
		when choice is Interval&lt;Quantity&gt; then
		  Interval[Patient.birthDate + (choice.low as Quantity),
			  Patient.birthDate + (choice.high as Quantity) + 1 year)
		when choice is Timing then
      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;
		else
			null as Interval&lt;DateTime&gt;
	end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </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="/*
@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]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </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="33"/>
        </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="/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Measure Observation 1"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Measure Observation 1&quot;(MalnutritionRiskScreening Encounter):
  if &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot; contains MalnutritionRiskScreening then 1 
    else 0"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Measure Observation Total Malnutrition Components Score"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Measure Observation Total Malnutrition Components Score&quot;(QualifyingEncounter Encounter):
  Sum({ &quot;Measure Observation 1&quot;(QualifyingEncounter), &quot;Measure Observation 2&quot;(QualifyingEncounter), &quot;Measure Observation 3&quot;(QualifyingEncounter), &quot;Measure Observation 4&quot;(QualifyingEncounter) })"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Measure Observation 2"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Measure Observation 2&quot;(NutritionAssessment Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains NutritionAssessment then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains NutritionAssessment then if &quot;Encounter With Most Recent Nutrition Assessment And Identified Status&quot; contains NutritionAssessment then 1 
    else 0 
    else 0"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="latest"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Given an interval, returns the ending point if the interval has an ending boundary specified,
otherwise, returns the starting point
*/
define fluent function latest(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):
  (choice.toInterval()) period
    return
      if (period.&quot;hasEnd&quot;()) then end of period
      else start of period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="38"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hasEnd"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Given an interval, returns true if the interval has an ending boundary specified
(i.e. the end of the interval is not null and not the maximum DateTime value)
*/
define fluent function hasEnd(period Interval&lt;DateTime&gt; ):
  not (
    end of period is null
      or end of period = maximum DateTime
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Last Nutrition Assessment Day During Encounter"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Last Nutrition Assessment Day During Encounter&quot;(QualifyingEncounter Encounter):
  Max(&quot;Nutrition Assessment Performed&quot; NutritionAssessmentTuple
      where NutritionAssessmentTuple.HospEncId = QualifyingEncounter.id
      return NutritionAssessmentTuple.NutrAssessTimingLatest
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="40"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Measure Observation 3"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Measure Observation 3&quot;(MalnutritionDiagnosis Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains MalnutritionDiagnosis then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains MalnutritionDiagnosis then if &quot;Encounters with Malnutrition Diagnosis&quot; contains MalnutritionDiagnosis then if &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains MalnutritionDiagnosis then 0 
    else if &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot; contains MalnutritionDiagnosis then 1 
    else 0 
    else 0 
    else 0"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="41"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="prevalenceInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
if condition.clinicalStatus ~ &quot;active&quot;
  or condition.clinicalStatus ~ &quot;recurrence&quot;
  or condition.clinicalStatus ~ &quot;relapse&quot; then
  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
    (end of condition.abatementInterval()) abatementDate
    return if abatementDate is null then
      Interval[start of condition.onset.toInterval(), abatementDate)
    else
      Interval[start of condition.onset.toInterval(), abatementDate]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="42"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="abatementInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized abatement of a given Condition.
@comment: If the abatement element of the Condition is represented as a DateTime, the result
is an interval beginning and ending on that DateTime.
If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
result is an interval from the date the patient turned that age to immediately before one year later.
If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
before one year later than the date the patient turned the ending age of the quantity interval.
*/
define fluent function abatementInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
	if condition.abatement is DateTime then
	  Interval[condition.abatement as DateTime, condition.abatement as DateTime]
	else if condition.abatement is Quantity then
		Interval[Patient.birthDate + (condition.abatement as Quantity),
			Patient.birthDate + (condition.abatement as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;Quantity&gt; then
	  Interval[Patient.birthDate + (condition.abatement.low as Quantity),
		  Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;DateTime&gt; then
	  Interval[condition.abatement.low, condition.abatement.high)
	else null as Interval&lt;DateTime&gt;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="43"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="isVerified"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define fluent function isVerified(condition Choice&lt;QICore.ConditionProblemsHealthConcerns, QICore.ConditionEncounterDiagnosis&gt;):
  condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon.&quot;confirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;unconfirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;provisional&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;differential&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="ToConcept"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="45"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="Status"/>
        </extension>
        <extension url="name">
          <valueString value="verified"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="//This library contains functions used to constrain FHIR resource elements for measures authored by NCQA, based on QICore 6.0.0 resources including IG and authoring patterns. The functions may appear similar to some QICoreCommon functions but differ in that they have constraints that are relevant for measures authored by NCQA.

//Condition
//Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential
define fluent function verified(conditions List&lt;Choice&lt;ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis&gt;&gt;):
  conditions C
    where C.verificationStatus is not null implies
      (C.verificationStatus ~ &quot;confirmed&quot;
        or C.verificationStatus ~ &quot;unconfirmed&quot;
        or C.verificationStatus ~ &quot;provisional&quot;
        or C.verificationStatus ~ &quot;differential&quot;
      )"/>
        </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="encounterDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*  
@description: Returns the Condition resources referenced by the diagnosis element of the Encounter  
*/
define fluent function encounterDiagnosis(Encounter Encounter ):
  Encounter.reasonReference D
    return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="47"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="references"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns true if the given reference is to the given resourceId
@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference Reference, resourceId String):
  resourceId = Last(Split(reference.reference, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="48"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString value="Measure Observation 4"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Measure Observation 4&quot;(NutritionCarePlan Encounter):
  if &quot;Encounters with Malnutrition Not At Risk Screening and without Dietitian Referral&quot; contains NutritionCarePlan then 0 
    else if &quot;Encounters with Malnutrition Risk Screening At Risk or with Dietitian Referral&quot; contains NutritionCarePlan then if &quot;Encounters with Nutrition Care Plan&quot; contains NutritionCarePlan then if &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains NutritionCarePlan then 0 
    else if &quot;Encounter With Most Recent Nutrition Assessment Status of Moderately Or Severely Malnourished&quot; contains NutritionCarePlan then 1 
    else 0 
    else 0 
    else 0"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="49"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="earliest"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Given an interval, return the starting point if the interval has a starting boundary specified,
otherwise, return the ending point
*/
define fluent function earliest(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):
  (choice.toInterval()) period
    return
      if (period.&quot;hasStart&quot;()) then start of period
      else end of period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="50"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hasStart"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Given an interval, return true if the interval has a starting boundary specified
(i.e. the start of the interval is not null and not the minimum DateTime value)
*/
define fluent function hasStart(period Interval&lt;DateTime&gt; ):
  not ( start of period is null
      or start of period = minimum DateTime
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="51"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Measure Observation Total Malnutrition Care Score as Percentage"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Measure Observation Total Malnutrition Care Score as Percentage&quot;(QualifyingEncounter Encounter):
  100 * ( &quot;Measure Observation Total Malnutrition Components Score&quot;(QualifyingEncounter) / &quot;Total Malnutrition Care Score Eligible Occurrences&quot;(QualifyingEncounter) )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="52"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS986FHIRMalnutritionScore"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Total Malnutrition Care Score Eligible Occurrences"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function &quot;Total Malnutrition Care Score Eligible Occurrences&quot;(QualifyingEncounter Encounter):
  if &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot; contains QualifyingEncounter
    and &quot;Encounters with Malnutrition Risk Screening Not At Risk&quot; contains QualifyingEncounter
    and not ( &quot;Encounters with Dietitian Referral&quot; contains QualifyingEncounter ) then 1 
    else if ( &quot;Encounters with Malnutrition Risk Screening or with Dietitian Referral&quot; contains QualifyingEncounter
      and &quot;Encounters with Malnutrition Risk Screening At Risk&quot; contains QualifyingEncounter
      or &quot;Encounters with Dietitian Referral&quot; contains QualifyingEncounter
  )
    and &quot;Encounter With Most Recent Nutrition Assessment Status of Not or Mildly Malnourished&quot; contains QualifyingEncounter
    or not ( &quot;Encounter With Most Recent Nutrition Assessment And Identified Status&quot; contains QualifyingEncounter ) then 2 
    else 4"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="53"/>
        </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="QICore model information"/>
        <resource value="http://hl7.org/fhir/Library/QICore-ModelInfo"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="https://madie.cms.gov/Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource value="https://madie.cms.gov/Library/QICoreCommon|4.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library CQMCommon"/>
        <resource value="https://madie.cms.gov/Library/CQMCommon|4.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource
                  value="https://madie.cms.gov/Library/SupplementalDataElements|5.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Status"/>
        <resource value="https://madie.cms.gov/Library/Status|1.15.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system SNOMEDCT"/>
        <resource value="http://snomed.info/sct"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionClinicalStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionVerificationStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
      </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 Hospice Care Referral or Admission"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1116.365"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Status"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.101"/>
      </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 Malnutrition Risk Screening"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.92"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Malnutrition Screening Finding of Not At Risk Result"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.34"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Malnutrition Screening Finding of At Risk Result"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.89"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Dietitian Referral"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.91"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Nutrition Assessment"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.21"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.96"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Nutrition Assessment Status Finding of Moderately Malnourished"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.47"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Nutrition Assessment Status Finding of Severely Malnourished"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.43"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Malnutrition Diagnosis"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.55"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Nutrition Care Plan"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.93"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Payer Type"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="Measure Population Exclusion"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Measure Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="SDE Payer Type"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
        <mustSupport value="birthDate"/>
        <mustSupport value="birthDate.value"/>
        <mustSupport value="url"/>
        <mustSupport value="extension"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="period"/>
        <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>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="id"/>
        <mustSupport value="period"/>
        <mustSupport value="id.value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <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>
      </dataRequirement>
      <dataRequirement>
        <type value="ServiceRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.101"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="ServiceRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="intent"/>
        <mustSupport value="intent.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.91"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.101"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.91"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.93"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.92"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.21"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1095.55"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
    <extension url="guidance">
      <valueString
                   value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex"/>
    </extension>
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
          <display value="Supplemental Data"/>
        </coding>
        <text value="Supplemental Data Guidance"/>
      </valueCodeableConcept>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Malnutrition Diagnosis"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="A documented diagnosis that identifies and describes a specific nutrition problem(s) that can be resolved or improved through nutrition intervention(s), monitoring, and evaluation. For the inpatient or acute care setting, the Malnutrition Diagnosis is identified by the physician or other eligible clinician as defined by CMS based on the scope of practice regulations within the respective state, commonwealth, or territory of care delivery.
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Malnutrition Risk Screening"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="The process of identifying and referring those individuals and populations who are at risk for nutrition-related problems, are appropriate for nutrition care services, and would benefit from nutrition interventions. For the inpatient or acute care setting, the Malnutrition Risk Screening can be completed by any eligible healthcare clinician as defined by local, state and federal guidelines.
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Nutrition Assessment"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="A systematic approach for collecting, classifying, and synthesizing important and relevant data to describe nutritional status related nutritional problems, and their causes. This assessment includes review of the &quot;whole&quot; patient and evaluates the anthropometrics (i.e., body measurements and proportions), biochemical data (i.e., laboratory findings), clinical observations, and diet history (also known as 'ABCD'). For the inpatient or acute care setting, the Nutrition Assessment is performed by a RD or RDN.
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Nutrition Care Plan"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="A documented plan based on information collected during the Nutrition Assessment of individualized nutrition recommendations, interventions, and monitoring and evaluation plans that are directed toward resolving the Malnutrition Diagnosis by altering or eliminating the nutrition etiology. The Nutrition Care Plan may encompass the interventions of Food and Nutrient Delivery, Nutrition Education, Nutrition Counseling, Coordination of Nutrition Care, and Population Based Nutrition Action, along with a plan for monitoring and evaluation, and is documented by the RD or RDN.
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <url value="https://madie.cms.gov/Measure/CMS986FHIRMalnutritionScore"/>
  <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="CMS986FHIR"/>
  </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:eed68e80-b466-4369-be87-166ada45f7c5"/>
  </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:dc5bae2c-8700-487a-b2a2-7cb56f7fa43d"/>
  </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="3592e"/>
    <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="986FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="1.0.000"/>
  <name value="CMS986FHIRMalnutritionScore"/>
  <title value="Malnutrition Care ScoreFHIR
"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2025-08-25T15:54:08+00:00"/>
  <publisher value="Academy of Nutrition and Dietetics"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="www.eatrightpro.org"/>
    </telecom>
  </contact>
  <description
               value="This measure assesses the percentage of eligible encounters of adults aged 18 years and older at the start of the eligible encounter during the measurement period, with a length of stay equal to or greater than 24 hours, who received optimal malnutrition care where care performed was appropriate to the patient's level of malnutrition risk and severity. Malnutrition care best practices recommend that for each eligible encounter, adult inpatients are (1) screened for malnutrition risk or for a dietitian referral order to be placed, (2) assessed by a registered dietitian (RD) or registered dietitian nutritionist (RDN) to confirm findings of malnutrition risk, and if identified with a &quot;moderate&quot; or &quot;severe&quot; malnutrition status in the current performed nutrition assessment, (3) receive a &quot;moderate&quot; or &quot;severe&quot; malnutrition diagnosis by a physician or eligible clinician as defined by the Centers for Medicare \&amp; Medicaid Services (CMS), and (4) have a current nutrition care plan performed by an RD/RDN.
"/>
  <purpose
           value="Percentage of hospitalizations where a patient 18 years of age or older, admitted for 24-hours or more, received optimal malnutrition care
"/>
  <usage
         value="This measure is constructed of four clinically eligible components that are aggregated as an arithmetic average of eligible encounters and expressed as a percentage. The four populations used to calculate the four components may differ and the measure observations for the four components do not need to be performed sequentially. This dQM is an episode-based measure. An episode is defined as each eligible encounter with a length of stay of greater than or equal to 24 hours among individuals 18 years of age and older at the start of the inpatient encounter. This FHIR-based measure has been derived from the QDM-based measure: CMS986v5. 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*).
"/>
  <copyright
             value="Copyright (C) Academy of Nutrition and Dietetics 2025 Limited proprietary coding is contained in the measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. ICD-10 copyright 2024 World Health Organization. This material contains SNOMED Clinical Terms (R) (SNOMED CT \[R\]) copyright 2004-2024. International Health Terminology Standards Development Organisation. All Rights Reserved.
"/>
  <effectivePeriod>
    <start value="2026-01-01"/>
    <end value="2026-12-31"/>
  </effectivePeriod>
  <author>
    <name value="Academy of Nutrition and Dietetics"/>
    <telecom>
      <system value="url"/>
      <value value="www.eatrightpro.org"/>
    </telecom>
  </author>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Academy of Nutrition and Dietetics. (2017). The Nutrition Care Process Model. Retrieved June 12, 2023 from https://www.ncpro.org/pubs/2020-encpt-en/ncp-model
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Hiller, L.D., Shaw, R.F., \&amp; Fabri, P.J. (2017) Difference in composite end point of readmission and death between malnourished and nonmalnourished veterans assessed using Academy of Nutrition and Dietetics/American Society for Parenteral and Enteral Nutrition clinical characteristics. Journal of Parenteral and Enteral Nutrition, 41(8), 1316-1324. https://doi.org/10.1177/0148607116668523
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Hudson, L., Chittams, J., Griffith, C., \&amp; Compher, C. (2018) Malnutrition identified by Academy of Nutrition and Dietetics/American Society for Parenteral and Enteral Nutrition is associated with more 30-day readmissions, greater hospital mortality, and longer hospital stays: a retrospective analysis of nutrition assessment data in a major medical center. Journal of Parenteral and Enteral Nutrition, 42(5), 892-897. https://doi.org/10.1002/jpen.1021
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Mogensen, K.M., Malone, A., Becker, P., Cutrell, S., Frank, L., Gonzales, K., Hudson, L., Miller, S., Guenter, P. (2019) Academy of Nutrition and Dietetics/American Society for Parenteral and Enteral Nutrition Consensus Malnutrition Characteristics: Usability and Association With Outcomes. Nutrition in Clinical Practice, 34 (5), 657-665. https://doi.org/10.1002/ncp.10310
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Mosquera, C., Koutlas, N.J., Edwards, K.C., Strickland, A., Vohra, N. A., Zervos, E.E., \&amp; Fitzgerald, T.L. (2016). Impact of malnutrition on gastrointestinal surgical patients. Journal of Surgical Research. 205(1), 95-101. https://doi.org/10.1016/j.jss.2016.05.030
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Mueller, C., Compher, C., Druyan, M.E., \&amp; the ASPEN Board of Directors. (2011). ASPEN clinical guidelines on nutrition screening, assessment, and intervention in adults: Journal of Parenteral and Enteral Nutrition, 35(1), 16-24. https://doi.org/10.1177/0148607110389335
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Sriram, K., Sulo, S., VanDerBosc,h .G, Partridge, J., Feldstein, J., Hegazi, R.A., Summerfelt, W.T. (2016) A comprehensive nutrition-focused quality improvement program reduces 30-day readmissions and length of stay in hospitalized patients. Journal of Parenteral and Enteral Nutrition, 41(3), 384-391. https://doi.org/10.1177/0148607116681468
"/>
  </relatedArtifact>
  <library value="https://madie.cms.gov/Library/CMS986FHIRMalnutritionScore"/>
  <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. THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, copyright is indicated by (C) or \[C\], registered trademarks are indicated by (R) or \[R\], and unregistered trademarks are indicated by (TM) or \[TM\].
"/>
  <rationale
             value="Malnutrition has been documented in approximately one-third of patients in developed countries upon admission to the hospital, and, if left untreated, can significantly impact important clinical outcomes (Mogensen et al., 2019). Adult patients with malnutrition have a significantly longer hospital length of stay (LOS) (Hudson, Chittams, Griffith, \&amp; Compher, 2018 and Mosquera et al., 2016) and significantly more patients with malnutrition have a LOS of greater than 7 days when compared to their well-nourished counterparts. Additionally, both higher rates of 30-day readmission and a significantly higher likelihood of 30-day readmission are observed in these patients (Mogensen et al., 2019; Hiller, Shaw, \&amp; Fabri, 2016; Mosquera et al., 2016). Lastly, hospitalized adults with malnutrition have an increased likelihood of death within 90 days of discharge (Hiller, Shaw, \&amp; Fabri, 2016). These consequences demonstrate the importance of addressing malnutrition in hospitalized patients to improve outcomes. The components of this measure are supported by clinical guidance that recommends (1) malnutrition screening for patients admitted into the acute inpatient care setting; (2) nutrition assessment for patients identified at risk for malnutrition or with a dietitian referral order to form the basis for appropriate nutrition interventions; (3) appropriate recognition, diagnosis, and documentation of the nutrition status of a patient in order to (4) address their condition with an appropriate plan of care and communicate patient needs to other care providers (Academy of Nutrition and Dietetics, 2017). The process for risk identification, assessment, diagnosis, and treatment of malnutrition necessitates a multi-disciplinary care team that begins with the identification of an initial risk population for a more thorough assessment by the RD/RDN. The RD/RDN, in turn, provides the necessary treatment recommendations to address nutrition problems utilizing a nutrition diagnosis and care plan, along with the clinical indicators that inform a medical diagnosis of malnutrition completed by a physician or eligible clinician as defined by CMS. The four measure observations individually provide a portion of the necessary information on the quality of care for patients at risk for or with malnutrition. Therefore, the four components are summed and averaged according to a patient's degree of malnutrition and/or malnutrition risk to determine an encounter-level Malnutrition Care Score. High performance on this measure requires malnutrition risk screening and/or referral to RDNs for appropriate nutrition assessment for identified patients during the current hospitalization. For patients identified with moderate or severe malnutrition by the nutrition assessment, best practice also recommends a medical diagnosis by a physician or other eligible clinician and the execution of the nutrition care plan by an RD/RDN. Evidence demonstrates that implementing a standardized protocol for screening, assessment, diagnosis, and care planning results in better identification of patients with malnutrition and subsequent improvements in rates of associated nutrition interventions. Outcomes modeling demonstrates benefits to patient outcomes, including reduced risk of 30-day readmissions, length of hospital stays, and complications, as well as improved quality of life after hospitalization (Sriram et al., 2016).
"/>
  <clinicalRecommendationStatement
                                   value="American Society for Parenteral and Enteral Nutrition (ASPEN) clinical guidelines on nutrition screening, assessment, and intervention in adults indicate that screening for nutrition risk is suggested for hospitalized patients (Mueller, Compher, Druyan, \&amp; ASPEN Board of Directors, 2011). This guideline places nutrition assessment and screening in the context of intervention as part of nutrition care. Screening those individuals at risk for malnutrition is the first step in nutrition care as risk for malnutrition, identified by nutrition screening, is associated with longer length of hospital stay, complications, and mortality. Malnutrition screening is also a predictor of mortality risk. Malnourished patients, identified by nutrition assessment tools, have more complications and longer hospitalizations than do patients with optimal nutrition status. Such patients, identified by nutrition assessment tools, have more infectious and noninfectious complications, longer hospital length of stay, and greater mortality. Nutrition intervention is recommended for patients identified by assessment as at risk for malnutrition or malnourished. Nutrition intervention with associated monitoring and evaluation plans in patients identified as at risk for malnutrition or malnourished improves clinical outcomes. Nutrition interventions and their associated monitoring and evaluation plans in malnourished patients are associated with improved nutrition status, nutrient intake, physical function, and quality of life. Hospital readmissions, inpatient length of stay, and complications were reduced with increased nutrition support interventions.
"/>
  <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="continuous-variable"/>
          <display value="Continuous Variable"/>
        </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="intermediate-outcome"/>
          <display value="Intermediate Outcome"/>
        </coding>
      </valueCodeableConcept>
    </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="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description value="Population Criteria 1
"/>
    <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="Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulation_1">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population"/>
          <display value="Measure Population"/>
        </coding>
      </code>
      <description value="Equals Initial Population
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulationExclusion_1">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population-exclusion"/>
          <display value="Measure Population Exclusion"/>
        </coding>
      </code>
      <description
                   value="Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population Exclusion"/>
      </criteria>
    </population>
    <population id="MeasureObservation_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="MeasurePopulation_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="Component Measure 1: Eligible encounters for patients with a current &quot;Malnutrition Risk Screening&quot; performed by an eligible healthcare clinician or with a Dietitian Referral.

&quot;Measure Observation 1&quot; is Encounters with Malnutrition Risk Screening or with a Dietitian Referral.

Measure Observation 1 identifies eligible encounters where a &quot;Malnutrition Risk Screening&quot; was performed during the encounter (including associated observation or emergency department encounters) with an identified Malnutrition Screening Finding of Not At Risk or At Risk Result. It also identifies an eligible encounter where there is a Dietitian Referral, whether there is a Malnutrition Risk Screening performed or not.
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Observation 1"/>
      </criteria>
    </population>
  </group>
  <group id="Group_2">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="continuous-variable"/>
          <display value="Continuous Variable"/>
        </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="intermediate-outcome"/>
          <display value="Intermediate Outcome"/>
        </coding>
      </valueCodeableConcept>
    </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="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description value="Nutrition Assessment
"/>
    <population id="InitialPopulation_2">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulation_2">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population"/>
          <display value="Measure Population"/>
        </coding>
      </code>
      <description value="Equals Initial Population
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulationExclusion_2">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population-exclusion"/>
          <display value="Measure Population Exclusion"/>
        </coding>
      </code>
      <description
                   value="Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population Exclusion"/>
      </criteria>
    </population>
    <population id="MeasureObservation_2">
      <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="MeasurePopulation_2"/>
      </extension>
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-observation"/>
          <display value="Measure Observation"/>
        </coding>
      </code>
      <description
                   value="Component Measure 2: Eligible encounters for patients with a documented &quot;Nutrition Assessment&quot; performed by an RD/RDN, after a Malnutrition Screening Finding of At Risk Result or a Dietitian Referral order from a physician or eligible clinician during the current encounter. Measure Observation 2 includes Encounter With Most Recent Nutrition Assessment and Identified Status if the Encounter also contains Completed Malnutrition Risk Screening or Dietitian Referral Measure Observation 2 identifies eligible encounters in which a malnutrition risk screening with an At Risk result or a dietitian referral was completed during the encounter (or associated observation or emergency department encounters) and a Nutrition Assessment was subsequently completed with an identified Nutrition Assessment Status Finding of Well Nourished or Not Malnourished or Mildly Malnourished, Nutrition Assessment Status Finding of Moderately Malnourished, or Nutrition Assessment Status Finding of Severely Malnourished.
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Observation 2"/>
      </criteria>
    </population>
  </group>
  <group id="Group_3">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="continuous-variable"/>
          <display value="Continuous Variable"/>
        </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="intermediate-outcome"/>
          <display value="Intermediate Outcome"/>
        </coding>
      </valueCodeableConcept>
    </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="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description value="Malnutrition Diagnosis
"/>
    <population id="InitialPopulation_3">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulation_3">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population"/>
          <display value="Measure Population"/>
        </coding>
      </code>
      <description value="Equals Initial Population
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulationExclusion_3">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population-exclusion"/>
          <display value="Measure Population Exclusion"/>
        </coding>
      </code>
      <description
                   value="Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population Exclusion"/>
      </criteria>
    </population>
    <population id="MeasureObservation_3">
      <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="MeasurePopulation_3"/>
      </extension>
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-observation"/>
          <display value="Measure Observation"/>
        </coding>
      </code>
      <description
                   value="Component Measure 3: Eligible encounters for patients with a documented &quot;Malnutrition Diagnosis&quot; based on the most recent Nutrition Assessment finding of Moderately Malnourished or Severely Malnourished. Measure Observation 3 includes Encounters with a most recent Nutrition Assessment and Identified Status of Moderately Malnourished or Severely Malnourished, that also identified an active medical malnutrition diagnosis during the encounter (including preceding observation or emergency department encounters) and a Malnutrition Risk Screening At Risk result or with a Dietitian Referral
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Observation 3"/>
      </criteria>
    </population>
  </group>
  <group id="Group_4">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="continuous-variable"/>
          <display value="Continuous Variable"/>
        </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="intermediate-outcome"/>
          <display value="Intermediate Outcome"/>
        </coding>
      </valueCodeableConcept>
    </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="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description value="Nutrition Care Plan
"/>
    <population id="InitialPopulation_4">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulation_4">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population"/>
          <display value="Measure Population"/>
        </coding>
      </code>
      <description value="Equals Initial Population
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulationExclusion_4">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population-exclusion"/>
          <display value="Measure Population Exclusion"/>
        </coding>
      </code>
      <description
                   value="Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population Exclusion"/>
      </criteria>
    </population>
    <population id="MeasureObservation_4">
      <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="MeasurePopulation_4"/>
      </extension>
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-observation"/>
          <display value="Measure Observation"/>
        </coding>
      </code>
      <description
                   value="Component Measure 4: Eligible encounters for patients with a documented &quot;Nutrition Care Plan&quot; based on the most recent Nutrition Assessment finding of Moderately Malnourished or Severely Malnourished. Measure Observation 4 identifies Encounters with a most recent Nutrition Assessment and Identified Status of Moderately Malnourished or Severely Malnourished, that also include a documented Nutrition Care Plan and a Malnutrition Risk Screening At Risk result or with a Dietitian Referral. &quot;Measure Observation 4&quot; identifies eligible encounters where a &quot;Nutrition Care Plan&quot; was performed during the encounter (including preceding observation or emergency department encounters).
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Observation 4"/>
      </criteria>
    </population>
  </group>
  <group id="Group_5">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="continuous-variable"/>
          <display value="Continuous Variable"/>
        </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="intermediate-outcome"/>
          <display value="Intermediate Outcome"/>
        </coding>
      </valueCodeableConcept>
    </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="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description value="Total Malnutrition Care Components
"/>
    <population id="InitialPopulation_5">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulation_5">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population"/>
          <display value="Measure Population"/>
        </coding>
      </code>
      <description value="Equals Initial Population
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulationExclusion_5">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population-exclusion"/>
          <display value="Measure Population Exclusion"/>
        </coding>
      </code>
      <description
                   value="Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population Exclusion"/>
      </criteria>
    </population>
    <population id="MeasureObservation_5">
      <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="MeasurePopulation_5"/>
      </extension>
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-observation"/>
          <display value="Measure Observation"/>
        </coding>
      </code>
      <description
                   value="Population 5 &quot;Measure Observation Total Malnutrition Components Score&quot; Calculations-For each eligible encounter, Population Criteria 5 represents the subtotal of Measure Observations performed for Population Criteria 1, 2, 3, and 4. Possible values may be 0, 1, 2, 3, or 4. Population 5 &quot;Measure Observation Total Malnutrition Components Score&quot; is (&quot;Measure Observation 1&quot; plus &quot;Measure Observation 2&quot; plus &quot;Measure Observation 3&quot; plus &quot;Measure Observation 4&quot;)
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression
                    value="Measure Observation Total Malnutrition Components Score"/>
      </criteria>
    </population>
  </group>
  <group id="Group_6">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="continuous-variable"/>
          <display value="Continuous Variable"/>
        </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="intermediate-outcome"/>
          <display value="Intermediate Outcome"/>
        </coding>
      </valueCodeableConcept>
    </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="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description value="Encounter Malnutrition Care Score
"/>
    <population id="InitialPopulation_6">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Eligible encounters during the measurement period with length of stay of 24 hours or more among individuals 18 years of age and older at the start of the inpatient encounter
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulation_6">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population"/>
          <display value="Measure Population"/>
        </coding>
      </code>
      <description value="Equals Initial Population
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population"/>
      </criteria>
    </population>
    <population id="MeasurePopulationExclusion_6">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-population-exclusion"/>
          <display value="Measure Population Exclusion"/>
        </coding>
      </code>
      <description
                   value="Encounters with hospice care ordered during the inpatient qualifying encounter and encounters with a discharge disposition of hospice
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Measure Population Exclusion"/>
      </criteria>
    </population>
    <population id="MeasureObservation_6">
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod">
        <valueString value="Average"/>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference">
        <valueString value="MeasurePopulation_6"/>
      </extension>
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="measure-observation"/>
          <display value="Measure Observation"/>
        </coding>
      </code>
      <description
                   value="Population 6 &quot;Measure Observation Total Malnutrition Care Score as Percentage&quot; Calculations:-For each eligible encounter, Population Criteria 6 represents the sum of performed Measure Observations 1, 2, 3, and 4 divided by the number of clinically eligible occurrences. Population 6 &quot;Measure Observation Total Malnutrition Care Score as Percentage&quot; is 100 multiplied by (&quot;Measure Observation Total Malnutrition Components Score&quot; divided by &quot;Total Malnutrition Care Score Eligible Occurrences&quot;). Possible values may be 0, 50, 75, or 100 percent. &quot;Total Malnutrition Care Score Eligible Occurrences&quot; is always 4 except in the following instances: -The &quot;Total Malnutrition Care Score Eligible Occurrences&quot; is 1 if ---A &quot;Malnutrition Risk Screening&quot; was performed and a Malnutrition Screening Finding of Not At Risk was identified and &quot;Dietitian Referral&quot; was not ordered. - The &quot;Total Malnutrition Care Score Eligible Occurrences&quot; is 2 ---If the most recent &quot;Nutrition Assessment&quot; performed has a result of Not or Mildly Malnourished. And, --- A &quot;Malnutrition Risk Screening&quot; was performed and a Malnutrition Screening Finding of At Risk was identified or a &quot;Dietitian Referral&quot; was ordered or a Dietitian Referral was ordered but a Nutrition Assessment was not performed.
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression
                    value="Measure Observation Total Malnutrition Care Score as Percentage"/>
      </criteria>
    </population>
  </group>
  <supplementalData id="sde-payer-type">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Payer Type
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer Type"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Race
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-ethnicity">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Ethnicity
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-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
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
</Measure>