<Library xmlns="http://hl7.org/fhir">
   <id value="AHAOverall"></id>
   <meta>
      <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary"></profile>
      <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary"></profile>
      <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary"></profile>
      <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary"></profile>
      <profile value="http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library"></profile>
      <profile value="http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library"></profile>
      <profile value="http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library"></profile>
   </meta>
   <language value="en"></language>
   <text>
      <status value="extensions"></status>
      <div xmlns="http://www.w3.org/1999/xhtml" class="col-12"> 
         <table class="narrative-table"> 
            <tbody> 
               <tr> 
                  <th colspan="2" scope="row" class="row-header">Metadata</th> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Title</th> 
                  <td class="content-container">AHAOverall</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Version</th> 
                  <td class="content-container">4.1.000</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Identifier</th> 
                  <td class="content-container">686690a2cea545775d8881ca</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Steward (Publisher)</th> 
                  <td class="content-container">Telligen</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Description</th> 
                  <td class="content-container">This version of the AHAOverall library is patterned after HFCommonDefinitionsQDM library version '3.0.000'</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Type</th> 
                  <td class="content-container">[http://terminology.hl7.org/CodeSystem/library-type#logic-library]</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Observation 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result 
                     <br></br>   
                     <em>Must Support Elements</em>: code, value, status, status.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1134 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>   
                     <span class="tab-one">
                        <em>Code(s)</em>:  http://snomed.info/sct#134401001: 'Left ventricular systolic dysfunction (disorder)'  
                     </span> 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>   
                     <span class="tab-one">
                        <em>Code(s)</em>:  http://snomed.info/sct#134401001: 'Left ventricular systolic dysfunction (disorder)'  
                     </span> 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, id, id.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, id, id.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, id, id.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, id, id.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, id, id.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, id, id.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: status, period, id, id.value, status.value 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: MedicationRequest 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest 
                     <br></br>   
                     <em>Must Support Elements</em>: authoredOn, timing, repeat, bounds, authoredOn.value, status, status.value, intent, intent.value 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Task 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-taskrejected 
                     <br></br>   
                     <em>Must Support Elements</em>: focus, code 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: AllergyIntolerance 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-allergyintolerance 
                     <br></br>   
                     <em>Must Support Elements</em>: verificationStatus, onset, lastOccurrence, lastOccurrence.value 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Procedure 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure 
                     <br></br>   
                     <em>Must Support Elements</em>: performed, status, status.value 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Procedure 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure 
                     <br></br>   
                     <em>Must Support Elements</em>: code, performed, status, status.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Procedure 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure 
                     <br></br>   
                     <em>Must Support Elements</em>: code, performed, status, status.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Observation 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate 
                     <br></br>   
                     <em>Must Support Elements</em>: effective, status, status.value 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: MedicationRequest 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationnotrequested 
                     <br></br>   
                     <em>Must Support Elements</em>: authoredOn, authoredOn.value, status, status.value, intent, intent.value 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th colspan="2" scope="row" class="row-header">Library Content</th> 
               </tr>  
               <tr> 
                  <th scope="row" class="row-header">CQL Content</th> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">library AHAOverall version '4.1.000'

using QICore version '6.0.0'
using USCore version '6.1.0'

include FHIRHelpers version '4.4.000' called FHIRHelpers
include QICoreCommon version '4.0.000' called QICoreCommon

codesystem "SNOMEDCT": 'http://snomed.info/sct'

valueset "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'
valueset "Ejection Fraction": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1134'
valueset "Heart Failure": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376'
valueset "Heart Transplant": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33'
valueset "Heart Transplant Complications": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56'
valueset "Home Healthcare Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'
valueset "Left Ventricular Assist Device Complications": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58'
valueset "Left Ventricular Assist Device Placement": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61'
valueset "Moderate or Severe": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1092'
valueset "Moderate or Severe LVSD": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090'
valueset "Nursing Facility Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012'
valueset "Office Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'
valueset "Outpatient Consultation": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008'
valueset "Patient Provider Interaction": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012'

code "Left ventricular systolic dysfunction (disorder)": '134401001' from "SNOMEDCT" display 'Left ventricular systolic dysfunction (disorder)'

parameter "Measurement Period" Interval&lt;DateTime&gt;

context Patient

/*
@description: Returns certain finished encounter types that overlap a Heart Failure condition and are during the measurement period: 
                * care services in long term residential facility (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014)
                * home healthcare services (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016)
                * nursing facility visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012)
                * office visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001)
                * outpatient consultation (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008)
*/
define "Heart Failure Outpatient Encounter":
  "Outpatient Encounter" QualifyingEncounter
    with ( [ConditionProblemsHealthConcerns: "Heart Failure"]
      union [ConditionEncounterDiagnosis: "Heart Failure"] ) HeartFailure
      such that HeartFailure.prevalenceInterval ( ) overlaps day of QualifyingEncounter.period
        and HeartFailure.isVerified ( )
    where QualifyingEncounter.period during day of "Measurement Period"
      and QualifyingEncounter.isEncounterFinished ( )

define "Outpatient Encounter":
  ( [Encounter: "Care Services in Long Term Residential Facility"]
      union [Encounter: "Home Healthcare Services"]
      union [Encounter: "Nursing Facility Visit"]
      union [Encounter: "Office Visit"]
      union [Encounter: "Outpatient Consultation"]
  ) 

/*
@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 "Has Heart Transplant Complications":
  exists ( ( [ConditionEncounterDiagnosis: "Heart Transplant Complications"]
      union [ConditionProblemsHealthConcerns: "Heart Transplant Complications"] ) HeartTransplantComplications
      let diagnosisStart: Coalesce(start of HeartTransplantComplications.prevalenceInterval(), HeartTransplantComplications.recordedDate)
      with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
        such that date from diagnosisStart on or before date from end of ModerateOrSevereLVSDHFOutpatientEncounter.period
      where HeartTransplantComplications.isVerified ( )
  )

/*
@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 "Has Left Ventricular Assist Device":
  exists ( [Procedure: "Left Ventricular Assist Device Placement"] LVADPlacement
      with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
        such that LVADPlacement.performed.toInterval ( ) starts before day of end of ModerateOrSevereLVSDHFOutpatientEncounter.period
      where LVADPlacement.status = 'completed'
  )

/*
@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 "Has Left Ventricular Assist Device Complications":
  exists ( ( [ConditionEncounterDiagnosis: "Left Ventricular Assist Device Complications"]
      union [ConditionProblemsHealthConcerns: "Left Ventricular Assist Device Complications"] ) LVADComplications
      let diagnosisStart: Coalesce(start of LVADComplications.prevalenceInterval(), LVADComplications.recordedDate)
      with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
        such that date from diagnosisStart on or before date from end of ModerateOrSevereLVSDHFOutpatientEncounter.period
      where LVADComplications.isVerified ( )
  )             

/*
@description: Returns certain finished encounter types that occurred during the measurement period: 
                * office visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001)
                * outpatient consultation (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008)
                * nursing facility visits (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012)
                * care services in long term residential facility (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014)
                * home healthcare services (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016)
                * patient provider interactions (http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012) 
*/
define "Qualifying Outpatient Encounter During Measurement Period":
  "Outpatient Encounter or Patient Provider Interaction" ValidEncounter
    where ValidEncounter.period during day of "Measurement Period"
      and ValidEncounter.isEncounterFinished ( )

define "Outpatient Encounter or Patient Provider Interaction":
  "Outpatient Encounter"
    union [Encounter: "Patient Provider Interaction"]

/*
@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 "Has Heart Transplant":
  exists ( [Procedure: "Heart Transplant"] HeartTransplant
      with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
        such that HeartTransplant.performed.toInterval ( ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period
      where HeartTransplant.status = 'completed'
  )

/*
@description: Returns heart failure outpatient encounters that start before the end of a moderate or severe LVSD finding
*/
define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":
  "Heart Failure Outpatient Encounter" HFOutpatientEncounter
    with "Moderate or Severe LVSD Findings" LVSDFindings
      such that Coalesce(LVSDFindings.prevalenceInterval(), LVSDFindings.effective.toInterval()) starts before end of HFOutpatientEncounter.period 

/*
@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 "Moderate or Severe LVSD Findings":
  ( [ObservationClinicalResult: "Ejection Fraction"] EjectionFraction
      where EjectionFraction.value as Quantity &lt;= 40 '%'
        and EjectionFraction.status in { 'final', 'amended', 'corrected' }
  )
    union ( ( ( [ConditionProblemsHealthConcerns: "Moderate or Severe LVSD"]
          union [ConditionEncounterDiagnosis: "Moderate or Severe LVSD"]
      )
        union ( ( [ConditionProblemsHealthConcerns: "Left ventricular systolic dysfunction (disorder)"]
            union [ConditionEncounterDiagnosis: "Left ventricular systolic dysfunction (disorder)"] ) LVSDDiagnosis
            where LVSDDiagnosis.severity in "Moderate or Severe"
        ) ) ModerateOrSevereLVSD
        where ModerateOrSevereLVSD.isVerified ( )
    ) 

/*
@description: Returns true if the patient meets the following criteria:
                * 18 years of age or older,
                * Has two Qualifying Outpatient Encounters During Measurement Period
                * Has a Heart Failure Outpatient Encounter
*/
define "Is Adult With Two Qualifying Outpatient Encounters and One Heart Failure Outpatient Encounter During the Measurement Period":
  AgeInYearsAt(date from start of "Measurement Period") &gt;= 18
    and exists ( "Qualifying Outpatient Encounter During Measurement Period" Encounter1
        with "Qualifying Outpatient Encounter During Measurement Period" Encounter2
          such that Encounter2.id !~ Encounter1.id
    )
    and exists "Heart Failure Outpatient Encounter"   


/*
@description: Returns true if the given Condition has a verification status of "confirmed", "unconfirmed", "provisional", or "differential"
*/
define fluent function isVerified(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon."confirmed"
      or condition.verificationStatus ~ QICoreCommon."unconfirmed"
      or condition.verificationStatus ~ QICoreCommon."provisional"
      or condition.verificationStatus ~ QICoreCommon."differential"
  )

/*
@description: Returns true if the given Encounter is finished
*/
define fluent function isEncounterFinished(Encounter Encounter):
  Encounter.status = 'finished'

/*
@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 ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where MedicationRequest.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and MedicationRequest.status in { 'active', 'completed' }
        and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
        and not exists ( ["TaskRejected"] TaskReject
            where TaskReject.focus.references ( MedicationRequest )
              and TaskReject.code ~ QICoreCommon."Fulfill"
        )
  )

/*
@description: Returns true if the given MedicationNotRequested overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
*/
define fluent function isMedicationNotRequestedOrderedDuringHeartFailureOutpatientEncounter(MedicationRequest MedicationNotRequested):
  exists ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where MedicationRequest.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and MedicationRequest.status in { 'completed', 'active' }
        and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
        and not exists ( ["TaskRejected"] TaskReject
            where TaskReject.focus.references ( MedicationRequest )
              and TaskReject.code ~ QICoreCommon."Fulfill"
        )
  )

