<?xml version="1.0" encoding="UTF-8"?>

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


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


</tr>

<tr>


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



<td class="content-container">Anticoagulation Therapy for Atrial Fibrillation/FlutterFHIR
</td>


</tr>



<tr>


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



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


</tr>


  
<tr>


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



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


</tr>



  
<tr>


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



<td class="content-container">urn:uuid:bc80e4cf-d267-47bf-ad0d-4d37f8ae2328</td>


</tr>



  
<tr>


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



<td class="content-container">urn:uuid:48d6fe97-e70f-4688-b24f-79c3146975be</td>


</tr>



  
    
    
<tr>


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



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


</tr>

  




  
    
    
<tr>


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



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


</tr>

  















<tr>


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



<td class="content-container">The Joint Commission</td>


</tr>






<tr>


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



<td class="content-container">The Joint Commission</td>


</tr>






<tr>


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



<td class="content-container"><div><p>Ischemic stroke patients with atrial fibrillation/flutter who are prescribed or continuing to take anticoagulation therapy at hospital discharge</p>
</div></td>


</tr>



<tr>


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



<td class="content-container"><div><p>Measure specifications are in the Public Domain.</p>
<p>LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.</p>
</div></td>


</tr>


<tr>


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



<td class="content-container"><div><p>These performance measures are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.</p>
</div></td>


</tr>













<tr>


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



<td class="content-container"><div><p>Nonvalvular atrial fibrillation (NVAF) is a common arrhythmia and an important risk factor for stroke. It is one of several conditions and lifestyle factors that have been identified as risk factors for stroke. It has been estimated that over 2 million adults in the United States have NVAF (Kornej, 2020). While the median age of patients with atrial fibrillation is 75 years, the incidence increases with advancing age. For example, The Framingham Heart Study noted a dramatic increase in stroke risk associated with atrial fibrillation with advancing age, from 1.5% for those 50 to 59 years of age to 23.5% for those 80 to 89 years of age. Furthermore, a prior stroke or transient ischemic attack (TIA) are among a limited number of predictors of high stroke risk within the population of patients with atrial fibrillation. Therefore, much emphasis has been placed on identifying methods for preventing recurrent ischemic stroke as well as preventing first stroke. Prevention strategies focus on the modifiable risk factors such as hypertension, smoking, and atrial fibrillation. Analysis of five placebo-controlled clinical trials investigating the efficacy of warfarin in the primary prevention of thromboembolic stroke, found the relative risk of thromboembolic stroke was reduced by 68% for atrial fibrillation patients treated with warfarin. The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk-atrial fibrillation patients with TIA or prior stroke.</p>
</div></td>


</tr>


<tr>


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



<td class="content-container"><div><p>The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk atrial fibrillation patients with TIA or prior stroke</p>
</div></td>


</tr>



<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Berge, E., Abdelnoor, M., Nakstad, P. H., et al. (2000, April 8). Low molecular-weight heparin versus aspirin in patients with acute ischaemic stroke and atrial fibrillation: A double-blind randomised study. Lancet, 355(9211), 1205-1210.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Centers for Disease Control and Prevention. (2009, May 1). Prevalence and most common causes of disability among adults- United States, 2005. Morbidity and Mortality Weekly Report, 58(16), 421-426.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Connolly, S. J., Ezekowitz, M. D., Yusuf, S., et al. (2009, September 17). Dabigatran versus warfarin in patients with atrial fibrillation. New England Journal of Medicine, 361(12), 1139-1151.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Fuster, V., Ryden, L. E., Asinger, R. W., et al. (2001, October). ACC/AHA/ESC guidelines for the management of patients with atrial fibrillation: Executive summary. A report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines and the European Society of Cardiology Committee for Practice Guidelines and Policy Conferences (Committee to Develop Guidelines for the Management of Patients with Atrial Fibrillation). Journal of the American College of Cardiology, 38(4), 1231-1266.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Fuster, V., Ryden, L. E., Cannom, D. S., et al. (2006, August 15). ACC/AHA/ESC 2006 guidelines for the management of patients with atrial fibrillation: A report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines and the European Society of Cardiology Committee for Practice Guidelines (writing committee to revise the 2001 guidelines for the management of patients with atrial fibrillation). Circulation, 114(7), e257-354.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Goldstein, L. B., Adams, R., Alberts, M. J., et al. (2006, June). Primary prevention of ischemic stroke: A guideline from the American Heart Association/American Stroke Association Stroke Council: Cosponsored by the Atherosclerotic Peripheral Vascular Disease Interdisciplinary Working Group; Cardiovascular Nursing Council; Clinical Cardiology Council; Nutrition, Physical Activity, and Metabolism Council; and the Quality of Care and Outcomes Research Interdisciplinary Working Group: The American Academy of Neurology affirms the value of this guideline. Stroke, 37(6), 1583-1633.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Gorelick, P. B., Sacco, R. L., Smith, D. B., et al. (1999, March). Prevention of a first stroke: A review of guidelines and a multidisciplinary consensus statement from the National Stroke Association. JAMA, 281(12), 1112-1120.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Hart, R. G., Benavente, O., McBride R., et al. (1999, October 5). Antithrombotic therapy to prevent stroke in patients with atrial fibrillation: A meta-analysis. Annals of Internal Medicine, 131(7), 492-501.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Jauch, E. C., Saver, J. L., Adams, H. P., Jr., et al. (2013). Guidelines for the early management of patients with acute ischemic stroke: A guideline for health care professionals from the American Heart Association/American Stroke Association. Stroke, 44(3), 870-947.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Kernan, W. N., Ovbiagele, B., Black, H. R., et al. (2014, May). Guidelines for the prevention of stroke in patients with stroke and transient ischemic attack: A guideline for health care professionals from the American Heart Association/American Stroke Association. Stroke, 45(7), 2160-2223.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Kleindorfer, D. O., Towfighi, A., Chaturvedi, S., Cockroft, K. M., Gutierrez, J., Lombardi-Hill, D., ... Williams, L. S. (2021). 2021 guideline for the prevention of stroke in patients with stroke and transient ischemic attack: A guideline from the American Heart Association/American Stroke Association. Stroke, 52(7), e364-e467. https://doi.org/10.1161/STR.0000000000000375</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Lin, H. J., Wolf, P. A., Kelly-Hayes, M., et al. (1996, October). Stroke severity in atrial fibrillation: The Framingham Study. Stroke 27(10), 1760-1764</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Penado, S., Cano, M., Acha, O., et al. (2003, February 15). Atrial fibrillation as a risk factor for stroke recurrence. American Journal of Medicine, 114 (3), 206-210.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Powers, W. J., Rabinstein, A. A., Ackerson, T., et al. (2018, January). 2018 guidelines for the early management of patients with acute ischemic stroke: A guideline for health care professionals from the American Heart Association/American Stroke Association. Stroke, 49, e31-e32.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Roger, V. L., Go, A. S., Lloyd-Jones, D. M., et al. (2012, January 3). Heart disease and stroke statistics- 2012 update: A report from the American Heart Association. Circulation, 125(1), e2-e220.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Saxena, R., &amp; Koudstaal, P. J. (2011). Anticoagulants for preventing stroke in patients with nonrheumatic atrial fibrillation and a history of stroke or transient ischemic attack (review). Cochrane Database of Systematic Reviews, (4), CD000185.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Saxena, R., Lewis, S., Berge, E., et al. (2001, October). Risk of early death and recurrent stroke and effect of heparin in 3,169 patients with acute ischemic stroke and atrial fibrillation in the International Stroke Trial. Stroke, 32(10), 2333-2337.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Van Walraven, C., Hart, R. G., Singer, D. E., et al. (2002, November 20).Oral anticoagulants vs. aspirin in nonvalvular atrial fibrillation: An individual patient meta-analysis. JAMA, 288(19), 2441-2448.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  
  <td class="content-container">
    
    
    
    <div><p>Wann, L. S., Curtis, A. B., Ellenbogen, K. A., et al. (2011, March 15). 2011 ACCF/AHA/HRS focused update on the management of patients with atrial fibrillation (update on dabigatran): A report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines. Journal of the American College of Cardiology, 57(11), 1330-1337.</p>
</div>
    
    
    
    
    
    
    
  </td>
</tr>







<tr>


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



<td class="content-container">The &quot;Nonelective Inpatient Encounter&quot; value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the &quot;Inpatient Encounter&quot; value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective Inpatient Encounters include emergency, urgent, and unplanned admissions.

&lt;br /&gt;

New or continuing anticoagulant medications are included with the use of the MedicationRequest QI-Core Profile. The Profile's community and discharge category codes indicate that the medications should be taken by or given to the patient after being discharged.

