Chronic Disease Surveillance
            
            0.1.0 - CI Build
  
            
          
Chronic Disease Surveillance, published by Clinical Quality Framework. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/cqframework/aphl-chronic-ig/ and changes regularly. See the Directory of published versions
| Draft as of 2025-09-25 | 
<Measure xmlns="http://hl7.org/fhir">
  <id value="ControllingHighBloodPressureFHIR"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
  <table class="narrative-table">
    <tbody>
<tr>
<th colspan="2" scope="row" class="row-header">Metadata</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Controlling High Blood Pressure</td>
</tr>
<tr>
<th scope="row" class="row-header">Version</th>
<td class="content-container">0.1.0</td>
</tr>
  
<tr>
<th scope="row" class="row-header">Identifier</th>
<td class="content-container">CMS165v12</td>
</tr>
  
<tr>
<th scope="row" class="row-header">Identifier</th>
<td class="content-container">236</td>
</tr>
  
<tr>
<th scope="row" class="row-header">Identifier</th>
<td class="content-container">abdc37cc-bac6-4156-9b91-d1be2c8b7268</td>
</tr>
  
    
    
<tr>
<th scope="row" class="row-header">Effective Period</th>
<td class="content-container">2024-01-01 through 2024-12-31</td>
</tr>
  
<tr>
<th scope="row" class="row-header">Status</th>
<td class="content-container">Draft</td>
</tr>
<tr>
<th scope="row" class="row-header">Jurisdiction</th>
<td class="content-container">
    001 from <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">http://unstats.un.org/unsd/methods/m49/m49.htm</a> 
</td>
</tr>
<tr>
<th scope="row" class="row-header">Steward (Publisher)</th>
<td class="content-container">Clinical Quality Framework</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container"><div><p>Percentage of patients 18-85 years of age who had a diagnosis of essential hypertension starting before and continuing into, or starting during the first six months of the measurement period, and whose most recent blood pressure was adequately controlled (<140/90 mmHg) during the measurement period</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Purpose</th>
<td class="content-container"><div><p>Unknown</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Copyright</th>
<td class="content-container"><div><p>This Physician Performance Measure (Measure) and related data specifications are owned and were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (e.g., use by healthcare providers in connection with their practices) without obtaining approval from NCQA. Commercial use is defined as the sale, licensing, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain. All commercial uses or requests for modification must be approved by NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2022 National Committee for Quality Assurance. All Rights Reserved.
Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third-party codes contained in the specifications.
CPT(R) codes, descriptions and other data are copyright 2022. American Medical Association. All rights reserved. CPT is a trademark of the American Medical Association. No fee schedules, basic units, relative values or related listings are included in CPT. The AMA assumes no liability for the data contained herein. Applicable FARS/DFARS restrictions apply to government use.
LOINC(R) copyright 2004-2022 Regenstrief Institute, Inc.
This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation.
ICD-10 copyright 2022 World Health Organization. All Rights Reserved.</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Disclaimer</th>
<td class="content-container"><div><p>The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Measure Scoring</th>
<td class="content-container">
    Proportion
</td>
</tr>
<tr>
<th scope="row" class="row-header">Improvement Notation</th>
<td class="content-container">
    Lower score indicates better quality
</td>
</tr>
<tr>
<th scope="row" class="row-header">Measure Type</th>
<td class="content-container">
    intermediateOutcome
</td>
</tr>
<tr>
<th scope="row" class="row-header">Rationale</th>
<td class="content-container"><div><p>High blood pressure (HBP), also known as hypertension, is when the pressure in blood vessels is higher than normal (Centers for Disease Control and Prevention [CDC], 2021). The causes of hypertension are multiple and multifaceted and can be based on genetic predisposition, environmental risk factors, being overweight and obese, sodium intake, potassium intake, physical activity, and alcohol use. High blood pressure is common; according to the American Heart Association, between 2013-2016, approximately 121.5 million US adults >= 20 years of age had HBP and the prevalence of hypertension among US adults 65 and older was 77.0 percent (Virani et al., 2021). In an analysis of adults with hypertension in NHANES, the estimated age-adjusted proportion with controlled BP increased from 31.8 percent in 1999 to 53.8 percent in 2014. However, that proportion declined to 43.7 percent in 2017 to 2018 (Tsao et al., 2022).
HBP, known as the “silent killer,” increases risks of heart disease and stroke which are two of the leading causes of death in the US; a person who has HBP is four times more likely to die from a stroke and three times more likely to die from heart disease (CDC, 2012). The National Center for Health Statistics reported that in 2020 there were over 670,000 deaths with HBP as a primary or contributing cause (CDC, 2022). Between 2009 and 2019 the number of deaths due to HBP rose by 65.3 percent (Tsao et al., 2022). Managing and treating HBP would reduce cardiovascular disease mortality for males and females by 30.4 percent and 38.0 percent, respectively (Patel et al., 2015). Age-adjusted death rates attributable to HBP in 2019 were more than twice as high in non-Hispanic Black males (56.7 percent) when compared to rates for non-Hispanic White males (25.7 percent) (Tsao et al., 2022).
HBP costs the U.S. approximately 131 billion dollars each year, averaged over 12 years from 2003 to 2014 (Kirkland et al., 2018). A study on cost-effectiveness on treating hypertension found that controlling HBP in patients with cardiovascular disease and systolic blood pressures (SBP) of >= 160 mmHg could be effective and cost-saving (Moran, 2015).
Many studies have shown that controlling high blood pressure reduces cardiovascular events and mortality. The Systolic Blood Pressure Intervention Trial (SPRINT) investigated the impact of obtaining a SBP goal of <120 mmHg compared to a SBP goal of <140 mmHg among patients 50 and older with established cardiovascular disease and found that the patients with the former goal had reduced cardiovascular events and mortality (SPRINT Research Group et al., 2015).
Controlling HBP will significantly reduce the risks of cardiovascular disease mortality and lead to better health outcomes like reduction of heart attacks, stroke, and kidney disease (James et al., 2014). Thus, the relationship between the measure (control of hypertension) and the long-term clinical outcomes listed is well established.</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Clinical Recommendation Statement</th>
<td class="content-container"><div><p>U.S. Preventive Services Task Force (USPSTF) (2021):</p>
<ul>
<li>The USPSTF recommends screening for hypertension in adults 18 years or older with office blood pressure measurement (OBPM). The USPSTF recommends obtaining blood pressure measurements outside of the clinical setting for diagnostic confirmation before starting treatment. This is a grade A recommendation.</li>
</ul>
<p>American College of Cardiology/American Heart Association (2017):</p>
<ul>
<li>For adults with confirmed hypertension and known CVD or 10-year ASCVD event risk of 10 percent or higher, a blood pressure target of less than 130/80 mmHg is recommended (Level of evidence: B-R (for systolic blood pressures), Level of evidence: C-EO (for diastolic blood pressure))</li>
<li>For adults with confirmed hypertension, without additional markers of increased CVD risk, a blood pressure target of less than 130/80 mmHg may be reasonable (Note: clinical trial evidence is strongest for a target blood pressure of 140/90 mmHg in this population. However, observational studies suggest that these individuals often have a high lifetime risk and would benefit from blood pressure control earlier in life) (Level of evidence: B-NR (for systolic blood pressure), Level of evidence: C-EO (for diastolic blood pressure)).</li>
</ul>
<p>American College of Physicians and the American Academy of Family Physicians (2017):</p>
<ul>
<li>Initiate or intensify pharmacologic treatment in some adults aged 60 years or older at high cardiovascular risk, based on individualized assessment, to achieve a target systolic blood pressure of less than 140 mmHg (Grade: weak recommendation, Quality of evidence: low)</li>
<li>Initiate or intensify pharmacologic treatment in adults aged 60 years or older with a history of stroke or transient ischemic attack to achieve a target systolic blood pressure of less than 140 mmHg to reduce the risk of recurrent stroke (Grade: weak recommendation, Quality of evidence: moderate)</li>
</ul>
<p>American Diabetes Association (2021):</p>
<ul>
<li>For individuals with diabetes and hypertension at higher cardiovascular risk (existing atherosclerotic cardiovascular disease or 10-year atherosclerotic cardiovascular disease risk >=15 percent), a blood pressure target of <130/80 mmHg may be appropriate, if it can be safely attained (Level of evidence: C)</li>
<li>For individuals with diabetes and hypertension at lower risk for cardiovascular disease (10-year atherosclerotic cardiovascular disease risk <15 percent), treat to a blood pressure target of <140/90 mmHg (Level of evidence: A)</li>
</ul>
</div></td>
</tr>
  
  
  
    <tr>
<th colspan="2" scope="row" class="row-header">Measure Group (Rate)</th>
</tr>
  
  
  
  
  
    
    
    <tr>
      
        
<th scope="row" class="row-header">Initial Population</th>
      
      <td class="content-container">
        
        <em>ID</em>: F348D767-1BDE-41AB-884D-5F0E19093980
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Patients 18-85 years of age who had a visit during the measurement period and diagnosis of essential hypertension</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#grp-F348D767-1BDE-41AB-884D-5F0E19093980">Initial Population</a> 
            
          
          
        
        
        
      </td>
    </tr>
  
  
    
    
    <tr>
      
        
<th scope="row" class="row-header">Denominator</th>
      
      <td class="content-container">
        
        <em>ID</em>: 3E0D40B3-64FC-4998-B371-34978D033116
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Patients 18-85 years of age who had a visit during the measurement period and diagnosis of essential hypertension</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#grp-3E0D40B3-64FC-4998-B371-34978D033116">Denominator</a> 
            
          
          
        
        
        
      </td>
    </tr>
  
  
    
    
    <tr>
      
        
<th scope="row" class="row-header">Numerator</th>
      
      <td class="content-container">
        
        <em>ID</em>: 24803F44-C643-45C7-A2A5-4C58BD540579
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Patients whose most recent blood pressure is adequately controlled (systolic blood pressure < 140 mmHg and diastolic blood pressure < 90 mmHg) during the measurement period</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#grp-24803F44-C643-45C7-A2A5-4C58BD540579">Numerator</a> 
            
          
          
        
        
        
      </td>
    </tr>
  
  
    
    
    <tr>
      
        
<th scope="row" class="row-header">Denominator Exclusions</th>
      
      <td class="content-container">
        
        <em>ID</em>: 95E1480E-8B61-4777-865D-B2A1D6525E1A
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Patients with ESRD or dialysis or renal transplant or pregnancy or in hospice or 66+ in nursing care or 66-80 with frailty and advanced illness or 81+ with frailty or receiving palliative care</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#grp-95E1480E-8B61-4777-865D-B2A1D6525E1A">Denominator Exclusion</a> 
            
          
          
        
        
        
      </td>
    </tr>
  
  
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-ethnicity
      
        <br/>
      
    
    
      
        <em>Code</em>: Ethnicity
      
      
        <br/>
      
    
    
      <em>Description</em>: Ethnicity (CDC Value Set)
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-payer
      
        <br/>
      
    
    
      
        <em>Code</em>: SDE Payer
      
      
        <br/>
      
    
    
      <em>Description</em>: Payer
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-race
      
        <br/>
      
    
    
      
        <em>Code</em>: SDE Race
      
      
        <br/>
      
    
    
      <em>Description</em>: Race (CDC Value Set)
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-sex
      
        <br/>
      
    
    
      
        <em>Code</em>: Sex [HL7.v3]
      
      
        <br/>
      
    
    
      <em>Description</em>: Administrative sex
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-age
      
        <br/>
      
    
    
      
        <em>Code</em>: Age
      
      
        <br/>
      
    
    
      <em>Description</em>: Age
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-state-of-residence
      
        <br/>
      
    
    
      
        <em>Code</em>: State, district or territory federal abbreviation
      
      
        <br/>
      
    
    
      <em>Description</em>: State of residence
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-postal-code-of-residence
      
        <br/>
      
    
    
      
        <em>Code</em>: Postal code
      
      
        <br/>
      
    
    
      <em>Description</em>: Postal code of residence
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Stratifier</th>
  <td class="content-container">
    
      <em>ID</em>: stratifier-food-insecurity-risk-status
      
        <br/>
      
    
    
      
        <em>Code</em>: Food insecurity risk [HVS]
      
      
        <br/>
      
    
    
      <em>Description</em>: Food insecurity risk status
    
  </td>