/*
@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 Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  exists ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where Condition.prevalenceInterval ( ) overlaps day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and Condition.isVerified ( )
  )

/*
@overloaded
@description: Returns true if the given Condition overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
*/
define fluent function overlapsAfterHeartFailureOutpatientEncounter(Condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  exists ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where Condition.prevalenceInterval ( ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and Condition.isVerified ( )
  )

/*
@overloaded
@description: Returns true if the given Procedure overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
*/
define fluent function overlapsAfterHeartFailureOutpatientEncounter(Procedure Procedure):
  exists ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where Procedure.performed.toInterval ( ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and Procedure.status = 'completed'
  )

/*
@overloaded
@description: Returns true if the given AllergyIntolerance overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
*/
define fluent function overlapsAfterHeartFailureOutpatientEncounter(AllergyIntolerance AllergyIntolerance):
  exists ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where Interval[start of AllergyIntolerance.onset.toInterval ( ), AllergyIntolerance.lastOccurrence]overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and AllergyIntolerance.isVerified ( )
  )
          
/*
@description: Returns true if the given condition either has no verification status or has a verification status of confirmed, unconfirmed, provisional, or differential
*/
define fluent function isVerified(AllergyIntolerance AllergyIntolerance):
  AllergyIntolerance.verificationStatus is not null implies ( AllergyIntolerance.verificationStatus ~ QICoreCommon."allergy-confirmed"
      or AllergyIntolerance.verificationStatus ~ QICoreCommon."allergy-unconfirmed"
  )

