Draft dQM CMS Content Implementation Guide
2025.1.0 - CI Build

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

## : Heart Failure (HF): Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) or Angiotensin Receptor-Neprilysin Inhibitor (ARNI) Therapy for Left Ventricular Systolic Dysfunction (LVSD)FHIR - XML Representation

Active as of 2026-01-16

Raw xml | Download

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

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

    </tr>

    <tr>

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

    <td class="content-container">Heart Failure (HF): Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) or Angiotensin Receptor-Neprilysin Inhibitor (ARNI) Therapy for Left Ventricular Systolic Dysfunction (LVSD)FHIR
    </td>

    </tr>

    <tr>

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

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

    </tr>

    <tr>

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

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

    </tr>

    <tr>

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

    <td class="content-container">urn:uuid:86136d6c-dbe1-4b7f-89f3-406cb90f08d5</td>

    </tr>

    <tr>

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

    <td class="content-container">urn:uuid:a0aa7f51-9882-4ceb-b4e5-bb94669b62ca</td>

    </tr>

    <tr>

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

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

    </tr>

    <tr>

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

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

    </tr>

    <tr>

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

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

    </tr>

    <tr>

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

    <td class="content-container">American Heart Association</td>

    </tr>

    <tr>

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

    <td class="content-container">American Heart Association</td>

    </tr>

    <tr>

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

    <td class="content-container">American Medical Association (AMA)</td>

    </tr>

    <tr>

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

    <td class="content-container"><div><p>Percentage of patients aged 18 years and older with a diagnosis of heart failure (HF) with a current or prior left ventricular ejection fraction (LVEF) &lt;=40% who were prescribed or already taking ACE inhibitor or ARB or ARNI therapy during the measurement period</p>
    </div></td>

    </tr>

    <tr>

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

    <td class="content-container"><div><p>Copyright 2025 American College of Cardiology and American Heart Association. All Rights Reserved.</p>
    </div></td>

    </tr>

    <tr>

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

    <td class="content-container"><div><p>The Measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.</p>
    <p>The Measure, while copyrighted, can be reproduced and distributed, without modification, for noncommercial purposes, e.g., use by health care providers in connection with their practices. Commercial use is defined as the sale, license, 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.</p>
    <p>Commercial uses of the Measure require a license agreement between the user and the American College of Cardiology (ACC) or the American Heart Association (AHA). Neither the ACC, nor AHA, nor their members shall be responsible for any use of the Measure.</p>
    <p>ACC and AHA encourage use of the Measure by other health care professionals, where appropriate. THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.</p>
    <p>Limited proprietary coding is contained in the Measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. The ACC and AHA and their members disclaim all liability for use or accuracy of any Current Procedural Terminology (CPT[R]) or other coding contained in the specifications.</p>
    <p>CPT(R) contained in the Measure specifications is copyright 2004-20234 American Medical Association. LOINC(R) is copyright 2004-20234 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-20234 International Health Terminology Standards Development Organisation. ICD-10 is copyright 20234 World Health Organization. All Rights Reserved.</p>
    <p>The American Medical Association's and the PCPI(R) Foundation's significant past efforts and contributions to the performance measure are gratefully acknowledged. Due to technical limitations, registered trademarks are indicated by (R) or [R].</p>
    </div></td>

    </tr>

    <tr>

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

    <td class="content-container"><div><p>Use of ACE inhibitor, ARB, or ARNI therapy has been associated with improved outcomes in patients with reduced LVEF. Long-term therapy with ARBs have also been shown to reduce morbidity and mortality, especially in ACE inhibitor--intolerant patients. More recently, ARNI therapy has also been shown to more significantly improve outcomes, such that the newest guidelines recommend replacement of ACE inhibitors or ARBs with ARNI therapy in eligible patients. However, despite the benefits of these drugs, use of ACE inhibitor, ARB, or ARNI remains suboptimal.</p>
    </div></td>

    </tr>

    <tr>

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

    <td class="content-container"><div><p>In patients with Heart Failure with Reduced Ejection Fraction (HFrEF) and New York Heart Association (NYHA) class II to III symptoms, the use of ARNI is recommended to reduce morbidity and mortality (Class I, Level of Evidence A) (Heidenreich et al., 2022). In patients with previous or current symptoms of chronic HFrEF, the use of angiotension-converting enzyme inhibitors (ACEi) is beneficial to reduce morbidity and mortality when the use of ARNI is not feasible (Class I, Level of Evidence A) (Heidenreich et al., 2022). In patients with previous or current symptoms of chronic HFrEF who are intolerant to ACEi because of cough or angioedema and when the use of ARNI is not feasible, the use of ARB is recommended to reduce morbidity and mortality (Class I, Level of Evidence A) (Heidenreich et al., 2022). In patients with chronic symptomatic HFrEF NYHA class II or III who tolerate an ACEi or ARB, replacement by an ARNI is recommended to further reduce morbidity and mortality (Class I, Level of Evidence B-R) (Heidenreich et al., 2022). ARNI should not be administered concomitantly with ACEi or within 36 hours of the last dose of an ACEi (Class II: Harm, Level of Evidence B-R) (Heidenreich et al., 2022). ARNI should not be administered to patients with any history of angioedema (Class III: Harm, Level of Evidence C-LD) (Heidenreich et al., 2022). ACEi should not be administered to patients with any history of angioedema (Class III: Harm, Level of Evidence C-LD) (Heidenreich et al., 2022).</p>
    <p>Drugs Commonly Used for Stage C HFrEF (abbreviated to align with focus of measure to include only ACE inhibitors, ARB and ARNI therapy)</p>
    <table class="grid">
    <thead>
    <tr>
    <th>Drug</th>
    <th>Initial Daily Dose(s)</th>
    <th>Target Dose(s)</th>
    <th>Mean Doses Achieved in Clinical Trials</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td><em>ACEi</em></td>
    <td>&lt;br /&gt;</td>
    <td>&lt;br /&gt;</td>
    <td>&lt;br /&gt;</td>
    </tr>
    <tr>
    <td>Captopril</td>
    <td>6.25 mg 3 times</td>
    <td>50 mg 3 times</td>
    <td>122.7 mg total daily</td>
    </tr>
    <tr>
    <td>Enalapril</td>
    <td>2.5 mg twice</td>
    <td>10 to 20 mg twice</td>
    <td>16.6 mg total daily</td>
    </tr>
    <tr>
    <td>Fosinopril</td>
    <td>5 to 10 mg once</td>
    <td>40 mg once</td>
    <td>N/A</td>
    </tr>
    <tr>
    <td>Lisinopril</td>
    <td>2.5 to 5 mg once</td>
    <td>20 to 40 mg once</td>
    <td>32.5 to 35.0 mg total daily</td>
    </tr>
    <tr>
    <td>Perindopril</td>
    <td>2 mg once</td>
    <td>8 to 16 mg once</td>
    <td>N/A</td>
    </tr>
    <tr>
    <td>Quinapril</td>
    <td>5 mg twice</td>
    <td>20 mg twice</td>
    <td>N/A</td>
    </tr>
    <tr>
    <td>Ramipril</td>
    <td>1.25 to 2.5 mg once</td>
    <td>10 mg once</td>
    <td>N/A</td>
    </tr>
    <tr>
    <td>Trandolapril</td>
    <td>1 mg once</td>
    <td>4 mg once</td>
    <td>N/A</td>
    </tr>
    <tr>
    <td><em>ARB</em></td>
    <td>&lt;br /&gt;</td>
    <td>&lt;br /&gt;</td>
    <td>&lt;br /&gt;</td>
    </tr>
    <tr>
    <td>Candesartan</td>
    <td>4 to 8 mg once</td>
    <td>32 mg once</td>
    <td>24 mg total daily</td>
    </tr>
    <tr>
    <td>Losartan</td>
    <td>25 to 50 mg once</td>
    <td>50 to 150 mg once</td>
    <td>129 mg total daily</td>
    </tr>
    <tr>
    <td>Valsartan</td>
    <td>20 to 40 mg twice</td>
    <td>160 mg twice</td>
    <td>254 mg total daily</td>
    </tr>
    <tr>
    <td><em>ARNI</em></td>
    <td>&lt;br /&gt;</td>
    <td>&lt;br /&gt;</td>
    <td>&lt;br /&gt;</td>
    </tr>
    <tr>
    <td>Sacubitril-valsartan</td>
    <td>49/51 mg twice (sacubitril/valsartan)</td>
    <td>97/103 mg twice (sacubitril/valsartan)</td>
    <td>182/193 mg (sacubitril/valsartan) total daily (therapy may be initiated at 24/26 mg twice)</td>
    </tr>
    </tbody>
    </table>
    </div></td>

    </tr>

    <tr>

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

      <td class="content-container">

        <div><p>Heidenreich, P.A., Bozkurt, B, Aguilar, D., ... Allen, L. A. (2022). 2022 AHA/ACC/HFSA Guideline for the Management of Heart Failure A report of the American College of Cardiology/American Heart Association Joint Committee on Clinical Practice Guidelines. Circulation, 145(18), e895-e1032. doi: 10.1161/CIR.0000000000001063</p>
    </div>

      </td>
    </tr>

    <tr>

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

    <td class="content-container">Moderate or Severe LVSD: LVEF \&lt;=40% corresponds to qualitative documentation of moderate dysfunction or severe dysfunction (LVSD). The LVSD may be determined by quantitative or qualitative assessment, which may be current or historical. Examples of a quantitative or qualitative assessment may include an echocardiogram:

    1. that provides a numerical value of LVSD or

    2. that uses descriptive terms such as moderately or severely depressed left ventricular systolic function. Any current or prior ejection fraction study documenting LVSD can be used to identify patients.

    </td>

    </tr>

    <tr>

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

    <td class="content-container">Prescribed: Denotes that a prescription has been given to the patient for ACE inhibitor or ARB or ARNI therapy at one or more visits in the measurement period OR that the patient is already taking an ACE inhibitor or ARB or ARNI therapy as documented in their current medication list
    </td>

    </tr>

    <tr>

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

    <td class="content-container">This eCQM is to be reported as patient-based. To satisfy this measure, it must be reported for all heart failure patients at least once during the measurement period.

    The requirement of two or more visits is used to establish that the eligible clinician has an existing relationship with the patient.

    A range value should satisfy the logic requirement for 'Ejection Fraction' as long as the ranged observation value clearly meets the less than or equal to 40% threshold noted in the denominator logic. A range that is greater than 40% would not meet the measure requirement.

    In order for the Ejection Fraction result pathway to be recognized as below 40%, the result must be reported as a number with unit of %. A text string of &quot;below 40%&quot; or &quot;ejection fraction between 35 and 40%&quot; will not be recognized through electronic data capture. Although, this criteria can also be met using the Diagnosis pathway if specified as &quot;Moderate or Severe.&quot;

    Eligible clinicians who have given a prescription for or whose patient is already taking an Angiotensin-Converting Enzyme Inhibitor (ACEI) or Angiotensin Receptor Blocker (ARB) would meet performance for this measure. Other combination therapies that consist of an ACEI plus diuretic, ARB + neprilysin inhibitor (ARNI), ARB plus diuretic, ACEI plus calcium channel blocker, ARB plus calcium channel blocker, or ARB plus calcium channel blocker plus diuretic would also meet performance for this measure.

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

    </tr>

        <tr>

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

    </tr>

    <tr>

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

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

    </tr>

    <tr>

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

    <td class="content-container">
        Proportion

    </td>

    </tr>

    <tr>

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

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

    </td>

    </tr>

    <tr>

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

    <td class="content-container">
        Process

    </td>

    </tr>

        <tr>

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

          <td class="content-container">

            <em>ID</em>: InitialPopulation_1
            <br/>

              <em>Description</em>:
              <p style="white-space: pre-line" class="tab-one">All patients aged 18 years and older with two qualifying encounters during the measurement period and a diagnosis of heart failure on or before at least one qualifying encounter
    </p>

                  <em>Criteria</em>: <a href="#Group_1-InitialPopulation_1">Initial Population</a>

          </td>
        </tr>

        <tr>

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

          <td class="content-container">

            <em>ID</em>: Denominator_1
            <br/>

              <em>Description</em>:
              <p style="white-space: pre-line" class="tab-one">Equals Initial Population with a current or prior LVEF \&lt;= 40%
    </p>

                  <em>Criteria</em>: <a href="#Group_1-Denominator_1">Denominator</a>

          </td>
        </tr>

        <tr>

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

          <td class="content-container">

            <em>ID</em>: DenominatorExclusion_1
            <br/>

              <em>Description</em>:
              <p style="white-space: pre-line" class="tab-one">Patients with a history of heart transplant or with a Left Ventricular Assist Device (LVAD) prior to the end of the outpatient encounter with Moderate or Severe LVSD
    </p>

                  <em>Criteria</em>: <a href="#Group_1-DenominatorExclusion_1">Denominator Exclusions</a>

          </td>
        </tr>

        <tr>

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

          <td class="content-container">

            <em>ID</em>: DenominatorException_1
            <br/>

              <em>Description</em>:
              <p style="white-space: pre-line" class="tab-one">* Documentation of medical reason(s) for not prescribing ACE inhibitor or ARB or ARNI therapy (e.g., pregnancy, renal failure due to ACEI, allergy, intolerance, other medical reasons).

    * Documentation of patient reason(s) for not prescribing ACE inhibitor or ARB or ARNI therapy (e.g., patient declined, other patient reasons).

    </p>

                  <em>Criteria</em>: <a href="#Group_1-DenominatorException_1">Denominator Exceptions</a>

          </td>
        </tr>

        <tr>

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

          <td class="content-container">

            <em>ID</em>: Numerator_1
            <br/>

              <em>Description</em>:
              <p style="white-space: pre-line" class="tab-one">Patients who were prescribed or already taking ACE inhibitor or ARB or ARNI therapy during the measurement period
    </p>

                  <em>Criteria</em>: <a href="#Group_1-Numerator_1">Numerator</a>

          </td>
        </tr>

    <tr>

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

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

    </tr>

      <tr>

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

    </tr>

    <tr>

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

      <td class="content-container">

          <em>ID</em>: sde-ethnicity

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: SDE Ethnicity

            <br/>

              <em>Logic Definition</em>: <a href="#cms135fhiraceiorarborarniforhf-sde-ethnicity">SDE Ethnicity</a>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

          <em>ID</em>: sde-payer

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: SDE Payer

            <br/>

              <em>Logic Definition</em>: <a href="#cms135fhiraceiorarborarniforhf-sde-payer">SDE Payer</a>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

          <em>ID</em>: sde-race

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: SDE Race

            <br/>

              <em>Logic Definition</em>: <a href="#cms135fhiraceiorarborarniforhf-sde-race">SDE Race</a>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

          <em>ID</em>: sde-sex

          <br/>

              <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>

            <br/>

          <em>Description</em>: SDE Sex

            <br/>

              <em>Logic Definition</em>: <a href="#cms135fhiraceiorarborarniforhf-sde-sex">SDE Sex</a>

      </td>
    </tr>

    <tr>

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

    </tr>

    <tr>

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

    <td class="content-container"><a href="Library-CMS135FHIRACEIorARBorARNIforHF.html">CMS135FHIRACEIorARBorARNIforHF</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/>
        <em><a href="#parameters">Parameters</a></em>
        <br/>
      </td>
    </tr>

      <tr>

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

    </tr>

        <tr>

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

    </tr>

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

        Initial Population

      </th>
    </tr>
    <tr>

      <td>

          <a name="Group_1-InitialPopulation_1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
      AHA.&quot;Is Adult With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;</code></pre>

          <a href="#cms135fhiraceiorarborarniforhf-initial-population"><em>Definition</em></a>

      </td>

    </tr>

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

        Denominator

      </th>
    </tr>
    <tr>

      <td>

          <a name="Group_1-Denominator_1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
      &quot;Initial Population&quot;
        and exists AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot;</code></pre>

          <a href="#cms135fhiraceiorarborarniforhf-denominator"><em>Definition</em></a>

      </td>

    </tr>

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

        Denominator Exclusion

      </th>
    </tr>
    <tr>

      <td>

          <a name="Group_1-DenominatorExclusion_1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
      AHA.&quot;Has Heart Transplant&quot;
        or AHA.&quot;Has Heart Transplant Complications&quot;
        or AHA.&quot;Has Left Ventricular Assist Device&quot;
        or AHA.&quot;Has Left Ventricular Assist Device Complications&quot;</code></pre>

          <a href="#cms135fhiraceiorarborarniforhf-denominator-exclusions"><em>Definition</em></a>

      </td>

    </tr>

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

        Denominator Exception

      </th>
    </tr>
    <tr>

      <td>

          <a name="Group_1-DenominatorException_1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
      &quot;Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI&quot;
        or &quot;Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient&quot;
        or &quot;Has Diagnosis of Allergy or Intolerance to ACEI or ARB&quot;
        or &quot;Has Diagnosis of Pregnancy&quot;
        or &quot;Has Diagnosis of Renal Failure Due to ACEI&quot;</code></pre>

          <a href="#cms135fhiraceiorarborarniforhf-denominator-exceptions"><em>Definition</em></a>

      </td>

    </tr>

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

        Numerator

      </th>
    </tr>
    <tr>

      <td>

          <a name="Group_1-Numerator_1"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
      &quot;Has ACEI or ARB or ARNI Ordered&quot;
        or &quot;Is Currently Taking ACEI or ARB or ARNI&quot;</code></pre>

          <a href="#cms135fhiraceiorarborarniforhf-numerator"><em>Definition</em></a>

      </td>

    </tr>

      <tr>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-sex"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-payer"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-ethnicity"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
      (Patient.ethnicity()) E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="supplementaldataelements-sde-race"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
      (Patient.race()) R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-sde-sex"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-has-acei-or-arb-or-arni-ordered"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has ACEI or ARB or ARNI Ordered&quot;:
      exists ( [MedicationRequest: medication in &quot;ACE Inhibitor or ARB or ARNI&quot;] ACEIOrARBOrARNIOrdered
          where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-is-currently-taking-acei-or-arb-or-arni"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Is Currently Taking ACEI or ARB or ARNI&quot;:
      exists ( [MedicationRequest: medication in &quot;ACE Inhibitor or ARB or ARNI&quot;] ActiveACEIOrARBOrARNI
          where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-numerator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
      &quot;Has ACEI or ARB or ARNI Ordered&quot;
        or &quot;Is Currently Taking ACEI or ARB or ARNI&quot;</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-initial-population"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
      AHA.&quot;Is Adult With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-denominator"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
      &quot;Initial Population&quot;
        and exists AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot;</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-sde-payer"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-sde-ethnicity"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-denominator-exclusions"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
      AHA.&quot;Has Heart Transplant&quot;
        or AHA.&quot;Has Heart Transplant Complications&quot;
        or AHA.&quot;Has Left Ventricular Assist Device&quot;
        or AHA.&quot;Has Left Ventricular Assist Device Complications&quot;</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-sde-race"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-has-medical-or-patient-reason-for-not-ordering-acei-or-arb-or-arni"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI&quot;:
      exists ( [MedicationNotRequested: medication in &quot;ACE Inhibitor or ARB or ARNI&quot;] NoACEIOrARBOrARNIOrdered
          where NoACEIOrARBOrARNIOrdered.isMedicationNotRequestedOrderedDuringHeartFailureOutpatientEncounter ( )
            and ( NoACEIOrARBOrARNIOrdered.reasonCode in &quot;Medical Reason&quot;
                or NoACEIOrARBOrARNIOrdered.reasonCode in &quot;Patient Reason&quot;
                or NoACEIOrARBOrARNIOrdered.reasonCode in &quot;Patient Reason for ACE Inhibitor or ARB Decline&quot;
            )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-has-allergy-or-intolerance-to-acei-or-arb-or-arni-ingredient"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient&quot;:
      exists ( ( [AllergyIntolerance: &quot;ACE Inhibitor or ARB or ARNI Ingredient&quot;]
          union [AllergyIntolerance: &quot;Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)&quot;]
          union [AllergyIntolerance: &quot;Substance with angiotensin II receptor antagonist mechanism of action (substance)&quot;]
          union [AllergyIntolerance: &quot;Substance with neprilysin inhibitor mechanism of action (substance)&quot;] ) ACEIOrARBOrARNIAllergyIntolerance
          where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-has-diagnosis-of-allergy-or-intolerance-to-acei-or-arb"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Diagnosis of Allergy or Intolerance to ACEI or ARB&quot;:
      exists ( (
        [&quot;Condition&quot;: &quot;Allergy to ACE Inhibitor or ARB&quot;]
          union [&quot;Condition&quot;: &quot;Intolerance to ACE Inhibitor or ARB&quot;]
       ) ACEIOrARBAllergyOrIntoleranceDiagnosis
          where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-has-diagnosis-of-pregnancy"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Diagnosis of Pregnancy&quot;:
      exists ( ( [Condition: &quot;Pregnancy&quot;] ) PregnancyDiagnosis
          with AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that PregnancyDiagnosis.prevalenceInterval ( ) starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period
              and PregnancyDiagnosis.isVerified ( )
      )
        or exists ( [USCore.ObservationPregnancyStatusProfile] PregnantObservation
            with AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
              such that PregnantObservation.effective.toInterval ( ) starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period
                and ( PregnantObservation.value in &quot;Pregnancy&quot;
                    and PregnantObservation.status in { 'final', 'amended', 'corrected' }
                )
        )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-has-diagnosis-of-renal-failure-due-to-acei"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Diagnosis of Renal Failure Due to ACEI&quot;:
      exists ( ( [Condition: &quot;Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)&quot;] ) RenalFailureDueToACEI
          where RenalFailureDueToACEI.overlapsHeartFailureOutpatientEncounter ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="cms135fhiraceiorarborarniforhf-denominator-exceptions"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
      &quot;Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI&quot;
        or &quot;Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient&quot;
        or &quot;Has Diagnosis of Allergy or Intolerance to ACEI or ARB&quot;
        or &quot;Has Diagnosis of Pregnancy&quot;
        or &quot;Has Diagnosis of Renal Failure Due to ACEI&quot;</code></pre>
      </td>

    </tr>

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

      <td class="content-container"><em>Library Name:</em> 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 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-toconcept"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
    */
    define function ToConcept(concept FHIR.CodeableConcept):
        if concept is null then
            null
        else
            System.Concept {
                codes: concept.coding C return ToCode(C),
                display: concept.text.value
            }</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tocode"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
    */
    define function ToCode(coding FHIR.Coding):
        if coding is null then
            null
        else
            System.Code {
              code: coding.code.value,
              system: coding.system.value,
              version: coding.version.value,
              display: coding.display.value
            }</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-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-tointerval"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
    value to a CQL DateTime Interval
    @comment: If the start value of the given period is unspecified, the starting
    boundary of the resulting interval will be open (meaning the start of the interval
    is unknown, as opposed to interpreted as the beginning of time).
    */
    define function ToInterval(period FHIR.Period):
        if period is null then
            null
        else
            if period.&quot;start&quot; is null then
                Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]
            else
                Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-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-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-toquantity"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tocalendarunit"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value 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 ObservationStatus): value.value</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-tostring"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhirhelpers-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> USCoreCommon</td>

    </tr>
    <tr>

      <td>

          <a name="uscorecommon-sex"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="uscorecommon-ethnicity"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="uscorecommon-race"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-ext"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-exts"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-prevalenceinterval"> </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 fluent function prevalenceInterval(condition Condition):
    if condition.clinicalStatus ~ &quot;active&quot;
      or condition.clinicalStatus ~ &quot;recurrence&quot;
      or condition.clinicalStatus ~ &quot;relapse&quot; then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
      (end of condition.abatementInterval()) abatementDate
        return
    	  if abatementDate is null then
            Interval[start of condition.onset.toInterval(), abatementDate)
          else
            Interval[start of condition.onset.toInterval(), abatementDate]</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-tointerval"> </a>

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

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

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-abatementinterval"> </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: @comment: If the abatement element of the Condition is represented as a DateTime, the result
    is an interval beginning and ending on that DateTime.
    If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
    result is an interval from the date the patient turned that age to immediately before one year later.
    If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
    which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
    before one year later than the date the patient turned the ending age of the quantity interval.

    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 fluent function abatementInterval(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&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
      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 condition.onset.toInterval(), 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-isverified"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
    */
    define fluent function isVerified(condition FHIR.Condition):
      condition.verificationStatus is not null implies
        (condition.verificationStatus ~ &quot;confirmed&quot;
          or condition.verificationStatus ~ &quot;unconfirmed&quot;
          or condition.verificationStatus ~ &quot;provisional&quot;
          or condition.verificationStatus ~ &quot;differential&quot;
        )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-references"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-ext"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-exts"> </a>

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

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="fhircommon-isverified"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
    */
    define fluent function isVerified(allergyIntolerance FHIR.AllergyIntolerance):
      allergyIntolerance.verificationStatus is not null implies
        (allergyIntolerance.verificationStatus ~ &quot;allergy-confirmed&quot;
          or allergyIntolerance.verificationStatus ~ &quot;allergy-unconfirmed&quot;
        )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-outpatient-encounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Outpatient Encounter&quot;:
      ( [Encounter: &quot;Care Services in Long Term Residential Facility&quot;]
          union [Encounter: &quot;Home Healthcare Services&quot;]
          union [Encounter: &quot;Nursing Facility Visit&quot;]
          union [Encounter: &quot;Office Visit&quot;]
          union [Encounter: &quot;Outpatient Consultation&quot;]
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-heart-failure-outpatient-encounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns certain finished encounter types that overlap a Heart Failure condition and are during the measurement period:
                    * care services in long term residential facility (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014)
                    * home healthcare services (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016)
                    * nursing facility visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012)
                    * office visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001)
                    * outpatient consultation (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008)
    */
    define &quot;Heart Failure Outpatient Encounter&quot;:
      &quot;Outpatient Encounter&quot; QualifyingEncounter
        with ( [Condition: &quot;Heart Failure&quot;] ) HeartFailure
          such that HeartFailure.prevalenceInterval ( ) overlaps day of QualifyingEncounter.period
            and HeartFailure.isVerified ( )
        where QualifyingEncounter.period during day of &quot;Measurement Period&quot;
          and QualifyingEncounter.isEncounterFinished ( )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-moderate-or-severe-lvsd-findings"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns a union  of the following:
                    * Observations where the final, amended or correction ejection fraction result is &lt;= 40
                    * Moderate or Severe LVSD conditions where the diagnosis has been confirmed as active
    */
    define &quot;Moderate or Severe LVSD Findings&quot;:
      ( [ObservationClinicalResult: &quot;Ejection Fraction&quot;] EjectionFraction
          where EjectionFraction.value as Quantity &lt;= 40 '%'
            and EjectionFraction.status in { 'final', 'amended', 'corrected' }
      )
        union ( ( ( [Condition: &quot;Moderate or Severe LVSD&quot;] )
          union ( ( [Condition: &quot;Left ventricular systolic dysfunction (disorder)&quot;] ) LVSDDiagnosis
            where LVSDDiagnosis.severity in &quot;Moderate or Severe&quot;
          ) ) ModerateOrSevereLVSD
          where ModerateOrSevereLVSD.isVerified ( )
        )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-heart-failure-outpatient-encounter-with-history-of-moderate-or-severe-lvsd"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns heart failure outpatient encounters that start before the end of a moderate or severe LVSD finding
    */
    define &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot;:
      &quot;Heart Failure Outpatient Encounter&quot; HFOutpatientEncounter
        with &quot;Moderate or Severe LVSD Findings&quot; LVSDFindings
          such that Coalesce(LVSDFindings.prevalenceInterval(), LVSDFindings.effective.toInterval()) starts before end of HFOutpatientEncounter.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> AHAOverall</td>

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-outpatient-encounter-or-patient-provider-interaction"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Outpatient Encounter or Patient Provider Interaction&quot;:
      &quot;Outpatient Encounter&quot;
        union [Encounter: &quot;Patient Provider Interaction&quot;]</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-qualifying-outpatient-encounter-during-measurement-period"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns certain finished encounter types that occurred during the measurement period:
                    * office visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001)
                    * outpatient consultation (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008)
                    * nursing facility visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012)
                    * care services in long term residential facility (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014)
                    * home healthcare services (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016)
                    * patient provider interactions (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012)
    */
    define &quot;Qualifying Outpatient Encounter During Measurement Period&quot;:
      &quot;Outpatient Encounter or Patient Provider Interaction&quot; ValidEncounter
        where ValidEncounter.period during day of &quot;Measurement Period&quot;
          and ValidEncounter.isEncounterFinished ( )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-is-adult-with-two-qualifying-outpatient-encounters-and-one-heart-failure-outpatient-encounter-during-the-measurement-period"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if the patient meets the following criteria:
                    * 18 years of age or older,
                    * Has two Qualifying Outpatient Encounters During Measurement Period
                    * Has a Heart Failure Outpatient Encounter
    */
    define &quot;Is Adult With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;:
      AgeInYearsAt(date from start of &quot;Measurement Period&quot;) &gt;= 18
        and exists ( &quot;Qualifying Outpatient Encounter During Measurement Period&quot; Encounter1
            with &quot;Qualifying Outpatient Encounter During Measurement Period&quot; Encounter2
              such that Encounter2.id !~ Encounter1.id
        )
        and exists &quot;Heart Failure Outpatient Encounter&quot;</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-has-heart-transplant"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns completed heart tansplant procedures that start before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Heart Transplant&quot;:
      exists ( [Procedure: &quot;Heart Transplant&quot;] HeartTransplant
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that HeartTransplant.performed.toInterval ( ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where HeartTransplant.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> AHAOverall</td>

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-has-heart-transplant-complications"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if patient has confirmed heart transplant complications that start before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Heart Transplant Complications&quot;:
      exists ( ( [Condition: &quot;Heart Transplant Complications&quot;] ) HeartTransplantComplications
          let diagnosisStart: Coalesce(start of HeartTransplantComplications.prevalenceInterval(), HeartTransplantComplications.recordedDate)
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that date from diagnosisStart on or before date from end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where HeartTransplantComplications.isVerified ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-has-left-ventricular-assist-device"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if patient has a completed LVAD placement that starts before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Left Ventricular Assist Device&quot;:
      exists ( [Procedure: &quot;Left Ventricular Assist Device Placement&quot;] LVADPlacement
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that LVADPlacement.performed.toInterval ( ) starts before day of end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where LVADPlacement.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> AHAOverall</td>

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-has-left-ventricular-assist-device-complications"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if patient has active LVAD complications that start before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Left Ventricular Assist Device Complications&quot;:
      exists ( ( [Condition: &quot;Left Ventricular Assist Device Complications&quot;] ) LVADComplications
          let diagnosisStart: Coalesce(start of LVADComplications.prevalenceInterval(), LVADComplications.recordedDate)
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that date from diagnosisStart on or before date from end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where LVADComplications.isVerified ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-isorderedduringheartfailureoutpatientencounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if the given MedicationRequest is ordered during the heart failure outpatient encounter with history of moderate or severe LVSD at any point
    */
    define fluent function isOrderedDuringHeartFailureOutpatientEncounter(MedicationRequest MedicationRequest):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where MedicationRequest.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MedicationRequest.status in { 'active', 'completed' }
            and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
            and not exists ( [&quot;TaskRejected&quot;] TaskReject
                where TaskReject.focus.references ( MedicationRequest )
                  and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
            )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-isencounterfinished"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if the given Encounter is finished
    */
    define fluent function isEncounterFinished(Encounter Encounter):
      Encounter.status = 'finished'</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-overlapsafterheartfailureoutpatientencounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @overloaded
    @description: Returns true if the given MedicationRequest overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function overlapsAfterHeartFailureOutpatientEncounter(MedicationRequest MedicationRequest):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where First((collapse(MedicationRequest.dosageInstruction.timing.repeat.bounds DoseTime
                return TimingBoundToInterval(MedicationRequest.authoredOn, DoseTime)
            )) DrugPeriods
              sort by start of $this
          ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MedicationRequest.status in { 'active', 'completed' }
            and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
            and not exists ( [&quot;TaskRejected&quot;] TaskReject
                where TaskReject.focus.references ( MedicationRequest )
                  and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
            )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-timingboundtointerval"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Converts the possible representations of the timing bound to an interval using the given date as an anchor for durations
    */
    define function TimingBoundToInterval(startDate System.DateTime, choice Choice&lt;FHIR.Duration, FHIR.Range, FHIR.Period&gt;):
      case
        when choice is FHIR.Period then
            choice as FHIR.Period
        when choice is FHIR.Range then
            Interval[startDate + (choice.low as Quantity), startDate + (choice.high as Quantity)]
        when choice is FHIR.Duration then
            Interval[startDate, startDate + (choice as FHIR.Duration))
        else
    		null as Interval&lt;DateTime&gt;
    	end</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-ismedicationnotrequestedorderedduringheartfailureoutpatientencounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if the given MedicationNotRequested overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function isMedicationNotRequestedOrderedDuringHeartFailureOutpatientEncounter(MedicationRequest MedicationNotRequested):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where MedicationRequest.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MedicationRequest.status in { 'completed', 'active' }
            and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
            and not exists ( [&quot;TaskRejected&quot;] TaskReject
                where TaskReject.focus.references ( MedicationRequest )
                  and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
            )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-overlapsafterheartfailureoutpatientencounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @overloaded
    @description: Returns true if the given AllergyIntolerance overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function overlapsAfterHeartFailureOutpatientEncounter(AllergyIntolerance AllergyIntolerance):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where Interval[start of AllergyIntolerance.onset.toInterval ( ), AllergyIntolerance.lastOccurrence]overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and AllergyIntolerance.isVerified ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-overlapsafterheartfailureoutpatientencounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @overloaded
    @description: Returns true if the given Condition overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function overlapsAfterHeartFailureOutpatientEncounter(Condition Condition):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where Condition.prevalenceInterval ( ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and Condition.isVerified ( )
      )</code></pre>
      </td>

    </tr>

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

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

    </tr>
    <tr>

      <td>

          <a name="ahaoverall-overlapsheartfailureoutpatientencounter"> </a>

        <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
    @description: Returns true if the given Condition overlaps the heart failure outpatient encounter with history of moderate or severe LVSD at any point
    */
    define fluent function overlapsHeartFailureOutpatientEncounter(Condition Condition):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where Condition.prevalenceInterval ( ) overlaps day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and Condition.isVerified ( )
      )</code></pre>
      </td>

    </tr>

      <tr>

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

    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Code system SNOMEDCT

        <br/>

        <em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">SNOMED CT (all versions)</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Code system ConditionClinicalStatusCodes

        <br/>

        <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.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 ConditionVerificationStatusCodes

        <br/>

        <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.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 TaskCodeSystem

        <br/>

        <em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-task-code.html">Task Codes</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/CodeSystem/task-code</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Code system AllergyIntoleranceVerificationStatusCodes

        <br/>

        <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-allergyintolerance-verification.html">AllergyIntolerance Verification Status</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/allergyintolerance-verification</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set ACE Inhibitor or ARB or ARNI

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1139/expansion">ACE Inhibitor or ARB or ARNI</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1139</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Care Services in Long Term Residential Facility

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1014/expansion">Care Services in Long Term Residential Facility</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014</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 Nursing Facility Visit

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1012/expansion">Nursing Facility 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.1012</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 Outpatient Consultation

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1008/expansion">Outpatient Consultation</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Heart Failure

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.376/expansion">Heart Failure</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Ejection Fraction

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1134/expansion">Ejection Fraction</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1134</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Moderate or Severe LVSD

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1090/expansion">Moderate or Severe LVSD</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Moderate or Severe

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1092/expansion">Moderate or Severe</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1092</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Patient Provider Interaction

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1012/expansion">Patient Provider Interaction</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Payer Type

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Heart Transplant

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.33/expansion">Heart Transplant</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Heart Transplant Complications

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.56/expansion">Heart Transplant Complications</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Left Ventricular Assist Device Placement

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.61/expansion">Left Ventricular Assist Device Placement</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Left Ventricular Assist Device Complications

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.58/expansion">Left Ventricular Assist Device Complications</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Medical Reason

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1007/expansion">Medical Reason</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Patient Reason

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1008/expansion">Patient Reason</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1008</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Patient Reason for ACE Inhibitor or ARB Decline

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1140/expansion">Patient Reason for ACE Inhibitor or ARB Decline</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1140</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set ACE Inhibitor or ARB or ARNI Ingredient

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1489/expansion">ACE Inhibitor or ARB or ARNI Ingredient</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1489</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Allergy to ACE Inhibitor or ARB

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1211/expansion">Allergy to ACE Inhibitor or ARB</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1211</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Value set Intolerance to ACE Inhibitor or ARB

        <br/>

        <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1212/expansion">Intolerance to ACE Inhibitor or ARB</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1212</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">Direct Reference Code</th>
        <td class="content-container">

            <em>Display</em>: Male (finding)
            <br/>

          <em>Code</em>: 248153007
          <br/>
          <em>System</em>: <tt>http://snomed.info/sct</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

            <em>Display</em>: Female (finding)
            <br/>

          <em>Code</em>: 248152002
          <br/>
          <em>System</em>: <tt>http://snomed.info/sct</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

          <em>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>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>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>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>Code</em>: unconfirmed
          <br/>
          <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

          <em>Code</em>: provisional
          <br/>
          <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

          <em>Code</em>: differential
          <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>: Left ventricular systolic dysfunction (disorder)
            <br/>

          <em>Code</em>: 134401001
          <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>: Fulfill
            <br/>

          <em>Code</em>: fulfill
          <br/>
          <em>System</em>: <tt>http://hl7.org/fhir/CodeSystem/task-code</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

            <em>Display</em>: Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)
            <br/>

          <em>Code</em>: 372733002
          <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>: Substance with angiotensin II receptor antagonist mechanism of action (substance)
            <br/>

          <em>Code</em>: 372913009
          <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>: Substance with neprilysin inhibitor mechanism of action (substance)
            <br/>

          <em>Code</em>: 786886009
          <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>Code</em>: confirmed
          <br/>
          <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/allergyintolerance-verification</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

          <em>Code</em>: unconfirmed
          <br/>
          <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/allergyintolerance-verification</tt>
        </td>
      </tr>

      <tr>
        <th scope="row" class="row-header">Direct Reference Code</th>
        <td class="content-container">

            <em>Display</em>: Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)
            <br/>

          <em>Code</em>: 422593004
          <br/>
          <em>System</em>: <tt>http://snomed.info/sct</tt>
        </td>
      </tr>

      <tr>

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

    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: USQualityCore model information

        <br/>

        <em>Resource</em>: <code>https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild</code>
        <br/>
        <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: USCore model information

        <br/>

        <em>Resource</em>: <a href="https://build.fhir.org/ig/HL7/us-cql-ig/Library-USCore-ModelInfo.html">http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: FHIR model information

        <br/>

        <em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIR-ModelInfo.html">http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Library SDE

        <br/>

        <em>Resource</em>: <a href="Library-SupplementalDataElements.html">SupplementalDataElementsversion: null6.1.000)</a>
        <br/>
        <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/SupplementalDataElements|6.1.000</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Library FHIRHelpers

        <br/>

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

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Library USCommon

        <br/>

        <em>Resource</em>: <a href="https://build.fhir.org/ig/HL7/us-cql-ig/Library-USCoreCommon.html">http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot</a>
        <br/>
        <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Library FHIRCommon

        <br/>

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

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Library AHA

        <br/>

        <em>Resource</em>: <a href="Library-AHAOverall.html">AHAOverallversion: null5.1.000)</a>
        <br/>
        <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/AHAOverall|5.1.000</tt>

      </td>
    </tr>

    <tr>

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

      <td class="content-container">

        <em>Description</em>: Library USQualityCoreCommon

        <br/>

        <em>Resource</em>: <a href="Library-USQualityCoreCommon.html">US Quality Core Commonversion: null0.1.0-cibuild)</a>
        <br/>
        <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild</tt>

      </td>
    </tr>

      <tr>

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

    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Patient
        <br/>

        <em>Profile(s)</em>:

        <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient</code>
        <br/>

        <em>Must Support Elements</em>: ombCategory, detailed, text
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, id
        <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.1014/expansion">Care Services in Long Term Residential Facility</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, id
        <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, id
        <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.1012/expansion">Nursing Facility 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, id
        <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, id
        <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.1008/expansion">Outpatient Consultation</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>: status, period, id
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Encounter
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
        <br/>

        <em>Must Support Elements</em>: type, period, id
        <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.1012/expansion">Patient Provider Interaction</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Patient
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
        <br/>

        <em>Must Support Elements</em>: birthDate
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Condition
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/condition.html">Condition</a>
        <br/>

        <em>Must Support Elements</em>: abatement, onset, recordedDate, clinicalStatus, verificationStatus
        <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
        <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.376/expansion">Heart Failure</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, severity
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          <a href="http://snomed.info/id/134401001">SNOMED CT: 134401001</a> (Left ventricular systolic dysfunction (disorder))

        </span>
        <br/>

        <span class="tab-one"><em>Path</em>: severity</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.1092/expansion">Moderate or Severe</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
        <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.1090/expansion">Moderate or Severe LVSD</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, 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.113762.1.4.1178.56/expansion">Heart Transplant Complications</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, 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.113762.1.4.1178.58/expansion">Left Ventricular Assist Device Complications</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
        <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.1211/expansion">Allergy to ACE Inhibitor or ARB</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
        <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.1212/expansion">Intolerance to ACE Inhibitor or ARB</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
        <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
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          <a href="http://snomed.info/id/422593004">SNOMED CT: 422593004</a> (Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder))

        </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>:

        <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-clinical-result</code>
        <br/>

        <em>Must Support Elements</em>: code, value, 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.526.3.1134/expansion">Ejection Fraction</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Resource
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/resource.html">Resource</a>
        <br/>

        <em>Must Support Elements</em>: id
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: MedicationRequest
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
        <br/>

        <em>Must Support Elements</em>: authoredOn, timing, repeat, bounds, status, intent
        <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, timing, repeat, bounds
        <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.526.3.1139/expansion">ACE Inhibitor or ARB or ARNI</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Task
        <br/>

        <em>Profile(s)</em>:

        <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-taskrejected</code>
        <br/>

        <em>Must Support Elements</em>: focus, code
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Coverage
        <br/>

        <em>Profile(s)</em>:

        <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage</code>
        <br/>

        <em>Must Support Elements</em>: type, period
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: type</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: 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.1178.33/expansion">Heart Transplant</a>
        <br/>

        <span class="tab-one"><em>Path</em>: status</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          [not stated]: completed (completed)

        </span>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Procedure
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
        <br/>

        <em>Must Support Elements</em>: code, performed, status
        <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.1178.61/expansion">Left Ventricular Assist Device Placement</a>
        <br/>

        <span class="tab-one"><em>Path</em>: status</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          [not stated]: completed (completed)

        </span>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: MedicationRequest
        <br/>

        <em>Profile(s)</em>:

        <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested</code>
        <br/>

        <em>Must Support Elements</em>: authoredOn, status, intent
        <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>:

        <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested</code>
        <br/>

        <em>Must Support Elements</em>: medication, reasonCode
        <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.526.3.1139/expansion">ACE Inhibitor or ARB or ARNI</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: AllergyIntolerance
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/allergyintolerance.html">AllergyIntolerance</a>
        <br/>

        <em>Must Support Elements</em>: verificationStatus, onset, lastOccurrence
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: AllergyIntolerance
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/allergyintolerance.html">AllergyIntolerance</a>
        <br/>

        <em>Must Support Elements</em>: code
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1489/expansion">ACE Inhibitor or ARB or ARNI Ingredient</a>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: AllergyIntolerance
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/allergyintolerance.html">AllergyIntolerance</a>
        <br/>

        <em>Must Support Elements</em>: code
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          <a href="http://snomed.info/id/372733002">SNOMED CT: 372733002</a> (Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance))

        </span>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: AllergyIntolerance
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/allergyintolerance.html">AllergyIntolerance</a>
        <br/>

        <em>Must Support Elements</em>: code
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          <a href="http://snomed.info/id/372913009">SNOMED CT: 372913009</a> (Substance with angiotensin II receptor antagonist mechanism of action (substance))

        </span>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: AllergyIntolerance
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/R4/allergyintolerance.html">AllergyIntolerance</a>
        <br/>

        <em>Must Support Elements</em>: code
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: code</span>
        <br/>

        <span class="tab-one"><em>Code(s)</em>:

          <a href="http://snomed.info/id/786886009">SNOMED CT: 786886009</a> (Substance with neprilysin inhibitor mechanism of action (substance))

        </span>
        <br/>

      </td>
    </tr>

    <tr>
      <th scope="row" class="row-header">Data Requirement</th>
      <td class="content-container">
        <em>Type</em>: Observation
        <br/>

        <em>Profile(s)</em>:

        <a href="http://hl7.org/fhir/us/core/STU7/StructureDefinition-us-core-observation-pregnancystatus.html">US Core Observation Pregnancy Status Profile</a>
        <br/>

        <em>Must Support Elements</em>: effective, value, status
        <br/>

        <em>Code Filter(s)</em>:
        <br/>

        <span class="tab-one"><em>Path</em>: value</span>
        <br/>

        <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.378/expansion">Pregnancy</a>
        <br/>

      </td>
    </tr>

      <tr>

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

    </tr>

      <tr>

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

      <td class="content-container">
        <table>
          <thead>
            <tr>
              <td><em>Name</em></td>
              <td><em>Use</em></td>
              <td><em>Card.</em></td>
              <td><em>Type</em></td>
              <td><em>Documentation</em></td>
            </tr>
          </thead>
          <tbody>

            <tr>
              <td>Measurement Period</td>
              <td>In</td>
              <td>0..1</td>
              <td>Period</td>
              <td/>
            </tr>

            <tr>
              <td>SDE Sex</td>
              <td>Out</td>
              <td>0..1</td>
              <td>Coding</td>
              <td/>
            </tr>

            <tr>
              <td>Numerator</td>
              <td>Out</td>
              <td>0..1</td>
              <td>boolean</td>
              <td/>
            </tr>

            <tr>
              <td>Denominator</td>
              <td>Out</td>
              <td>0..1</td>
              <td>boolean</td>
              <td/>
            </tr>

            <tr>
              <td>SDE Payer</td>
              <td>Out</td>
              <td>0..*</td>
              <td>Resource</td>
              <td/>
            </tr>

            <tr>
              <td>Initial Population</td>
              <td>Out</td>
              <td>0..1</td>
              <td>boolean</td>
              <td/>
            </tr>

            <tr>
              <td>SDE Ethnicity</td>
              <td>Out</td>
              <td>0..1</td>
              <td>Resource</td>
              <td/>
            </tr>

            <tr>
              <td>Denominator Exclusions</td>
              <td>Out</td>
              <td>0..1</td>
              <td>boolean</td>
              <td/>
            </tr>

            <tr>
              <td>SDE Race</td>
              <td>Out</td>
              <td>0..1</td>
              <td>Resource</td>
              <td/>
            </tr>

            <tr>
              <td>Denominator Exceptions</td>
              <td>Out</td>
              <td>0..1</td>
              <td>boolean</td>
              <td/>
            </tr>

          </tbody>
        </table>
      </td>
    </tr>

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

        </tbody>
      </table>
    </div>
      </text>
      <contained>
        <Library>
          <id value="effective-data-requirements"/>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://snomed.info/sct"/>
              <code value="248153007"/>
              <display value="Male (finding)"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://snomed.info/sct"/>
              <code value="248152002"/>
              <display value="Female (finding)"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
              <code value="active"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
              <code 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"/>
            </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"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
              <code value="unconfirmed"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
              <code value="provisional"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
              <code value="differential"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://snomed.info/sct"/>
              <code value="134401001"/>
              <display value="Left ventricular systolic dysfunction (disorder)"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://hl7.org/fhir/CodeSystem/task-code"/>
              <code value="fulfill"/>
              <display value="Fulfill"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://snomed.info/sct"/>
              <code value="372733002"/>
              <display
                       value="Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://snomed.info/sct"/>
              <code value="372913009"/>
              <display
                       value="Substance with angiotensin II receptor antagonist mechanism of action (substance)"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://snomed.info/sct"/>
              <code value="786886009"/>
              <display
                       value="Substance with neprilysin inhibitor mechanism of action (substance)"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"/>
              <code value="confirmed"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"/>
              <code value="unconfirmed"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
              <system value="http://snomed.info/sct"/>
              <code value="422593004"/>
              <display
                       value="Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)"/>
            </valueCoding>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Sex"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Sex&quot;:
      case
        when Patient.sex() = '248153007' then &quot;Male (finding)&quot;
        when Patient.sex() = '248152002' then &quot;Female (finding)&quot;
        else null
      end"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="0"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Sex"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Sex&quot;:
      SDE.&quot;SDE Sex&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="1"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Outpatient Encounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Outpatient Encounter&quot;:
      ( [Encounter: &quot;Care Services in Long Term Residential Facility&quot;]
          union [Encounter: &quot;Home Healthcare Services&quot;]
          union [Encounter: &quot;Nursing Facility Visit&quot;]
          union [Encounter: &quot;Office Visit&quot;]
          union [Encounter: &quot;Outpatient Consultation&quot;]
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="2"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Heart Failure Outpatient Encounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns certain finished encounter types that overlap a Heart Failure condition and are during the measurement period:
                    * care services in long term residential facility (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014)
                    * home healthcare services (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016)
                    * nursing facility visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012)
                    * office visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001)
                    * outpatient consultation (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008)
    */
    define &quot;Heart Failure Outpatient Encounter&quot;:
      &quot;Outpatient Encounter&quot; QualifyingEncounter
        with ( [Condition: &quot;Heart Failure&quot;] ) HeartFailure
          such that HeartFailure.prevalenceInterval ( ) overlaps day of QualifyingEncounter.period
            and HeartFailure.isVerified ( )
        where QualifyingEncounter.period during day of &quot;Measurement Period&quot;
          and QualifyingEncounter.isEncounterFinished ( )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="3"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Moderate or Severe LVSD Findings"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns a union  of the following:
                    * Observations where the final, amended or correction ejection fraction result is &lt;= 40
                    * Moderate or Severe LVSD conditions where the diagnosis has been confirmed as active
    */
    define &quot;Moderate or Severe LVSD Findings&quot;:
      ( [ObservationClinicalResult: &quot;Ejection Fraction&quot;] EjectionFraction
          where EjectionFraction.value as Quantity &lt;= 40 '%'
            and EjectionFraction.status in { 'final', 'amended', 'corrected' }
      )
        union ( ( ( [Condition: &quot;Moderate or Severe LVSD&quot;] )
          union ( ( [Condition: &quot;Left ventricular systolic dysfunction (disorder)&quot;] ) LVSDDiagnosis
            where LVSDDiagnosis.severity in &quot;Moderate or Severe&quot;
          ) ) ModerateOrSevereLVSD
          where ModerateOrSevereLVSD.isVerified ( )
        )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="4"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns heart failure outpatient encounters that start before the end of a moderate or severe LVSD finding
    */
    define &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot;:
      &quot;Heart Failure Outpatient Encounter&quot; HFOutpatientEncounter
        with &quot;Moderate or Severe LVSD Findings&quot; LVSDFindings
          such that Coalesce(LVSDFindings.prevalenceInterval(), LVSDFindings.effective.toInterval()) starts before end of HFOutpatientEncounter.period"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="5"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Has ACEI or ARB or ARNI Ordered"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Has ACEI or ARB or ARNI Ordered&quot;:
      exists ( [MedicationRequest: medication in &quot;ACE Inhibitor or ARB or ARNI&quot;] ACEIOrARBOrARNIOrdered
          where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="6"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Is Currently Taking ACEI or ARB or ARNI"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Is Currently Taking ACEI or ARB or ARNI&quot;:
      exists ( [MedicationRequest: medication in &quot;ACE Inhibitor or ARB or ARNI&quot;] ActiveACEIOrARBOrARNI
          where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="7"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Numerator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Numerator&quot;:
      &quot;Has ACEI or ARB or ARNI Ordered&quot;
        or &quot;Is Currently Taking ACEI or ARB or ARNI&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="8"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Outpatient Encounter or Patient Provider Interaction"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Outpatient Encounter or Patient Provider Interaction&quot;:
      &quot;Outpatient Encounter&quot;
        union [Encounter: &quot;Patient Provider Interaction&quot;]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="9"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Qualifying Outpatient Encounter During Measurement Period"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns certain finished encounter types that occurred during the measurement period:
                    * office visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001)
                    * outpatient consultation (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008)
                    * nursing facility visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012)
                    * care services in long term residential facility (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014)
                    * home healthcare services (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016)
                    * patient provider interactions (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012)
    */
    define &quot;Qualifying Outpatient Encounter During Measurement Period&quot;:
      &quot;Outpatient Encounter or Patient Provider Interaction&quot; ValidEncounter
        where ValidEncounter.period during day of &quot;Measurement Period&quot;
          and ValidEncounter.isEncounterFinished ( )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="10"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Is Adult With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the patient meets the following criteria:
                    * 18 years of age or older,
                    * Has two Qualifying Outpatient Encounters During Measurement Period
                    * Has a Heart Failure Outpatient Encounter
    */
    define &quot;Is Adult With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;:
      AgeInYearsAt(date from start of &quot;Measurement Period&quot;) &gt;= 18
        and exists ( &quot;Qualifying Outpatient Encounter During Measurement Period&quot; Encounter1
            with &quot;Qualifying Outpatient Encounter During Measurement Period&quot; Encounter2
              such that Encounter2.id !~ Encounter1.id
        )
        and exists &quot;Heart Failure Outpatient Encounter&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="11"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Initial Population"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Initial Population&quot;:
      AHA.&quot;Is Adult With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="12"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator&quot;:
      &quot;Initial Population&quot;
        and exists AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="13"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Payer"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Payer&quot;:
      [USQualityCore.Coverage: type in &quot;Payer Type&quot;] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="14"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Payer"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Payer&quot;:
      SDE.&quot;SDE Payer&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="15"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Ethnicity"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Ethnicity&quot;:
      (Patient.ethnicity()) E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="16"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Ethnicity"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Ethnicity&quot;:
      SDE.&quot;SDE Ethnicity&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="17"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Has Heart Transplant"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns completed heart tansplant procedures that start before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Heart Transplant&quot;:
      exists ( [Procedure: &quot;Heart Transplant&quot;] HeartTransplant
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that HeartTransplant.performed.toInterval ( ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where HeartTransplant.status = 'completed'
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="18"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Has Heart Transplant Complications"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if patient has confirmed heart transplant complications that start before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Heart Transplant Complications&quot;:
      exists ( ( [Condition: &quot;Heart Transplant Complications&quot;] ) HeartTransplantComplications
          let diagnosisStart: Coalesce(start of HeartTransplantComplications.prevalenceInterval(), HeartTransplantComplications.recordedDate)
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that date from diagnosisStart on or before date from end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where HeartTransplantComplications.isVerified ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="19"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="Has Left Ventricular Assist Device"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if patient has a completed LVAD placement that starts before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Left Ventricular Assist Device&quot;:
      exists ( [Procedure: &quot;Left Ventricular Assist Device Placement&quot;] LVADPlacement
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that LVADPlacement.performed.toInterval ( ) starts before day of end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where LVADPlacement.status = 'completed'
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="20"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Has Left Ventricular Assist Device Complications"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if patient has active LVAD complications that start before the end of a heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define &quot;Has Left Ventricular Assist Device Complications&quot;:
      exists ( ( [Condition: &quot;Left Ventricular Assist Device Complications&quot;] ) LVADComplications
          let diagnosisStart: Coalesce(start of LVADComplications.prevalenceInterval(), LVADComplications.recordedDate)
          with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that date from diagnosisStart on or before date from end of ModerateOrSevereLVSDHFOutpatientEncounter.period
          where LVADComplications.isVerified ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="21"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator Exclusions"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator Exclusions&quot;:
      AHA.&quot;Has Heart Transplant&quot;
        or AHA.&quot;Has Heart Transplant Complications&quot;
        or AHA.&quot;Has Left Ventricular Assist Device&quot;
        or AHA.&quot;Has Left Ventricular Assist Device Complications&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="22"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="SupplementalDataElements"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Race"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Race&quot;:
      (Patient.race()) R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="23"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="SDE Race"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;SDE Race&quot;:
      SDE.&quot;SDE Race&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="24"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI&quot;:
      exists ( [MedicationNotRequested: medication in &quot;ACE Inhibitor or ARB or ARNI&quot;] NoACEIOrARBOrARNIOrdered
          where NoACEIOrARBOrARNIOrdered.isMedicationNotRequestedOrderedDuringHeartFailureOutpatientEncounter ( )
            and ( NoACEIOrARBOrARNIOrdered.reasonCode in &quot;Medical Reason&quot;
                or NoACEIOrARBOrARNIOrdered.reasonCode in &quot;Patient Reason&quot;
                or NoACEIOrARBOrARNIOrdered.reasonCode in &quot;Patient Reason for ACE Inhibitor or ARB Decline&quot;
            )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="25"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient&quot;:
      exists ( ( [AllergyIntolerance: &quot;ACE Inhibitor or ARB or ARNI Ingredient&quot;]
          union [AllergyIntolerance: &quot;Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)&quot;]
          union [AllergyIntolerance: &quot;Substance with angiotensin II receptor antagonist mechanism of action (substance)&quot;]
          union [AllergyIntolerance: &quot;Substance with neprilysin inhibitor mechanism of action (substance)&quot;] ) ACEIOrARBOrARNIAllergyIntolerance
          where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="26"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString
                           value="Has Diagnosis of Allergy or Intolerance to ACEI or ARB"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Has Diagnosis of Allergy or Intolerance to ACEI or ARB&quot;:
      exists ( (
        [&quot;Condition&quot;: &quot;Allergy to ACE Inhibitor or ARB&quot;]
          union [&quot;Condition&quot;: &quot;Intolerance to ACE Inhibitor or ARB&quot;]
       ) ACEIOrARBAllergyOrIntoleranceDiagnosis
          where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="27"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Has Diagnosis of Pregnancy"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Has Diagnosis of Pregnancy&quot;:
      exists ( ( [Condition: &quot;Pregnancy&quot;] ) PregnancyDiagnosis
          with AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
            such that PregnancyDiagnosis.prevalenceInterval ( ) starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period
              and PregnancyDiagnosis.isVerified ( )
      )
        or exists ( [USCore.ObservationPregnancyStatusProfile] PregnantObservation
            with AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
              such that PregnantObservation.effective.toInterval ( ) starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period
                and ( PregnantObservation.value in &quot;Pregnancy&quot;
                    and PregnantObservation.status in { 'final', 'amended', 'corrected' }
                )
        )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="28"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Has Diagnosis of Renal Failure Due to ACEI"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Has Diagnosis of Renal Failure Due to ACEI&quot;:
      exists ( ( [Condition: &quot;Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)&quot;] ) RenalFailureDueToACEI
          where RenalFailureDueToACEI.overlapsHeartFailureOutpatientEncounter ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="29"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="CMS135FHIRACEIorARBorARNIforHF"/>
            </extension>
            <extension url="name">
              <valueString value="Denominator Exceptions"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define &quot;Denominator Exceptions&quot;:
      &quot;Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI&quot;
        or &quot;Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient&quot;
        or &quot;Has Diagnosis of Allergy or Intolerance to ACEI or ARB&quot;
        or &quot;Has Diagnosis of Pregnancy&quot;
        or &quot;Has Diagnosis of Renal Failure Due to ACEI&quot;"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="30"/>
            </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="31"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="USCoreCommon"/>
            </extension>
            <extension url="name">
              <valueString value="sex"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns the sex element as defined for the USCore patient profile
    */
    define fluent function sex(patient Patient):
      patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="32"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="ext"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns the single extension (if present) on the given resource with the specified url.
    @comment: This function uses singleton from to ensure that a run-time exception is thrown if there
    is more than one extension on the given resource with the specified url.
    */
    define fluent function ext(domainResource DomainResource, url String):
      singleton from domainResource.exts(url)"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="33"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="exts"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns any extensions defined on the given resource with the specified url
    */
    define fluent function exts(domainResource DomainResource, url String):
      domainResource.extension E
        where E.url = url
        return E"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="34"/>
            </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="35"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="isOrderedDuringHeartFailureOutpatientEncounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the given MedicationRequest is ordered during the heart failure outpatient encounter with history of moderate or severe LVSD at any point
    */
    define fluent function isOrderedDuringHeartFailureOutpatientEncounter(MedicationRequest MedicationRequest):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where MedicationRequest.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MedicationRequest.status in { 'active', 'completed' }
            and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
            and not exists ( [&quot;TaskRejected&quot;] TaskReject
                where TaskReject.focus.references ( MedicationRequest )
                  and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
            )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="36"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="prevalenceInterval"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns an interval representing the normalized prevalence period of a given Condition 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 fluent function prevalenceInterval(condition Condition):
    if condition.clinicalStatus ~ &quot;active&quot;
      or condition.clinicalStatus ~ &quot;recurrence&quot;
      or condition.clinicalStatus ~ &quot;relapse&quot; then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
      (end of condition.abatementInterval()) abatementDate
        return
    	  if abatementDate is null then
            Interval[start of condition.onset.toInterval(), abatementDate)
          else
            Interval[start of condition.onset.toInterval(), abatementDate]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="37"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToConcept"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
    */
    define function ToConcept(concept FHIR.CodeableConcept):
        if concept is null then
            null
        else
            System.Concept {
                codes: concept.coding C return ToCode(C),
                display: concept.text.value
            }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="38"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToCode"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
    */
    define function ToCode(coding FHIR.Coding):
        if coding is null then
            null
        else
            System.Code {
              code: coding.code.value,
              system: coding.system.value,
              version: coding.version.value,
              display: coding.display.value
            }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="39"/>
            </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 fluent function toInterval(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range&gt;):
      case
        when choice is FHIR.dateTime then
          Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
        when choice is FHIR.Period then
          FHIRHelpers.ToInterval(choice as FHIR.Period)
        when choice is FHIR.instant then
          Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
        when choice is FHIR.Age then
          Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
            FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
        when choice is FHIR.Range then
          Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
            FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
        when choice is FHIR.Timing then
          Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')
        when choice is FHIR.string then
          Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
        else
          null as Interval&lt;DateTime&gt;
      end"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="40"/>
            </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="41"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToInterval"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
    value to a CQL DateTime Interval
    @comment: If the start value of the given period is unspecified, the starting
    boundary of the resulting interval will be open (meaning the start of the interval
    is unknown, as opposed to interpreted as the beginning of time).
    */
    define function ToInterval(period FHIR.Period):
        if period is null then
            null
        else
            if period.&quot;start&quot; is null then
                Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]
            else
                Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="42"/>
            </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="43"/>
            </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="44"/>
            </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="/*
    @description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity)
    value to a CQL Quantity
    @comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity
    has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)
    an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.
    @seealso: ToCalendarUnit
    */
    define function ToQuantity(quantity FHIR.Quantity):
        case
            when quantity is null then null
            when quantity.value is null then null
            when quantity.comparator is not null then
                Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
            when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
                  or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
                System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
            else
                Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')
        end"/>
            </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="ToCalendarUnit"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Converts a UCUM definite duration unit to a CQL calendar duration
    unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities)
    topic of the CQL specification.
    @comment: Note that for durations above days (or weeks), the conversion is understood to be approximate
    */
    define function ToCalendarUnit(unit System.String):
        case unit
            when 'ms' then 'millisecond'
            when 's' then 'second'
            when 'min' then 'minute'
            when 'h' then 'hour'
            when 'd' then 'day'
            when 'wk' then 'week'
            when 'mo' then 'month'
            when 'a' then 'year'
            else unit
        end"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="46"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="abatementInterval"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns an interval representing the normalized Abatement of a given Condition resource.
    @comment: @comment: If the abatement element of the Condition is represented as a DateTime, the result
    is an interval beginning and ending on that DateTime.
    If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
    result is an interval from the date the patient turned that age to immediately before one year later.
    If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
    which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
    before one year later than the date the patient turned the ending age of the quantity interval.

    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 fluent function abatementInterval(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&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
      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 condition.onset.toInterval(), condition.recordedDate)
      else
        null"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="47"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="isVerified"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
    */
    define fluent function isVerified(condition FHIR.Condition):
      condition.verificationStatus is not null implies
        (condition.verificationStatus ~ &quot;confirmed&quot;
          or condition.verificationStatus ~ &quot;unconfirmed&quot;
          or condition.verificationStatus ~ &quot;provisional&quot;
          or condition.verificationStatus ~ &quot;differential&quot;
        )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="48"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="isEncounterFinished"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the given Encounter is finished
    */
    define fluent function isEncounterFinished(Encounter Encounter):
      Encounter.status = 'finished'"/>
            </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="ToString"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function ToString(value EncounterStatus): value.value"/>
            </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="ToString"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function ToString(value MedicationRequestStatus): value.value"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="52"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRHelpers"/>
            </extension>
            <extension url="name">
              <valueString value="ToString"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define function ToString(value MedicationRequestIntent): value.value"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="53"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="references"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the given reference is to the given resource
    @comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
    NOTE: This function assumes resources from the same source server.
    */
    define fluent function references(reference FHIR.Reference, resource FHIR.Resource):
      resource.id = Last(Split(reference.reference, '/'))"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="54"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="overlapsAfterHeartFailureOutpatientEncounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @overloaded
    @description: Returns true if the given MedicationRequest overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function overlapsAfterHeartFailureOutpatientEncounter(MedicationRequest MedicationRequest):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where First((collapse(MedicationRequest.dosageInstruction.timing.repeat.bounds DoseTime
                return TimingBoundToInterval(MedicationRequest.authoredOn, DoseTime)
            )) DrugPeriods
              sort by start of $this
          ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MedicationRequest.status in { 'active', 'completed' }
            and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
            and not exists ( [&quot;TaskRejected&quot;] TaskReject
                where TaskReject.focus.references ( MedicationRequest )
                  and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
            )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="55"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="TimingBoundToInterval"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Converts the possible representations of the timing bound to an interval using the given date as an anchor for durations
    */
    define function TimingBoundToInterval(startDate System.DateTime, choice Choice&lt;FHIR.Duration, FHIR.Range, FHIR.Period&gt;):
      case
        when choice is FHIR.Period then
            choice as FHIR.Period
        when choice is FHIR.Range then
            Interval[startDate + (choice.low as Quantity), startDate + (choice.high as Quantity)]
        when choice is FHIR.Duration then
            Interval[startDate, startDate + (choice as FHIR.Duration))
        else
    		null as Interval&lt;DateTime&gt;
    	end"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="56"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="USCoreCommon"/>
            </extension>
            <extension url="name">
              <valueString value="ethnicity"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define fluent function ethnicity(patient Patient):
      (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E
        return {
          ombCategory: E.ext('ombCategory').value as FHIR.Coding,
          detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
          text: E.ext('text').value as FHIR.string
        }"/>
            </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="ext"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns the single extension (if present) on the given element with the specified url.
    @comment: This function uses singleton from to ensure that a run-time exception is thrown if there
    is more than one extension on the given element with the specified url.
    */
    define fluent function ext(element Element, url String):
      singleton from element.exts(url)"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="58"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="exts"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns any extensions defined on the given element with the specified url.
    */
    define fluent function exts(element Element, url String):
      element.extension E
        where E.url = url
        return E"/>
            </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 ProcedureStatus): 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="USCoreCommon"/>
            </extension>
            <extension url="name">
              <valueString value="race"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="define fluent function race(patient Patient):
      (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E
        return {
          ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding,
          detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,
          text: E.ext('text').value as FHIR.string
        }"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="61"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString
                           value="isMedicationNotRequestedOrderedDuringHeartFailureOutpatientEncounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the given MedicationNotRequested overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function isMedicationNotRequestedOrderedDuringHeartFailureOutpatientEncounter(MedicationRequest MedicationNotRequested):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where MedicationRequest.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MedicationRequest.status in { 'completed', 'active' }
            and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
            and not exists ( [&quot;TaskRejected&quot;] TaskReject
                where TaskReject.focus.references ( MedicationRequest )
                  and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
            )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="62"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="overlapsAfterHeartFailureOutpatientEncounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @overloaded
    @description: Returns true if the given AllergyIntolerance overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function overlapsAfterHeartFailureOutpatientEncounter(AllergyIntolerance AllergyIntolerance):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where Interval[start of AllergyIntolerance.onset.toInterval ( ), AllergyIntolerance.lastOccurrence]overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and AllergyIntolerance.isVerified ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="63"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="FHIRCommon"/>
            </extension>
            <extension url="name">
              <valueString value="isVerified"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
    */
    define fluent function isVerified(allergyIntolerance FHIR.AllergyIntolerance):
      allergyIntolerance.verificationStatus is not null implies
        (allergyIntolerance.verificationStatus ~ &quot;allergy-confirmed&quot;
          or allergyIntolerance.verificationStatus ~ &quot;allergy-unconfirmed&quot;
        )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="64"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="overlapsAfterHeartFailureOutpatientEncounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @overloaded
    @description: Returns true if the given Condition overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
    */
    define fluent function overlapsAfterHeartFailureOutpatientEncounter(Condition Condition):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where Condition.prevalenceInterval ( ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and Condition.isVerified ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="65"/>
            </extension>
          </extension>
          <extension
                     url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
              <valueString value="AHAOverall"/>
            </extension>
            <extension url="name">
              <valueString value="overlapsHeartFailureOutpatientEncounter"/>
            </extension>
            <extension url="statement">
              <valueString
                           value="/*
    @description: Returns true if the given Condition overlaps the heart failure outpatient encounter with history of moderate or severe LVSD at any point
    */
    define fluent function overlapsHeartFailureOutpatientEncounter(Condition Condition):
      exists ( &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
          where Condition.prevalenceInterval ( ) overlaps day of ModerateOrSevereLVSDHFOutpatientEncounter.period
            and Condition.isVerified ( )
      )"/>
            </extension>
            <extension url="displaySequence">
              <valueInteger value="66"/>
            </extension>
          </extension>
          <name value="EffectiveDataRequirements"/>
          <status value="active"/>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
              <code value="module-definition"/>
            </coding>
          </type>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="USQualityCore model information"/>
            <resource
                      value="https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="USCore model information"/>
            <resource
                      value="http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="FHIR model information"/>
            <resource
                      value="http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library SDE"/>
            <resource
                      value="https://madie.cms.gov/Library/SupplementalDataElements|6.1.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library FHIRHelpers"/>
            <resource
                      value="http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library USCommon"/>
            <resource
                      value="http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library FHIRCommon"/>
            <resource
                      value="http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library AHA"/>
            <resource value="https://madie.cms.gov/Library/AHAOverall|5.1.000"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Library USQualityCoreCommon"/>
            <resource
                      value="https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Code system SNOMEDCT"/>
            <resource value="http://snomed.info/sct"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Code system ConditionClinicalStatusCodes"/>
            <resource
                      value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Code system ConditionVerificationStatusCodes"/>
            <resource
                      value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Code system TaskCodeSystem"/>
            <resource value="http://hl7.org/fhir/CodeSystem/task-code"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display
                     value="Code system AllergyIntoleranceVerificationStatusCodes"/>
            <resource
                      value="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set ACE Inhibitor or ARB or ARNI"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1139"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display
                     value="Value set Care Services in Long Term Residential Facility"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"/>
          </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 Nursing Facility Visit"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"/>
          </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 Outpatient Consultation"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Heart Failure"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Ejection Fraction"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1134"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Moderate or Severe LVSD"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Moderate or Severe"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1092"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Patient Provider Interaction"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Payer Type"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Heart Transplant"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Heart Transplant Complications"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Left Ventricular Assist Device Placement"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display
                     value="Value set Left Ventricular Assist Device Complications"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Medical Reason"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1007"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Patient Reason"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1008"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display
                     value="Value set Patient Reason for ACE Inhibitor or ARB Decline"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1140"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set ACE Inhibitor or ARB or ARNI Ingredient"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1489"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Allergy to ACE Inhibitor or ARB"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1211"/>
          </relatedArtifact>
          <relatedArtifact>
            <type value="depends-on"/>
            <display value="Value set Intolerance to ACE Inhibitor or ARB"/>
            <resource
                      value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1212"/>
          </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>
          <parameter>
            <name value="Measurement Period"/>
            <use value="in"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Period"/>
          </parameter>
          <parameter>
            <name value="SDE Sex"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="Coding"/>
          </parameter>
          <parameter>
            <name value="Numerator"/>
            <use value="out"/>
            <min value="0"/>
            <max value="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="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="1"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="Denominator Exclusions"/>
            <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="1"/>
            <type value="Resource"/>
          </parameter>
          <parameter>
            <name value="Denominator Exceptions"/>
            <use value="out"/>
            <min value="0"/>
            <max value="1"/>
            <type value="boolean"/>
          </parameter>
          <dataRequirement>
            <type value="Patient"/>
            <profile
                     value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient"/>
            <mustSupport value="ombCategory"/>
            <mustSupport value="detailed"/>
            <mustSupport value="text"/>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="id"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="id"/>
            <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="id"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="id"/>
            <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="id"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
            <mustSupport value="status"/>
            <mustSupport value="period"/>
            <mustSupport value="id"/>
          </dataRequirement>
          <dataRequirement>
            <type value="Encounter"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <mustSupport value="id"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Patient"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
            <mustSupport value="birthDate"/>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="abatement"/>
            <mustSupport value="onset"/>
            <mustSupport value="recordedDate"/>
            <mustSupport value="clinicalStatus"/>
            <mustSupport value="verificationStatus"/>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <mustSupport value="severity"/>
            <codeFilter>
              <path value="code"/>
              <code>
                <system value="http://snomed.info/sct"/>
                <code value="134401001"/>
                <display
                         value="Left ventricular systolic dysfunction (disorder)"/>
              </code>
            </codeFilter>
            <codeFilter>
              <path value="severity"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1092"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <mustSupport value="recordedDate"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <mustSupport value="recordedDate"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1211"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1212"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Condition"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Condition"/>
            <mustSupport value="code"/>
            <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"/>
            <codeFilter>
              <path value="code"/>
              <code>
                <system value="http://snomed.info/sct"/>
                <code value="422593004"/>
                <display
                         value="Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Observation"/>
            <profile
                     value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-observation-clinical-result"/>
            <mustSupport value="code"/>
            <mustSupport value="value"/>
            <mustSupport value="status"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1134"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Resource"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
            <mustSupport value="id"/>
          </dataRequirement>
          <dataRequirement>
            <type value="MedicationRequest"/>
            <profile
                     value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
            <mustSupport value="authoredOn"/>
            <mustSupport value="timing"/>
            <mustSupport value="repeat"/>
            <mustSupport value="bounds"/>
            <mustSupport value="status"/>
            <mustSupport value="intent"/>
          </dataRequirement>
          <dataRequirement>
            <type value="MedicationRequest"/>
            <profile
                     value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
            <mustSupport value="medication"/>
            <mustSupport value="timing"/>
            <mustSupport value="repeat"/>
            <mustSupport value="bounds"/>
            <codeFilter>
              <path value="medication"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1139"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Task"/>
            <profile
                     value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-taskrejected"/>
            <mustSupport value="focus"/>
            <mustSupport value="code"/>
          </dataRequirement>
          <dataRequirement>
            <type value="Coverage"/>
            <profile
                     value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage"/>
            <mustSupport value="type"/>
            <mustSupport value="period"/>
            <codeFilter>
              <path value="type"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="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.1178.33"/>
            </codeFilter>
            <codeFilter>
              <path value="status"/>
              <code>
                <code value="completed"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Procedure"/>
            <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
            <mustSupport value="code"/>
            <mustSupport value="performed"/>
            <mustSupport value="status"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61"/>
            </codeFilter>
            <codeFilter>
              <path value="status"/>
              <code>
                <code value="completed"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="MedicationRequest"/>
            <profile
                     value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"/>
            <mustSupport value="authoredOn"/>
            <mustSupport value="status"/>
            <mustSupport value="intent"/>
          </dataRequirement>
          <dataRequirement>
            <type value="MedicationRequest"/>
            <profile
                     value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"/>
            <mustSupport value="medication"/>
            <mustSupport value="reasonCode"/>
            <codeFilter>
              <path value="medication"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1139"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="AllergyIntolerance"/>
            <profile
                     value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
            <mustSupport value="verificationStatus"/>
            <mustSupport value="onset"/>
            <mustSupport value="lastOccurrence"/>
          </dataRequirement>
          <dataRequirement>
            <type value="AllergyIntolerance"/>
            <profile
                     value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1489"/>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="AllergyIntolerance"/>
            <profile
                     value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <code>
                <system value="http://snomed.info/sct"/>
                <code value="372733002"/>
                <display
                         value="Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="AllergyIntolerance"/>
            <profile
                     value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <code>
                <system value="http://snomed.info/sct"/>
                <code value="372913009"/>
                <display
                         value="Substance with angiotensin II receptor antagonist mechanism of action (substance)"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="AllergyIntolerance"/>
            <profile
                     value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance"/>
            <mustSupport value="code"/>
            <codeFilter>
              <path value="code"/>
              <code>
                <system value="http://snomed.info/sct"/>
                <code value="786886009"/>
                <display
                         value="Substance with neprilysin inhibitor mechanism of action (substance)"/>
              </code>
            </codeFilter>
          </dataRequirement>
          <dataRequirement>
            <type value="Observation"/>
            <profile
                     value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-pregnancystatus"/>
            <mustSupport value="effective"/>
            <mustSupport value="value"/>
            <mustSupport value="status"/>
            <codeFilter>
              <path value="value"/>
              <valueSet
                        value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"/>
            </codeFilter>
          </dataRequirement>
        </Library>
      </contained>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
        <extension url="guidance">
          <valueString
                       value="&lt;p&gt;For every patient evaluated by this measure also identify payer, race, ethnicity and sex&lt;/p&gt;"/>
        </extension>
        <extension url="usage">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
              <code value="supplemental-data"/>
              <display value="Supplemental Data"/>
            </coding>
            <text value="Supplemental Data Guidance"/>
          </valueCodeableConcept>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
        <extension url="term">
          <valueString value="Moderate or Severe LVSD"/>
        </extension>
        <extension url="definition">
          <valueMarkdown
                         value="LVEF \&lt;=40% corresponds to qualitative documentation of moderate dysfunction or severe dysfunction (LVSD). The LVSD may be determined by quantitative or qualitative assessment, which may be current or historical. Examples of a quantitative or qualitative assessment may include an echocardiogram:

    1. that provides a numerical value of LVSD or

    2. that uses descriptive terms such as moderately or severely depressed left ventricular systolic function. Any current or prior ejection fraction study documenting LVSD can be used to identify patients.

    "/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
        <extension url="term">
          <valueString value="Prescribed"/>
        </extension>
        <extension url="definition">
          <valueMarkdown
                         value="Denotes that a prescription has been given to the patient for ACE inhibitor or ARB or ARNI therapy at one or more visits in the measurement period OR that the patient is already taking an ACE inhibitor or ARB or ARNI therapy as documented in their current medication list
    "/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
        <valueCanonical value="#effective-data-requirements"/>
      </extension>
      <url value="https://madie.cms.gov/Measure/CMS135FHIRACEIorARBorARNIforHF"/>
      <identifier>
        <use value="usual"/>
        <type>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
            <code value="short-name"/>
            <display value="Short Name"/>
          </coding>
        </type>
        <system value="https://madie.cms.gov/measure/shortName"/>
        <value value="CMS135FHIR"/>
      </identifier>
      <identifier>
        <use value="official"/>
        <type>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
            <code value="version-independent"/>
            <display value="Version Independent"/>
          </coding>
        </type>
        <system value="urn:ietf:rfc:3986"/>
        <value value="urn:uuid:86136d6c-dbe1-4b7f-89f3-406cb90f08d5"/>
      </identifier>
      <identifier>
        <use value="official"/>
        <type>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
            <code value="version-specific"/>
            <display value="Version Specific"/>
          </coding>
        </type>
        <system value="urn:ietf:rfc:3986"/>
        <value value="urn:uuid:a0aa7f51-9882-4ceb-b4e5-bb94669b62ca"/>
      </identifier>
      <identifier>
        <use value="official"/>
        <type>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
            <code value="endorser"/>
            <display value="Endorser"/>
          </coding>
        </type>
        <system value="https://madie.cms.gov/measure/cbeId"/>
        <value value="0081e"/>
        <assigner>
          <display value="CMS Consensus Based Entity"/>
        </assigner>
      </identifier>
      <identifier>
        <use value="official"/>
        <type>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
            <code value="publisher"/>
            <display value="Publisher"/>
          </coding>
        </type>
        <system value="https://madie.cms.gov/measure/cmsId"/>
        <value value="135FHIR"/>
        <assigner>
          <display value="CMS"/>
        </assigner>
      </identifier>
      <version value="1.1.000"/>
      <name value="CMS135FHIRACEIorARBorARNIforHF"/>
      <title
             value="Heart Failure (HF): Angiotensin-Converting Enzyme (ACE) Inhibitor or Angiotensin Receptor Blocker (ARB) or Angiotensin Receptor-Neprilysin Inhibitor (ARNI) Therapy for Left Ventricular Systolic Dysfunction (LVSD)FHIR
    "/>
      <status value="active"/>
      <experimental value="false"/>
      <date value="2026-01-16T18:18:12+00:00"/>
      <publisher value="American Heart Association"/>
      <contact>
        <telecom>
          <system value="url"/>
          <value value="https://www.heart.org/"/>
        </telecom>
      </contact>
      <description
                   value="Percentage of patients aged 18 years and older with a diagnosis of heart failure (HF) with a current or prior left ventricular ejection fraction (LVEF) \&lt;=40% who were prescribed or already taking ACE inhibitor or ARB or ARNI therapy during the measurement period
    "/>
      <usage
             value="This eCQM is to be reported as patient-based. To satisfy this measure, it must be reported for all heart failure patients at least once during the measurement period.

    The requirement of two or more visits is used to establish that the eligible clinician has an existing relationship with the patient.

    A range value should satisfy the logic requirement for 'Ejection Fraction' as long as the ranged observation value clearly meets the less than or equal to 40% threshold noted in the denominator logic. A range that is greater than 40% would not meet the measure requirement.

    In order for the Ejection Fraction result pathway to be recognized as below 40%, the result must be reported as a number with unit of %. A text string of &quot;below 40%&quot; or &quot;ejection fraction between 35 and 40%&quot; will not be recognized through electronic data capture. Although, this criteria can also be met using the Diagnosis pathway if specified as &quot;Moderate or Severe.&quot;

    Eligible clinicians who have given a prescription for or whose patient is already taking an Angiotensin-Converting Enzyme Inhibitor (ACEI) or Angiotensin Receptor Blocker (ARB) would meet performance for this measure. Other combination therapies that consist of an ACEI plus diuretic, ARB + neprilysin inhibitor (ARNI), ARB plus diuretic, ACEI plus calcium channel blocker, ARB plus calcium channel blocker, or ARB plus calcium channel blocker plus diuretic would also meet performance for this measure.

    This FHIR-based measure has been derived from the QDM-based measure CMS135v14. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6 (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
    "/>
      <copyright
                 value="Copyright 2025 American College of Cardiology and American Heart Association. All Rights Reserved.
    "/>
      <effectivePeriod>
        <start value="2026-01-01"/>
        <end value="2026-12-31"/>
      </effectivePeriod>
      <author>
        <name value="American Heart Association"/>
        <telecom>
          <system value="url"/>
          <value value="https://www.heart.org/"/>
        </telecom>
      </author>
      <author>
        <name value="American Medical Association (AMA)"/>
        <telecom>
          <system value="url"/>
          <value value="https://www.ama-assn.org/"/>
        </telecom>
      </author>
      <relatedArtifact>
        <type value="citation"/>
        <citation
                  value="Heidenreich, P.A., Bozkurt, B, Aguilar, D., ... Allen, L. A. (2022). 2022 AHA/ACC/HFSA Guideline for the Management of Heart Failure A report of the American College of Cardiology/American Heart Association Joint Committee on Clinical Practice Guidelines. Circulation, 145(18), e895-e1032. doi: 10.1161/CIR.0000000000001063
    "/>
      </relatedArtifact>
      <library
               value="https://madie.cms.gov/Library/CMS135FHIRACEIorARBorARNIforHF"/>
      <disclaimer
                  value="The Measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.

    The Measure, while copyrighted, can be reproduced and distributed, without modification, for noncommercial purposes, e.g., use by health care providers in connection with their practices. Commercial use is defined as the sale, license, 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.

    Commercial uses of the Measure require a license agreement between the user and the American College of Cardiology (ACC) or the American Heart Association (AHA). Neither the ACC, nor AHA, nor their members shall be responsible for any use of the Measure.

    ACC and AHA encourage use of the Measure by other health care professionals, where appropriate. THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.

    Limited proprietary coding is contained in the Measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. The ACC and AHA and their members disclaim all liability for use or accuracy of any Current Procedural Terminology (CPT\[R\]) or other coding contained in the specifications.

    CPT(R) contained in the Measure specifications is copyright 2004-20234 American Medical Association. LOINC(R) is copyright 2004-20234 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT\[R\]) copyright 2004-20234 International Health Terminology Standards Development Organisation. ICD-10 is copyright 20234 World Health Organization. All Rights Reserved.

    The American Medical Association's and the PCPI(R) Foundation's significant past efforts and contributions to the performance measure are gratefully acknowledged. Due to technical limitations, registered trademarks are indicated by (R) or \[R\].
    "/>
      <rationale
                 value="Use of ACE inhibitor, ARB, or ARNI therapy has been associated with improved outcomes in patients with reduced LVEF. Long-term therapy with ARBs have also been shown to reduce morbidity and mortality, especially in ACE inhibitor--intolerant patients. More recently, ARNI therapy has also been shown to more significantly improve outcomes, such that the newest guidelines recommend replacement of ACE inhibitors or ARBs with ARNI therapy in eligible patients. However, despite the benefits of these drugs, use of ACE inhibitor, ARB, or ARNI remains suboptimal.
    "/>
      <clinicalRecommendationStatement
                                       value="In patients with Heart Failure with Reduced Ejection Fraction (HFrEF) and New York Heart Association (NYHA) class II to III symptoms, the use of ARNI is recommended to reduce morbidity and mortality (Class I, Level of Evidence A) (Heidenreich et al., 2022). In patients with previous or current symptoms of chronic HFrEF, the use of angiotension-converting enzyme inhibitors (ACEi) is beneficial to reduce morbidity and mortality when the use of ARNI is not feasible (Class I, Level of Evidence A) (Heidenreich et al., 2022). In patients with previous or current symptoms of chronic HFrEF who are intolerant to ACEi because of cough or angioedema and when the use of ARNI is not feasible, the use of ARB is recommended to reduce morbidity and mortality (Class I, Level of Evidence A) (Heidenreich et al., 2022). In patients with chronic symptomatic HFrEF NYHA class II or III who tolerate an ACEi or ARB, replacement by an ARNI is recommended to further reduce morbidity and mortality (Class I, Level of Evidence B-R) (Heidenreich et al., 2022). ARNI should not be administered concomitantly with ACEi or within 36 hours of the last dose of an ACEi (Class II: Harm, Level of Evidence B-R) (Heidenreich et al., 2022). ARNI should not be administered to patients with any history of angioedema (Class III: Harm, Level of Evidence C-LD) (Heidenreich et al., 2022). ACEi should not be administered to patients with any history of angioedema (Class III: Harm, Level of Evidence C-LD) (Heidenreich et al., 2022).

    Drugs Commonly Used for Stage C HFrEF (abbreviated to align with focus of measure to include only ACE inhibitors, ARB and ARNI therapy)

    |         Drug         |         Initial Daily Dose(s)         |             Target Dose(s)             |                           Mean Doses Achieved in Clinical Trials                           |
    |----------------------|---------------------------------------|----------------------------------------|--------------------------------------------------------------------------------------------|
    | *ACEi*               | &lt;br /&gt;                                | &lt;br /&gt;                                 | &lt;br /&gt;                                                                                     |
    | Captopril            | 6.25 mg 3 times                       | 50 mg 3 times                          | 122.7 mg total daily                                                                       |
    | Enalapril            | 2.5 mg twice                          | 10 to 20 mg twice                      | 16.6 mg total daily                                                                        |
    | Fosinopril           | 5 to 10 mg once                       | 40 mg once                             | N/A                                                                                        |
    | Lisinopril           | 2.5 to 5 mg once                      | 20 to 40 mg once                       | 32.5 to 35.0 mg total daily                                                                |
    | Perindopril          | 2 mg once                             | 8 to 16 mg once                        | N/A                                                                                        |
    | Quinapril            | 5 mg twice                            | 20 mg twice                            | N/A                                                                                        |
    | Ramipril             | 1.25 to 2.5 mg once                   | 10 mg once                             | N/A                                                                                        |
    | Trandolapril         | 1 mg once                             | 4 mg once                              | N/A                                                                                        |
    | *ARB*                | &lt;br /&gt;                                | &lt;br /&gt;                                 | &lt;br /&gt;                                                                                     |
    | Candesartan          | 4 to 8 mg once                        | 32 mg once                             | 24 mg total daily                                                                          |
    | Losartan             | 25 to 50 mg once                      | 50 to 150 mg once                      | 129 mg total daily                                                                         |
    | Valsartan            | 20 to 40 mg twice                     | 160 mg twice                           | 254 mg total daily                                                                         |
    | *ARNI*               | &lt;br /&gt;                                | &lt;br /&gt;                                 | &lt;br /&gt;                                                                                     |
    | Sacubitril-valsartan | 49/51 mg twice (sacubitril/valsartan) | 97/103 mg twice (sacubitril/valsartan) | 182/193 mg (sacubitril/valsartan) total daily (therapy may be initiated at 24/26 mg twice) |

    "/>
      <group id="Group_1">
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
              <code value="proportion"/>
              <display value="Proportion"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
          <valueCode value="boolean"/>
        </extension>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
          <valueCodeableConcept>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
              <code value="process"/>
              <display value="Process"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <extension
                   url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
          <valueCodeableConcept>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
              <code value="increase"/>
              <display value="Increased score indicates improvement"/>
            </coding>
          </valueCodeableConcept>
        </extension>
        <population id="InitialPopulation_1">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="initial-population"/>
              <display value="Initial Population"/>
            </coding>
          </code>
          <description
                       value="All patients aged 18 years and older with two qualifying encounters during the measurement period and a diagnosis of heart failure on or before at least one qualifying encounter
    "/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Initial Population"/>
          </criteria>
        </population>
        <population id="Denominator_1">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator"/>
              <display value="Denominator"/>
            </coding>
          </code>
          <description
                       value="Equals Initial Population with a current or prior LVEF \&lt;= 40%
    "/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator"/>
          </criteria>
        </population>
        <population id="DenominatorExclusion_1">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator-exclusion"/>
              <display value="Denominator Exclusion"/>
            </coding>
          </code>
          <description
                       value="Patients with a history of heart transplant or with a Left Ventricular Assist Device (LVAD) prior to the end of the outpatient encounter with Moderate or Severe LVSD
    "/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator Exclusions"/>
          </criteria>
        </population>
        <population id="Numerator_1">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="numerator"/>
              <display value="Numerator"/>
            </coding>
          </code>
          <description
                       value="Patients who were prescribed or already taking ACE inhibitor or ARB or ARNI therapy during the measurement period
    "/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Numerator"/>
          </criteria>
        </population>
        <population id="DenominatorException_1">
          <code>
            <coding>
              <system
                      value="http://terminology.hl7.org/CodeSystem/measure-population"/>
              <code value="denominator-exception"/>
              <display value="Denominator Exception"/>
            </coding>
          </code>
          <description
                       value="* Documentation of medical reason(s) for not prescribing ACE inhibitor or ARB or ARNI therapy (e.g., pregnancy, renal failure due to ACEI, allergy, intolerance, other medical reasons).

    * Documentation of patient reason(s) for not prescribing ACE inhibitor or ARB or ARNI therapy (e.g., patient declined, other patient reasons).

    "/>
          <criteria>
            <language value="text/cql-identifier"/>
            <expression value="Denominator Exceptions"/>
          </criteria>
        </population>
      </group>
      <supplementalData id="sde-ethnicity">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Ethnicity
    "/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Ethnicity"/>
        </criteria>
      </supplementalData>
      <supplementalData id="sde-payer">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Payer
    "/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Payer"/>
        </criteria>
      </supplementalData>
      <supplementalData id="sde-race">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Race
    "/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Race"/>
        </criteria>
      </supplementalData>
      <supplementalData id="sde-sex">
        <usage>
          <coding>
            <system
                    value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
            <code value="supplemental-data"/>
          </coding>
        </usage>
        <description value="SDE Sex
    "/>
        <criteria>
          <language value="text/cql-identifier"/>
          <expression value="SDE Sex"/>
        </criteria>
      </supplementalData>
    </Measure>