</tr>
  <tr>
<th colspan="2" scope="row" class="row-header">Supplemental Data Elements</th>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-ethnicity
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Ethnicity (CDC Value Set)
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-ethnicity">SDE Ethnicity</a> 
        
      
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-payer
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Payer
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-payer">SDE Payer</a> 
        
      
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-race
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Race (CDC Value Set)
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-race">SDE Race</a> 
        
      
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-sex
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Administrative sex
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-sex">SDE Sex</a> 
        
      
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-age
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Age
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-age">SDE Age</a> 
        
      
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-state-of-residence
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: State of residence
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-state-of-residence">SDE State of Residence</a> 
        
      
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-postal-code-of-residence
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Postal code of residence
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-postal-code-of-residence">SDE Postal Code of Residence</a> 
        
      
    
  </td>
</tr>
<tr>
  
<th scope="row" class="row-header">Supplemental Data Element</th>
  <td class="content-container">
    
      <em>ID</em>: sde-food-insecurity-risk-status
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: Food insecurity risk status
    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#controllinghighbloodpressurefhir-sde-food-insecurity-risk-status">SDE Food Insecurity Risk Status</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"><a href="Library-ControllingHighBloodPressureFHIR.html">ControllingHighBloodPressureFHIR</a></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)</th>
</tr>
  
  
  
  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Initial Population
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
      
      <a name="grp-F348D767-1BDE-41AB-884D-5F0E19093980"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population":
  AgeInYearsAt(date from end of "Measurement Period") in Interval[18, 85]
		and exists "Essential Hypertension Diagnosis"
		and exists AdultOutpatientEncounters."Qualifying Encounters"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-initial-population"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  
  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Denominator
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
      
      <a name="grp-3E0D40B3-64FC-4998-B371-34978D033116"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator":
	"Initial Population"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-denominator"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  
  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Numerator
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
      
      <a name="grp-24803F44-C643-45C7-A2A5-4C58BD540579"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator":
	"Has Diastolic Blood Pressure Less Than 90"
	    and "Has Systolic Blood Pressure Less Than 140"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-numerator"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  
  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Denominator Exclusions
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
      
      <a name="grp-95E1480E-8B61-4777-865D-B2A1D6525E1A"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator Exclusion":
  Hospice."Has Hospice"
    or exists ("Pregnancy Or Renal Diagnosis")
    or exists ("End Stage Renal Disease Procedures")
    or exists ("End Stage Renal Disease Encounter")
    or FrailtyLTI."Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"
    or FrailtyLTI."Is Age 66 or Older Living Long Term in a Nursing Home"
    or PalliativeCare."Palliative Care in the Measurement Period"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-denominator-exclusion"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  
  
  
    
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding</code></pre>
    
      
      <a href="#supplementaldataelementsfhir4-sde-ethnicity"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
  SDE."SDE Ethnicity"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-ethnicity"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
    
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Payer":
  [Coverage: type in "Payer"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }</code></pre>
    
      
      <a href="#supplementaldataelementsfhir4-sde-payer"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Payer":
  SDE."SDE Payer"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-payer"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
    
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Race":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding</code></pre>
    
      
      <a href="#supplementaldataelementsfhir4-sde-race"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Race":
  SDE."SDE Race"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-race"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
    
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Sex":
  case
      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
      else null
    end</code></pre>
    
      
      <a href="#supplementaldataelementsfhir4-sde-sex"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Sex":
  SDE."SDE Sex"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-sex"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
    
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Age":
  SurveillanceDataElements."Age"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-age"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
    
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE State of Residence":
  SurveillanceDataElements."State of Residence"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-state-of-residence"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
    
        
          
        
          
        
          
        
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Postal Code of Residence":
  SurveillanceDataElements."Postal Code of Residence"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-postal-code-of-residence"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
    
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
    Stratifier
    
  </th>
</tr>
<tr>
  <td>
    
    
    
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Food Insecurity Risk Status":
  SurveillanceDataElements."Food Insecurity Risk Status"</code></pre>
    
      
      <a href="#controllinghighbloodpressurefhir-sde-food-insecurity-risk-status"><em>Definition</em></a>
    
  </td>
</tr>
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
    
  
  
  
  
  <tr>
<th colspan="2" scope="row" class="row-header"><a name="definitions"> </a>Logic Definitions</th>
</tr>
  
  
          
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdultOutpatientEncountersFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="adultoutpatientencountersfhir4-qualifying-encounters"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Qualifying Encounters":
  (
	[Encounter: "Office Visit"]
      union [Encounter: "Annual Wellness Visit"]
      union [Encounter: "Preventive Care Services - Established Office Visit, 18 and Up"]
      union [Encounter: "Preventive Care Services - Initial Office Visit, 18 and Up"]
      union [Encounter: "Home Healthcare Services"]
      union [Encounter: "Online Assessments"]
      union [Encounter: "Telephone Visits"]
  ) ValidEncounters
    where FC.ToInterval(ValidEncounters.period) during "Measurement Period"
	  and ValidEncounters.status ~ 'finished' or ValidEncounters.status ~ 'in-progress'</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SurveillanceDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="surveillancedataelementsfhir4-most-recent-physical-home-address"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Jurisdiction of residence (jurisdiction of the patient)
define "Most recent physical home address":
  First(
    Patient.address A
      where A.use = 'home'
        and A.type = 'physical'
      sort by end of period desc
  )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SurveillanceDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="surveillancedataelementsfhir4-postal-code-of-residence"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Postal Code of Residence":
  "Most recent physical home address".postalCode</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SurveillanceDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="surveillancedataelementsfhir4-state-of-residence"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "State of Residence":
  "Most recent physical home address".state</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SurveillanceDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="surveillancedataelementsfhir4-food-insecurity-risk-status"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Jurisdiction of care (jurisdiction of the most recent encounter)
// TODO:
//define "Most recent address of care":
// NOTE: Included in eICR
// Occupational Data for Health - Past or Present Job
// http://hl7.org/fhir/us/odh/StructureDefinition-odh-PastOrPresentJob.html
// Observation: LOINC#11341-5, valueCodeableConcept in https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.7186
// Social Determinants of Health (SDOH)
// http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/StructureDefinition-SDOHCC-ObservationScreeningResponse.html
// Food insecurity risk: http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/Observation-SDOHCC-ObservationResponseHungerVitalSignQuestion3Example.html
// Observation: LOINC#88124-3, valueCodeableConcept in https://loinc.org/LL2510-7/ (At risk, No risk)
define "Food Insecurity Risk Status":
  First(
    [Observation: "Food insecurity risk [HVS]"] O
      sort by issued desc
  ).value as CodeableConcept</code></pre>
  </td>