/*
@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 ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where First((collapse(MedicationRequest.dosageInstruction.timing.repeat.bounds DoseTime
            return TimingBoundToInterval(MedicationRequest.authoredOn, DoseTime)
        )) DrugPeriods
          sort by start of $this
      ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and MedicationRequest.status in { 'active', 'completed' }
        and MedicationRequest.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
        and not exists ( ["TaskRejected"] TaskReject
            where TaskReject.focus.references ( MedicationRequest )
              and TaskReject.code ~ QICoreCommon."Fulfill"
        )
  )

/*
@overloaded
@description: Returns true if the given HeartRateObservation overlaps after the day of the heart failure outpatient encounter with history of moderate or severe LVSD
*/
define fluent function overlapsAfterHeartFailureOutpatientEncounter(HeartRateObservation USCoreHeartRateProfile):
  exists ( "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter
      where HeartRateObservation.effective.toInterval ( ) overlaps after day of ModerateOrSevereLVSDHFOutpatientEncounter.period
        and HeartRateObservation.status in { 'final', 'amended', 'corrected' }
  )
 
define function TimingBoundToInterval(startDate System.DateTime, choice Choice&lt;Quantity, Interval&lt;Quantity&gt;, Interval&lt;DateTime&gt;&gt;):
  case
    when choice is Interval&lt;DateTime&gt; then
        choice as Interval&lt;DateTime&gt;
    when choice is Interval&lt;Quantity&gt; then
        Interval[startDate + (choice.low as Quantity), startDate + (choice.high as Quantity)]
    when choice is Quantity then
        Interval[startDate, startDate + (choice as Quantity))
    else
		null as Interval&lt;DateTime&gt;
	end</code></pre> 
                  </td> 
               </tr>   
               <tr> 
                  <th colspan="2" scope="row" class="row-header">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th> 
               </tr> 
            </tbody> 
         </table> 
      </div>
   </text>
   <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
      <valueCoding>
         <system value="http://snomed.info/sct"></system>
         <code value="134401001"></code>
         <display value="Left ventricular systolic dysfunction (disorder)"></display>
      </valueCoding>
   </extension>
   <url value="https://madie.cms.gov/Library/AHAOverall"></url>
   <identifier>
      <use value="official"></use>
      <system value="https://madie.cms.gov/login"></system>
      <value value="686690a2cea545775d8881ca"></value>
   </identifier>
   <version value="4.1.000"></version>
   <name value="AHAOverall"></name>
   <title value="AHAOverall"></title>
   <status value="active"></status>
   <experimental value="false"></experimental>
   <type>
      <coding>
         <system value="http://terminology.hl7.org/CodeSystem/library-type"></system>
         <code value="logic-library"></code>
      </coding>
   </type>
   <date value="2025-08-22T19:19:03+00:00"></date>
   <publisher value="Telligen"></publisher>
   <description value="This version of the AHAOverall library is patterned after HFCommonDefinitionsQDM library version '3.0.000'"></description>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="QICore model information"></display>
      <resource value="http://hl7.org/fhir/Library/QICore-ModelInfo"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Library FHIRHelpers"></display>
      <resource value="https://madie.cms.gov/Library/FHIRHelpers|4.4.000"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Library QICoreCommon"></display>
      <resource value="https://madie.cms.gov/Library/QICoreCommon|4.0.000"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Code system SNOMEDCT"></display>
      <resource value="http://snomed.info/sct"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Ejection Fraction"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1134"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Moderate or Severe LVSD"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Moderate or Severe"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1092"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Care Services in Long Term Residential Facility"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Home Healthcare Services"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Nursing Facility Visit"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Office Visit"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Outpatient Consultation"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Heart Failure"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Heart Transplant"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Patient Provider Interaction"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Heart Transplant Complications"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Left Ventricular Assist Device Placement"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61"></resource>
   </relatedArtifact>
   <relatedArtifact>
      <type value="depends-on"></type>
      <display value="Value set Left Ventricular Assist Device Complications"></display>
      <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58"></resource>
   </relatedArtifact>
   <dataRequirement>
      <type value="Observation"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result"></profile>
      <mustSupport value="code"></mustSupport>
      <mustSupport value="value"></mustSupport>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1134"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <code>
            <system value="http://snomed.info/sct"></system>
            <code value="134401001"></code>
            <display value="Left ventricular systolic dysfunction (disorder)"></display>
         </code>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1090"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <code>
            <system value="http://snomed.info/sct"></system>
            <code value="134401001"></code>
            <display value="Left ventricular systolic dysfunction (disorder)"></display>
         </code>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.376"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.56"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Condition"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"></profile>
      <mustSupport value="code"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.58"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Encounter"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
      <mustSupport value="type"></mustSupport>
      <mustSupport value="period"></mustSupport>
      <mustSupport value="id"></mustSupport>
      <mustSupport value="id.value"></mustSupport>
      <codeFilter>
         <path value="type"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1014"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Encounter"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
      <mustSupport value="type"></mustSupport>
      <mustSupport value="period"></mustSupport>
      <mustSupport value="id"></mustSupport>
      <mustSupport value="id.value"></mustSupport>
      <codeFilter>
         <path value="type"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Encounter"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
      <mustSupport value="type"></mustSupport>
      <mustSupport value="period"></mustSupport>
      <mustSupport value="id"></mustSupport>
      <mustSupport value="id.value"></mustSupport>
      <codeFilter>
         <path value="type"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1012"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Encounter"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
      <mustSupport value="type"></mustSupport>
      <mustSupport value="period"></mustSupport>
      <mustSupport value="id"></mustSupport>
      <mustSupport value="id.value"></mustSupport>
      <codeFilter>
         <path value="type"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Encounter"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
      <mustSupport value="type"></mustSupport>
      <mustSupport value="period"></mustSupport>
      <mustSupport value="id"></mustSupport>
      <mustSupport value="id.value"></mustSupport>
      <codeFilter>
         <path value="type"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1008"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Encounter"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
      <mustSupport value="type"></mustSupport>
      <mustSupport value="period"></mustSupport>
      <mustSupport value="id"></mustSupport>
      <mustSupport value="id.value"></mustSupport>
      <codeFilter>
         <path value="type"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1012"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Encounter"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="period"></mustSupport>
      <mustSupport value="id"></mustSupport>
      <mustSupport value="id.value"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
   </dataRequirement>
   <dataRequirement>
      <type value="MedicationRequest"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"></profile>
      <mustSupport value="authoredOn"></mustSupport>
      <mustSupport value="timing"></mustSupport>
      <mustSupport value="repeat"></mustSupport>
      <mustSupport value="bounds"></mustSupport>
      <mustSupport value="authoredOn.value"></mustSupport>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
      <mustSupport value="intent"></mustSupport>
      <mustSupport value="intent.value"></mustSupport>
   </dataRequirement>
   <dataRequirement>
      <type value="Task"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-taskrejected"></profile>
      <mustSupport value="focus"></mustSupport>
      <mustSupport value="code"></mustSupport>
   </dataRequirement>
   <dataRequirement>
      <type value="AllergyIntolerance"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-allergyintolerance"></profile>
      <mustSupport value="verificationStatus"></mustSupport>
      <mustSupport value="onset"></mustSupport>
      <mustSupport value="lastOccurrence"></mustSupport>
      <mustSupport value="lastOccurrence.value"></mustSupport>
   </dataRequirement>
   <dataRequirement>
      <type value="Procedure"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"></profile>
      <mustSupport value="performed"></mustSupport>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
   </dataRequirement>
   <dataRequirement>
      <type value="Procedure"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"></profile>
      <mustSupport value="code"></mustSupport>
      <mustSupport value="performed"></mustSupport>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.33"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Procedure"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"></profile>
      <mustSupport value="code"></mustSupport>
      <mustSupport value="performed"></mustSupport>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
      <codeFilter>
         <path value="code"></path>
         <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1178.61"></valueSet>
      </codeFilter>
   </dataRequirement>
   <dataRequirement>
      <type value="Observation"></type>
      <profile value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-heart-rate"></profile>
      <mustSupport value="effective"></mustSupport>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
   </dataRequirement>
   <dataRequirement>
      <type value="MedicationRequest"></type>
      <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationnotrequested"></profile>
      <mustSupport value="authoredOn"></mustSupport>
      <mustSupport value="authoredOn.value"></mustSupport>
      <mustSupport value="status"></mustSupport>
      <mustSupport value="status.value"></mustSupport>
      <mustSupport value="intent"></mustSupport>
      <mustSupport value="intent.value"></mustSupport>
   </dataRequirement>
   <content>
      <contentType value="text/cql"></contentType>
      <data value="[encoded data, 24060 characters]"></data>
   </content>
   <content>
      <contentType value="application/elm+xml"></contentType>
      <data value="[encoded data, 526172 characters]"></data>
   </content>
   <content>
      <contentType value="application/elm+json"></contentType>
      <data value="[encoded data, 813512 characters]"></data>
   </content>
</Library>