&lt;br /&gt;

The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.

&lt;br /&gt;

This dQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. This FHIR-based measure has been derived from the QDM-based measure: CMS71v15. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
</td>


</tr>



  
  
  
    
    <tr>


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


</tr>
  
  
  
  
<tr>


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



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


</tr>



  
<tr>


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



<td class="content-container">
    Proportion


</td>


</tr>





  
<tr>


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



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


</td>


</tr>






<tr>


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



<td class="content-container">
    Process


</td>


</tr>



  
<tr>


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



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


</tr>



  
  

    
      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Inpatient hospitalizations (non-elective admissions) for patients age 18 and older, discharged from inpatient care with a principal diagnosis of ischemic stroke, that ends during the measurement period
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-InitialPopulation_1">Initial Population</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: Denominator_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Inpatient hospitalizations for patients with a principal diagnosis of ischemic stroke, and a history of atrial ablation, or current or history of atrial fibrillation/flutter
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-Denominator_1">Denominator</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: DenominatorExclusion_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">* Inpatient hospitalizations for patients admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations.

* Inpatient hospitalizations for patients discharged to another hospital

* Inpatient hospitalizations for patients who left against medical advice

* Inpatient hospitalizations for patients who expired

* Inpatient hospitalizations for patients discharged to home for hospice care

* Inpatient hospitalizations for patients discharged to a health care facility for hospice care

* Inpatient hospitalizations for patients with comfort measures documented

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

      
    

    
      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: DenominatorException_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Inpatient hospitalizations for patients with a documented reason for not prescribing anticoagulation therapy at discharge
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-DenominatorException_1">Denominator Exceptions</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
        
  
    
    
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: Numerator_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Inpatient hospitalizations for patients prescribed or continuing to take anticoagulation therapy at hospital discharge
</p>
        
        
          
            
              
              <em>Criteria</em>: <a href="#Group_1-Numerator_1">Numerator</a> 
            
          
          
        
        
        
      </td>
    </tr>
  

      
    

    
      
    

  


  







  
    
    
    
    
    
<tr>


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



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


</tr>

  




  <tr>


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


</tr>


<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: sde-ethnicity
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Ethnicity

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms71fhirstkanticoagafflutter-sde-ethnicity">SDE Ethnicity</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: sde-payer
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Payer

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms71fhirstkanticoagafflutter-sde-payer">SDE Payer</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: sde-race
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Race

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms71fhirstkanticoagafflutter-sde-race">SDE Race</a> 
        
      
    
  </td>
</tr>

<tr>
  

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


  <td class="content-container">
    
      <em>ID</em>: sde-sex
      
      <br/>
      
    
    
      
        
          <em>Usage Code</em>: <span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-data-usage supplemental-data}">Supplemental Data</span>
        
        <br/>
      
    
    
      <em>Description</em>: SDE Sex

    
    
      
        <br/>
        
          
          <em>Logic Definition</em>: <a href="#cms71fhirstkanticoagafflutter-sde-sex">SDE Sex</a> 
        
      
    
  </td>
</tr>


<tr>


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


</tr>

<tr>


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



<td class="content-container"><code>https://madie.cms.gov/Library/CMS71FHIRSTKAnticoagAFFlutter</code></td>


</tr>




<tr>
  <th scope="row" class="row-header">Contents</th>
  <td class="content-container">
    <em><a href="#population-criteria">Population Criteria</a></em>
    <br/>
    <em><a href="#definitions">Logic Definitions</a></em>
    <br/>
    <em><a href="#terminology">Terminology</a></em>
    <br/>
    <em><a href="#dependencies">Dependencies</a></em>
    <br/>
    <em><a href="#data-requirements">Data Requirements</a></em>
    <br/>
    <em><a href="#parameters">Parameters</a></em>
    <br/>
  </td>
</tr>


  <tr>


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


</tr>
  
  
  

  
  
  
    
    <tr>


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


</tr>
  
  
  
  

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

  <td>
    
    
    
    
      
      <a name="Group_1-InitialPopulation_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  TJC.&quot;Ischemic Stroke Encounter&quot;</code></pre>
    
      
      <a href="#cms71fhirstkanticoagafflutter-initial-population"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

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

  <td>
    
    
    
    
      
      <a name="Group_1-Denominator_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Encounter With A History Of Atrial Ablation&quot;
    union &quot;Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter&quot;</code></pre>
    
      
      <a href="#cms71fhirstkanticoagafflutter-denominator"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

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

  <td>
    
    
    
    
      
      <a name="Group_1-DenominatorExclusion_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
  ( &quot;Denominator&quot; Encounter
      where Encounter.status = 'finished'
        and ( Encounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Discharged to Home for Hospice Care&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Discharged to Health Care Facility for Hospice Care&quot;
        )
  )
    union &quot;Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter&quot;</code></pre>
    
      
      <a href="#cms71fhirstkanticoagafflutter-denominator-exclusions"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

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

  <td>
    
    
    
    
      
      <a name="Group_1-DenominatorException_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
  &quot;Denominator&quot; Encounter
    with &quot;Documented Reason For Not Giving Anticoagulant At Discharge&quot; NoDischargeAnticoagulant
      such that NoDischargeAnticoagulant.authoredOn during Encounter.period</code></pre>
    
      
      <a href="#cms71fhirstkanticoagafflutter-denominator-exceptions"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

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

  <td>
    
    
    
    
      
      <a name="Group_1-Numerator_1"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Denominator&quot; Encounter
    with [&quot;MedicationRequest&quot;: &quot;Anticoagulant Therapy&quot;] DischargeAnticoagulant
      such that DischargeAnticoagulant.status in { 'active', 'completed' }
        and DischargeAnticoagulant.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
        and ( DischargeAnticoagulant.isCommunity ( )
            or DischargeAnticoagulant.isDischarge ( )
        )
        and DischargeAnticoagulant.authoredOn during Encounter.period
        and not exists ( [&quot;TaskRejected&quot;] TaskReject
            where TaskReject.focus.references ( DischargeAnticoagulant )
              and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
        )</code></pre>
    
      
      <a href="#cms71fhirstkanticoagafflutter-numerator"><em>Definition</em></a>
    
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

      
    

    
      
    

  


  


  

  
  


  <tr>


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