</tr>
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SurveillanceDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="surveillancedataelementsfhir4-age"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Age
define "Age":
  AgeInYearsAt(end of "Measurement Period")</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> HospiceFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="hospicefhir4-has-hospice"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Has Hospice":
  exists(
    (AC.QualifiedEncounters([Encounter: "Encounter Inpatient"])) HospiceInp
      where (HospiceInp.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"
        or HospiceInp.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)")
      and FC.ToInterval(HospiceInp.period) ends during "Measurement Period"
  ) or exists(
    (AC.QualifiedEncounters([Encounter: "Hospice Encounter"])) HospiceEnc
      where FC.ToInterval(HospiceEnc.period) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedObservations([Observation: "Hospice care [Minimum Data Set]"])) HospiceObs
      where HospiceObs.value ~ ToConcept("Yes (qualifier value)")
        and FC.ToInterval(HospiceObs.effective) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedServiceRequests([ServiceRequest: "Hospice Care Ambulatory"])) HospiceSR
      where FC.ToInterval(HospiceSR.authoredOn) during "Measurement Period"
  ) or exists(
    (AC.QualifiedProcedures([Procedure: "Hospice Care Ambulatory"])) HospiceProc
      where FC.ToInterval(HospiceProc.performed) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedConditions([Condition: "Hospice Diagnosis"])) HospiceCareDiagnosis
      where FC.ToPrevalenceInterval(HospiceCareDiagnosis) overlaps "Measurement Period"
  )</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-has-criteria-indicating-frailty"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Has Criteria Indicating Frailty":
  exists(
    (AC.QualifiedDeviceRequests([DeviceRequest: "Frailty Device"])) FrailtyDeviceOrder
      where FrailtyDeviceOrder.authoredOn during day of "Measurement Period"
    ) 
    or exists(
        (AC.QualifiedObservations([Observation: "Medical Equipment Used"])) EquipmentUsed
          where EquipmentUsed.value in "Frailty Device"
            and FC.ToInterval(EquipmentUsed.effective) ends during day of "Measurement Period"
    )
    or exists(
      (AC.QualifiedConditions([Condition: "Frailty Diagnosis"])) FrailtyDiagnosis
        where FC.ToPrevalenceInterval(FrailtyDiagnosis) overlaps "Measurement Period"
    )
    or exists(
      (AC.QualifiedEncounters([Encounter: "Frailty Encounter"])) FrailtyEnc
        where FC.ToInterval(FrailtyEnc.period) overlaps "Measurement Period"
    )
    or exists(
      (AC.QualifiedObservations([Observation: "Frailty Symptom"])) FrailtySymptom
        where FC.ToInterval(FrailtySymptom.effective) overlaps "Measurement Period"
    )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-up-to-one-year-prior-including-measurement-period"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Up To One Year Prior Including Measurement Period":
  Interval[start of "Measurement Period" - 1 year, end of "Measurement Period"]</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-outpatient-encounters-with-advanced-illness"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Outpatient Encounters With Advanced Illness":
  ((AC.QualifiedEncounters([Encounter: "Outpatient"]))
    union (AC.QualifiedEncounters([Encounter: "Observation"]))
    union (AC.QualifiedEncounters([Encounter: "Emergency Department Visit"]))
    union (AC.QualifiedEncounters([Encounter: "Nonacute Inpatient"]))) OutpatientEnc
      with (AC.QualifiedConditions([Condition: "Advanced Illness"])) AdvanIll
        such that FC.ToPrevalenceInterval(AdvanIll) overlaps "Measurement Period"
      and FC.ToInterval(OutpatientEnc.period) overlaps "Up To One Year Prior Including Measurement Period"</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-has-two-outpatient-encounters-with-advanced-illness-on-different-dates-of-service"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Has Two Outpatient Encounters With Advanced Illness on Different Dates of Service":
  from
    "Outpatient Encounters With Advanced Illness" OutpatientEncounter1,
    "Outpatient Encounters With Advanced Illness" OutpatientEncounter2
  where OutpatientEncounter2.period ends 1 day or more after day of end of OutpatientEncounter1.period
  return OutpatientEncounter1</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-has-inpatient-encounter-with-advanced-illness"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Has Inpatient Encounter With Advanced Illness":  
  (AC.QualifiedEncounters([Encounter: "Acute Inpatient"])) InpatientEnc
    with (AC.QualifiedConditions([Condition: "Advanced Illness"])) AdvanIll
      such that FC.ToPrevalenceInterval(AdvanIll) overlaps InpatientEnc.period
        and FC.ToInterval(InpatientEnc.period) overlaps "Up To One Year Prior Including Measurement Period"</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-has-dementia-medications-in-year-before-or-during-measurement-period"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Has Dementia Medications In Year Before or During Measurement Period":
  (AC.QualifiedMedicationRequests([MedicationRequest: "Dementia Medications"])) DementiaMed
    where exists(
      DementiaMed.dosageInstruction dosage
      where exists(
        FC.ToTimingInterval(dosage.timing)) timing
        where timing overlaps "Up To One Year Prior Including Measurement Period")</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-is-age-66-to-80-with-advanced-illness-and-frailty-or-is-age-81-or-older-with-frailty"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty":
  (
    AgeInYearsAt(date from end of "Measurement Period") in Interval[66, 80]
      and "Has Criteria Indicating Frailty"
      and (
        exists("Has Two Outpatient Encounters With Advanced Illness on Different Dates of Service")
        or exists("Has Inpatient Encounter With Advanced Illness")
        or exists("Has Dementia Medications In Year Before or During Measurement Period")
      )
  ) 
  or (
    AgeInYearsAt(date from end of "Measurement Period") >= 81
      and "Has Criteria Indicating Frailty"
  )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-lives-in-a-nursing-home"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Lives In A Nursing Home":
  Last(
    (AC.QualifiedObservations([Observation: "Housing Status"])) HousingStatus
      where FC.ToInterval(HousingStatus.effective) ends on or before end of "Measurement Period"
        and HousingStatus.value ~ ToConcept("Lives In A Nursing Home (finding)")
    sort by issued ascending
  ) is not null</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AdvancedIllnessandFrailtyExclusionECQMFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="advancedillnessandfrailtyexclusionecqmfhir4-is-age-66-or-older-living-long-term-in-a-nursing-home"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is Age 66 or Older Living Long Term in a Nursing Home":
  AgeInYearsAt(date from end of "Measurement Period") >= 66
    and "Lives In A Nursing Home"</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> PalliativeCareFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="palliativecarefhir-palliative-care-in-the-measurement-period"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Palliative Care in the Measurement Period":
  exists(
    (AC.QualifiedObservations([Observation: "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"])) PalliativeObservation
      where FC.ToInterval(PalliativeObservation.effective) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedConditions([Condition: "Palliative Care Diagnosis"])) PalliativeDiagnosis
      where FC.ToPrevalenceInterval(PalliativeDiagnosis) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedEncounters([Encounter: "Palliative Care Encounter"])) PalliativeEncounter
      where FC.ToInterval(PalliativeEncounter.period) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedProcedures([Procedure: "Palliative Care Intervention"])) PalliativeProcedure
      where FC.ToInterval(PalliativeProcedure.performed) overlaps "Measurement Period"
  )</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SupplementalDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="supplementaldataelementsfhir4-sde-sex"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Sex":
  case
      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
      else null
    end</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SupplementalDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="supplementaldataelementsfhir4-sde-payer"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Payer":
  [Coverage: type in "Payer"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }</code></pre>
  </td>
</tr>
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SupplementalDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="supplementaldataelementsfhir4-sde-ethnicity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> SupplementalDataElementsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="supplementaldataelementsfhir4-sde-race"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Race":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-sex"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Sex":
  SDE."SDE Sex"</code></pre>
  </td>
</tr>
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-postal-code-of-residence"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Postal Code of Residence":
  SurveillanceDataElements."Postal Code of Residence"</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-qualifying-diastolic-blood-pressure-reading"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Qualifying Diastolic Blood Pressure Reading":
	[Observation: "Blood pressure"] BloodPressure
    without ([Encounter: "Encounter Inpatient"]
      union [Encounter: "Emergency Department Evaluation and Management Visit"]) DisqualifyingEncounter
      such that Common.Latest(BloodPressure.effective) during day of DisqualifyingEncounter.period
    where BloodPressure.status in {'final', 'amended'}
      and Common.Latest(BloodPressure.effective) during "Measurement Period"
      and exists (
        BloodPressure.component DiastolicBP
          where DiastolicBP.code ~ "Diastolic blood pressure"
            and (DiastolicBP.value as Quantity).code.value = 'mm[Hg]'
      )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-qualifying-systolic-blood-pressure-reading"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Qualifying Systolic Blood Pressure Reading":
	[Observation: "Blood pressure"] BloodPressure
    without ([Encounter: "Encounter Inpatient"]
      union [Encounter: "Emergency Department Evaluation and Management Visit"]) DisqualifyingEncounter
      such that Common.Latest(BloodPressure.effective) during day of DisqualifyingEncounter.period
    where BloodPressure.status in {'final', 'amended'}
      and Common.Latest(BloodPressure.effective) during "Measurement Period"
      and exists (
        BloodPressure.component SystolicBP
          where SystolicBP.code ~ "Systolic blood pressure"
            and (SystolicBP.value as Quantity).code.value = 'mm[Hg]'
      )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-blood-pressure-days"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Blood Pressure Days":
	("Qualifying Diastolic Blood Pressure Reading" DBPExam 
        return Common.Latest(DBPExam.effective)
    ) 
        intersect ("Qualifying Systolic Blood Pressure Reading" SBPExam 
            return Common.Latest(SBPExam.effective)
        )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-most-recent-blood-pressure-day"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Most Recent Blood Pressure Day":
	Max("Blood Pressure Days")</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-lowest-diastolic-reading-on-most-recent-blood-pressure-day"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Lowest Diastolic Reading on Most Recent Blood Pressure Day":
	First(
        "Qualifying Diastolic Blood Pressure Reading" DBPReading
		    where Common.Earliest(DBPReading.effective) same day as "Most Recent Blood Pressure Day"
        return singleton from (
            DBPReading.component C
                where C.code ~ "Diastolic blood pressure"
                return C.value as FHIR.Quantity
        ) sort ascending
	)</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-has-diastolic-blood-pressure-less-than-90"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Has Diastolic Blood Pressure Less Than 90":
    "Lowest Diastolic Reading on Most Recent Blood Pressure Day" < 90 'mm[Hg]'</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-lowest-systolic-reading-on-most-recent-blood-pressure-day"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Lowest Systolic Reading on Most Recent Blood Pressure Day":
	First(
        "Qualifying Systolic Blood Pressure Reading" SBPReading
		    where Common.Latest(SBPReading.effective) same day as "Most Recent Blood Pressure Day"
        return singleton from (
            SBPReading.component C
                where C.code ~ "Systolic blood pressure"
                return C.value as FHIR.Quantity
        ) sort ascending
    )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-has-systolic-blood-pressure-less-than-140"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Has Systolic Blood Pressure Less Than 140":
	"Lowest Systolic Reading on Most Recent Blood Pressure Day" < 140 'mm[Hg]'</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-numerator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator":
	"Has Diastolic Blood Pressure Less Than 90"
	    and "Has Systolic Blood Pressure Less Than 140"</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-essential-hypertension-diagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Essential Hypertension Diagnosis":
	[Condition: "Essential Hypertension"] Hypertension
    where Hypertension.verificationStatus ~ Common."confirmed"
      and Common."Prevalence Period"(Hypertension) overlaps Interval[start of "Measurement Period", start of "Measurement Period" + 6 months]</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-initial-population"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population":
  AgeInYearsAt(date from end of "Measurement Period") in Interval[18, 85]
		and exists "Essential Hypertension Diagnosis"
		and exists AdultOutpatientEncounters."Qualifying Encounters"</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-denominator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator":
	"Initial Population"</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-payer"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Payer":
  SDE."SDE Payer"</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-state-of-residence"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE State of Residence":
  SurveillanceDataElements."State of Residence"</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-food-insecurity-risk-status"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Food Insecurity Risk Status":
  SurveillanceDataElements."Food Insecurity Risk Status"</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-ethnicity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
  SDE."SDE Ethnicity"</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-age"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Age":
  SurveillanceDataElements."Age"</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-pregnancy-or-renal-diagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Pregnancy Or Renal Diagnosis":
	( [Condition: "Pregnancy"]
		union [Condition: "End Stage Renal Disease"]
		union [Condition: "Kidney Transplant Recipient"]
		union [Condition: "Chronic Kidney Disease, Stage 5"] ) PregnancyESRDDiagnosis
      where PregnancyESRDDiagnosis.verificationStatus ~ Common."confirmed"
        and PregnancyESRDDiagnosis.recordedDate during "Measurement Period"</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-end-stage-renal-disease-procedures"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "End Stage Renal Disease Procedures":
	([Procedure: "Kidney Transplant"]
		union [Procedure: "Dialysis Services"]) ESRDProcedure
		    where ESRDProcedure.status = 'completed'
                and end of Common."Normalize Interval"(ESRDProcedure.performed) on or before end of "Measurement Period"</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-end-stage-renal-disease-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "End Stage Renal Disease Encounter":
	[Encounter: "ESRD Monthly Outpatient Services"] ESRDEncounter
		where ESRDEncounter.status in { 'arrived', 'triaged', 'in-progress', 'onleave', 'finished' }
		  and ESRDEncounter.period starts on or before end of "Measurement Period"</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-denominator-exclusion"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator Exclusion":
  Hospice."Has Hospice"
    or exists ("Pregnancy Or Renal Diagnosis")
    or exists ("End Stage Renal Disease Procedures")
    or exists ("End Stage Renal Disease Encounter")
    or FrailtyLTI."Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"
    or FrailtyLTI."Is Age 66 or Older Living Long Term in a Nursing Home"
    or PalliativeCare."Palliative Care in the Measurement Period"</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> ControllingHighBloodPressureFHIR</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="controllinghighbloodpressurefhir-sde-race"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Race":
  SDE."SDE Race"</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctionsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="matglobalcommonfunctionsfhir4-prevalence-period"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Returns an interval representing the period during which the condition was prevalent (i.e. onset to abatement)
