eCQM QICore Content Implementation Guide
2024.0.0 - CI Build

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

: Heart Failure (HF): Beta-Blocker Therapy for Left Ventricular Systolic Dysfunction (LVSD)FHIR - XML Representation

Draft as of 2024-07-09

Raw xml | Download


<Measure xmlns="http://hl7.org/fhir">
  <id value="HFBetaBlockerTherapyforLVSDFHIR"/>
  <meta>
    <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"/>
  </meta>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
    <table class="grid dict">
        
            <tr>
                <th scope="row"><b>Title: </b></th>
                <td style="padding-left: 4px;">Heart Failure (HF): Beta-Blocker Therapy for Left Ventricular Systolic Dysfunction (LVSD)FHIR</td>
            </tr>
        

        

        
            <tr>
                <th scope="row"><b>Id: </b></th>
                <td style="padding-left: 4px;">HFBetaBlockerTherapyforLVSDFHIR</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Version: </b></th>
                <td style="padding-left: 4px;">1.4.000</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Url: </b></th>
                <td style="padding-left: 4px;"><a href="Measure-HFBetaBlockerTherapyforLVSDFHIR.html">Heart Failure (HF): Beta-Blocker Therapy for Left Ventricular Systolic Dysfunction (LVSD)FHIR</a></td>
            </tr>
        

        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                short-name identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>CMS144FHIR</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                version-independent identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>urn:uuid:73947208-412c-4295-bf7f-43bc907569d3</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                version-specific identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>urn:uuid:42d6879c-a0a4-4f59-be82-ba03783e88da</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                endorser (CMS Consensus Based Entity) identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>0083e</span>
                        </p>
                    
                </td>
            </tr>
        
            <tr>
                <th scope="row">
                    <b>
                        
                            
                                publisher (CMS) identifier:
                            
                        
                    </b>
                </th>

                <td style="padding-left: 4px;">
                    
                        <p style="margin-bottom: 5px;">
                            <span>144FHIR</span>
                        </p>
                    
                </td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Effective Period: </b></th>
                <td style="padding-left: 4px;">2025-01-01..2025-12-31</td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Status: </b></th>
                <td style="padding-left: 4px;">draft</td>
            </tr>
        

        

        
            <tr>
                <th scope="row"><b>Publisher: </b></th>
                <td style="padding-left: 4px;">American Heart Association</td>
            </tr>
        

        
        <tr>
            <th scope="row"><b>Author: </b></th>
            <td style="padding-left: 4px;">American Heart Association, American Medical Association (AMA), American Medical Association-convened Physician Consortium for Performance Improvement(R) (AMA-PCPI)</td>
        </tr>
        

        

        
            <tr>
                <th scope="row"><b>Description: </b></th>
                <td style="padding-left: 4px;"><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 beta-blocker therapy during the measurement period</p>
</div></td>
            </tr>
        

        

        

        

        

        

        
            <tr>
                <th scope="row"><b>Purpose: </b></th>
                <td style="padding-left: 4px;"><div><p>UNKNOWN</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Copyright: </b></th>
                <td style="padding-left: 4px;"><div><p>Copyright 2024 American College of Cardiology and American Heart Association. All Rights Reserved.</p>
</div></td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Disclaimer: </b></th>
                <td style="padding-left: 4px;"><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.  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-2023 American Medical Association. LOINC(R) is copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 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].</p>
</div></td>
            </tr>
        

        

        

        

        

        

        

        

        
        <tr>
            <th scope="row"><b>Rationale: </b></th>
            <td style="padding-left: 4px;"><div><p>Beta blockers improve survival and reduce hospitalization for patients with stable heart failure with reduced ejection fraction (HFrEF). Treatment should be initiated as soon as a patient is diagnosed with reduced LVEF and does not have prohibitively low systemic blood pressure, fluid overload, or recent treatment with an intravenous positive inotropic agent. Beta blockers have also been shown to lessen the symptoms of heart failure, improve the clinical status of patients, and reduce future clinical deterioration. Despite these benefits, use of beta blockers in eligible patients remains suboptimal.</p>
</div></td>
        </tr>
        

        
        <tr>
            <th scope="row"><b>Clinical recommendation statement: </b></th>
            <td style="padding-left: 4px;"><div><p>In patients with HFrEF, with current or previous symptoms, use of 1 of the 3 beta blockers proven to reduce mortality (e.g., bisoprolol, carvedilol, sustained-release metoprolol succinate) is recommended to reduce mortality and hospitalizations (Class I, Level of Evidence A) (Heidenreich, 2022).   Drugs Commonly Used for Stage C HFrEF (abbreviated to align with focus of measure to include only Beta-blocker therapy) Drug                               Initial Daily Dose(s)       Target Dose(s)        Mean Doses Achieved in Clinical Trials                                                                                                                                                  Beta Blockers Bisoprolol                         1.25 mg once               10 mg once                  8.6 mg/d Carvedilol                         3.125 mg twice            25-50 mg twice             37 mg/d Carvedilol CR                   10 mg once                  80 mg once                   N/A Metoprolol succinate         12.5 to 25 mg once      200 mg once                159 mg/d extended release (metoprolol CR/XL)</p>