</tr>
  
  
          
        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="tjcoverall-non-elective-inpatient-encounter-with-age"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Non Elective Inpatient Encounter With Age&quot;:
  [&quot;Encounter&quot;: &quot;Nonelective Inpatient Encounter&quot;] NonElectiveEncounter
        where AgeInYearsAt(date from start of NonElectiveEncounter.period ) &gt;= 18
         and NonElectiveEncounter.period ends during day of &quot;Measurement Period&quot;</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="tjcoverall-ischemic-stroke-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Ischemic Stroke Encounter&quot;:
  &quot;Non Elective Inpatient Encounter With Age&quot; NonElectiveEncounterWithAge
   where NonElectiveEncounterWithAge.hasPrincipalDiagnosisOf(&quot;Ischemic Stroke&quot; )</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="tjcoverall-intervention-comfort-measures"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Intervention Comfort Measures&quot;:
  ( [&quot;ServiceRequest&quot;: &quot;Comfort Measures&quot;] ComfortCare
    where ComfortCare.status in { 'active', 'completed', 'on-hold' }
      and ComfortCare.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
  )  
  union ( [&quot;Procedure&quot;: &quot;Comfort Measures&quot;] ComfortCarePerformed
        where ComfortCarePerformed.status in { 'completed', 'in-progress' }
  )</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        




        
        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        




        
        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-encounter-with-a-history-of-atrial-ablation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With A History Of Atrial Ablation&quot;:
  ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
      where exists ( [&quot;Procedure&quot;: &quot;Atrial Ablation&quot;] AtrialAblationProcedure
          where AtrialAblationProcedure.status = 'completed'
            and AtrialAblationProcedure.performed.toInterval ( ) starts before start of IschemicStrokeEncounter.period
      )
  )
    union ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with [&quot;ConditionProblemsHealthConcerns&quot;: &quot;History of Atrial Ablation&quot;] AtrialAblationDiagnosis
          such that AtrialAblationDiagnosis.verificationStatus is not null implies ( AtrialAblationDiagnosis.verificationStatus !~ Status.&quot;refuted&quot;
              and AtrialAblationDiagnosis.verificationStatus !~ Status.&quot;entered-in-error&quot;
          )
            and AtrialAblationDiagnosis.onset.toInterval ( ) starts before start of IschemicStrokeEncounter.period
    )
    union ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with [&quot;SimpleObservation&quot;: &quot;History of Atrial Ablation&quot;] AtrialAblationObservation
          such that AtrialAblationObservation.status in { 'final', 'amended', 'corrected' }
            and AtrialAblationObservation.effective.earliest ( ) on or before end of IschemicStrokeEncounter.period
    )
    union ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
        with [&quot;ConditionEncounterDiagnosis&quot;: &quot;History of Atrial Ablation&quot;] AtrialAblationEncDiagnosis
          such that AtrialAblationEncDiagnosis.verificationStatus is not null implies ( AtrialAblationEncDiagnosis.verificationStatus !~ Status.&quot;refuted&quot;
              and AtrialAblationEncDiagnosis.verificationStatus !~ Status.&quot;entered-in-error&quot;
          )
            and AtrialAblationEncDiagnosis.onset.toInterval ( ) starts before start of IschemicStrokeEncounter.period
    )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-encounter-with-prior-or-present-diagnosis-of-atrial-fibrillation-or-flutter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter&quot;:
  ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
      with [&quot;ConditionProblemsHealthConcerns&quot;: &quot;Atrial Fibrillation or Flutter&quot;] AtrialFibrillationFlutter
        such that AtrialFibrillationFlutter.verificationStatus is not null implies ( AtrialFibrillationFlutter.verificationStatus !~ Status.&quot;refuted&quot;
            and AtrialFibrillationFlutter.verificationStatus !~ Status.&quot;entered-in-error&quot;
        )
          and AtrialFibrillationFlutter.onset.toInterval ( ) starts on or before end of IschemicStrokeEncounter.period
  )
    union TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter
      where exists ( ( IschemicStrokeEncounter.encounterDiagnosis ( ) ) EncounterDiagnosis
          where EncounterDiagnosis.code in &quot;Atrial Fibrillation or Flutter&quot;
      )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-denominator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Encounter With A History Of Atrial Ablation&quot;
    union &quot;Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter&quot;</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-numerator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Denominator&quot; Encounter
    with [&quot;MedicationRequest&quot;: &quot;Anticoagulant Therapy&quot;] DischargeAnticoagulant
      such that DischargeAnticoagulant.status in { 'active', 'completed' }
        and DischargeAnticoagulant.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
        and ( DischargeAnticoagulant.isCommunity ( )
            or DischargeAnticoagulant.isDischarge ( )
        )
        and DischargeAnticoagulant.authoredOn during Encounter.period
        and not exists ( [&quot;TaskRejected&quot;] TaskReject
            where TaskReject.focus.references ( DischargeAnticoagulant )
              and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
        )</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-initial-population"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  TJC.&quot;Ischemic Stroke Encounter&quot;</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

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

</tr>



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-encounter-with-comfort-measures-during-hospitalization-for-patients-with-documented-atrial-fibrillation-or-flutter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter&quot;:
  &quot;Denominator&quot; Encounter
    with TJC.&quot;Intervention Comfort Measures&quot; ComfortMeasure
      such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during Encounter.hospitalizationWithObservation ( )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-denominator-exclusions"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
  ( &quot;Denominator&quot; Encounter
      where Encounter.status = 'finished'
        and ( Encounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Discharged to Home for Hospice Care&quot;
            or Encounter.hospitalization.dischargeDisposition in &quot;Discharged to Health Care Facility for Hospice Care&quot;
        )
  )
    union &quot;Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter&quot;</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-documented-reason-for-not-giving-anticoagulant-at-discharge"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Documented Reason For Not Giving Anticoagulant At Discharge&quot;:
  ( [&quot;MedicationNotRequested&quot;: &quot;Anticoagulant Therapy&quot;] NoAnticoagulant
      where ( NoAnticoagulant.reasonCode in &quot;Medical Reason For Not Providing Treatment&quot;
          or NoAnticoagulant.reasonCode in &quot;Patient Refusal&quot;
      )
        and ( NoAnticoagulant.isCommunity ( )
            or NoAnticoagulant.isDischarge ( )
        )
        and NoAnticoagulant.status in { 'active', 'completed' }
        and NoAnticoagulant.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
  )
    union ( [&quot;MedicationRequest&quot;: &quot;Anticoagulant Therapy&quot;] MedReqAntiCoagulant
        with [&quot;TaskRejected&quot;] TaskReject
          such that TaskReject.focus.references ( MedReqAntiCoagulant )
            and ( TaskReject.statusReason in &quot;Medical Reason For Not Providing Treatment&quot;
                or TaskReject.statusReason in &quot;Patient Refusal&quot;
            )
            and MedReqAntiCoagulant.status in { 'active', 'completed' }
            and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;
    )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cms71fhirstkanticoagafflutter-denominator-exceptions"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
  &quot;Denominator&quot; Encounter
    with &quot;Documented Reason For Not Giving Anticoagulant At Discharge&quot; NoDischargeAnticoagulant
      such that NoDischargeAnticoagulant.authoredOn during Encounter.period</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-references"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if any of the given references are to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(references List&lt;FHIR.Reference&gt;, resource FHIR.Resource):
  exists (references R where R.references(resource))</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-includescode"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given code is in the given codeList
@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.
*/
define fluent function includesCode(codeList List&lt;CodeableConcept&gt;, code Concept):
  exists (codeList C where C ~ code)</code></pre>
  </td>

</tr>



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        


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

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

</tr>
<tr>

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

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

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

</tr>



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-iscommunity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given MedicationRequest has a category of Community
*/
define fluent function isCommunity(medicationRequest MedicationRequest):
  exists (medicationRequest.category C
    where C ~ Community
  )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhircommon-isdischarge"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given MedicationRequest has a category of Discharge
*/
define fluent function isDischarge(medicationRequest MedicationRequest):
  exists (medicationRequest.category C
    where C ~ Discharge
  )</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-todate"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDate(value date): value.value</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-todatetime"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value dateTime): value.value</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-todatetime"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value instant): value.value</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-hasprincipaldiagnosisof"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
 @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet.
 @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
 */
 define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet System.ValueSet):
   (encounter.principalDiagnosis()) PD
     return PD.diagnosis in valueSet
       or PD.diagnosis.getCondition().code in valueSet</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-principaldiagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter
 @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
*/
define fluent function principalDiagnosis(encounter Encounter):
singleton from (
     (encounter.claimDiagnosis()) CD
       where CD.type.includesCode(&quot;Principal Diagnosis&quot;)
   )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-claimdiagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the claim diagnosis elements for the given encounter
@comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information
*/
define fluent function claimDiagnosis(encounter Encounter):
  encounter E
    let 
      claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))),
      claimItem: (claim.item I where I.encounter.references(E))
    return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-getcondition"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the Condition resource for the given reference
*/
define fluent function getCondition(reference Reference):
  singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="cqmcommon-hospitalizationwithobservation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
*/
define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
  TheEncounter Visit
  		let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs
  				where LastObs.status = 'finished'
            and LastObs.period ends 1 hour or less on or before start of Visit.period
  				sort by end of period
  			),
  			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
  			EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED
  				where LastED.status = 'finished'
            and LastED.period ends 1 hour or less on or before VisitStart
  				sort by end of period
  			)
  		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]</code></pre>
  </td>

</tr>



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>





  
  


  <tr>


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


</tr>
  
  
  

 

 

 

 

 

 

 

 

 

 

 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system SNOMEDCT
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-snomedct.html">SNOMED CT (all versions)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system Diagnosis Type
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-ex-diagnosistype.html">Example Diagnosis Type Codes</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/ex-diagnosistype</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system ConditionVerificationStatusCodes
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-condition-ver-status.html">ConditionVerificationStatus</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system MedicationRequestCategory
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.1.0/CodeSystem-medicationrequest-category.html">MedicationRequest Category Codes</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system TaskCodeSystem
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-task-code.html">Task Codes</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/CodeSystem/task-code</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Nonelective Inpatient Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.424/expansion">Nonelective Inpatient Encounter</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Ischemic Stroke
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.247/expansion">Ischemic Stroke</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Atrial Ablation
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.203/expansion">Atrial Ablation</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.203</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set History of Atrial Ablation
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.76/expansion">History of Atrial Ablation</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.76</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Atrial Fibrillation or Flutter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.202/expansion">Atrial Fibrillation or Flutter</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Anticoagulant Therapy
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.200/expansion">Anticoagulant Therapy</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Payer Type
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Discharge To Acute Care Facility
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.87/expansion">Discharge To Acute Care Facility</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Left Against Medical Advice
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.308/expansion">Left Against Medical Advice</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Patient Expired
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.309/expansion">Patient Expired</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Discharged to Home for Hospice Care
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.209/expansion">Discharged to Home for Hospice Care</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.209</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Discharged to Health Care Facility for Hospice Care
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.207/expansion">Discharged to Health Care Facility for Hospice Care</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.207</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Comfort Measures
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion">Comfort Measures</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Observation Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Emergency Department Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Medical Reason For Not Providing Treatment
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.473/expansion">Medical Reason For Not Providing Treatment</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Patient Refusal
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.93/expansion">Patient Refusal</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93</tt>
    
  </td>