If the condition is "active", then abatement being unknown
would indicate the condition is ongoing, and the ending boundary of the prevalence
period is inclusive, otherwise, the abatement is considered unknown and the ending boundary
of the prevalence period is exclusive.
Note that when using this function it should be noted that many clinical systems
do not actually capture abatement, so care should be taken when using this function
to meet clinical intent.
*/
define function "Prevalence Period"(condition Condition ):
  if condition.clinicalStatus ~ "active"
    or condition.clinicalStatus ~ "recurrence"
    or condition.clinicalStatus ~ "relapse" then
    Interval[start of "Normalize Interval"(condition.onset), end of "Normalize Abatement"(condition)]
  else
    Interval[start of "Normalize Interval"(condition.onset), end of "Normalize Abatement"(condition))</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> MATGlobalCommonFunctionsFHIR4</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="matglobalcommonfunctionsfhir4-normalize-abatement"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/**
* Returns an interval representing the abatement of the given condition, if an
abatement element is present, null otherwise.
This function uses the semantics of Normalize Interval to interpret the abatement
element.
*/
define function "Normalize Abatement"(condition Condition ):
  if condition.abatement is FHIR.dateTime then
	  Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]
	else if condition.abatement is FHIR.Period then
	  FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)
	else if condition.abatement is FHIR.string then
  Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
	else if condition.abatement is FHIR.Age then
		Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),
			FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)
	else if condition.abatement is FHIR.Range then
	  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),
		  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)
	else if condition.abatement is FHIR.boolean then
	  Interval[end of "Normalize Interval"(condition.onset), condition.recordedDate)
	else null</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AlphoraCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="alphoracommon-qualifiedencounters"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* Common Resource Qualifications and Negations */
define function QualifiedEncounters(value List<FHIR.Encounter>):
  value Encounter
    where (
      //planned | arrived | triaged | in-progress | onleave | finished | cancelled | entered-in-error | unknown
      Encounter.status ~ 'arrived'
      or Encounter.status ~ 'in-progress'
      or Encounter.status ~ 'finished'
      or Encounter.status ~ 'onleave'
      or Encounter.status ~ 'triaged'
    )</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AlphoraCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="alphoracommon-qualifiedobservations"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function QualifiedObservations(value List<FHIR.Observation>):
  value Observation
		where (
      //registered | preliminary | final | amended | corrected | cancelled | entered-in-error | unknown
      Observation.status ~ 'final'
			or Observation.status ~ 'amended'
			or Observation.status ~ 'corrected'
		)</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AlphoraCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="alphoracommon-qualifiedservicerequests"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function QualifiedServiceRequests(value List<FHIR.ServiceRequest>):
  value ServiceRequest
    where (
      //draft | active | on-hold | revoked | completed | entered-in-error | unknown
      ServiceRequest.status ~ 'active'
      or ServiceRequest.status ~ 'completed'
      and ServiceRequest.intent ~ 'order'
    )
    and (
      ServiceRequest.doNotPerform is null
      or ServiceRequest.doNotPerform = false
    )</code></pre>
  </td>
</tr>
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AlphoraCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="alphoracommon-qualifiedprocedures"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function QualifiedProcedures(value List<FHIR.Procedure>):
  value Procedure
    where (
      //preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown
      Procedure.status ~ 'completed'
    )</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AlphoraCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="alphoracommon-qualifiedconditions"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function QualifiedConditions(value List<FHIR.Condition>):
  value Condition
    where (
      FHIRHelpers.ToConcept(Condition.clinicalStatus) ~ FC."active"
    )
    and (
      FHIRHelpers.ToConcept(Condition.verificationStatus) ~ FC."confirmed"
    )</code></pre>
  </td>
</tr>
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AlphoraCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="alphoracommon-qualifieddevicerequests"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function QualifiedDeviceRequests(value List<FHIR.DeviceRequest>):
  value DeviceRequest
    where (
      //draft | active | on-hold | revoked | completed | entered-in-error | unknown
      DeviceRequest.status ~ 'completed'
      or DeviceRequest.status ~ 'active'
      and DeviceRequest.intent ~ 'order'
    )</code></pre>
  </td>
</tr>
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> AlphoraCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="alphoracommon-qualifiedmedicationrequests"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function QualifiedMedicationRequests(value List<FHIR.MedicationRequest>):
  value MedicationRequest
    where (
      //active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown
      (MedicationRequest.status ~ 'active'
        or MedicationRequest.status ~ 'completed'
      )
        and (
          MedicationRequest.doNotPerform is null
          or MedicationRequest.doNotPerform = false
        )
        and MedicationRequest.intent ~ 'order'
    )</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value AdministrativeGender): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value AddressUse): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value AddressType): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tointerval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-toquantity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToQuantity(quantity FHIR.Quantity):
    case
        when quantity is null then null
        when quantity.value is null then null
        when quantity.comparator is not null then
            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
        else
            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
    end</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tocalendarunit"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToCalendarUnit(unit System.String):
    case unit
        when 'ms' then 'millisecond'
        when 's' then 'second'
        when 'min' then 'minute'
        when 'h' then 'hour'
        when 'd' then 'day'
        when 'wk' then 'week'
        when 'mo' then 'month'
        when 'a' then 'year'
        else unit
    end</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ObservationStatus): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-toconcept"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tocode"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }</code></pre>
  </td>
</tr>
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-todatetime"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value dateTime): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-todate"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDate(value date): value.value</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-todatetime"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value instant): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value EncounterStatus): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
  </td>
</tr>
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ServiceRequestStatus): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ServiceRequestIntent): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-toboolean"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToBoolean(value boolean): value.value</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value ProcedureStatus): value.value</code></pre>
  </td>
</tr>
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value DeviceRequestStatus): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value RequestIntent): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value string): value.value</code></pre>
  </td>
</tr>
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value MedicationRequestStatus): value.value</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value MedicationRequestIntent): value.value</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhircommon-tointerval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.
The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.
NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define function ToInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
  case
	  when choice is FHIR.dateTime then
    	Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
		when choice is FHIR.Period then
  		FHIRHelpers.ToInterval(choice as FHIR.Period)
		when choice is FHIR.instant then
			Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
		when choice is FHIR.Age then
		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
		when choice is FHIR.Range then
		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
		when choice is FHIR.Timing then
			//Interval[FHIRHelpers.ToDateTime(choice as FHIR.timing), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
		  Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')
    when choice is FHIR.string then
      Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
		else
			null as Interval<DateTime>
	end</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhircommon-toprevalenceinterval"> </a>
    
    <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 resource.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition.
*/
define function ToPrevalenceInterval(condition Condition):
if condition.clinicalStatus ~ "active"
  or condition.clinicalStatus ~ "recurrence"
  or condition.clinicalStatus ~ "relapse" then
  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]
else
  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition))</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhircommon-toabatementinterval"> </a>
    
    <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 resource.
@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw
a run-time exception if used with a Condition instance that has a String as the abatement value.
*/
define function ToAbatementInterval(condition Condition):
	if condition.abatement is FHIR.dateTime then
	  Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]
	else if condition.abatement is FHIR.Period then
	  FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)
	else if condition.abatement is FHIR.string then
    Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
	else if condition.abatement is FHIR.Age then
		Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),
			FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)
	else if condition.abatement is FHIR.Range then
	  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),
		  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)
	else if condition.abatement is FHIR.boolean then
	  Interval[end of ToInterval(condition.onset), condition.recordedDate)
	else null</code></pre>
  </td>
</tr>
        
        
        
        
        
        
        
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhircommon-totiminginterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToTimingInterval(timing FHIR.Timing):
  convert (
    NullToEmptyInterval(ToIntervalFromList(timing.event))
    union NullToEmptyInterval({ToInterval(timing.repeat.bounds as FHIR.Period)})
  ) to List<Interval<DateTime>> except { null }</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhircommon-nulltoemptyinterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function NullToEmptyInterval(value List<Interval<DateTime>>):
  if value is not null then value else { }</code></pre>
  </td>
</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    Logic Definition
  </th>
  <td class="content-container"><em>Library Name:</em> FHIRCommon</td>
</tr>
<tr>
  <td>
    
    
    
    
      <a name="fhircommon-tointervalfromlist"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToIntervalFromList(value List<FHIR.dateTime>):
  value v
    return ToInterval(v)</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 LOINC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-v3-loinc.html">Logical Observation Identifiers, Names and Codes (LOINC)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://loinc.org</tt>
    
  </td>
</tr>
 
<tr>
  
  
  
<th scope="row" class="row-header">Code System</th>
  
  <td class="content-container">
    
    <em>Description</em>: Code system ConditionVerificationStatusCodes
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-condition-ver-status.html">ConditionVerificationStatus</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</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>: <a href="http://terminology.hl7.org/6.5.0/CodeSystem-condition-clinical.html">Condition Clinical Status Codes</a>
    <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 SNOMEDCT
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">SNOMED CT (all versions)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Encounter Inpatient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Emergency Department Evaluation and Management Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1010/expansion">Emergency Department Visit</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Essential Hypertension
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.104.12.1011/expansion">Essential Hypertension</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.104.12.1011</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Office Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Annual Wellness Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1240/expansion">Annual Wellness Visit</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Preventive Care Services - Established Office Visit, 18 and Up
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1025/expansion">Preventive Care Services - Established Office Visit, 18 and Up</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Preventive Care Services - Initial Office Visit, 18 and Up
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1023/expansion">Preventive Care Services-Initial Office Visit, 18 and Up</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Home Healthcare Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1016/expansion">Home Healthcare Services</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Online Assessments
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1089/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Telephone Visits
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1080/expansion">Telephone Visits</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Payer
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hospice Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.1003/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hospice Care Ambulatory
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1108.15/expansion">Hospice care ambulatory</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hospice Diagnosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.1165/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Pregnancy
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.378/expansion">Pregnancy</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set End Stage Renal Disease
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.353/expansion">End Stage Renal Disease</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.353</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Kidney Transplant Recipient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1029/expansion">Kidney Transplant Recipient</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1029</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Chronic Kidney Disease, Stage 5
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1002/expansion">Chronic Kidney Disease, Stage 5</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1002</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Kidney Transplant
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1012/expansion">Kidney Transplant</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1012</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Dialysis Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1013/expansion">Dialysis Services</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1013</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set ESRD Monthly Outpatient Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1014/expansion">ESRD Monthly Outpatient Services</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Device
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.118.12.1300/expansion">Frailty Device</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Diagnosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.113.12.1074/expansion">Frailty Diagnosis</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1074</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1088/expansion">Frailty Encounter</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Symptom
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.113.12.1075/expansion">Frailty Symptom</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Outpatient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1087/expansion">Outpatient</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1087</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Observation
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1086/expansion">Observation</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1086</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Nonacute Inpatient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1084/expansion">Nonacute Inpatient</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1084</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Advanced Illness
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.110.12.1082/expansion">Advanced Illness</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1082</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Acute Inpatient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1083/expansion">Acute Inpatient</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Dementia Medications
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.196.12.1510/expansion">Dementia Medications</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Palliative Care Diagnosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.1167/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Palliative Care Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1090/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090</tt>
    
  </td>
</tr>
 
<tr>
  
  
<th scope="row" class="row-header">Value Set</th>
  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Palliative Care Intervention
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.198.12.1135/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135</tt>
    
  </td>