</div></td>
        </tr>
        

        

        
            <tr>
                <th scope="row"><b>Guidance (Usage): </b></th>
                <td style="padding-left: 4px;">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.  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;  Beta-blocker therapy: -For patients with prior LVEF &lt;= 40%, beta-blocker therapy should include bisoprolol, carvedilol, or sustained release metoprolol succinate.  The requirement of two or more visits is to establish that the eligible clinician has an existing relationship with the patient.  This eCQM is a PATIENT-based measure.   This FHIR-based measure has been derived from the QDM-based measure: CMS144v13.   Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</td>
            </tr>
        

        
            
                <tr>
                    <th scope="row"><b>Population Criteria: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <table class="grid-dict">
                                
                                    <tr>
                                        <th><b>664396d3f4fc785d87117076</b></th>
                                    </tr>
                                
                                
                                    <tr>
                                        <td>Initial Population:</td>

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

                                    </tr>
                                
                                    <tr>
                                        <td>Denominator:</td>

                                        
                                            
                                                <td>Equals Initial Population with a current or prior LVEF &lt;= 40%</td>
                                            
                                        

                                    </tr>
                                
                                    <tr>
                                        <td>Denominator Exclusion:</td>

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

                                    </tr>
                                
                                    <tr>
                                        <td>Numerator:</td>

                                        
                                            
                                                <td>Patients who were prescribed or already taking beta-blocker therapy during the measurement period</td>
                                            
                                        

                                    </tr>
                                
                                    <tr>
                                        <td>Denominator Exception:</td>

                                        
                                            
                                                <td>Documentation of medical reason(s) for not prescribing beta-blocker therapy (e.g., arrhythmia, asthma, bradycardia, hypotension, patients with atrioventricular block without cardiac pacer, observation of consecutive heart rates &lt;50, allergy, intolerance, other medical reasons).  Documentation of patient reason(s) for not prescribing beta-blocker therapy (e.g., patient declined, other patient reasons).</td>
                                            
                                        

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

        
            <tr>
                <th scope="row"><b> Supplemental Data Elements: </b></th>
                <td style="padding-left: 4px;">
                    
                        
                            
                                <p>SDE Ethnicity</p>
                            
                        
                    
                        
                            
                                <p>SDE Payer</p>
                            
                        
                    
                        
                            
                                <p>SDE Race</p>
                            
                        
                    
                        
                            
                                <p>SDE Sex</p>
                            
                        
                    
                </td>
            </tr>
        

        

        
            <tr>
                <th scope="row">
                    <b> Supplemental Data Guidance
                        : </b></th>
                <td style="padding-left: 4px;"> For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity   SDE Payer   SDE Race   SDE Sex    </td>
            </tr>
        

        
            <tr>
                <th scope="row"><b>Libraries: </b></th>
                <td style="padding-left: 4px;">
                    <table class="grid-dict">
                        
                            <tr>
                                <td><a href="Library-HFBetaBlockerTherapyforLVSDFHIR.html">HFBetaBlockerTherapyforLVSDFHIR</a></td>
                            </tr>
                        
                    </table>
                </td>
            </tr>
        

        

        
            
                <tr>
                    <th scope="row"><b>Terminology and Other Dependencies: </b></th>
                    <td style="padding-left: 4px;">
                        
                            <li><code>Library/SupplementalDataElements|3.5.000</code></li>
                        
                            <li><code>Library/AHAOverall|2.8.000</code></li>
                        
                            <li><code>Library/QICoreCommon|2.1.000</code></li>
                        
                            <li><code>Library/FHIRHelpers|4.4.000</code></li>
                        
                            <li><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">AdministrativeGender</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-condition-clinical.html">Condition Clinical Status Codes</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-condition-ver-status.html">ConditionVerificationStatus</a></li>
                        
                            <li><a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">SNOMED CT (all versions)</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-allergyintolerance-clinical.html">AllergyIntolerance Clinical Status Codes</a></li>
                        
                            <li><a href="http://terminology.hl7.org/5.5.0/CodeSystem-allergyintolerance-verification.html">AllergyIntolerance Verification Status</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1184/expansion">Beta Blocker Therapy for LVSD</a></li>
                        
                            <li><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></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1016/expansion">Home Healthcare Services</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1012/expansion">Nursing Facility Visit</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1008/expansion">Outpatient Consultation</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.376/expansion">Heart Failure</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1134/expansion">Ejection Fraction</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1090/expansion">Moderate or Severe LVSD</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1092/expansion">Moderate or Severe</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1012/expansion">Patient Provider Interaction</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.33/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.56/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.61/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.58/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.370/expansion">Hypotension</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.362/expansion">Asthma</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1177/expansion">Allergy to Beta Blocker Therapy</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1178/expansion">Intolerance to Beta Blocker Therapy</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.412/expansion">Bradycardia</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1493/expansion">Beta Blocker Therapy Ingredient</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.367/expansion">Atrioventricular Block</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.368/expansion">Cardiac Pacer in Situ</a></li>
                        
                            <li><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.53/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.53</a></li>
                        
                    </td>
                </tr>
                <tr>
                    <th scope="row"><b>Parameters:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr>
                                <th><b>name</b></th>
                                <th><b>use</b></th>
                                <th><b>min</b></th>
                                <th><b>max</b></th>
                                <th><b>type</b></th>
                            </tr>
                            
                                <tr>
                                    <td>Measurement Period</td>
                                    <td>In</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Period</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Sex</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Coding</td>
                                </tr>
                            
                                <tr>
                                    <td>Numerator</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>boolean</td>
                                </tr>
                            
                                <tr>
                                    <td>Denominator</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>boolean</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Payer</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>*</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Initial Population</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>boolean</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Ethnicity</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Denominator Exclusions</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>boolean</td>
                                </tr>
                            
                                <tr>
                                    <td>SDE Race</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>Resource</td>
                                </tr>
                            
                                <tr>
                                    <td>Denominator Exceptions</td>
                                    <td>Out</td>
                                    <td>0</td>
                                    <td>1</td>
                                    <td>boolean</td>
                                </tr>
                            
                        </table>
                    </td>
                </tr>

                <tr>
                    <th scope="row"><b>DataRequirements:</b></th>
                    <td style="padding-left: 4px;">
                        <table class="grid-dict">
                            <tr>
                                <th><b>Resource Type</b></th>
                                <th><b>Resource Elements</b></th>
                                <th><b>Valueset Name</b></th>
                                <th><b>Valueset</b></th>
                            </tr>
                            
                                <tr>
                                    <td>Patient(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html">QICorePatient</a>)</td>
                                    <td>
                                        
                                            ethnicity
                                        
                                            race
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Office Visit
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Outpatient Consultation
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1008/expansion">Outpatient Consultation</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Nursing Facility Visit
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1012/expansion">Nursing Facility Visit</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Care Services in Long Term Residential Facility
                                            
                                        
                                    </td>
                                    <td><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></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Home Healthcare Services
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1016/expansion">Home Healthcare Services</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Encounter(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                            id
                                        
                                            id.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Patient Provider Interaction
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1012/expansion">Patient Provider Interaction</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Heart Failure
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.376/expansion">Heart Failure</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            severity
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Moderate or Severe LVSD
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1090/expansion">Moderate or Severe LVSD</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            recordedDate
                                        
                                            recordedDate.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Heart Transplant Complications
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.56/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            recordedDate
                                        
                                            recordedDate.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Left Ventricular Assist Device Complications
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.58/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Hypotension
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.370/expansion">Hypotension</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Asthma
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.362/expansion">Asthma</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Allergy to Beta Blocker Therapy
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1177/expansion">Allergy to Beta Blocker Therapy</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Intolerance to Beta Blocker Therapy
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1178/expansion">Intolerance to Beta Blocker Therapy</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Bradycardia
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.412/expansion">Bradycardia</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Atrioventricular Block
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.367/expansion">Atrioventricular Block</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Condition(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Cardiac Pacer in Situ
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.368/expansion">Cardiac Pacer in Situ</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Observation(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html">QICoreObservation</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            value
                                        
                                            status
                                        
                                            status.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Ejection Fraction
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1134/expansion">Ejection Fraction</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Medication(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html">QICoreMedication</a>)</td>
                                    <td>
                                        
                                            id
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>Medication(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html">QICoreMedication</a>)</td>
                                    <td>
                                        
                                            id
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                    <td>
                                        
                                            medication.reference
                                        
                                            timing
                                        
                                            repeat
                                        
                                            bounds
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>MedicationRequest(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html">QICoreMedicationRequest</a>)</td>
                                    <td>
                                        
                                            medication
                                        
                                            timing
                                        
                                            repeat
                                        
                                            bounds
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Beta Blocker Therapy for LVSD
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1184/expansion">Beta Blocker Therapy for LVSD</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Coverage(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html">QICoreCoverage</a>)</td>
                                    <td>
                                        
                                            type
                                        
                                            period
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Payer Type
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Procedure(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html">QICoreProcedure</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            performed
                                        
                                            status
                                        
                                            status.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Heart Transplant
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.33/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Procedure(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html">QICoreProcedure</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            performed
                                        
                                            status
                                        
                                            status.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Left Ventricular Assist Device Placement
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.61/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Procedure(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html">QICoreProcedure</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            performed
                                        
                                            status
                                        
                                            status.value
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Cardiac Pacer
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1178.53/expansion">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.53</a></td>
                                </tr>
                            
                                <tr>
                                    <td>Observation(<a href="http://hl7.org/fhir/R4/heartrate.html">Observation Heart Rate Profile</a>)</td>
                                    <td>
                                        
                                            effective
                                        
                                            value
                                        
                                            status
                                        
                                            status.value
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                                <tr>
                                    <td>AllergyIntolerance(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-allergyintolerance.html">QICoreAllergyIntolerance</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            clinicalStatus
                                        
                                    </td>
                                    <td>
                                        
                                            
                                                 Beta Blocker Therapy Ingredient
                                            
                                        
                                    </td>
                                    <td><a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.526.3.1493/expansion">Beta Blocker Therapy Ingredient</a></td>
                                </tr>
                            
                                <tr>
                                    <td>AllergyIntolerance(<a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-allergyintolerance.html">QICoreAllergyIntolerance</a>)</td>
                                    <td>
                                        
                                            code
                                        
                                            clinicalStatus
                                        
                                    </td>
                                    <td>
                                        
                                    </td>
                                    <td/>
                                </tr>
                            
                        </table>
                    </td>
                </tr>

                
                    <tr>
                        <th scope="row"><b>Direct Reference Codes:</b></th>
                        <td style="padding-left: 4px;">
                            <table class="grid-dict">
                                <tr>
                                    <th><b>display</b></th>
                                    <th><b>code</b></th>
                                    <th><b>system</b></th>
                                </tr>
                                
                                    <tr>
                                        <td>Male</td>
                                        <td>M</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Female</td>
                                        <td>F</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">http://hl7.org/fhir/administrative-gender</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Active</td>
                                        <td>active</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-condition-clinical.html">http://terminology.hl7.org/CodeSystem/condition-clinical</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Recurrence</td>
                                        <td>recurrence</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-condition-clinical.html">http://terminology.hl7.org/CodeSystem/condition-clinical</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Relapse</td>
                                        <td>relapse</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-condition-clinical.html">http://terminology.hl7.org/CodeSystem/condition-clinical</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Confirmed</td>
                                        <td>confirmed</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-condition-ver-status.html">http://terminology.hl7.org/CodeSystem/condition-ver-status</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Left ventricular systolic dysfunction (disorder)</td>
                                        <td>134401001</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">http://snomed.info/sct</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Substance with beta adrenergic receptor antagonist mechanism of action (substance)</td>
                                        <td>373254001</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">http://snomed.info/sct</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Active</td>
                                        <td>active</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-allergyintolerance-clinical.html">http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical</a></td>
                                    </tr>
                                
                                    <tr>
                                        <td>Confirmed</td>
                                        <td>confirmed</td>
                                        <td><a href="http://hl7.org/fhir/R4/codesystem-allergyintolerance-verification.html">http://terminology.hl7.org/CodeSystem/allergyintolerance-verification</a></td>
                                    </tr>
                                
                            </table>
                        </td>
                    </tr>
                

                
                <tr>
                    <th scope="row"><b>Logic Definitions:</b></th>
                    <td style="padding-left: 4px;">
                        
                        <table class="grid-dict">
                            <tr>
                                <th><b>Group</b></th>
                                <th><b>Scoring</b></th>
                                <th><b>Population Criteria</b></th>
                                <th><b>Expression</b></th>
                            </tr>
                            <tr>
                                
                                <td> 664396d3f4fc785d87117076 </td>
                                <td colspan="3" style="padding-left: 4px;">
                                    
                                        <b>Group scoring:</b>
                                        
                                            <span>  proportion </span>
                                        
                                    

                                    

                                    

                                    

                                    
                                        <tr>
                                        
                                            <th scope="row"><b>Type: </b></th>
                                            <td style="padding-left: 4px;">
                                                
                                                    
                                                        <p style="margin-bottom: 5px;">
                                                            <span>Process </span>
                                                        </p>
                                                    
                                                
                                                
                                            </td>
                                        
                                        </tr>
                                    

                                    

                                    
                                    <tr>
                                        <th scope="row"><b>Rate Aggregation: </b></th>
                                        <td colspan="3" style="padding-left: 4px;">None</td>
                                    </tr>
                                    

                                    
                                        <tr>
                                            <th scope="row"><b>Improvement Notation: </b></th>
                                            <td style="padding-left: 4px;">
                                            
                                                
                                                    
                                                        <p style="margin-bottom: 5px;">
                                                            <span>Increased score indicates improvement </span>
                                                        </p>
                                                    
                                                
                                                
                                            
                                            </td>
                                        </tr>
                                    

                                    

                                </td>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Initial Population</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Initial Population&quot;:
  AHA.&quot;Is Adults With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Denominator</td>
                                    <td>
                                        
                                            <pre><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>
                                    <td/>
                                    <td/>
                                    <td>Denominator Exclusion</td>
                                    <td>
                                        
                                            <pre><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>
                                    <td/>
                                    <td/>
                                    <td>Numerator</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Has Beta Blocker Therapy for LVSD Ordered&quot;
    or &quot;Is Currently Taking Beta Blocker Therapy for LVSD&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td/>
                                    <td/>
                                    <td>Denominator Exception</td>
                                    <td>
                                        
                                            <pre><code class="language-cql">/*
@commentedOuf: Temporary removal of &quot;Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD&quot;
@commentedOufReason: Negation issue noted in https://github.com/cqframework/cql-execution/issues/296, which is tied to https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1455
*/


define &quot;Denominator Exceptions&quot;:
  &quot;Has Consecutive Heart Rates Less than 50&quot;
    //or &quot;Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD&quot;*/or &quot;Has Arrhythmia Diagnosis&quot;
    
    or &quot;Has Hypotension Diagnosis&quot;
    or &quot;Has Asthma Diagnosis&quot;
    or &quot;Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy&quot;
    or &quot;Has Bradycardia Diagnosis&quot;
    or &quot;Has Allergy or Intolerance to Beta Blocker Therapy Ingredient&quot;
    or &quot;Atrioventricular Block without Cardiac Pacer&quot;</code></pre>
                                        
                                    </td>
                                </tr>
                                
                                
                            
                            </tr>
                        </table>
                

                <table class="grid-dict">
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Sex</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>SDE Sex</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Heart Failure Outpatient Encounter</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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 consolutations (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;:
  ( [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;]
     ) QualifyingEncounter
    with [Condition: &quot;Heart Failure&quot;] HeartFailure
      such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period  
        and HeartFailure.isConfirmedActiveDiagnosis()
    where QualifyingEncounter.period during day of &quot;Measurement Period&quot;
      and QualifyingEncounter.isFinished()</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Moderate or Severe LVSD Findings</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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;:
  ( [Observation: &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.isConfirmedActiveDiagnosis()
          )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Beta Blocker Therapy for LVSD Ordered</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Beta Blocker Therapy for LVSD Ordered&quot;:
  exists ( [MedicationRequest: &quot;Beta Blocker Therapy for LVSD&quot;] BetaBlockerOrdered
      where BetaBlockerOrdered.isOrderedDuringHeartFailureOutpatientEncounter ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Is Currently Taking Beta Blocker Therapy for LVSD</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Is Currently Taking Beta Blocker Therapy for LVSD&quot;:
  exists ( [&quot;MedicationRequest&quot;: &quot;Beta Blocker Therapy for LVSD&quot;] ActiveBetaBlocker
      where ActiveBetaBlocker.overlapsAfterHeartFailureOutpatientEncounter ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Numerator</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Has Beta Blocker Therapy for LVSD Ordered&quot;
    or &quot;Is Currently Taking Beta Blocker Therapy for LVSD&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Qualifying Outpatient Encounter During Measurement Period</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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 consolutations (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;:
    ( [Encounter: &quot;Office Visit&quot;]
        union [Encounter: &quot;Outpatient Consultation&quot;]
        union [Encounter: &quot;Nursing Facility Visit&quot;]
        union [Encounter: &quot;Care Services in Long Term Residential Facility&quot;]
        union [Encounter: &quot;Home Healthcare Services&quot;]
        union [Encounter: &quot;Patient Provider Interaction&quot;] ) ValidEncounter
      where ValidEncounter.period during day of &quot;Measurement Period&quot;
        and ValidEncounter.isFinished()</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Is Adults With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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 
                * Has two Qualifying Outpatient Encounters During Measurement Period
                * Has a Heart Failure Outpatient Encounter
*/           
define &quot;Is Adults 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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Initial Population</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  AHA.&quot;Is Adults With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Denominator</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Payer</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>SDE Payer</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Ethnicity</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>SDE Ethnicity</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Has Heart Transplant</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Has Heart Transplant Complications</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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( HeartTransplantComplications.recordedDate, start of HeartTransplantComplications.prevalenceInterval() )  
            with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
              such that diagnosisStart before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
            where HeartTransplantComplications.isConfirmedActiveDiagnosis()
          )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Has Left Ventricular Assist Device</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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;] LVADOutpatient
              with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
                such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
              where LVADOutpatient.status = 'completed'
            )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>Has Left Ventricular Assist Device Complications</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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( LVADComplications.recordedDate, start of LVADComplications.prevalenceInterval() ) 
              with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
                such that diagnosisStart before end of ModerateOrSevereLVSDHFOutpatientEncounter.period  
              where LVADComplications.isConfirmedActiveDiagnosis()
          )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Denominator Exclusions</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>SupplementalDataElements</td>
                            
                            
                                <td>SDE Race</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>SDE Race</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Consecutive Heart Rates Less than 50</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Consecutive Heart Rates Less than 50&quot;:
  exists ( from
      [&quot;observation-heartrate&quot;] HeartRate,
      AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
      let PriorHeartRate: Last([&quot;observation-heartrate&quot;] MostRecentPriorHeartRate
          where MostRecentPriorHeartRate.effective.toInterval() during ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MostRecentPriorHeartRate.effective.toInterval() before HeartRate.effective.toInterval()
          sort by start of effective.toInterval()
      )
      where HeartRate.effective.toInterval ( ) during ModerateOrSevereLVSDHFOutpatientEncounter.period
        and HeartRate.status in { 'final', 'amended', 'corrected' }
        and HeartRate.value &lt; 50 '/min'
        and PriorHeartRate.value &lt; 50 '/min'
      return HeartRate
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Hypotension Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Hypotension Diagnosis&quot;:
  exists ( [&quot;Condition&quot;: &quot;Hypotension&quot;] Hypotension
      where Hypotension.overlapsHeartFailureOutpatientEncounter ( )
        and Hypotension.isConfirmedActiveDiagnosis ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Asthma Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Asthma Diagnosis&quot;:
  exists ( [Condition: &quot;Asthma&quot;] Asthma
      where Asthma.overlapsHeartFailureOutpatientEncounter ( )
        and Asthma.isConfirmedActiveDiagnosis ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy&quot;:
  exists ( ( [&quot;Condition&quot;: &quot;Allergy to Beta Blocker Therapy&quot;]
      union [&quot;Condition&quot;: &quot;Intolerance to Beta Blocker Therapy&quot;] ) BetaBlockerAllergyOrIntoleranceDiagnosis
      where BetaBlockerAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter ( )
        and BetaBlockerAllergyOrIntoleranceDiagnosis.isConfirmedActiveDiagnosis ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Bradycardia Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Bradycardia Diagnosis&quot;:
  exists ( [Condition: &quot;Bradycardia&quot;] Bradycardia
      where Bradycardia.overlapsHeartFailureOutpatientEncounter ( )
        and Bradycardia.isConfirmedActiveDiagnosis ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Allergy or Intolerance to Beta Blocker Therapy Ingredient</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@commentedOut: implies logic
@commentedOutReason: implies not available in cql-execution. Reference https://github.com/cqframework/cql-execution/issues/319.
*/


define &quot;Has Allergy or Intolerance to Beta Blocker Therapy Ingredient&quot;:
  exists ( ( [AllergyIntolerance: &quot;Beta Blocker Therapy Ingredient&quot;]
      union [AllergyIntolerance: &quot;Substance with beta adrenergic receptor antagonist mechanism of action (substance)&quot;] ) BetaBlockerAllergyIntolerance
      where BetaBlockerAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter ( )
        and ( /*https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1771 - issue with implies operator tied to a non-supported feature in cql-exectuion 
                      For cql-execution issue, reference https://github.com/cqframework/cql-execution/issues/319.
                       ( BetaBlockerAllergyIntolerance.clinicalStatus is not null implies 
                             BetaBlockerAllergyIntolerance.clinicalStatus !~ QICoreCommon.&quot;allergy-inactive&quot; ) 
                        or */
          BetaBlockerAllergyIntolerance.clinicalStatus ~ QICoreCommon.&quot;allergy-active&quot;
        )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Atrioventricular Block Diagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Atrioventricular Block Diagnosis&quot;:
  exists ( [Condition: &quot;Atrioventricular Block&quot;] AtrioventricularBlock
      where AtrioventricularBlock.overlapsHeartFailureOutpatientEncounter ( )
        and AtrioventricularBlock.isConfirmedActiveDiagnosis ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Diagnosis of Cardiac Pacer in Situ</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Diagnosis of Cardiac Pacer in Situ&quot;:
  exists ( [&quot;Condition&quot;: &quot;Cardiac Pacer in Situ&quot;] CardiacPacerDiagnosis
      where CardiacPacerDiagnosis.overlapsAfterHeartFailureOutpatientEncounter ( )
        and CardiacPacerDiagnosis.isConfirmedActiveDiagnosis ( )
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Has Cardiac Pacer Device Implanted</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Has Cardiac Pacer Device Implanted&quot;:
  exists ( [Procedure: &quot;Cardiac Pacer&quot;] ImplantedCardiacPacer
      with AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
        such that ImplantedCardiacPacer.performed.toInterval ( ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
      where ImplantedCardiacPacer.status = 'completed'
  )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Atrioventricular Block without Cardiac Pacer</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define &quot;Atrioventricular Block without Cardiac Pacer&quot;:
  &quot;Has Atrioventricular Block Diagnosis&quot;
    and not &quot;Has Diagnosis of Cardiac Pacer in Situ&quot;
    and not &quot;Has Cardiac Pacer Device Implanted&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>HFBetaBlockerTherapyforLVSDFHIR</td>
                            
                            
                                <td>Denominator Exceptions</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@commentedOuf: Temporary removal of &quot;Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD&quot;
@commentedOufReason: Negation issue noted in https://github.com/cqframework/cql-execution/issues/296, which is tied to https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1455
*/


define &quot;Denominator Exceptions&quot;:
  &quot;Has Consecutive Heart Rates Less than 50&quot;
    //or &quot;Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD&quot;*/or &quot;Has Arrhythmia Diagnosis&quot;
    
    or &quot;Has Hypotension Diagnosis&quot;
    or &quot;Has Asthma Diagnosis&quot;
    or &quot;Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy&quot;
    or &quot;Has Bradycardia Diagnosis&quot;
    or &quot;Has Allergy or Intolerance to Beta Blocker Therapy Ingredient&quot;
    or &quot;Atrioventricular Block without Cardiac Pacer&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>isOrderedDuringHeartFailureOutpatientEncounter</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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' }
              /*Issue: The logic commented out below was added to the logic due to an issue described in the authoring patterns for QI-Core: https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns---QICore-v4.1.1#medication-ordered. However, when this logic is present, it causes an issue in Coverage calculation for resources that must be QI-Core compliant, because the inverse cannot be tested for a QI-Core MedicationRequest profile instance. This logic was commented out to achieve 100% Coverage. This requirement is really to handle what would happen if a MedicationRequest instance that could be set to 'false' were provided, but this should not happen within a trusted environment where QI-Core profile instances must be provided.*/
              // and MedicationRequest.doNotPerform is not true 
          )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>prevalenceInterval</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition 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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>isConfirmedActiveDiagnosis</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given Condition is confirmed as active
*/
define fluent function isConfirmedActiveDiagnosis(condition Condition):
    condition.isActive()
        and condition.verificationStatus ~ QICoreCommon.&quot;confirmed&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>QICoreCommon</td>
                            
                            
                                <td>isActive</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/* Candidates for FHIRCommon */

/*
@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
*/
define fluent function isActive(condition Condition):
  condition.clinicalStatus ~ &quot;active&quot;
    or condition.clinicalStatus ~ &quot;recurrence&quot;
    or condition.clinicalStatus ~ &quot;relapse&quot;</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>isFinished</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given Encounter is finished
*/
define fluent function isFinished(Encounter Encounter):
    Encounter.status = 'finished'</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>overlapsAfterHeartFailureOutpatientEncounter</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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 DoseTime.toInterval()) ) 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' }
               /*Issue: The logic commented out below was added to the logic due to an issue described in the authoring patterns for QI-Core: https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns---QICore-v4.1.1#medication-ordered. However, when this logic is present, it causes an issue in Coverage calculation for resources that must be QI-Core compliant, because the inverse cannot be tested for a QI-Core MedicationRequest profile instance. This logic was commented out to achieve 100% Coverage. This requirement is really to handle what would happen if a MedicationRequest instance that could be set to 'false' were provided, but this should not happen within a trusted environment where QI-Core profile instances must be provided.*/
               // and Event.doNotPerform is not true 
          )</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToString</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="highlight language-cql"><code class="language-cql">define function ToString(value uri): value.value</code></pre>
                                </td>
                            
                        </tr>
                    
                        <tr>
                            <th><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>FHIRHelpers</td>
                            
                            
                                <td>ToCode</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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><b>Library Name</b></th>
                            <th><b>Name</b></th>
                        </tr>
                        <tr>
                            
                                <td>AHAOverall</td>
                            
                            
                                <td>overlapsHeartFailureOutpatientEncounter</td>
                            
                        </tr>
                        <tr>
                            
                                <td/>
                                <td>
                                    <pre class="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.isConfirmedActiveDiagnosis()
          )</code></pre>
                                </td>
                            
                        </tr>
                    
                    </table>
                </td>
            </tr>
            
        
    

    </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="M"/>
          <display value="Male"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="F"/>
          <display value="Female"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="active"/>
          <display value="Active"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="recurrence"/>
          <display value="Recurrence"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="relapse"/>
          <display value="Relapse"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="confirmed"/>
          <display value="Confirmed"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="373254001"/>
          <display
                   value="Substance with beta adrenergic receptor antagonist mechanism of action (substance)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"/>
          <code value="active"/>
          <display value="Active"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"/>
          <code value="confirmed"/>
          <display value="Confirmed"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </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/us/cqfmeasures/StructureDefinition/cqfm-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 consolutations (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;:
  ( [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;]
     ) QualifyingEncounter
    with [Condition: &quot;Heart Failure&quot;] HeartFailure
      such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period  
        and HeartFailure.isConfirmedActiveDiagnosis()
    where QualifyingEncounter.period during day of &quot;Measurement Period&quot;
      and QualifyingEncounter.isFinished()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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;:
  ( [Observation: &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.isConfirmedActiveDiagnosis()
          )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Beta Blocker Therapy for LVSD Ordered"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Beta Blocker Therapy for LVSD Ordered&quot;:
  exists ( [MedicationRequest: &quot;Beta Blocker Therapy for LVSD&quot;] BetaBlockerOrdered
      where BetaBlockerOrdered.isOrderedDuringHeartFailureOutpatientEncounter ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Is Currently Taking Beta Blocker Therapy for LVSD"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Is Currently Taking Beta Blocker Therapy for LVSD&quot;:
  exists ( [&quot;MedicationRequest&quot;: &quot;Beta Blocker Therapy for LVSD&quot;] ActiveBetaBlocker
      where ActiveBetaBlocker.overlapsAfterHeartFailureOutpatientEncounter ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Numerator&quot;:
  &quot;Has Beta Blocker Therapy for LVSD Ordered&quot;
    or &quot;Is Currently Taking Beta Blocker Therapy for LVSD&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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 consolutations (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;:
    ( [Encounter: &quot;Office Visit&quot;]
        union [Encounter: &quot;Outpatient Consultation&quot;]
        union [Encounter: &quot;Nursing Facility Visit&quot;]
        union [Encounter: &quot;Care Services in Long Term Residential Facility&quot;]
        union [Encounter: &quot;Home Healthcare Services&quot;]
        union [Encounter: &quot;Patient Provider Interaction&quot;] ) ValidEncounter
      where ValidEncounter.period during day of &quot;Measurement Period&quot;
        and ValidEncounter.isFinished()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="AHAOverall"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Is Adults 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 
                * Has two Qualifying Outpatient Encounters During Measurement Period
                * Has a Heart Failure Outpatient Encounter
*/           
define &quot;Is Adults 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="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Initial Population&quot;:
  AHA.&quot;Is Adults With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </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="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </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="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </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="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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="16"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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( HeartTransplantComplications.recordedDate, start of HeartTransplantComplications.prevalenceInterval() )  
            with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
              such that diagnosisStart before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
            where HeartTransplantComplications.isConfirmedActiveDiagnosis()
          )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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;] LVADOutpatient
              with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
                such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
              where LVADOutpatient.status = 'completed'
            )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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( LVADComplications.recordedDate, start of LVADComplications.prevalenceInterval() ) 
              with &quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
                such that diagnosisStart before end of ModerateOrSevereLVSDHFOutpatientEncounter.period  
              where LVADComplications.isConfirmedActiveDiagnosis()
          )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </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="20"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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="21"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </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="22"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Consecutive Heart Rates Less than 50"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Consecutive Heart Rates Less than 50&quot;:
  exists ( from
      [&quot;observation-heartrate&quot;] HeartRate,
      AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
      let PriorHeartRate: Last([&quot;observation-heartrate&quot;] MostRecentPriorHeartRate
          where MostRecentPriorHeartRate.effective.toInterval() during ModerateOrSevereLVSDHFOutpatientEncounter.period
            and MostRecentPriorHeartRate.effective.toInterval() before HeartRate.effective.toInterval()
          sort by start of effective.toInterval()
      )
      where HeartRate.effective.toInterval ( ) during ModerateOrSevereLVSDHFOutpatientEncounter.period
        and HeartRate.status in { 'final', 'amended', 'corrected' }
        and HeartRate.value &lt; 50 '/min'
        and PriorHeartRate.value &lt; 50 '/min'
      return HeartRate
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Hypotension Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Hypotension Diagnosis&quot;:
  exists ( [&quot;Condition&quot;: &quot;Hypotension&quot;] Hypotension
      where Hypotension.overlapsHeartFailureOutpatientEncounter ( )
        and Hypotension.isConfirmedActiveDiagnosis ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Asthma Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Asthma Diagnosis&quot;:
  exists ( [Condition: &quot;Asthma&quot;] Asthma
      where Asthma.overlapsHeartFailureOutpatientEncounter ( )
        and Asthma.isConfirmedActiveDiagnosis ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy&quot;:
  exists ( ( [&quot;Condition&quot;: &quot;Allergy to Beta Blocker Therapy&quot;]
      union [&quot;Condition&quot;: &quot;Intolerance to Beta Blocker Therapy&quot;] ) BetaBlockerAllergyOrIntoleranceDiagnosis
      where BetaBlockerAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter ( )
        and BetaBlockerAllergyOrIntoleranceDiagnosis.isConfirmedActiveDiagnosis ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Bradycardia Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Bradycardia Diagnosis&quot;:
  exists ( [Condition: &quot;Bradycardia&quot;] Bradycardia
      where Bradycardia.overlapsHeartFailureOutpatientEncounter ( )
        and Bradycardia.isConfirmedActiveDiagnosis ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Has Allergy or Intolerance to Beta Blocker Therapy Ingredient"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@commentedOut: implies logic
@commentedOutReason: implies not available in cql-execution. Reference https://github.com/cqframework/cql-execution/issues/319.
*/


define &quot;Has Allergy or Intolerance to Beta Blocker Therapy Ingredient&quot;:
  exists ( ( [AllergyIntolerance: &quot;Beta Blocker Therapy Ingredient&quot;]
      union [AllergyIntolerance: &quot;Substance with beta adrenergic receptor antagonist mechanism of action (substance)&quot;] ) BetaBlockerAllergyIntolerance
      where BetaBlockerAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter ( )
        and ( /*https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1771 - issue with implies operator tied to a non-supported feature in cql-exectuion 
                      For cql-execution issue, reference https://github.com/cqframework/cql-execution/issues/319.
                       ( BetaBlockerAllergyIntolerance.clinicalStatus is not null implies 
                             BetaBlockerAllergyIntolerance.clinicalStatus !~ QICoreCommon.&quot;allergy-inactive&quot; ) 
                        or */
          BetaBlockerAllergyIntolerance.clinicalStatus ~ QICoreCommon.&quot;allergy-active&quot;
        )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Atrioventricular Block Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Atrioventricular Block Diagnosis&quot;:
  exists ( [Condition: &quot;Atrioventricular Block&quot;] AtrioventricularBlock
      where AtrioventricularBlock.overlapsHeartFailureOutpatientEncounter ( )
        and AtrioventricularBlock.isConfirmedActiveDiagnosis ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Diagnosis of Cardiac Pacer in Situ"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Diagnosis of Cardiac Pacer in Situ&quot;:
  exists ( [&quot;Condition&quot;: &quot;Cardiac Pacer in Situ&quot;] CardiacPacerDiagnosis
      where CardiacPacerDiagnosis.overlapsAfterHeartFailureOutpatientEncounter ( )
        and CardiacPacerDiagnosis.isConfirmedActiveDiagnosis ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has Cardiac Pacer Device Implanted"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Cardiac Pacer Device Implanted&quot;:
  exists ( [Procedure: &quot;Cardiac Pacer&quot;] ImplantedCardiacPacer
      with AHA.&quot;Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD&quot; ModerateOrSevereLVSDHFOutpatientEncounter
        such that ImplantedCardiacPacer.performed.toInterval ( ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
      where ImplantedCardiacPacer.status = 'completed'
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Atrioventricular Block without Cardiac Pacer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Atrioventricular Block without Cardiac Pacer&quot;:
  &quot;Has Atrioventricular Block Diagnosis&quot;
    and not &quot;Has Diagnosis of Cardiac Pacer in Situ&quot;
    and not &quot;Has Cardiac Pacer Device Implanted&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HFBetaBlockerTherapyforLVSDFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exceptions"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@commentedOuf: Temporary removal of &quot;Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD&quot;
@commentedOufReason: Negation issue noted in https://github.com/cqframework/cql-execution/issues/296, which is tied to https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1455
*/


define &quot;Denominator Exceptions&quot;:
  &quot;Has Consecutive Heart Rates Less than 50&quot;
    //or &quot;Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD&quot;*/or &quot;Has Arrhythmia Diagnosis&quot;
    
    or &quot;Has Hypotension Diagnosis&quot;
    or &quot;Has Asthma Diagnosis&quot;
    or &quot;Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy&quot;
    or &quot;Has Bradycardia Diagnosis&quot;
    or &quot;Has Allergy or Intolerance to Beta Blocker Therapy Ingredient&quot;
    or &quot;Atrioventricular Block without Cardiac Pacer&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="33"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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' }
              /*Issue: The logic commented out below was added to the logic due to an issue described in the authoring patterns for QI-Core: https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns---QICore-v4.1.1#medication-ordered. However, when this logic is present, it causes an issue in Coverage calculation for resources that must be QI-Core compliant, because the inverse cannot be tested for a QI-Core MedicationRequest profile instance. This logic was commented out to achieve 100% Coverage. This requirement is really to handle what would happen if a MedicationRequest instance that could be set to 'false' were provided, but this should not happen within a trusted environment where QI-Core profile instances must be provided.*/
              // and MedicationRequest.doNotPerform is not true 
          )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="prevalenceInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition 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="35"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="AHAOverall"/>
        </extension>
        <extension url="name">
          <valueString value="isConfirmedActiveDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns true if the given Condition is confirmed as active
*/
define fluent function isConfirmedActiveDiagnosis(condition Condition):
    condition.isActive()
        and condition.verificationStatus ~ QICoreCommon.&quot;confirmed&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isActive"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/* Candidates for FHIRCommon */

/*
@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
*/
define fluent function isActive(condition Condition):
  condition.clinicalStatus ~ &quot;active&quot;
    or condition.clinicalStatus ~ &quot;recurrence&quot;
    or condition.clinicalStatus ~ &quot;relapse&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="AHAOverall"/>
        </extension>
        <extension url="name">
          <valueString value="isFinished"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns true if the given Encounter is finished
*/
define fluent function isFinished(Encounter Encounter):
    Encounter.status = 'finished'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="38"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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 DoseTime.toInterval()) ) 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' }
               /*Issue: The logic commented out below was added to the logic due to an issue described in the authoring patterns for QI-Core: https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns---QICore-v4.1.1#medication-ordered. However, when this logic is present, it causes an issue in Coverage calculation for resources that must be QI-Core compliant, because the inverse cannot be tested for a QI-Core MedicationRequest profile instance. This logic was commented out to achieve 100% Coverage. This requirement is really to handle what would happen if a MedicationRequest instance that could be set to 'false' were provided, but this should not happen within a trusted environment where QI-Core profile instances must be provided.*/
               // and Event.doNotPerform is not true 
          )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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="40"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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="41"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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.isConfirmedActiveDiagnosis()
          )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="42"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource value="Library/SupplementalDataElements|3.5.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AHA"/>
        <resource value="Library/AHAOverall|2.8.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource value="Library/QICoreCommon|2.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system AdministrativeGender"/>
        <resource value="http://hl7.org/fhir/administrative-gender"/>
      </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 SNOMEDCT"/>
        <resource value="http://snomed.info/sct"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system AllergyIntoleranceClinicalStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"/>
      </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 Beta Blocker Therapy for LVSD"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1184"/>
      </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 Hypotension"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.370"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Asthma"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.362"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Allergy to Beta Blocker Therapy"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1177"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Intolerance to Beta Blocker Therapy"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1178"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Bradycardia"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.412"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Beta Blocker Therapy Ingredient"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1493"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Atrioventricular Block"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.367"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Cardiac Pacer in Situ"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.368"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Cardiac Pacer"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.53"/>
      </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://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
        <mustSupport value="ethnicity"/>
        <mustSupport value="race"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <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/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <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/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <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/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <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/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <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/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="id"/>
        <mustSupport value="id.value"/>
        <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="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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/us/qicore/StructureDefinition/qicore-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/us/qicore/StructureDefinition/qicore-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/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="code"/>
        <mustSupport value="recordedDate"/>
        <mustSupport value="recordedDate.value"/>
        <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/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="code"/>
        <mustSupport value="recordedDate"/>
        <mustSupport value="recordedDate.value"/>
        <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/us/qicore/StructureDefinition/qicore-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.370"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.362"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.1177"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.1178"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.412"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.367"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.368"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
        <mustSupport value="code"/>
        <mustSupport value="value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <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="Medication"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"/>
        <mustSupport value="medication.reference"/>
        <mustSupport value="timing"/>
        <mustSupport value="repeat"/>
        <mustSupport value="bounds"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-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.1184"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.53"/>
        </codeFilter>
        <codeFilter>
          <path value="status.value"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/heartrate"/>
        <mustSupport value="effective"/>
        <mustSupport value="value"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="AllergyIntolerance"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-allergyintolerance"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1493"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="AllergyIntolerance"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-allergyintolerance"/>
        <mustSupport value="code"/>
        <mustSupport value="clinicalStatus"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://snomed.info/sct"/>
            <code value="373254001"/>
            <display
                     value="Substance with beta adrenergic receptor antagonist mechanism of action (substance)"/>
          </code>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
    <extension url="guidance">
      <valueString
                   value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity   SDE Payer   SDE Race   SDE Sex   "/>
    </extension>
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
          <display value="Supplemental Data"/>
        </coding>
        <text value="Supplemental Data Guidance"/>
      </valueCodeableConcept>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
    <valueReference>
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <url value="https://madie.cms.gov/Measure/HFBetaBlockerTherapyforLVSDFHIR"/>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="short-name"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/shortName"/>
    <value value="CMS144FHIR"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:73947208-412c-4295-bf7f-43bc907569d3"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:42d6879c-a0a4-4f59-be82-ba03783e88da"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="endorser"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cbeId"/>
    <value value="0083e"/>
    <assigner>
      <display value="CMS Consensus Based Entity"/>
    </assigner>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="publisher"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cmsId"/>
    <value value="144FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="1.4.000"/>
  <name value="HFBetaBlockerTherapyforLVSDFHIR"/>
  <title
         value="Heart Failure (HF): Beta-Blocker Therapy for Left Ventricular Systolic Dysfunction (LVSD)FHIR"/>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2024-07-09T14:53:56+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 beta-blocker therapy during the measurement period"/>
  <purpose value="UNKNOWN"/>
  <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.  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;  Beta-blocker therapy: -For patients with prior LVEF &lt;= 40%, beta-blocker therapy should include bisoprolol, carvedilol, or sustained release metoprolol succinate.  The requirement of two or more visits is to establish that the eligible clinician has an existing relationship with the patient.  This eCQM is a PATIENT-based measure.   This FHIR-based measure has been derived from the QDM-based measure: CMS144v13.   Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html)."/>
  <copyright
             value="Copyright 2024 American College of Cardiology and American Heart Association. All Rights Reserved."/>
  <effectivePeriod>
    <start value="2025-01-01"/>
    <end value="2025-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>
  <author>
    <name
          value="American Medical Association-convened Physician Consortium for Performance Improvement(R) (AMA-PCPI)"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.ama-assn.org/"/>
    </telecom>
  </author>
  <library
           value="https://madie.cms.gov/Library/HFBetaBlockerTherapyforLVSDFHIR"/>
  <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-2023 American Medical Association. LOINC(R) is copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 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="Beta blockers improve survival and reduce hospitalization for patients with stable heart failure with reduced ejection fraction (HFrEF). Treatment should be initiated as soon as a patient is diagnosed with reduced LVEF and does not have prohibitively low systemic blood pressure, fluid overload, or recent treatment with an intravenous positive inotropic agent. Beta blockers have also been shown to lessen the symptoms of heart failure, improve the clinical status of patients, and reduce future clinical deterioration. Despite these benefits, use of beta blockers in eligible patients remains suboptimal."/>
  <clinicalRecommendationStatement
                                   value="In patients with HFrEF, with current or previous symptoms, use of 1 of the 3 beta blockers proven to reduce mortality (e.g., bisoprolol, carvedilol, sustained-release metoprolol succinate) is recommended to reduce mortality and hospitalizations (Class I, Level of Evidence A) (Heidenreich, 2022).   Drugs Commonly Used for Stage C HFrEF (abbreviated to align with focus of measure to include only Beta-blocker therapy) Drug                               Initial Daily Dose(s)       Target Dose(s)        Mean Doses Achieved in Clinical Trials                                                                                                                                                  Beta Blockers Bisoprolol                         1.25 mg once               10 mg once                  8.6 mg/d Carvedilol                         3.125 mg twice            25-50 mg twice             37 mg/d Carvedilol CR                   10 mg once                  80 mg once                   N/A Metoprolol succinate         12.5 to 25 mg once      200 mg once                159 mg/d extended release (metoprolol CR/XL)"/>
  <group id="664396d3f4fc785d87117076">
    <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-rateAggregation">
      <valueCode value="None"/>
    </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="1B625C4B-96F3-482D-B676-063B9144144F">
      <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="2AEA621A-A4FE-41F1-B8A9-35B186B2C37E">
      <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="210258BE-E94A-433B-BD61-03599A8A7456">
      <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="50F7F79A-C9F5-4BD0-89AD-A4027A745D90">
      <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 beta-blocker therapy during the measurement period"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <population id="3E48AAB1-F6FD-4282-AA01-852B65F2C20F">
      <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 beta-blocker therapy (e.g., arrhythmia, asthma, bradycardia, hypotension, patients with atrioventricular block without cardiac pacer, observation of consecutive heart rates &lt;50, allergy, intolerance, other medical reasons).  Documentation of patient reason(s) for not prescribing beta-blocker 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>