</tr>
 


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

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

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Principal Diagnosis
        <br/>
      
      <em>Code</em>: principal
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/ex-diagnosistype</tt>
    </td>
  </tr>

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

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

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Community
        <br/>
      
      <em>Code</em>: community
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Discharge
        <br/>
      
      <em>Code</em>: discharge
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/medicationrequest-category</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Fulfill
        <br/>
      
      <em>Code</em>: fulfill
      <br/>
      <em>System</em>: <tt>http://hl7.org/fhir/CodeSystem/task-code</tt>
    </td>
  </tr>

  
  


  <tr>


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


</tr>
  
  
  


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: USQualityCore model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: USCore model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/us/cql/2026May/Library-USCore-ModelInfo.html">http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: FHIR model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIR-ModelInfo.html">http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</tt>
    
  </td>
</tr>
 


<tr>
  

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


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


<tr>
  

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


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


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library USCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/us/cql/2026May/Library-USCoreCommon.html">http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot</tt>
    
  </td>
</tr>
 


<tr>
  

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


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


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library TJC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-TJCOverall.html">TJCOverall</a> version: 9.1.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/TJCOverall|9.1.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library CQMCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-CQMCommon.html">CQMCommon</a> version: 5.1.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/CQMCommon|5.1.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


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


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library USQualityCoreCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-USQualityCoreCommon.html">US Quality Core Common</a> version: 0.1.0-cibuild
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild</tt>
    
  </td>
</tr>
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


  
  






  <tr>


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


</tr>
  
  
  
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: ombCategory, detailed, text
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period, diagnosis, diagnosis.code, hospitalization, hospitalization.dischargeDisposition
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion">Observation Services</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: finished (finished)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period, diagnosis, diagnosis.code, hospitalization, hospitalization.dischargeDisposition
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion">Emergency Department Visit</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: finished (finished)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, diagnosis, diagnosis.code, status, hospitalization, hospitalization.dischargeDisposition
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.424/expansion">Nonelective Inpatient Encounter</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Resource
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/resource.html">Resource</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Claim
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/claim.html">Claim</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: status, use, item
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: active (active)
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: use</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: claim (claim)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis</code>
    <br/>        
  
   
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns</code>
    <br/>        
  
   
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus, onset
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.202/expansion">Atrial Fibrillation or Flutter</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: birthDate
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, performed
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.203/expansion">Atrial Ablation</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: status</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      [not stated]: completed (completed)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/procedure.html">Procedure</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion">Comfort Measures</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, effective
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1110.76/expansion">History of Atrial Ablation</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Medication
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.200/expansion">Anticoagulant Therapy</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication.reference, status, intent, authoredOn
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, status, intent, authoredOn
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.200/expansion">Anticoagulant Therapy</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Task
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-taskrejected</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: focus, code, statusReason
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Coverage
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion">Payer Type</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: ServiceRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/servicerequest.html">ServiceRequest</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, intent
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/1.3.6.1.4.1.33895.1.3.0.45/expansion">Comfort Measures</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <code>http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested</code>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, reasonCode, status, intent
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: medication</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.200/expansion">Anticoagulant Therapy</a>
    <br/> 
  
  
  
   
  </td>
</tr>

  
  


  <tr>


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


</tr>
  
  
  <tr>
  

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


  <td class="content-container">
    <table>
      <thead>
        <tr>
          <td><em>Name</em></td>
          <td><em>Use</em></td>
          <td><em>Card.</em></td>
          <td><em>Type</em></td>
          <td><em>Documentation</em></td>
        </tr>
      </thead>
      <tbody>
      
        <tr>
          <td>Measurement Period</td>
          <td>In</td>
          <td>0..1</td>
          <td>Period</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Sex</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Coding</td>
          <td/>
        </tr>
      
        <tr>
          <td>Numerator</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>Denominator</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Payer</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Initial Population</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Ethnicity</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Denominator Exclusions</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
        <tr>
          <td>SDE Race</td>
          <td>Out</td>
          <td>0..1</td>
          <td>Resource</td>
          <td/>
        </tr>
      
        <tr>
          <td>Denominator Exceptions</td>
          <td>Out</td>
          <td>0..*</td>
          <td>Encounter</td>
          <td/>
        </tr>
      
      </tbody>
    </table>
  </td>