</tr>
 
  
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: blood pressure
        <br/>
      
      <em>Code</em>: 85354-9
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Diastolic blood pressure
        <br/>
      
      <em>Code</em>: 8462-4
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Systolic blood pressure
        <br/>
      
      <em>Code</em>: 8480-6
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: 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>: 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>: Food insecurity risk [HVS]
        <br/>
      
      <em>Code</em>: 88124-3
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Discharge to home for hospice care (procedure)
        <br/>
      
      <em>Code</em>: 428361000124107
      <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>: Discharge to healthcare facility for hospice care (procedure)
        <br/>
      
      <em>Code</em>: 428371000124100
      <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>: Hospice care [Minimum Data Set]
        <br/>
      
      <em>Code</em>: 45755-6
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Yes (qualifier value)
        <br/>
      
      <em>Code</em>: 373066001
      <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>: Medical equipment used
        <br/>
      
      <em>Code</em>: 98181-1
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Housing status
        <br/>
      
      <em>Code</em>: 71802-3
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Lives in a nursing home (finding)
        <br/>
      
      <em>Code</em>: 160734000
      <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>: Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)
        <br/>
      
      <em>Code</em>: 71007-9
      <br/>
      <em>System</em>: <tt>http://loinc.org</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">None</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>: 
  
    <a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: use, type, url, extension, value
    <br/>
   
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, status, component
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/85354-9">LOINC 85354-9</a>: blood pressure
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, value, effective, component, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/45755-6">LOINC 45755-6</a>: Hospice care [Minimum Data Set]
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, value, effective, component, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/98181-1">LOINC 98181-1</a>: Medical equipment used
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, component, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.113.12.1075/expansion">Frailty Symptom</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, value, component, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/71802-3">LOINC 71802-3</a>: Housing status
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, component, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/71007-9">LOINC 71007-9</a>: Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, component, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/88124-3">LOINC 88124-3</a>: Food insecurity risk [HVS]
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1240/expansion">Annual Wellness Visit</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1025/expansion">Preventive Care Services - Established Office Visit, 18 and Up</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1023/expansion">Preventive Care Services-Initial Office Visit, 18 and Up</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1016/expansion">Home Healthcare Services</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1089/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1080/expansion">Telephone Visits</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status, hospitalization, hospitalization.dischargeDisposition
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion">Encounter Inpatient</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.1003/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1014/expansion">ESRD Monthly Outpatient Services</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1088/expansion">Frailty Encounter</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1087/expansion">Outpatient</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1086/expansion">Observation</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1010/expansion">Emergency Department Visit</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1084/expansion">Nonacute Inpatient</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1083/expansion">Acute Inpatient</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1090/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus, clinicalStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.104.12.1011/expansion">Essential Hypertension</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.1165/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.378/expansion">Pregnancy</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.353/expansion">End Stage Renal Disease</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1029/expansion">Kidney Transplant Recipient</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1002/expansion">Chronic Kidney Disease, Stage 5</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.113.12.1074/expansion">Frailty Diagnosis</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.110.12.1082/expansion">Advanced Illness</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, clinicalStatus, verificationStatus, recordedDate
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.1167/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Coverage
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/coverage.html">Coverage</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a>
    <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>: 
  
    <a href="http://hl7.org/fhir/R4/servicerequest.html">ServiceRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, authoredOn, status, intent, doNotPerform
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1108.15/expansion">Hospice care ambulatory</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1108.15/expansion">Hospice care ambulatory</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1012/expansion">Kidney Transplant</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.109.12.1013/expansion">Dialysis Services</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.198.12.1135/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: DeviceRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/devicerequest.html">DeviceRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, intent, authoredOn
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.118.12.1300/expansion">Frailty Device</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, status, doNotPerform, intent, dosageInstruction
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.196.12.1510/expansion">Dementia Medications</a>
    <br/> 
  
  
  
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication.reference, status, doNotPerform, intent, dosageInstruction
    <br/>
   
   
  </td>
</tr>
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <br/>
   
   
  </td>
</tr>
  
  
<tr>
  <th colspan="2" scope="row" class="row-header">Generated using version 0.5.1-cibuild 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://loinc.org"/>
          <code value="85354-9"/>
          <display value="blood pressure"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="8462-4"/>
          <display value="Diastolic blood pressure"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="8480-6"/>
          <display value="Systolic blood pressure"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://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-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://loinc.org"/>
          <code value="88124-3"/>
          <display value="Food insecurity risk [HVS]"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="428361000124107"/>
          <display value="Discharge to home for hospice care (procedure)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="428371000124100"/>
          <display
                   value="Discharge to healthcare facility for hospice care (procedure)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="45755-6"/>
          <display value="Hospice care [Minimum Data Set]"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="373066001"/>
          <display value="Yes (qualifier value)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="98181-1"/>
          <display value="Medical equipment used"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="71802-3"/>
          <display value="Housing status"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="160734000"/>
          <display value="Lives in a nursing home (finding)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="71007-9"/>
          <display
                   value="Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Sex":
  case
      when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
      when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
      else null
    end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Sex":
  SDE."SDE Sex""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SurveillanceDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Most recent physical home address"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Jurisdiction of residence (jurisdiction of the patient)
define "Most recent physical home address":
  First(
    Patient.address A
      where A.use = 'home'
        and A.type = 'physical'
      sort by end of period desc
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SurveillanceDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Postal Code of Residence"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Postal Code of Residence":
  "Most recent physical home address".postalCode"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Postal Code of Residence"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Postal Code of Residence":
  SurveillanceDataElements."Postal Code of Residence""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Diastolic Blood Pressure Reading"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Qualifying Diastolic Blood Pressure Reading":
	[Observation: "Blood pressure"] BloodPressure
    without ([Encounter: "Encounter Inpatient"]
      union [Encounter: "Emergency Department Evaluation and Management Visit"]) DisqualifyingEncounter
      such that Common.Latest(BloodPressure.effective) during day of DisqualifyingEncounter.period
    where BloodPressure.status in {'final', 'amended'}
      and Common.Latest(BloodPressure.effective) during "Measurement Period"
      and exists (
        BloodPressure.component DiastolicBP
          where DiastolicBP.code ~ "Diastolic blood pressure"
            and (DiastolicBP.value as Quantity).code.value = 'mm[Hg]'
      )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Systolic Blood Pressure Reading"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Qualifying Systolic Blood Pressure Reading":
	[Observation: "Blood pressure"] BloodPressure
    without ([Encounter: "Encounter Inpatient"]
      union [Encounter: "Emergency Department Evaluation and Management Visit"]) DisqualifyingEncounter
      such that Common.Latest(BloodPressure.effective) during day of DisqualifyingEncounter.period
    where BloodPressure.status in {'final', 'amended'}
      and Common.Latest(BloodPressure.effective) during "Measurement Period"
      and exists (
        BloodPressure.component SystolicBP
          where SystolicBP.code ~ "Systolic blood pressure"
            and (SystolicBP.value as Quantity).code.value = 'mm[Hg]'
      )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Blood Pressure Days"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Blood Pressure Days":
	("Qualifying Diastolic Blood Pressure Reading" DBPExam 
        return Common.Latest(DBPExam.effective)
    ) 
        intersect ("Qualifying Systolic Blood Pressure Reading" SBPExam 
            return Common.Latest(SBPExam.effective)
        )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Most Recent Blood Pressure Day"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Most Recent Blood Pressure Day":
	Max("Blood Pressure Days")"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Lowest Diastolic Reading on Most Recent Blood Pressure Day"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Lowest Diastolic Reading on Most Recent Blood Pressure Day":
	First(
        "Qualifying Diastolic Blood Pressure Reading" DBPReading
		    where Common.Earliest(DBPReading.effective) same day as "Most Recent Blood Pressure Day"
        return singleton from (
            DBPReading.component C
                where C.code ~ "Diastolic blood pressure"
                return C.value as FHIR.Quantity
        ) sort ascending
	)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Diastolic Blood Pressure Less Than 90"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Has Diastolic Blood Pressure Less Than 90":
    "Lowest Diastolic Reading on Most Recent Blood Pressure Day" < 90 'mm[Hg]'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Lowest Systolic Reading on Most Recent Blood Pressure Day"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Lowest Systolic Reading on Most Recent Blood Pressure Day":
	First(
        "Qualifying Systolic Blood Pressure Reading" SBPReading
		    where Common.Latest(SBPReading.effective) same day as "Most Recent Blood Pressure Day"
        return singleton from (
            SBPReading.component C
                where C.code ~ "Systolic blood pressure"
                return C.value as FHIR.Quantity
        ) sort ascending
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Systolic Blood Pressure Less Than 140"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Has Systolic Blood Pressure Less Than 140":
	"Lowest Systolic Reading on Most Recent Blood Pressure Day" < 140 'mm[Hg]'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Numerator":
	"Has Diastolic Blood Pressure Less Than 90"
	    and "Has Systolic Blood Pressure Less Than 140""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Essential Hypertension Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Essential Hypertension Diagnosis":
	[Condition: "Essential Hypertension"] Hypertension
    where Hypertension.verificationStatus ~ Common."confirmed"
      and Common."Prevalence Period"(Hypertension) overlaps Interval[start of "Measurement Period", start of "Measurement Period" + 6 months]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdultOutpatientEncountersFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Encounters"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Qualifying Encounters":
  (
	[Encounter: "Office Visit"]
      union [Encounter: "Annual Wellness Visit"]
      union [Encounter: "Preventive Care Services - Established Office Visit, 18 and Up"]
      union [Encounter: "Preventive Care Services - Initial Office Visit, 18 and Up"]
      union [Encounter: "Home Healthcare Services"]
      union [Encounter: "Online Assessments"]
      union [Encounter: "Telephone Visits"]
  ) ValidEncounters
    where FC.ToInterval(ValidEncounters.period) during "Measurement Period"
	  and ValidEncounters.status ~ 'finished' or ValidEncounters.status ~ 'in-progress'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Initial Population":
  AgeInYearsAt(date from end of "Measurement Period") in Interval[18, 85]
		and exists "Essential Hypertension Diagnosis"
		and exists AdultOutpatientEncounters."Qualifying Encounters""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Denominator":
	"Initial Population""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Payer":
  [Coverage: type in "Payer"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Payer":
  SDE."SDE Payer""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SurveillanceDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="State of Residence"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "State of Residence":
  "Most recent physical home address".state"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE State of Residence"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE State of Residence":
  SurveillanceDataElements."State of Residence""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SurveillanceDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Food Insecurity Risk Status"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Jurisdiction of care (jurisdiction of the most recent encounter)
// TODO:
//define "Most recent address of care":
// NOTE: Included in eICR
// Occupational Data for Health - Past or Present Job
// http://hl7.org/fhir/us/odh/StructureDefinition-odh-PastOrPresentJob.html
// Observation: LOINC#11341-5, valueCodeableConcept in https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.7186
// Social Determinants of Health (SDOH)
// http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/StructureDefinition-SDOHCC-ObservationScreeningResponse.html
// Food insecurity risk: http://build.fhir.org/ig/HL7/fhir-sdoh-clinicalcare/Observation-SDOHCC-ObservationResponseHungerVitalSignQuestion3Example.html
// Observation: LOINC#88124-3, valueCodeableConcept in https://loinc.org/LL2510-7/ (At risk, No risk)
define "Food Insecurity Risk Status":
  First(
    [Observation: "Food insecurity risk [HVS]"] O
      sort by issued desc
  ).value as CodeableConcept"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Food Insecurity Risk Status"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Food Insecurity Risk Status":
  SurveillanceDataElements."Food Insecurity Risk Status""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Ethnicity":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Ethnicity":
  SDE."SDE Ethnicity""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SurveillanceDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Age"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Age
define "Age":
  AgeInYearsAt(end of "Measurement Period")"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Age"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Age":
  SurveillanceDataElements."Age""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="HospiceFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Has Hospice"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Has Hospice":
  exists(
    (AC.QualifiedEncounters([Encounter: "Encounter Inpatient"])) HospiceInp
      where (HospiceInp.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"
        or HospiceInp.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)")
      and FC.ToInterval(HospiceInp.period) ends during "Measurement Period"
  ) or exists(
    (AC.QualifiedEncounters([Encounter: "Hospice Encounter"])) HospiceEnc
      where FC.ToInterval(HospiceEnc.period) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedObservations([Observation: "Hospice care [Minimum Data Set]"])) HospiceObs
      where HospiceObs.value ~ ToConcept("Yes (qualifier value)")
        and FC.ToInterval(HospiceObs.effective) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedServiceRequests([ServiceRequest: "Hospice Care Ambulatory"])) HospiceSR
      where FC.ToInterval(HospiceSR.authoredOn) during "Measurement Period"
  ) or exists(
    (AC.QualifiedProcedures([Procedure: "Hospice Care Ambulatory"])) HospiceProc
      where FC.ToInterval(HospiceProc.performed) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedConditions([Condition: "Hospice Diagnosis"])) HospiceCareDiagnosis
      where FC.ToPrevalenceInterval(HospiceCareDiagnosis) overlaps "Measurement Period"
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Pregnancy Or Renal Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Pregnancy Or Renal Diagnosis":
	( [Condition: "Pregnancy"]
		union [Condition: "End Stage Renal Disease"]
		union [Condition: "Kidney Transplant Recipient"]
		union [Condition: "Chronic Kidney Disease, Stage 5"] ) PregnancyESRDDiagnosis
      where PregnancyESRDDiagnosis.verificationStatus ~ Common."confirmed"
        and PregnancyESRDDiagnosis.recordedDate during "Measurement Period""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="End Stage Renal Disease Procedures"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "End Stage Renal Disease Procedures":
	([Procedure: "Kidney Transplant"]
		union [Procedure: "Dialysis Services"]) ESRDProcedure
		    where ESRDProcedure.status = 'completed'
                and end of Common."Normalize Interval"(ESRDProcedure.performed) on or before end of "Measurement Period""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="End Stage Renal Disease Encounter"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "End Stage Renal Disease Encounter":
	[Encounter: "ESRD Monthly Outpatient Services"] ESRDEncounter
		where ESRDEncounter.status in { 'arrived', 'triaged', 'in-progress', 'onleave', 'finished' }
		  and ESRDEncounter.period starts on or before end of "Measurement Period""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Has Criteria Indicating Frailty"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Has Criteria Indicating Frailty":
  exists(
    (AC.QualifiedDeviceRequests([DeviceRequest: "Frailty Device"])) FrailtyDeviceOrder
      where FrailtyDeviceOrder.authoredOn during day of "Measurement Period"
    ) 
    or exists(
        (AC.QualifiedObservations([Observation: "Medical Equipment Used"])) EquipmentUsed
          where EquipmentUsed.value in "Frailty Device"
            and FC.ToInterval(EquipmentUsed.effective) ends during day of "Measurement Period"
    )
    or exists(
      (AC.QualifiedConditions([Condition: "Frailty Diagnosis"])) FrailtyDiagnosis
        where FC.ToPrevalenceInterval(FrailtyDiagnosis) overlaps "Measurement Period"
    )
    or exists(
      (AC.QualifiedEncounters([Encounter: "Frailty Encounter"])) FrailtyEnc
        where FC.ToInterval(FrailtyEnc.period) overlaps "Measurement Period"
    )
    or exists(
      (AC.QualifiedObservations([Observation: "Frailty Symptom"])) FrailtySymptom
        where FC.ToInterval(FrailtySymptom.effective) overlaps "Measurement Period"
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Up To One Year Prior Including Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Up To One Year Prior Including Measurement Period":
  Interval[start of "Measurement Period" - 1 year, end of "Measurement Period"]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="33"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Outpatient Encounters With Advanced Illness"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Outpatient Encounters With Advanced Illness":
  ((AC.QualifiedEncounters([Encounter: "Outpatient"]))
    union (AC.QualifiedEncounters([Encounter: "Observation"]))
    union (AC.QualifiedEncounters([Encounter: "Emergency Department Visit"]))
    union (AC.QualifiedEncounters([Encounter: "Nonacute Inpatient"]))) OutpatientEnc
      with (AC.QualifiedConditions([Condition: "Advanced Illness"])) AdvanIll
        such that FC.ToPrevalenceInterval(AdvanIll) overlaps "Measurement Period"
      and FC.ToInterval(OutpatientEnc.period) overlaps "Up To One Year Prior Including Measurement Period""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Has Two Outpatient Encounters With Advanced Illness on Different Dates of Service"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Has Two Outpatient Encounters With Advanced Illness on Different Dates of Service":
  from
    "Outpatient Encounters With Advanced Illness" OutpatientEncounter1,
    "Outpatient Encounters With Advanced Illness" OutpatientEncounter2
  where OutpatientEncounter2.period ends 1 day or more after day of end of OutpatientEncounter1.period
  return OutpatientEncounter1"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Has Inpatient Encounter With Advanced Illness"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Has Inpatient Encounter With Advanced Illness":  
  (AC.QualifiedEncounters([Encounter: "Acute Inpatient"])) InpatientEnc
    with (AC.QualifiedConditions([Condition: "Advanced Illness"])) AdvanIll
      such that FC.ToPrevalenceInterval(AdvanIll) overlaps InpatientEnc.period
        and FC.ToInterval(InpatientEnc.period) overlaps "Up To One Year Prior Including Measurement Period""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Has Dementia Medications In Year Before or During Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Has Dementia Medications In Year Before or During Measurement Period":
  (AC.QualifiedMedicationRequests([MedicationRequest: "Dementia Medications"])) DementiaMed
    where exists(
      DementiaMed.dosageInstruction dosage
      where exists(
        FC.ToTimingInterval(dosage.timing)) timing
        where timing overlaps "Up To One Year Prior Including Measurement Period")"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty":
  (
    AgeInYearsAt(date from end of "Measurement Period") in Interval[66, 80]
      and "Has Criteria Indicating Frailty"
      and (
        exists("Has Two Outpatient Encounters With Advanced Illness on Different Dates of Service")
        or exists("Has Inpatient Encounter With Advanced Illness")
        or exists("Has Dementia Medications In Year Before or During Measurement Period")
      )
  ) 
  or (
    AgeInYearsAt(date from end of "Measurement Period") >= 81
      and "Has Criteria Indicating Frailty"
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="38"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Lives In A Nursing Home"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Lives In A Nursing Home":
  Last(
    (AC.QualifiedObservations([Observation: "Housing Status"])) HousingStatus
      where FC.ToInterval(HousingStatus.effective) ends on or before end of "Measurement Period"
        and HousingStatus.value ~ ToConcept("Lives In A Nursing Home (finding)")
    sort by issued ascending
  ) is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AdvancedIllnessandFrailtyExclusionECQMFHIR4"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Is Age 66 or Older Living Long Term in a Nursing Home"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Is Age 66 or Older Living Long Term in a Nursing Home":
  AgeInYearsAt(date from end of "Measurement Period") >= 66
    and "Lives In A Nursing Home""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="40"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="PalliativeCareFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Palliative Care in the Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Palliative Care in the Measurement Period":
  exists(
    (AC.QualifiedObservations([Observation: "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"])) PalliativeObservation
      where FC.ToInterval(PalliativeObservation.effective) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedConditions([Condition: "Palliative Care Diagnosis"])) PalliativeDiagnosis
      where FC.ToPrevalenceInterval(PalliativeDiagnosis) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedEncounters([Encounter: "Palliative Care Encounter"])) PalliativeEncounter
      where FC.ToInterval(PalliativeEncounter.period) overlaps "Measurement Period"
  ) or exists(
    (AC.QualifiedProcedures([Procedure: "Palliative Care Intervention"])) PalliativeProcedure
      where FC.ToInterval(PalliativeProcedure.performed) overlaps "Measurement Period"
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="41"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusion"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "Denominator Exclusion":
  Hospice."Has Hospice"
    or exists ("Pregnancy Or Renal Diagnosis")
    or exists ("End Stage Renal Disease Procedures")
    or exists ("End Stage Renal Disease Encounter")
    or FrailtyLTI."Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"
    or FrailtyLTI."Is Age 66 or Older Living Long Term in a Nursing Home"
    or PalliativeCare."Palliative Care in the Measurement Period""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="42"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElementsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Race":
  (flatten (
      Patient.extension Extension
        where Extension.url = 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race'
          return Extension.extension
    )) E
      where E.url = 'ombCategory'
        or E.url = 'detailed'
      return E.value as Coding"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="43"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ControllingHighBloodPressureFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define "SDE Race":
  SDE."SDE Race""/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="44"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value AdministrativeGender): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="45"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value AddressUse): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="46"/>
        </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 AddressType): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="47"/>
        </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="define function ToInterval(period FHIR.Period):
    if period is null then
        null
    else
        if period."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="48"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToQuantity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToQuantity(quantity FHIR.Quantity):
    case
        when quantity is null then null
        when quantity.value is null then null
        when quantity.comparator is not null then
            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
        else
            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
    end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="49"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCalendarUnit"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToCalendarUnit(unit System.String):
    case unit
        when 'ms' then 'millisecond'
        when 's' then 'second'
        when 'min' then 'minute'
        when 'h' then 'hour'
        when 'd' then 'day'
        when 'wk' then 'week'
        when 'mo' then 'month'
        when 'a' then 'year'
        else unit
    end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="50"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value ObservationStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="51"/>
        </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="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="52"/>
        </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="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="53"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="MATGlobalCommonFunctionsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Prevalence Period"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
Returns an interval representing the period during which the condition was prevalent (i.e. onset to abatement)
If the condition is "active", then abatement being unknown
would indicate the condition is ongoing, and the ending boundary of the prevalence
period is inclusive, otherwise, the abatement is considered unknown and the ending boundary
of the prevalence period is exclusive.
Note that when using this function it should be noted that many clinical systems
do not actually capture abatement, so care should be taken when using this function
to meet clinical intent.
*/
define function "Prevalence Period"(condition Condition ):
  if condition.clinicalStatus ~ "active"
    or condition.clinicalStatus ~ "recurrence"
    or condition.clinicalStatus ~ "relapse" then
    Interval[start of "Normalize Interval"(condition.onset), end of "Normalize Abatement"(condition)]
  else
    Interval[start of "Normalize Interval"(condition.onset), end of "Normalize Abatement"(condition))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="54"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="MATGlobalCommonFunctionsFHIR4"/>
        </extension>
        <extension url="name">
          <valueString value="Normalize Abatement"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/**
* Returns an interval representing the abatement of the given condition, if an
abatement element is present, null otherwise.
This function uses the semantics of Normalize Interval to interpret the abatement
element.
*/
define function "Normalize Abatement"(condition Condition ):
  if condition.abatement is FHIR.dateTime then
	  Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]
	else if condition.abatement is FHIR.Period then
	  FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)
	else if condition.abatement is FHIR.string then
  Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
	else if condition.abatement is FHIR.Age then
		Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),
			FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)
	else if condition.abatement is FHIR.Range then
	  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),
		  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)
	else if condition.abatement is FHIR.boolean then
	  Interval[end of "Normalize Interval"(condition.onset), condition.recordedDate)
	else null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="55"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToDateTime(value dateTime): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="56"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDate"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToDate(value date): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="57"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ToInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.