</tr>

  
  

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

    </tbody>
  </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248153007"/>
          <display value="Male (finding)"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248152002"/>
          <display value="Female (finding)"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/ex-diagnosistype"/>
          <code value="principal"/>
          <display value="Principal Diagnosis"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="refuted"/>
          <display value="refuted"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="entered-in-error"/>
          <display value="entered-in-error"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
          <code value="community"/>
          <display value="Community"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
          <code value="discharge"/>
          <display value="Discharge"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/CodeSystem/task-code"/>
          <code value="fulfill"/>
          <display value="Fulfill"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-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;:&#xA;  case&#xA;    when Patient.sex() = '248153007' then &quot;Male (finding)&quot;&#xA;    when Patient.sex() = '248152002' then &quot;Female (finding)&quot;&#xA;    else null&#xA;  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Sex&quot;:&#xA;  SDE.&quot;SDE Sex&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="TJCOverall"/>
        </extension>
        <extension url="name">
          <valueString value="Non Elective Inpatient Encounter With Age"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Non Elective Inpatient Encounter With Age&quot;:&#xA;  [&quot;Encounter&quot;: &quot;Nonelective Inpatient Encounter&quot;] NonElectiveEncounter&#xA;        where AgeInYearsAt(date from start of NonElectiveEncounter.period ) &gt;= 18&#xA;         and NonElectiveEncounter.period ends during day of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="TJCOverall"/>
        </extension>
        <extension url="name">
          <valueString value="Ischemic Stroke Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Ischemic Stroke Encounter&quot;:&#xA;  &quot;Non Elective Inpatient Encounter With Age&quot; NonElectiveEncounterWithAge&#xA;   where NonElectiveEncounterWithAge.hasPrincipalDiagnosisOf(&quot;Ischemic Stroke&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With A History Of Atrial Ablation"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With A History Of Atrial Ablation&quot;:&#xA;  ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter&#xA;      where exists ( [&quot;Procedure&quot;: &quot;Atrial Ablation&quot;] AtrialAblationProcedure&#xA;          where AtrialAblationProcedure.status = 'completed'&#xA;            and AtrialAblationProcedure.performed.toInterval ( ) starts before start of IschemicStrokeEncounter.period&#xA;      )&#xA;  )&#xA;    union ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter&#xA;        with [&quot;ConditionProblemsHealthConcerns&quot;: &quot;History of Atrial Ablation&quot;] AtrialAblationDiagnosis&#xA;          such that AtrialAblationDiagnosis.verificationStatus is not null implies ( AtrialAblationDiagnosis.verificationStatus !~ Status.&quot;refuted&quot;&#xA;              and AtrialAblationDiagnosis.verificationStatus !~ Status.&quot;entered-in-error&quot;&#xA;          )&#xA;            and AtrialAblationDiagnosis.onset.toInterval ( ) starts before start of IschemicStrokeEncounter.period&#xA;    )&#xA;    union ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter&#xA;        with [&quot;SimpleObservation&quot;: &quot;History of Atrial Ablation&quot;] AtrialAblationObservation&#xA;          such that AtrialAblationObservation.status in { 'final', 'amended', 'corrected' }&#xA;            and AtrialAblationObservation.effective.earliest ( ) on or before end of IschemicStrokeEncounter.period&#xA;    )&#xA;    union ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter&#xA;        with [&quot;ConditionEncounterDiagnosis&quot;: &quot;History of Atrial Ablation&quot;] AtrialAblationEncDiagnosis&#xA;          such that AtrialAblationEncDiagnosis.verificationStatus is not null implies ( AtrialAblationEncDiagnosis.verificationStatus !~ Status.&quot;refuted&quot;&#xA;              and AtrialAblationEncDiagnosis.verificationStatus !~ Status.&quot;entered-in-error&quot;&#xA;          )&#xA;            and AtrialAblationEncDiagnosis.onset.toInterval ( ) starts before start of IschemicStrokeEncounter.period&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter&quot;:&#xA;  ( TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter&#xA;      with [&quot;ConditionProblemsHealthConcerns&quot;: &quot;Atrial Fibrillation or Flutter&quot;] AtrialFibrillationFlutter&#xA;        such that AtrialFibrillationFlutter.verificationStatus is not null implies ( AtrialFibrillationFlutter.verificationStatus !~ Status.&quot;refuted&quot;&#xA;            and AtrialFibrillationFlutter.verificationStatus !~ Status.&quot;entered-in-error&quot;&#xA;        )&#xA;          and AtrialFibrillationFlutter.onset.toInterval ( ) starts on or before end of IschemicStrokeEncounter.period&#xA;  )&#xA;    union TJC.&quot;Ischemic Stroke Encounter&quot; IschemicStrokeEncounter&#xA;      where exists ( ( IschemicStrokeEncounter.encounterDiagnosis ( ) ) EncounterDiagnosis&#xA;          where EncounterDiagnosis.code in &quot;Atrial Fibrillation or Flutter&quot;&#xA;      )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator&quot;:&#xA;  &quot;Encounter With A History Of Atrial Ablation&quot;&#xA;    union &quot;Encounter With Prior Or Present Diagnosis Of Atrial Fibrillation Or Flutter&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Numerator&quot;:&#xA;  &quot;Denominator&quot; Encounter&#xA;    with [&quot;MedicationRequest&quot;: &quot;Anticoagulant Therapy&quot;] DischargeAnticoagulant&#xA;      such that DischargeAnticoagulant.status in { 'active', 'completed' }&#xA;        and DischargeAnticoagulant.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }&#xA;        and ( DischargeAnticoagulant.isCommunity ( )&#xA;            or DischargeAnticoagulant.isDischarge ( )&#xA;        )&#xA;        and DischargeAnticoagulant.authoredOn during Encounter.period&#xA;        and not exists ( [&quot;TaskRejected&quot;] TaskReject&#xA;            where TaskReject.focus.references ( DischargeAnticoagulant )&#xA;              and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;&#xA;        )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Payer&quot;:&#xA;  [USQualityCore.Coverage: type in &quot;Payer Type&quot;] Payer&#xA;    return {&#xA;      code: Payer.type,&#xA;      period: Payer.period&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Payer&quot;:&#xA;  SDE.&quot;SDE Payer&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Initial Population&quot;:&#xA;  TJC.&quot;Ischemic Stroke Encounter&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Ethnicity&quot;:&#xA;  (Patient.ethnicity()) E&#xA;    return Tuple {&#xA;      codes: { E.ombCategory } union E.detailed,&#xA;      display: E.text&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Ethnicity&quot;:&#xA;  SDE.&quot;SDE Ethnicity&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="TJCOverall"/>
        </extension>
        <extension url="name">
          <valueString value="Intervention Comfort Measures"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Intervention Comfort Measures&quot;:&#xA;  ( [&quot;ServiceRequest&quot;: &quot;Comfort Measures&quot;] ComfortCare&#xA;    where ComfortCare.status in { 'active', 'completed', 'on-hold' }&#xA;      and ComfortCare.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }&#xA;  )  &#xA;  union ( [&quot;Procedure&quot;: &quot;Comfort Measures&quot;] ComfortCarePerformed&#xA;        where ComfortCarePerformed.status in { 'completed', 'in-progress' }&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter&quot;:&#xA;  &quot;Denominator&quot; Encounter&#xA;    with TJC.&quot;Intervention Comfort Measures&quot; ComfortMeasure&#xA;      such that Coalesce(start of ComfortMeasure.performed.toInterval(), ComfortMeasure.authoredOn) during Encounter.hospitalizationWithObservation ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusions"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator Exclusions&quot;:&#xA;  ( &quot;Denominator&quot; Encounter&#xA;      where Encounter.status = 'finished'&#xA;        and ( Encounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;&#xA;            or Encounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&quot;&#xA;            or Encounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;&#xA;            or Encounter.hospitalization.dischargeDisposition in &quot;Discharged to Home for Hospice Care&quot;&#xA;            or Encounter.hospitalization.dischargeDisposition in &quot;Discharged to Health Care Facility for Hospice Care&quot;&#xA;        )&#xA;  )&#xA;    union &quot;Encounter With Comfort Measures During Hospitalization For Patients With Documented Atrial Fibrillation Or Flutter&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Race&quot;:&#xA;  (Patient.race()) R&#xA;    return Tuple {&#xA;      codes: R.ombCategory union R.detailed,&#xA;      display: R.text&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;SDE Race&quot;:&#xA;  SDE.&quot;SDE Race&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Documented Reason For Not Giving Anticoagulant At Discharge"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Documented Reason For Not Giving Anticoagulant At Discharge&quot;:&#xA;  ( [&quot;MedicationNotRequested&quot;: &quot;Anticoagulant Therapy&quot;] NoAnticoagulant&#xA;      where ( NoAnticoagulant.reasonCode in &quot;Medical Reason For Not Providing Treatment&quot;&#xA;          or NoAnticoagulant.reasonCode in &quot;Patient Refusal&quot;&#xA;      )&#xA;        and ( NoAnticoagulant.isCommunity ( )&#xA;            or NoAnticoagulant.isDischarge ( )&#xA;        )&#xA;        and NoAnticoagulant.status in { 'active', 'completed' }&#xA;        and NoAnticoagulant.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }&#xA;  )&#xA;    union ( [&quot;MedicationRequest&quot;: &quot;Anticoagulant Therapy&quot;] MedReqAntiCoagulant&#xA;        with [&quot;TaskRejected&quot;] TaskReject&#xA;          such that TaskReject.focus.references ( MedReqAntiCoagulant )&#xA;            and ( TaskReject.statusReason in &quot;Medical Reason For Not Providing Treatment&quot;&#xA;                or TaskReject.statusReason in &quot;Patient Refusal&quot;&#xA;            )&#xA;            and MedReqAntiCoagulant.status in { 'active', 'completed' }&#xA;            and TaskReject.code ~ USQualityCoreCommon.&quot;Fulfill&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS71FHIRSTKAnticoagAFFlutter"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exceptions"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator Exceptions&quot;:&#xA;  &quot;Denominator&quot; Encounter&#xA;    with &quot;Documented Reason For Not Giving Anticoagulant At Discharge&quot; NoDischargeAnticoagulant&#xA;      such that NoDischargeAnticoagulant.authoredOn during Encounter.period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value string): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="USCoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="sex"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the sex element as defined for the USCore patient profile&#xA;*/&#xA;define fluent function sex(patient Patient):&#xA;  patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex').value as FHIR.code"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ext"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the single extension (if present) on the given resource with the specified url.&#xA;@comment: This function uses singleton from to ensure that a run-time exception is thrown if there&#xA;is more than one extension on the given resource with the specified url.&#xA;*/&#xA;define fluent function ext(domainResource DomainResource, url String):&#xA;  singleton from domainResource.exts(url)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="exts"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns any extensions defined on the given resource with the specified url&#xA;*/&#xA;define fluent function exts(domainResource DomainResource, url String):&#xA;  domainResource.extension E&#xA;    where E.url = url&#xA;    return E"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value uri): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDate"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDate(value date): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)&#xA;value to a CQL DateTime Interval&#xA;@comment: If the start value of the given period is unspecified, the starting&#xA;boundary of the resulting interval will be open (meaning the start of the interval&#xA;is unknown, as opposed to interpreted as the beginning of time).&#xA;*/&#xA;define function ToInterval(period FHIR.Period):&#xA;    if period is null then&#xA;        null&#xA;    else&#xA;        if period.&quot;start&quot; is null then&#xA;            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]&#xA;        else&#xA;            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hasPrincipalDiagnosisOf"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA; @description: Returns the condition that is specified as the principal diagnosis for the encounter and has a code in the given valueSet.&#xA; @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information&#xA; */&#xA; define fluent function hasPrincipalDiagnosisOf(encounter Encounter, valueSet System.ValueSet):&#xA;   (encounter.principalDiagnosis()) PD&#xA;     return PD.diagnosis in valueSet&#xA;       or PD.diagnosis.getCondition().code in valueSet"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="principalDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the claim diagnosis element that is specified as the principal diagnosis for the encounter&#xA; @comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information&#xA;*/&#xA;define fluent function principalDiagnosis(encounter Encounter):&#xA;singleton from (&#xA;     (encounter.claimDiagnosis()) CD&#xA;       where CD.type.includesCode(&quot;Principal Diagnosis&quot;)&#xA;   )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="claimDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the claim diagnosis elements for the given encounter&#xA;@comment: See the QICore 6 Authoring Patterns discussion on [Principal Diagnosis and Present on Admission](https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns-QICore-v6.0.0#conditions-present-on-admission-and-principal-diagnoses) for more information&#xA;*/&#xA;define fluent function claimDiagnosis(encounter Encounter):&#xA;  encounter E&#xA;    let &#xA;      claim: ([Claim] C where C.status = 'active' and C.use = 'claim' and exists (C.item I where I.encounter.references(E))),&#xA;      claimItem: (claim.item I where I.encounter.references(E))&#xA;    return claim.diagnosis D where D.sequence in claimItem.diagnosisSequence"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ClaimStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value Use): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="references"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if any of the given references are to the given resource&#xA;@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.&#xA;NOTE: This function assumes resources from the same source server.&#xA;*/&#xA;define fluent function references(references List&lt;FHIR.Reference&gt;, resource FHIR.Resource):&#xA;  exists (references R where R.references(resource))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="32"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="references"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given reference is to the given resource&#xA;@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.&#xA;NOTE: This function assumes resources from the same source server.&#xA;*/&#xA;define fluent function references(reference FHIR.Reference, resource FHIR.Resource):&#xA;  resource.id = Last(Split(reference.reference, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="33"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="includesCode"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given code is in the given codeList&#xA;@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.&#xA;*/&#xA;define fluent function includesCode(codeList List&lt;CodeableConcept&gt;, code Concept):&#xA;  exists (codeList C where C ~ code)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToConcept"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.&#xA;*/&#xA;define function ToConcept(concept FHIR.CodeableConcept):&#xA;    if concept is null then&#xA;        null&#xA;    else&#xA;        System.Concept {&#xA;            codes: concept.coding C return ToCode(C),&#xA;            display: concept.text.value&#xA;        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCode"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.&#xA;*/&#xA;define function ToCode(coding FHIR.Coding):&#xA;    if coding is null then&#xA;        null&#xA;    else&#xA;        System.Code {&#xA;          code: coding.code.value,&#xA;          system: coding.system.value,&#xA;          version: coding.version.value,&#xA;          display: coding.display.value&#xA;        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="36"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getCondition"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the Condition resource for the given reference&#xA;*/&#xA;define fluent function getCondition(reference Reference):&#xA;  singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where reference.references(C.id))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="37"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="references"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given reference is to the given resourceId&#xA;@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.&#xA;NOTE: This function assumes resources from the same source server.&#xA;*/&#xA;define fluent function references(reference FHIR.Reference, resourceId String):&#xA;  resourceId = Last(Split(reference.reference, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="38"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ProcedureStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval&#xA;@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types&#xA;to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible&#xA;representations for timing-valued elements in FHIR, allowing this function to be used across any resource.&#xA;&#xA;The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.&#xA;The intent of this function is to provide a clear and concise mechanism to treat single&#xA;elements that have multiple possible representations as intervals so that logic doesn't have to account&#xA;for the variability. More complex calculations (such as medication request period or dispense period&#xA;calculation) need specific guidance and consideration. That guidance may make use of this function, but&#xA;the focus of this function is on single element calculations where the semantics are unambiguous.&#xA;If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.&#xA;If the input is a Period, the result is a DateTime Interval.&#xA;If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.&#xA;If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.&#xA;If the input is a string, an error is raised indicating a single interval cannot be computed from a string.&#xA;If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,&#xA;and ending immediately prior to when the patient was the given Age plus one year.&#xA;If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given&#xA;by the low end of the Range, and ending immediately prior to when the patient was the Age given by the&#xA;high end of the Range plus one year.&#xA;&#xA;NOTE: Due to the&#xA;complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used&#xA;with a Timing or String.&#xA;*/&#xA;define fluent function toInterval(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range&gt;):&#xA;  case&#xA;    when choice is FHIR.dateTime then&#xA;      Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]&#xA;    when choice is FHIR.Period then&#xA;      FHIRHelpers.ToInterval(choice as FHIR.Period)&#xA;    when choice is FHIR.instant then&#xA;      Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]&#xA;    when choice is FHIR.Age then&#xA;      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),&#xA;        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)&#xA;    when choice is FHIR.Range then&#xA;      Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),&#xA;        FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)&#xA;    when choice is FHIR.Timing then&#xA;      Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')&#xA;    when choice is FHIR.string then&#xA;      Message(null as Interval&lt;DateTime&gt;, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')&#xA;    else&#xA;      null as Interval&lt;DateTime&gt;&#xA;  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="40"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDateTime(value dateTime): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="41"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDateTime(value instant): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="42"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToQuantity"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) &#xA;value to a CQL Quantity&#xA;@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity&#xA;has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)&#xA;an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.&#xA;@seealso: ToCalendarUnit&#xA;*/&#xA;define function ToQuantity(quantity FHIR.Quantity):&#xA;    case&#xA;        when quantity is null then null&#xA;        when quantity.value is null then null&#xA;        when quantity.comparator is not null then&#xA;            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')&#xA;        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'&#xA;              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then&#xA;            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }&#xA;        else&#xA;            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')&#xA;    end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="43"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCalendarUnit"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Converts a UCUM definite duration unit to a CQL calendar duration&#xA;unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) &#xA;topic of the CQL specification.&#xA;@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate&#xA;*/&#xA;define function ToCalendarUnit(unit System.String):&#xA;    case unit&#xA;        when 'ms' then 'millisecond'&#xA;        when 's' then 'second'&#xA;        when 'min' then 'minute'&#xA;        when 'h' then 'hour'&#xA;        when 'd' then 'day'&#xA;        when 'wk' then 'week'&#xA;        when 'mo' then 'month'&#xA;        when 'a' then 'year'&#xA;        else unit&#xA;    end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="44"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ObservationStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="45"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="earliest"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Given an interval, return the starting point if the interval has a starting boundary specified,&#xA;otherwise, return the ending point&#xA;*/&#xA;define fluent function earliest(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Age, FHIR.Range&gt;):&#xA;  (choice.toInterval()) period&#xA;    return&#xA;      if (period.hasStart()) then start of period&#xA;      else end of period"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="46"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hasStart"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Given an interval, return true if the interval has a starting boundary specified&#xA;(i.e. the start of the interval is not null and not the minimum DateTime value)&#xA;*/&#xA;define fluent function hasStart(period Interval&lt;DateTime&gt;):&#xA;  not ( start of period is null&#xA;      or start of period = minimum DateTime&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="47"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="encounterDiagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="/*  &#xA;@description: Returns the Condition resources referenced by the diagnosis element of the Encounter  &#xA;*/&#xA;define fluent function encounterDiagnosis(Encounter Encounter ):&#xA;  Encounter.reasonReference D&#xA;    return singleton from (([ConditionEncounterDiagnosis] union [ConditionProblemsHealthConcerns]) C where D.references(C.id))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="48"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value MedicationRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="49"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value MedicationRequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="50"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isCommunity"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given MedicationRequest has a category of Community&#xA;*/&#xA;define fluent function isCommunity(medicationRequest MedicationRequest):&#xA;  exists (medicationRequest.category C&#xA;    where C ~ Community&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="51"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isDischarge"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given MedicationRequest has a category of Discharge&#xA;*/&#xA;define fluent function isDischarge(medicationRequest MedicationRequest):&#xA;  exists (medicationRequest.category C&#xA;    where C ~ Discharge&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="52"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="USCoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function ethnicity(patient Patient):&#xA;  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity')) E&#xA;    return {&#xA;      ombCategory: E.ext('ombCategory').value as FHIR.Coding,&#xA;      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,&#xA;      text: E.ext('text').value as FHIR.string&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="53"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="ext"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the single extension (if present) on the given element with the specified url.&#xA;@comment: This function uses singleton from to ensure that a run-time exception is thrown if there&#xA;is more than one extension on the given element with the specified url.&#xA;*/&#xA;define fluent function ext(element Element, url String):&#xA;  singleton from element.exts(url)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="54"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRCommon"/>
        </extension>
        <extension url="name">
          <valueString value="exts"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns any extensions defined on the given element with the specified url.&#xA;*/&#xA;define fluent function exts(element Element, url String):&#xA;  element.extension E&#xA;    where E.url = url&#xA;    return E"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="55"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value EncounterStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="56"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ServiceRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="57"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ServiceRequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="58"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CQMCommon"/>
        </extension>
        <extension url="name">
          <valueString value="hospitalizationWithObservation"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter&#xA;*/&#xA;define fluent function hospitalizationWithObservation(TheEncounter Encounter ):&#xA;  TheEncounter Visit&#xA;  &#x9;&#x9;let ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs&#xA;  &#x9;&#x9;&#x9;&#x9;where LastObs.status = 'finished'&#xA;            and LastObs.period ends 1 hour or less on or before start of Visit.period&#xA;  &#x9;&#x9;&#x9;&#x9;sort by end of period&#xA;  &#x9;&#x9;&#x9;),&#xA;  &#x9;&#x9;&#x9;VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),&#xA;  &#x9;&#x9;&#x9;EDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED&#xA;  &#x9;&#x9;&#x9;&#x9;where LastED.status = 'finished'&#xA;            and LastED.period ends 1 hour or less on or before VisitStart&#xA;  &#x9;&#x9;&#x9;&#x9;sort by end of period&#xA;  &#x9;&#x9;&#x9;)&#xA;  &#x9;&#x9;return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="59"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="USCoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="race"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function race(patient Patient):&#xA;  (patient.ext('http://hl7.org/fhir/us/core/StructureDefinition/us-core-race')) E&#xA;    return {&#xA;      ombCategory: (E.exts('ombCategory')) o return o.value as FHIR.Coding,&#xA;      detailed: (E.exts('detailed')) d return d.value as FHIR.Coding,&#xA;      text: E.ext('text').value as FHIR.string&#xA;    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="60"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="USQualityCore model information"/>
        <resource value="https://madie.cms.gov/Library/USQualityCore-ModelInfo|0.1.0-cibuild"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="USCore model information"/>
        <resource value="http://hl7.org/fhir/us/cql/Library/USCore-ModelInfo|6.1.0-derived"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="FHIR model information"/>
        <resource value="http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource value="https://madie.cms.gov/Library/SupplementalDataElements|6.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library USCommon"/>
        <resource value="http://hl7.org/fhir/us/cql/Library/USCoreCommon|2.0.0-ballot"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRCommon"/>
        <resource value="http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library TJC"/>
        <resource value="https://madie.cms.gov/Library/TJCOverall|9.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library CQMCommon"/>
        <resource value="https://madie.cms.gov/Library/CQMCommon|5.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Status"/>
        <resource value="https://madie.cms.gov/Library/Status|2.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library USQualityCoreCommon"/>
        <resource value="https://madie.cms.gov/Library/USQualityCoreCommon|0.1.0-cibuild"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system SNOMEDCT"/>
        <resource value="http://snomed.info/sct"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system Diagnosis Type"/>
        <resource value="http://terminology.hl7.org/CodeSystem/ex-diagnosistype"/>
      </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 MedicationRequestCategory"/>
        <resource value="http://terminology.hl7.org/CodeSystem/medicationrequest-category"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system TaskCodeSystem"/>
        <resource value="http://hl7.org/fhir/CodeSystem/task-code"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Nonelective Inpatient Encounter"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Ischemic Stroke"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.247"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Atrial Ablation"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.203"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set History of Atrial Ablation"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.76"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Atrial Fibrillation or Flutter"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Anticoagulant Therapy"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200"/>
      </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 Discharge To Acute Care Facility"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Left Against Medical Advice"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Patient Expired"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Discharged to Home for Hospice Care"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.209"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Discharged to Health Care Facility for Hospice Care"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.207"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Comfort Measures"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Observation Services"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Emergency Department Visit"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Medical Reason For Not Providing Treatment"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.473"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Patient Refusal"/>
        <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.93"/>
      </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="*"/>
        <type value="Encounter"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Encounter"/>
      </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="*"/>
        <type value="Encounter"/>
      </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="*"/>
        <type value="Encounter"/>
      </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="*"/>
        <type value="Encounter"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-patient"/>
        <mustSupport value="ombCategory"/>
        <mustSupport value="detailed"/>
        <mustSupport value="text"/>
      </dataRequirement>
      <dataRequirement id="279">
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="status"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/uv/crmi-analysisException">
              <valueString value="Error attempting to determine filter value: toFhirValue not implemented for Subtract"/>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="diagnosis"/>
        <mustSupport value="diagnosis.code"/>
        <mustSupport value="status"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.424"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
          <valuePeriod>
            <extension url="http://hl7.org/fhir/StructureDefinition/cqf-expression">
              <valueExpression>
                <language value="text/cql-identifier"/>
                <expression value="Measurement Period"/>
              </valueExpression>
            </extension>
          </valuePeriod>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Resource"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Resource"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Claim"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Claim"/>
        <mustSupport value="status"/>
        <mustSupport value="use"/>
        <mustSupport value="item"/>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="active"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="use"/>
          <code>
            <code value="claim"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="onset"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.76"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-encounter-diagnosis"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="onset"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.76"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-condition-problems-health-concerns"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <mustSupport value="onset"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.202"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
        <mustSupport value="birthDate"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.203"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-simple-observation"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1110.76"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication.reference"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
        <mustSupport value="medication"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Task"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-taskrejected"/>
        <mustSupport value="focus"/>
        <mustSupport value="code"/>
        <mustSupport value="statusReason"/>
        <codeFilter>
          <path value="code"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="ServiceRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/1.3.6.1.4.1.33895.1.3.0.45"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://fhir.org/guides/astp/us-quality-core/StructureDefinition/us-quality-core-medicationnotrequested"/>
        <mustSupport value="medication"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.200"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension id="supplementalDataGuidance" url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance">
    <extension url="guidance">
      <valueString value="&lt;p&gt;For every patient evaluated by this measure also identify payer, race, ethnicity and sex&lt;/p&gt;"/>
    </extension>
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
          <display value="Supplemental Data"/>
        </coding>
        <text value="Supplemental Data Guidance"/>
      </valueCodeableConcept>
    </extension>
  </extension>
  <extension url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem">
    <valueReference>
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <extension url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <url value="https://madie.cms.gov/Measure/CMS71FHIRSTKAnticoagAFFlutter"/>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="short-name"/>
        <display value="Short Name"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/shortName"/>
    <value value="CMS71FHIR"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-independent"/>
        <display value="Version Independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:bc80e4cf-d267-47bf-ad0d-4d37f8ae2328"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-specific"/>
        <display value="Version Specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:48d6fe97-e70f-4688-b24f-79c3146975be"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="publisher"/>
        <display value="Publisher"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cmsId"/>
    <value value="71FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="1.0.000"/>
  <name value="CMS71FHIRSTKAnticoagAFFlutter"/>
  <title value="Anticoagulation Therapy for Atrial Fibrillation/FlutterFHIR&#xA;"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2026-01-16T18:18:13+00:00"/>
  <publisher value="The Joint Commission"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.jointcommission.org/"/>
    </telecom>
  </contact>
  <description value="Ischemic stroke patients with atrial fibrillation/flutter who are prescribed or continuing to take anticoagulation therapy at hospital discharge&#xA;"/>
  <usage value="The &quot;Nonelective Inpatient Encounter&quot; value set intends to capture all non-scheduled hospitalizations. This value set is a subset of the &quot;Inpatient Encounter&quot; value set, excluding concepts that specifically refer to elective hospital admissions. Non-elective Inpatient Encounters include emergency, urgent, and unplanned admissions.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;New or continuing anticoagulant medications are included with the use of the MedicationRequest QI-Core Profile. The Profile's community and discharge category codes indicate that the medications should be taken by or given to the patient after being discharged.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.&#xA;&#xA;&lt;br /&gt;&#xA;&#xA;This dQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. This FHIR-based measure has been derived from the QDM-based measure: CMS71v15. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).&#xA;"/>
  <copyright value="Measure specifications are in the Public Domain.&#xA;&#xA;LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT\[R\]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.&#xA;"/>
  <effectivePeriod>
    <start value="2026-01-01"/>
    <end value="2026-12-31"/>
  </effectivePeriod>
  <author>
    <name value="The Joint Commission"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.jointcommission.org/"/>
    </telecom>
  </author>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Berge, E., Abdelnoor, M., Nakstad, P. H., et al. (2000, April 8). Low molecular-weight heparin versus aspirin in patients with acute ischaemic stroke and atrial fibrillation: A double-blind randomised study. Lancet, 355(9211), 1205-1210.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Centers for Disease Control and Prevention. (2009, May 1). Prevalence and most common causes of disability among adults- United States, 2005. Morbidity and Mortality Weekly Report, 58(16), 421-426.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Connolly, S. J., Ezekowitz, M. D., Yusuf, S., et al. (2009, September 17). Dabigatran versus warfarin in patients with atrial fibrillation. New England Journal of Medicine, 361(12), 1139-1151.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Fuster, V., Ryden, L. E., Asinger, R. W., et al. (2001, October). ACC/AHA/ESC guidelines for the management of patients with atrial fibrillation: Executive summary. A report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines and the European Society of Cardiology Committee for Practice Guidelines and Policy Conferences (Committee to Develop Guidelines for the Management of Patients with Atrial Fibrillation). Journal of the American College of Cardiology, 38(4), 1231-1266.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Fuster, V., Ryden, L. E., Cannom, D. S., et al. (2006, August 15). ACC/AHA/ESC 2006 guidelines for the management of patients with atrial fibrillation: A report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines and the European Society of Cardiology Committee for Practice Guidelines (writing committee to revise the 2001 guidelines for the management of patients with atrial fibrillation). Circulation, 114(7), e257-354.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Goldstein, L. B., Adams, R., Alberts, M. J., et al. (2006, June). Primary prevention of ischemic stroke: A guideline from the American Heart Association/American Stroke Association Stroke Council: Cosponsored by the Atherosclerotic Peripheral Vascular Disease Interdisciplinary Working Group; Cardiovascular Nursing Council; Clinical Cardiology Council; Nutrition, Physical Activity, and Metabolism Council; and the Quality of Care and Outcomes Research Interdisciplinary Working Group: The American Academy of Neurology affirms the value of this guideline. Stroke, 37(6), 1583-1633.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Gorelick, P. B., Sacco, R. L., Smith, D. B., et al. (1999, March). Prevention of a first stroke: A review of guidelines and a multidisciplinary consensus statement from the National Stroke Association. JAMA, 281(12), 1112-1120.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Hart, R. G., Benavente, O., McBride R., et al. (1999, October 5). Antithrombotic therapy to prevent stroke in patients with atrial fibrillation: A meta-analysis. Annals of Internal Medicine, 131(7), 492-501.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Jauch, E. C., Saver, J. L., Adams, H. P., Jr., et al. (2013). Guidelines for the early management of patients with acute ischemic stroke: A guideline for health care professionals from the American Heart Association/American Stroke Association. Stroke, 44(3), 870-947.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Kernan, W. N., Ovbiagele, B., Black, H. R., et al. (2014, May). Guidelines for the prevention of stroke in patients with stroke and transient ischemic attack: A guideline for health care professionals from the American Heart Association/American Stroke Association. Stroke, 45(7), 2160-2223.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Kleindorfer, D. O., Towfighi, A., Chaturvedi, S., Cockroft, K. M., Gutierrez, J., Lombardi-Hill, D., ... Williams, L. S. (2021). 2021 guideline for the prevention of stroke in patients with stroke and transient ischemic attack: A guideline from the American Heart Association/American Stroke Association. Stroke, 52(7), e364-e467. https://doi.org/10.1161/STR.0000000000000375&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Lin, H. J., Wolf, P. A., Kelly-Hayes, M., et al. (1996, October). Stroke severity in atrial fibrillation: The Framingham Study. Stroke 27(10), 1760-1764&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Penado, S., Cano, M., Acha, O., et al. (2003, February 15). Atrial fibrillation as a risk factor for stroke recurrence. American Journal of Medicine, 114 (3), 206-210.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Powers, W. J., Rabinstein, A. A., Ackerson, T., et al. (2018, January). 2018 guidelines for the early management of patients with acute ischemic stroke: A guideline for health care professionals from the American Heart Association/American Stroke Association. Stroke, 49, e31-e32.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Roger, V. L., Go, A. S., Lloyd-Jones, D. M., et al. (2012, January 3). Heart disease and stroke statistics- 2012 update: A report from the American Heart Association. Circulation, 125(1), e2-e220.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Saxena, R., \&amp; Koudstaal, P. J. (2011). Anticoagulants for preventing stroke in patients with nonrheumatic atrial fibrillation and a history of stroke or transient ischemic attack (review). Cochrane Database of Systematic Reviews, (4), CD000185.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Saxena, R., Lewis, S., Berge, E., et al. (2001, October). Risk of early death and recurrent stroke and effect of heparin in 3,169 patients with acute ischemic stroke and atrial fibrillation in the International Stroke Trial. Stroke, 32(10), 2333-2337.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Van Walraven, C., Hart, R. G., Singer, D. E., et al. (2002, November 20).Oral anticoagulants vs. aspirin in nonvalvular atrial fibrillation: An individual patient meta-analysis. JAMA, 288(19), 2441-2448.&#xA;"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation value="Wann, L. S., Curtis, A. B., Ellenbogen, K. A., et al. (2011, March 15). 2011 ACCF/AHA/HRS focused update on the management of patients with atrial fibrillation (update on dabigatran): A report of the American College of Cardiology Foundation/American Heart Association Task Force on Practice Guidelines. Journal of the American College of Cardiology, 57(11), 1330-1337.&#xA;"/>
  </relatedArtifact>
  <library value="https://madie.cms.gov/Library/CMS71FHIRSTKAnticoagAFFlutter"/>
  <disclaimer value="These performance measures are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty.&#xA;"/>
  <rationale value="Nonvalvular atrial fibrillation (NVAF) is a common arrhythmia and an important risk factor for stroke. It is one of several conditions and lifestyle factors that have been identified as risk factors for stroke. It has been estimated that over 2 million adults in the United States have NVAF (Kornej, 2020). While the median age of patients with atrial fibrillation is 75 years, the incidence increases with advancing age. For example, The Framingham Heart Study noted a dramatic increase in stroke risk associated with atrial fibrillation with advancing age, from 1.5% for those 50 to 59 years of age to 23.5% for those 80 to 89 years of age. Furthermore, a prior stroke or transient ischemic attack (TIA) are among a limited number of predictors of high stroke risk within the population of patients with atrial fibrillation. Therefore, much emphasis has been placed on identifying methods for preventing recurrent ischemic stroke as well as preventing first stroke. Prevention strategies focus on the modifiable risk factors such as hypertension, smoking, and atrial fibrillation. Analysis of five placebo-controlled clinical trials investigating the efficacy of warfarin in the primary prevention of thromboembolic stroke, found the relative risk of thromboembolic stroke was reduced by 68% for atrial fibrillation patients treated with warfarin. The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk-atrial fibrillation patients with TIA or prior stroke.&#xA;"/>
  <clinicalRecommendationStatement value="The administration of anticoagulation therapy, unless there are contraindications, is an established effective strategy in preventing recurrent stroke in high stroke risk atrial fibrillation patients with TIA or prior stroke&#xA;"/>
  <group id="Group_1">
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="proportion"/>
          <display value="Proportion"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
      <valueCode value="Encounter"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
          <code value="process"/>
          <display value="Process"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation">
      <valueString value="None&#xA;"/>
    </extension>
    <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
          <code value="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <population id="InitialPopulation_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description value="Inpatient hospitalizations (non-elective admissions) for patients age 18 and older, discharged from inpatient care with a principal diagnosis of ischemic stroke, that ends during the measurement period&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="Denominator_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description value="Inpatient hospitalizations for patients with a principal diagnosis of ischemic stroke, and a history of atrial ablation, or current or history of atrial fibrillation/flutter&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="DenominatorExclusion_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exclusion"/>
          <display value="Denominator Exclusion"/>
        </coding>
      </code>
      <description value="* Inpatient hospitalizations for patients admitted for elective carotid intervention. This exclusion is implicitly modeled by only including non-elective hospitalizations.&#xA;&#xA;* Inpatient hospitalizations for patients discharged to another hospital&#xA;&#xA;* Inpatient hospitalizations for patients who left against medical advice&#xA;&#xA;* Inpatient hospitalizations for patients who expired&#xA;&#xA;* Inpatient hospitalizations for patients discharged to home for hospice care&#xA;&#xA;* Inpatient hospitalizations for patients discharged to a health care facility for hospice care&#xA;&#xA;* Inpatient hospitalizations for patients with comfort measures documented&#xA;&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exclusions"/>
      </criteria>
    </population>
    <population id="Numerator_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description value="Inpatient hospitalizations for patients prescribed or continuing to take anticoagulation therapy at hospital discharge&#xA;"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <population id="DenominatorException_1">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exception"/>
          <display value="Denominator Exception"/>
        </coding>
      </code>
      <description value="Inpatient hospitalizations for patients with a documented reason for not prescribing anticoagulation therapy at discharge&#xA;"/>
      <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&#xA;"/>
    <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&#xA;"/>
    <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&#xA;"/>
    <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&#xA;"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
</Measure>