The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.
NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define function ToInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
  case
	  when choice is FHIR.dateTime then
    	Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
		when choice is FHIR.Period then
  		FHIRHelpers.ToInterval(choice as FHIR.Period)
		when choice is FHIR.instant then
			Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
		when choice is FHIR.Age then
		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
		when choice is FHIR.Range then
		  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
			  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
		when choice is FHIR.Timing then
			//Interval[FHIRHelpers.ToDateTime(choice as FHIR.timing), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
		  Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute a single interval from a Timing type')
    when choice is FHIR.string then
      Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
		else
			null as Interval<DateTime>
	end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="58"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToDateTime(value instant): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="59"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value EncounterStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="60"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value uri): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="61"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AlphoraCommon"/>
        </extension>
        <extension url="name">
          <valueString value="QualifiedEncounters"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/* Common Resource Qualifications and Negations */
define function QualifiedEncounters(value List<FHIR.Encounter>):
  value Encounter
    where (
      //planned | arrived | triaged | in-progress | onleave | finished | cancelled | entered-in-error | unknown
      Encounter.status ~ 'arrived'
      or Encounter.status ~ 'in-progress'
      or Encounter.status ~ 'finished'
      or Encounter.status ~ 'onleave'
      or Encounter.status ~ 'triaged'
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="62"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AlphoraCommon"/>
        </extension>
        <extension url="name">
          <valueString value="QualifiedObservations"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function QualifiedObservations(value List<FHIR.Observation>):
  value Observation
		where (
      //registered | preliminary | final | amended | corrected | cancelled | entered-in-error | unknown
      Observation.status ~ 'final'
			or Observation.status ~ 'amended'
			or Observation.status ~ 'corrected'
		)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="63"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AlphoraCommon"/>
        </extension>
        <extension url="name">
          <valueString value="QualifiedServiceRequests"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function QualifiedServiceRequests(value List<FHIR.ServiceRequest>):
  value ServiceRequest
    where (
      //draft | active | on-hold | revoked | completed | entered-in-error | unknown
      ServiceRequest.status ~ 'active'
      or ServiceRequest.status ~ 'completed'
      and ServiceRequest.intent ~ 'order'
    )
    and (
      ServiceRequest.doNotPerform is null
      or ServiceRequest.doNotPerform = false
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="64"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value ServiceRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="65"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value ServiceRequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="66"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToBoolean"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToBoolean(value boolean): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="67"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AlphoraCommon"/>
        </extension>
        <extension url="name">
          <valueString value="QualifiedProcedures"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function QualifiedProcedures(value List<FHIR.Procedure>):
  value Procedure
    where (
      //preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown
      Procedure.status ~ 'completed'
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="68"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value ProcedureStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="69"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AlphoraCommon"/>
        </extension>
        <extension url="name">
          <valueString value="QualifiedConditions"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function QualifiedConditions(value List<FHIR.Condition>):
  value Condition
    where (
      FHIRHelpers.ToConcept(Condition.clinicalStatus) ~ FC."active"
    )
    and (
      FHIRHelpers.ToConcept(Condition.verificationStatus) ~ FC."confirmed"
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="70"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ToPrevalenceInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized prevalence period of a given Condition resource.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition.
*/
define function ToPrevalenceInterval(condition Condition):
if condition.clinicalStatus ~ "active"
  or condition.clinicalStatus ~ "recurrence"
  or condition.clinicalStatus ~ "relapse" then
  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]
else
  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="71"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ToAbatementInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized Abatement of a given Condition resource.
@comment: NOTE: Due to the complexity of determining an interval from a String, this function will throw
a run-time exception if used with a Condition instance that has a String as the abatement value.
*/
define function ToAbatementInterval(condition Condition):
	if condition.abatement is FHIR.dateTime then
	  Interval[FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime), FHIRHelpers.ToDateTime(condition.abatement as FHIR.dateTime)]
	else if condition.abatement is FHIR.Period then
	  FHIRHelpers.ToInterval(condition.abatement as FHIR.Period)
	else if condition.abatement is FHIR.string then
    Message(null as Interval<DateTime>, true, '1', 'Error', 'Cannot compute an interval from a String value')
	else if condition.abatement is FHIR.Age then
		Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age),
			FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(condition.abatement as FHIR.Age) + 1 year)
	else if condition.abatement is FHIR.Range then
	  Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).low),
		  FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((condition.abatement as FHIR.Range).high) + 1 year)
	else if condition.abatement is FHIR.boolean then
	  Interval[end of ToInterval(condition.onset), condition.recordedDate)
	else null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="72"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AlphoraCommon"/>
        </extension>
        <extension url="name">
          <valueString value="QualifiedDeviceRequests"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function QualifiedDeviceRequests(value List<FHIR.DeviceRequest>):
  value DeviceRequest
    where (
      //draft | active | on-hold | revoked | completed | entered-in-error | unknown
      DeviceRequest.status ~ 'completed'
      or DeviceRequest.status ~ 'active'
      and DeviceRequest.intent ~ 'order'
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="73"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value DeviceRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="74"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value RequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="75"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value string): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="76"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AlphoraCommon"/>
        </extension>
        <extension url="name">
          <valueString value="QualifiedMedicationRequests"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function QualifiedMedicationRequests(value List<FHIR.MedicationRequest>):
  value MedicationRequest
    where (
      //active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown
      (MedicationRequest.status ~ 'active'
        or MedicationRequest.status ~ 'completed'
      )
        and (
          MedicationRequest.doNotPerform is null
          or MedicationRequest.doNotPerform = false
        )
        and MedicationRequest.intent ~ 'order'
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="77"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value MedicationRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="78"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value MedicationRequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="79"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ToTimingInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToTimingInterval(timing FHIR.Timing):
  convert (
    NullToEmptyInterval(ToIntervalFromList(timing.event))
    union NullToEmptyInterval({ToInterval(timing.repeat.bounds as FHIR.Period)})
  ) to List<Interval<DateTime>> except { null }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="80"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="NullToEmptyInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function NullToEmptyInterval(value List<Interval<DateTime>>):
  if value is not null then value else { }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="81"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ToIntervalFromList"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToIntervalFromList(value List<FHIR.dateTime>):
  value v
    return ToInterval(v)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="82"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4|2.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SurveillanceDataElements"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4|1.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Common"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4|6.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AdultOutpatientEncounters"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AdultOutpatientEncountersFHIR4|2.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FC"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRCommon|1.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Hospice"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/HospiceFHIR4|2.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AC"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AlphoraCommon"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FrailtyLTI"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AdvancedIllnessandFrailtyExclusionECQMFHIR4|5.12.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library PalliativeCare"/>
        <resource
                  value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/PalliativeCareFHIR"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system LOINC"/>
        <resource value="http://loinc.org"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionVerificationStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
      </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 SNOMEDCT"/>
        <resource value="http://snomed.info/sct"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Encounter Inpatient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Emergency Department Evaluation and Management Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Essential Hypertension"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.104.12.1011"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Office Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Annual Wellness Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Preventive Care Services - Established Office Visit, 18 and Up"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Preventive Care Services - Initial Office Visit, 18 and Up"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Home Healthcare Services"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Online Assessments"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Telephone Visits"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Payer"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Encounter"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Care Ambulatory"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Diagnosis"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Pregnancy"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set End Stage Renal Disease"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.353"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Kidney Transplant Recipient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1029"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Chronic Kidney Disease, Stage 5"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1002"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Kidney Transplant"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1012"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Dialysis Services"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1013"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set ESRD Monthly Outpatient Services"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Device"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Diagnosis"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1074"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Encounter"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Symptom"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Outpatient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1087"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Observation"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1086"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Nonacute Inpatient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1084"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Advanced Illness"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1082"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Acute Inpatient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Dementia Medications"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Palliative Care Diagnosis"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Palliative Care Encounter"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Palliative Care Intervention"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="SDE Postal Code of Residence"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE State of Residence"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="SDE Food Insecurity Risk Status"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="CodeableConcept"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="SDE Age"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="integer"/>
      </parameter>
      <parameter>
        <name value="Denominator Exclusion"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Coding"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
        <mustSupport value="use"/>
        <mustSupport value="type"/>
        <mustSupport value="url"/>
        <mustSupport value="extension"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="component"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="85354-9"/>
            <display value="blood pressure"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="value"/>
        <mustSupport value="effective"/>
        <mustSupport value="component"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="45755-6"/>
            <display value="Hospice care [Minimum Data Set]"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="value"/>
        <mustSupport value="effective"/>
        <mustSupport value="component"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="98181-1"/>
            <display value="Medical equipment used"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="component"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <mustSupport value="component"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="71802-3"/>
            <display value="Housing status"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="component"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="71007-9"/>
            <display
                     value="Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="component"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="88124-3"/>
            <display value="Food insecurity risk [HVS]"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <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="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1087"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1086"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1084"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.104.12.1011"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.353"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1029"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1002"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1074"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1082"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="recordedDate"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="ServiceRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
        <mustSupport value="code"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="doNotPerform"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.15"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1012"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1013"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="DeviceRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/DeviceRequest"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="status"/>
        <mustSupport value="doNotPerform"/>
        <mustSupport value="intent"/>
        <mustSupport value="dosageInstruction"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication.reference"/>
        <mustSupport value="status"/>
        <mustSupport value="doNotPerform"/>
        <mustSupport value="intent"/>
        <mustSupport value="dosageInstruction"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem" id="cqf-tooling">
    <valueReference>
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <url
       value="http://fhir.org/guides/cqf/aphl/chronic-ds/Measure/ControllingHighBloodPressureFHIR"/>
  <identifier>
    <use value="usual"/>
    <system value="short-name"/>
    <value value="CMS165v12"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <system value="publisher"/>
    <value value="236"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <system value="http://hl7.org/fhir/cqi/ecqm/Measure/Identifier/guid"/>
    <value value="abdc37cc-bac6-4156-9b91-d1be2c8b7268"/>
  </identifier>
  <version value="0.1.0"/>
  <name value="ControllingHighBloodPressureFHIR"/>
  <title value="Controlling High Blood Pressure"/>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2025-09-25T07:40:03-06:00"/>
  <publisher value="Clinical Quality Framework"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://cqframework.org"/>
    </telecom>
  </contact>
  <description
               value="Percentage of patients 18-85 years of age who had a diagnosis of essential hypertension starting before and continuing into, or starting during the first six months of the measurement period, and whose most recent blood pressure was adequately controlled (<140/90 mmHg) during the measurement period"/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
    </coding>
  </jurisdiction>
  <purpose value="Unknown"/>
  <copyright
             value="This Physician Performance Measure (Measure) and related data specifications are owned and were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (e.g., use by healthcare providers in connection with their practices) without obtaining approval from NCQA. Commercial use is defined as the sale, licensing, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain. All commercial uses or requests for modification must be approved by NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2022 National Committee for Quality Assurance. All Rights Reserved.
Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third-party codes contained in the specifications.
CPT(R) codes, descriptions and other data are copyright 2022. American Medical Association. All rights reserved. CPT is a trademark of the American Medical Association. No fee schedules, basic units, relative values or related listings are included in CPT. The AMA assumes no liability for the data contained herein. Applicable FARS/DFARS restrictions apply to government use.
LOINC(R) copyright 2004-2022 Regenstrief Institute, Inc. 
This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation. 
ICD-10 copyright 2022 World Health Organization. All Rights Reserved."/>
  <effectivePeriod>
    <start value="2024-01-01"/>
    <end value="2024-12-31"/>
  </effectivePeriod>
  <library
           value="http://fhir.org/guides/cqf/aphl/chronic-ds/Library/ControllingHighBloodPressureFHIR"/>
  <disclaimer
              value="The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. 
Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM]."/>
  <scoring>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
      <code value="proportion"/>
      <display value="Proportion"/>
    </coding>
  </scoring>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
      <code value="outcome"/>
      <display value="intermediateOutcome"/>
    </coding>
  </type>
  <rationale
             value="High blood pressure (HBP), also known as hypertension, is when the pressure in blood vessels is higher than normal (Centers for Disease Control and Prevention [CDC], 2021). The causes of hypertension are multiple and multifaceted and can be based on genetic predisposition, environmental risk factors, being overweight and obese, sodium intake, potassium intake, physical activity, and alcohol use. High blood pressure is common; according to the American Heart Association, between 2013-2016, approximately 121.5 million US adults >= 20 years of age had HBP and the prevalence of hypertension among US adults 65 and older was 77.0 percent (Virani et al., 2021). In an analysis of adults with hypertension in NHANES, the estimated age-adjusted proportion with controlled BP increased from 31.8 percent in 1999 to 53.8 percent in 2014. However, that proportion declined to 43.7 percent in 2017 to 2018 (Tsao et al., 2022).
HBP, known as the “silent killer,” increases risks of heart disease and stroke which are two of the leading causes of death in the US; a person who has HBP is four times more likely to die from a stroke and three times more likely to die from heart disease (CDC, 2012). The National Center for Health Statistics reported that in 2020 there were over 670,000 deaths with HBP as a primary or contributing cause (CDC, 2022). Between 2009 and 2019 the number of deaths due to HBP rose by 65.3 percent (Tsao et al., 2022). Managing and treating HBP would reduce cardiovascular disease mortality for males and females by 30.4 percent and 38.0 percent, respectively (Patel et al., 2015). Age-adjusted death rates attributable to HBP in 2019 were more than twice as high in non-Hispanic Black males (56.7 percent) when compared to rates for non-Hispanic White males (25.7 percent) (Tsao et al., 2022).
HBP costs the U.S. approximately 131 billion dollars each year, averaged over 12 years from 2003 to 2014 (Kirkland et al., 2018). A study on cost-effectiveness on treating hypertension found that controlling HBP in patients with cardiovascular disease and systolic blood pressures (SBP) of >= 160 mmHg could be effective and cost-saving (Moran, 2015).
Many studies have shown that controlling high blood pressure reduces cardiovascular events and mortality. The Systolic Blood Pressure Intervention Trial (SPRINT) investigated the impact of obtaining a SBP goal of <120 mmHg compared to a SBP goal of <140 mmHg among patients 50 and older with established cardiovascular disease and found that the patients with the former goal had reduced cardiovascular events and mortality (SPRINT Research Group et al., 2015). 
Controlling HBP will significantly reduce the risks of cardiovascular disease mortality and lead to better health outcomes like reduction of heart attacks, stroke, and kidney disease (James et al., 2014). Thus, the relationship between the measure (control of hypertension) and the long-term clinical outcomes listed is well established."/>
  <clinicalRecommendationStatement
                                   value="U.S. Preventive Services Task Force (USPSTF) (2021):
- The USPSTF recommends screening for hypertension in adults 18 years or older with office blood pressure measurement (OBPM). The USPSTF recommends obtaining blood pressure measurements outside of the clinical setting for diagnostic confirmation before starting treatment. This is a grade A recommendation.  
American College of Cardiology/American Heart Association (2017):
- For adults with confirmed hypertension and known CVD or 10-year ASCVD event risk of 10 percent or higher, a blood pressure target of less than 130/80 mmHg is recommended (Level of evidence: B-R (for systolic blood pressures), Level of evidence: C-EO (for diastolic blood pressure)) 
- For adults with confirmed hypertension, without additional markers of increased CVD risk, a blood pressure target of less than 130/80 mmHg may be reasonable (Note: clinical trial evidence is strongest for a target blood pressure of 140/90 mmHg in this population. However, observational studies suggest that these individuals often have a high lifetime risk and would benefit from blood pressure control earlier in life) (Level of evidence: B-NR (for systolic blood pressure), Level of evidence: C-EO (for diastolic blood pressure)).
American College of Physicians and the American Academy of Family Physicians (2017):   
- Initiate or intensify pharmacologic treatment in some adults aged 60 years or older at high cardiovascular risk, based on individualized assessment, to achieve a target systolic blood pressure of less than 140 mmHg (Grade: weak recommendation, Quality of evidence: low) 
- Initiate or intensify pharmacologic treatment in adults aged 60 years or older with a history of stroke or transient ischemic attack to achieve a target systolic blood pressure of less than 140 mmHg to reduce the risk of recurrent stroke (Grade: weak recommendation, Quality of evidence: moderate) 
American Diabetes Association (2021): 
- For individuals with diabetes and hypertension at higher cardiovascular risk (existing atherosclerotic cardiovascular disease or 10-year atherosclerotic cardiovascular disease risk >=15 percent), a blood pressure target of <130/80 mmHg may be appropriate, if it can be safely attained (Level of evidence: C)
- For individuals with diabetes and hypertension at lower risk for cardiovascular disease (10-year atherosclerotic cardiovascular disease risk <15 percent), treat to a blood pressure target of <140/90 mmHg (Level of evidence: A)"/>
  <improvementNotation>
    <coding>
      <system
              value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
      <code value="decrease"/>
      <display value="Lower score indicates better quality"/>
    </coding>
  </improvementNotation>
  <guidance
            value="In reference to the numerator element, only blood pressure readings performed by a clinician or an automated blood pressure monitor or device are acceptable for numerator compliance with this measure. This includes blood pressures taken in person by a clinician and blood pressures measured remotely by electronic monitoring devices capable of transmitting the blood pressure data to the clinician. Blood pressure readings taken by an automated blood pressure monitor or device and conveyed by the patient to the clinician are also acceptable. It is the clinician’s responsibility and discretion to confirm the automated blood pressure monitor or device used to obtain the blood pressure is considered acceptable and reliable and whether the blood pressure reading is considered accurate before documenting it in the patient’s medical record.
Do not include BP readings taken during an acute inpatient stay or an ED visit.
If no blood pressure is recorded during the measurement period, the patient's blood pressure is assumed 'not controlled'.
If there are multiple blood pressure readings on the same day, use the lowest systolic and the lowest diastolic reading as the most recent blood pressure reading. Ranges and thresholds do not meet criteria for this measure. A distinct numeric result for both the systolic and diastolic BP reading is required for numerator compliance.
This eCQM is a patient-based measure.
This version of the eCQM uses QDM version 5.6. Please refer to the eCQI resource center (https://ecqi.healthit.gov/qdm) for more information on the QDM."/>
  <group>
    <population id="F348D767-1BDE-41AB-884D-5F0E19093980">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Patients 18-85 years of age who had a visit during the measurement period and diagnosis of essential hypertension"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="3E0D40B3-64FC-4998-B371-34978D033116">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description
                   value="Patients 18-85 years of age who had a visit during the measurement period and diagnosis of essential hypertension"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="24803F44-C643-45C7-A2A5-4C58BD540579">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description
                   value="Patients whose most recent blood pressure is adequately controlled (systolic blood pressure < 140 mmHg and diastolic blood pressure < 90 mmHg) during the measurement period"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <population id="95E1480E-8B61-4777-865D-B2A1D6525E1A">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exclusion"/>
          <display value="Denominator Exclusions"/>
        </coding>
      </code>
      <description
                   value="Patients with ESRD or dialysis or renal transplant or pregnancy or in hospice or 66+ in nursing care or 66-80 with frailty and advanced illness or 81+ with frailty or receiving palliative care"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exclusion"/>
      </criteria>
    </population>
    <stratifier id="stratifier-ethnicity">
      <code>
        <coding>
          <system value="http://loinc.org"/>
          <code value="54133-4"/>
          <display value="Ethnicity"/>
        </coding>
      </code>
      <description value="Ethnicity (CDC Value Set)"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE Ethnicity"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-payer">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/coverage-class"/>
          <code value="plan"/>
          <display value="SDE Payer"/>
        </coding>
      </code>
      <description value="Payer"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE Payer"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-race">
      <code>
        <coding>
          <system value="http://loinc.org"/>
          <code value="32624-9"/>
          <display value="SDE Race"/>
        </coding>
      </code>
      <description value="Race (CDC Value Set)"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE Race"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-sex">
      <code>
        <coding>
          <system value="http://loinc.org"/>
          <code value="72143-1"/>
          <display value="Sex [HL7.v3]"/>
        </coding>
      </code>
      <description value="Administrative sex"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE Sex"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-age">
      <code>
        <coding>
          <system value="http://loinc.org"/>
          <code value="30525-0"/>
          <display value="Age"/>
        </coding>
      </code>
      <description value="Age"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE Age"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-state-of-residence">
      <code>
        <coding>
          <system value="http://loinc.org"/>
          <code value="52830-7"/>
          <display value="State, district or territory federal abbreviation"/>
        </coding>
      </code>
      <description value="State of residence"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE State of Residence"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-postal-code-of-residence">
      <code>
        <coding>
          <system value="http://loinc.org"/>
          <code value="45401-7"/>
          <display value="Postal code"/>
        </coding>
      </code>
      <description value="Postal code of residence"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE Postal Code of Residence"/>
      </criteria>
    </stratifier>
    <stratifier id="stratifier-food-insecurity-risk-status">
      <code>
        <coding>
          <system value="http://loinc.org"/>
          <code value="88124-3"/>
          <display value="Food insecurity risk [HVS]"/>
        </coding>
      </code>
      <description value="Food insecurity risk status"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="SDE Food Insecurity Risk Status"/>
      </criteria>
    </stratifier>
  </group>
  <supplementalData id="sde-ethnicity">
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="54133-4"/>
        <display value="Ethnicity"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Ethnicity (CDC Value Set)"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-payer">
    <code>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/coverage-class"/>
        <code value="plan"/>
        <display value="SDE Payer"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Payer"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="32624-9"/>
        <display value="SDE Race"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Race (CDC Value Set)"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-sex">
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="72143-1"/>
        <display value="Sex [HL7.v3]"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Administrative sex"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-age">
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="30525-0"/>
        <display value="Age"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Age"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Age"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-state-of-residence">
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="52830-7"/>
        <display value="State, district or territory federal abbreviation"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="State of residence"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE State of Residence"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-postal-code-of-residence">
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="45401-7"/>
        <display value="Postal code"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Postal code of residence"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Postal Code of Residence"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-food-insecurity-risk-status">
    <code>
      <coding>
        <system value="http://loinc.org"/>
        <code value="88124-3"/>
        <display value="Food insecurity risk [HVS]"/>
      </coding>
    </code>
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="Food insecurity risk status"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Food Insecurity Risk Status"/>
    </criteria>
  </supplementalData>
</Measure>