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

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


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


</tr>

<tr>


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



<td class="content-container">Controlling High Blood Pressure (Atrius CMS165)</td>


</tr>



<tr>


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



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


</tr>


  
<tr>


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



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


</tr>



  
<tr>


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



<td class="content-container">urn:uuid:55c0d0bf-c4c1-5f4b-8b6a-4e2d3494e027</td>


</tr>



  
<tr>


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



<td class="content-container">urn:uuid:ffa5ae60-f510-50b7-9afe-c38ab337fd41</td>


</tr>





  
<tr>


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



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


</tr>


  
<tr>


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



<td class="content-container">urn:oid:1.3.6.1.4.1.66219.1.29.1</td>


</tr>







<tr>


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



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


</tr>




<tr>


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



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


</tr>












<tr>


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



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


</tr>



<tr>


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



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


</tr>







<tr>


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



<td class="content-container"><div><p>Proportion measure: adults 18–85 with hypertension and a qualifying outpatient encounter who have controlled BP (&lt;140/&lt;90). CMS labels this intermediate-outcome; THO measure-type 3.0.1 has no such code, so type is outcome.</p>
</div></td>


</tr>






  
<tr>


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



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


</tr>



<tr>


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



<td class="content-container">
    proportion from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-measure-scoring.html">http://terminology.hl7.org/CodeSystem/measure-scoring</a> 


</td>


</tr>




<tr>


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



<td class="content-container">
    increase from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-measure-improvement-notation.html">http://terminology.hl7.org/CodeSystem/measure-improvement-notation</a> 


</td>


</tr>




<tr>


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



<td class="content-container">
    outcome from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-measure-type.html">http://terminology.hl7.org/CodeSystem/measure-type</a> 


</td>


</tr>







<tr>
  
  
  
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Atrius CMS165 CQL Library
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-AtriusCMS165ControllingHighBP.html">Atrius CMS165 Controlling High Blood Pressure CQL</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS165ControllingHighBP|0.1.0</tt>
    
    
    
  </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"/>



<td class="content-container"><div><p>SDE Sex uses Patient.gender mapped to the same SNOMED Male/Female findings as CMS. SDE Payer uses AtriusIn coverage payer type (PM-JAY, ESIS, private, public, self-pay). SDE Residence (state/district) and SDE Urban Rural replace US Core race and ethnicity and are not US-comparable.</p>
</div></td>


</tr>

  






<tr>


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


</tr>

<tr>


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



<td class="content-container"><a href="Library-AtriusCMS165ControllingHighBP.html">Atrius CMS165 Controlling High Blood Pressure CQL</a> version: 0.1.0</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 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> AtriusAdultOutpatientEncounters</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadultoutpatientencounters-qualifying-encounters"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Qualifying Encounters&quot;:
  (
    (
      [Encounter: &quot;Office Visit&quot;]
        union [Encounter: &quot;Annual Wellness Visit&quot;]
        union [Encounter: &quot;Preventive Care Services Established Office Visit, 18 and Up&quot;]
        union [Encounter: &quot;Preventive Care Services Initial Office Visit, 18 and Up&quot;]
        union [Encounter: &quot;Home Healthcare Services&quot;]
        union [Encounter: &quot;Virtual Encounter&quot;]
        union [Encounter: &quot;Telephone Visits&quot;]
    ).isEncounterPerformed()
  ) ValidEncounter
    where FHIRHelpers.ToInterval(ValidEncounter.period as FHIR.Period) 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> AtriusHospice</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriushospice-has-hospice-services"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Hospice Services&quot;:
  exists ( ( ( [Encounter: &quot;Encounter Inpatient&quot;] ).isEncounterPerformed() ) InpatientEncounter
      where FHIRHelpers.ToConcept(InpatientEncounter.hospitalization.dischargeDisposition) ~ &quot;Hospice (HL7 discharge)&quot;
        and FHIRHelpers.ToInterval(InpatientEncounter.period as FHIR.Period) ends during day of &quot;Measurement Period&quot;
  )
    or exists ( ( ( [Encounter: &quot;Hospice Encounter&quot;] ).isEncounterPerformed() ) HospiceEncounter
        where FHIRHelpers.ToInterval(HospiceEncounter.period as FHIR.Period) overlaps day of &quot;Measurement Period&quot;
    )
    or exists ( ( ( [ObservationGeneralAssessment: &quot;Hospice care [Minimum Data Set]&quot;] ).isAssessmentPerformed() ) HospiceAssessment
        where FHIRHelpers.ToConcept(HospiceAssessment.value as FHIR.CodeableConcept) ~ &quot;Yes (qualifier value)&quot;
          and HospiceAssessment.effective.toObservationEffectiveInterval() overlaps day of &quot;Measurement Period&quot;
    )
    or exists ( ( ( [ServiceRequest: &quot;Hospice Care Ambulatory&quot;] ).isInterventionOrder() ) HospiceOrder
        where FHIRHelpers.ToDateTime(HospiceOrder.authoredOn) during day of &quot;Measurement Period&quot;
    )
    or exists ( ( ( [Procedure: &quot;Hospice Care Ambulatory&quot;] ).isInterventionPerformed() ) HospicePerformed
        where HospicePerformed.performed.toPerformedInterval() overlaps day of &quot;Measurement Period&quot;
    )
    or exists ( ( (
        [ConditionProblemsHealthConcerns: &quot;Hospice Diagnosis&quot;]
          union [ConditionEncounterDiagnosis: &quot;Hospice Diagnosis&quot;]
    ).verified() ) HospiceCareDiagnosis
        where HospiceCareDiagnosis.prevalenceInterval() overlaps 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-frailty-device-order"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Frailty Device Order&quot;:
  exists (
    [DeviceRequest: &quot;Frailty Device&quot;] FrailtyDeviceOrder
      where FrailtyDeviceOrder.status in { 'active', 'completed' }
        and FrailtyDeviceOrder.intent in {
          'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'
        }
        and Interval[
          FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn),
          FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn)
        ] 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-frailty-equipment-observation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Frailty Equipment Observation&quot;:
  exists (
    [Observation: &quot;Medical equipment used&quot;] EquipmentUsed
      where EquipmentUsed.status in { 'final', 'amended', 'corrected' }
        and EquipmentUsed.value is FHIR.CodeableConcept
        and FHIRHelpers.ToConcept(EquipmentUsed.value as FHIR.CodeableConcept) in &quot;Frailty Device&quot;
        and end of EquipmentUsed.observationEffectiveInterval() 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-frailty-diagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Frailty Diagnosis&quot;:
  exists (
    [ConditionProblemsHealthConcerns: &quot;Frailty Diagnosis&quot;] FrailtyProblem
      where (
        FrailtyProblem.verificationStatus is null
          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;confirmed&quot;
          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;unconfirmed&quot;
          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;provisional&quot;
          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;differential&quot;
      )
        and FrailtyProblem.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;
  )
    or exists (
      [ConditionEncounterDiagnosis: &quot;Frailty Diagnosis&quot;] FrailtyEncounterDiagnosis
        where (
          FrailtyEncounterDiagnosis.verificationStatus is null
            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;confirmed&quot;
            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;unconfirmed&quot;
            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;provisional&quot;
            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;differential&quot;
        )
          and FrailtyEncounterDiagnosis.prevalenceInterval() overlaps 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-frailty-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Frailty Encounter&quot;:
  exists (
    [Encounter: &quot;Frailty Encounter&quot;] FrailtyEncounter
      where FrailtyEncounter.status = 'finished'
        and FHIRHelpers.ToInterval(FrailtyEncounter.period as FHIR.Period) overlaps 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-frailty-symptom-observation"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Frailty Symptom Observation&quot;:
  exists (
    [Observation: &quot;Frailty Symptom&quot;] FrailtySymptom
      where FrailtySymptom.status in { 'preliminary', 'final', 'amended', 'corrected' }
        and FrailtySymptom.observationEffectiveInterval() overlaps 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-criteria-indicating-frailty"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Criteria Indicating Frailty&quot;:
  &quot;Has Frailty Device Order&quot;
    or &quot;Has Frailty Equipment Observation&quot;
    or &quot;Has Frailty Diagnosis&quot;
    or &quot;Has Frailty Encounter&quot;
    or &quot;Has Frailty Symptom Observation&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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-advanced-illness-in-year-before-or-during-measurement-period"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Advanced Illness in Year Before or During Measurement Period&quot;:
  exists (
    [ConditionProblemsHealthConcerns: &quot;Advanced Illness&quot;] AdvancedIllnessProblem
      where (
        AdvancedIllnessProblem.verificationStatus is null
          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;confirmed&quot;
          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;unconfirmed&quot;
          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;provisional&quot;
          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;differential&quot;
      )
        and start of AdvancedIllnessProblem.prevalenceInterval() during day of Interval[
          start of &quot;Measurement Period&quot; - 1 year,
          end of &quot;Measurement Period&quot;
        ]
  )
    or exists (
      [ConditionEncounterDiagnosis: &quot;Advanced Illness&quot;] AdvancedIllnessEncounterDiagnosis
        where (
          AdvancedIllnessEncounterDiagnosis.verificationStatus is null
            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;confirmed&quot;
            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;unconfirmed&quot;
            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;provisional&quot;
            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;differential&quot;
        )
          and start of AdvancedIllnessEncounterDiagnosis.prevalenceInterval() during day of Interval[
            start of &quot;Measurement Period&quot; - 1 year,
            end 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-has-dementia-medications-in-year-before-or-during-measurement-period"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Dementia Medications in Year Before or During Measurement Period&quot;:
  exists (
    [MedicationRequest: &quot;Dementia Medications&quot;] DementiaMedication
      where DementiaMedication.status = 'active'
        and DementiaMedication.intent in {
          'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'
        }
        and DementiaMedication.medicationRequestPeriod() overlaps day of Interval[
          start of &quot;Measurement Period&quot; - 1 year,
          end 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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-is-age-66-to-80-with-advanced-illness-and-frailty-or-is-age-81-or-older-with-frailty"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty&quot;:
  (
    AgeInYearsAt(date from end of &quot;Measurement Period&quot;) in Interval[66, 80]
      and &quot;Has Criteria Indicating Frailty&quot;
      and (
        &quot;Has Advanced Illness in Year Before or During Measurement Period&quot;
          or &quot;Has Dementia Medications in Year Before or During Measurement Period&quot;
      )
  )
    or (
      AgeInYearsAt(date from end of &quot;Measurement Period&quot;) &gt;= 81
        and &quot;Has Criteria Indicating Frailty&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> AtriusAdvancedIllnessAndFrailty</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusadvancedillnessandfrailty-is-age-66-or-older-living-long-term-in-a-nursing-home"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Is Age 66 or Older Living Long Term in a Nursing Home&quot;:
  AgeInYearsAt(date from end of &quot;Measurement Period&quot;) &gt;= 66
    and (
      (
        Last(
          [Observation: &quot;Housing status&quot;] HousingStatus
            where HousingStatus.status in { 'final', 'amended', 'corrected' }
              and end of HousingStatus.observationEffectiveInterval() on or before day of end of &quot;Measurement Period&quot;
               sort by end of observationEffectiveInterval() asc
        )
      ) LastHousingStatus
        where LastHousingStatus.value is FHIR.CodeableConcept
          and FHIRHelpers.ToConcept(LastHousingStatus.value as FHIR.CodeableConcept) ~ &quot;Lives in nursing home (finding)&quot;
    ) is not null</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuspalliativecare-has-palliative-care-in-the-measurement-period"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Palliative Care in the Measurement Period&quot;:
  exists (
    [ObservationGeneralAssessment: &quot;Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)&quot;] PalliativeAssessment
      where PalliativeAssessment.status in { 'final', 'amended', 'corrected' }
        and PalliativeAssessment.effective.toObservationEffectiveInterval() overlaps day of &quot;Measurement Period&quot;
  )
    or exists (
      [ConditionProblemsHealthConcerns: &quot;Palliative Care Diagnosis&quot;] PalliativeProblem
        where (
          PalliativeProblem.verificationStatus is null
            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;confirmed&quot;
            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;unconfirmed&quot;
            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;provisional&quot;
            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;differential&quot;
        )
          and PalliativeProblem.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;
    )
    or exists (
      [ConditionEncounterDiagnosis: &quot;Palliative Care Diagnosis&quot;] PalliativeEncounterDiagnosis
        where (
          PalliativeEncounterDiagnosis.verificationStatus is null
            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;confirmed&quot;
            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;unconfirmed&quot;
            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;provisional&quot;
            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;differential&quot;
        )
          and PalliativeEncounterDiagnosis.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;
    )
    or exists (
      [Encounter: &quot;Palliative Care Encounter&quot;] PalliativeEncounter
        where PalliativeEncounter.status = 'finished'
          and FHIRHelpers.ToInterval(PalliativeEncounter.period as FHIR.Period) overlaps day of &quot;Measurement Period&quot;
    )
    or exists (
      [Procedure: &quot;Palliative Care Intervention&quot;] PalliativeIntervention
        where PalliativeIntervention.status = 'completed'
          and PalliativeIntervention.performed.toPerformedInterval() overlaps 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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-inpatient-and-ed-encounters"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Inpatient and ED Encounters&quot;:
  ( [Encounter: &quot;Encounter Inpatient&quot;]
      union [Encounter: &quot;Emergency Department Evaluation and Management Visit&quot;]
  ).isEncounterPerformed()</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-qualifying-blood-pressure-reading"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Qualifying Blood Pressure Reading&quot;:
  (
    [ObservationVitalSigns: &quot;Blood pressure panel with all children optional&quot;] BloodPressure
      without &quot;Inpatient and ED Encounters&quot; DisqualifyingEncounter
        such that BloodPressure.effective.latest()
          during day of FHIRHelpers.ToInterval(DisqualifyingEncounter.period as FHIR.Period)
      where BloodPressure.status in { 'final', 'amended', 'corrected' }
        and BloodPressure.effective.latest() during day of &quot;Measurement Period&quot;
  )
    union (
      [ObservationVitalSigns: &quot;Blood pressure panel with all children optional&quot;] BloodPressure
        where BloodPressure.status in { 'final', 'amended', 'corrected' }
          and (
            BloodPressure.encounter is null
              or not (
                FHIRHelpers.ToCode(BloodPressure.encounter.getEncounter().class) in {
                  Common.&quot;emergency&quot;,
                  Common.&quot;inpatient encounter&quot;,
                  Common.&quot;inpatient acute&quot;,
                  Common.&quot;inpatient non-acute&quot;,
                  Common.&quot;pre-admission&quot;,
                  Common.&quot;short stay&quot;
                }
              )
          )
          and BloodPressure.effective.latest() 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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-blood-pressure-days"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Blood Pressure Days&quot;:
  &quot;Qualifying Blood Pressure Reading&quot; BPExam
    return date from BPExam.effective.latest ( )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-most-recent-blood-pressure-day"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Most Recent Blood Pressure Day&quot;:
  Last(&quot;Blood Pressure Days&quot; BPDays
      sort asc
  )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-lowest-systolic-reading-on-most-recent-blood-pressure-day"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Lowest Systolic Reading on Most Recent Blood Pressure Day&quot;:
  First(&quot;Qualifying Blood Pressure Reading&quot; SBPReading
      where SBPReading.effective.latest() same day as &quot;Most Recent Blood Pressure Day&quot;
      return singleton from(SBPReading.component SBPComponent
          where SBPComponent.code ~ &quot;Systolic blood pressure&quot;
          return SBPComponent.value as Quantity
      )
      sort asc
  )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-has-systolic-blood-pressure-less-than-140"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Systolic Blood Pressure Less Than 140&quot;:
  &quot;Lowest Systolic Reading on Most Recent Blood Pressure Day&quot; &lt; 140 'mm[Hg]'</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-lowest-diastolic-reading-on-most-recent-blood-pressure-day"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Lowest Diastolic Reading on Most Recent Blood Pressure Day&quot;:
  First(&quot;Qualifying Blood Pressure Reading&quot; DBPReading
      where DBPReading.effective.latest() same day as &quot;Most Recent Blood Pressure Day&quot;
      return singleton from(DBPReading.component DBPComponent
          where DBPComponent.code ~ &quot;Diastolic blood pressure&quot;
          return DBPComponent.value as Quantity
      )
      sort asc
  )</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-has-diastolic-blood-pressure-less-than-90"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Diastolic Blood Pressure Less Than 90&quot;:
  &quot;Lowest Diastolic Reading on Most Recent Blood Pressure Day&quot; &lt; 90 'mm[Hg]'</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-numerator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  &quot;Has Systolic Blood Pressure Less Than 140&quot;
    and &quot;Has Diastolic Blood Pressure Less Than 90&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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-essential-hypertension-diagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Essential Hypertension Diagnosis&quot;:
  ( ( [ConditionProblemsHealthConcerns: &quot;Essential Hypertension&quot;]
      union [ConditionEncounterDiagnosis: &quot;Essential Hypertension&quot;]
  ).verified ( ) ) Hypertension
    where Hypertension.prevalenceInterval ( ) overlaps Interval[start of &quot;Measurement Period&quot;, start of &quot;Measurement Period&quot; + 6 months )</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-initial-population"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  AgeInYearsAt(end of &quot;Measurement Period&quot;) in Interval[18, 85]
    and exists &quot;Essential Hypertension Diagnosis&quot;
    and exists AdultOutpatientEncounters.&quot;Qualifying Encounters&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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-denominator"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator&quot;:
  &quot;Initial Population&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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-pregnancy-or-renal-diagnosis"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Pregnancy or Renal Diagnosis&quot;:
  ( ( [ConditionProblemsHealthConcerns: &quot;Pregnancy&quot;]
      union [ConditionEncounterDiagnosis: &quot;Pregnancy&quot;]
      union [ConditionProblemsHealthConcerns: &quot;End Stage Renal Disease&quot;]
      union [ConditionEncounterDiagnosis: &quot;End Stage Renal Disease&quot;]
      union [ConditionProblemsHealthConcerns: &quot;Kidney Transplant Recipient&quot;]
      union [ConditionEncounterDiagnosis: &quot;Kidney Transplant Recipient&quot;]
      union [ConditionProblemsHealthConcerns: &quot;Chronic Kidney Disease, Stage 5&quot;]
      union [ConditionEncounterDiagnosis: &quot;Chronic Kidney Disease, Stage 5&quot;]
  ).verified ( ) ) PregnancyESRDDiagnosis
    where PregnancyESRDDiagnosis.prevalenceInterval ( ) overlaps &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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-end-stage-renal-disease-procedures"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;End Stage Renal Disease Procedures&quot;:
  ( ([Procedure: &quot;Kidney Transplant&quot;]
      union [Procedure: &quot;Dialysis Services&quot;]
  ).isProcedurePerformed() ) ESRDProcedure
    where ESRDProcedure.performed.toPerformedInterval() ends on or before end 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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-end-stage-renal-disease-encounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;End Stage Renal Disease Encounter&quot;:
  ( ([Encounter: &quot;ESRD Monthly Outpatient Services&quot;]).isEncounterPerformed() ) ESRDEncounter
    where FHIRHelpers.ToInterval(ESRDEncounter.period as FHIR.Period) starts on or before end 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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-has-advanced-illness-frailty-exclusion"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Advanced Illness Frailty Exclusion&quot;:
  AIFrailLTCF.&quot;Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty&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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-has-long-term-care-exclusion"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Long Term Care Exclusion&quot;:
  AIFrailLTCF.&quot;Is Age 66 or Older Living Long Term in a Nursing Home&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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-has-palliative-care-exclusion"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Palliative Care Exclusion&quot;:
  PalliativeCare.&quot;Has Palliative Care in the Measurement Period&quot;</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-denominator-exclusions"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
  Hospice.&quot;Has Hospice Services&quot;
    or exists ( &quot;Pregnancy or Renal Diagnosis&quot; )
    or exists ( &quot;End Stage Renal Disease Procedures&quot; )
    or exists ( &quot;End Stage Renal Disease Encounter&quot; )
    or &quot;Has Advanced Illness Frailty Exclusion&quot;
    or &quot;Has Long Term Care Exclusion&quot;
    or &quot;Has Palliative Care Exclusion&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> AtriusCMS165ControllingHighBP</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscms165controllinghighbp-getencounter"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function getEncounter(reference Reference):
  singleton from ( [Encounter] E
      where E.id = reference.reference.getId ( )
  )</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusstatus-isencounterperformed"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isEncounterPerformed(Enc List&lt;Encounter&gt;):
  Enc E
    where E.status = 'finished'</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusstatus-verified"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function verified(
  conditions List&lt;Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;&gt;
):
  conditions C
    where C.verificationStatus is not null implies (
      FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;confirmed&quot;
        or FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;unconfirmed&quot;
        or FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;provisional&quot;
        or FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;differential&quot;
    )</code></pre>
  </td>

</tr>



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusstatus-isassessmentperformed"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isAssessmentPerformed(Obs List&lt;Observation&gt;):
  Obs O
    where O.status in { 'final', 'amended', 'corrected' }</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusstatus-isinterventionorder"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isInterventionOrder(ServiceRequest List&lt;ServiceRequest&gt;):
  ServiceRequest S
    where S.status in { 'active', 'completed' }
      and S.intent in {
        'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'
      }</code></pre>
  </td>

</tr>



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusstatus-isinterventionperformed"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isInterventionPerformed(Proc List&lt;Procedure&gt;):
  Proc P
    where P.status = 'completed'</code></pre>
  </td>

</tr>



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriusstatus-isprocedureperformed"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isProcedurePerformed(Proc List&lt;Procedure&gt;):
  Proc P
    where P.status = 'completed'</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        



        


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

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

</tr>
<tr>

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

</tr>



        


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

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

</tr>
<tr>

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

</tr>



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="fhirhelpers-tostring"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value 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 UnitsOfTime): 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> AtriusCumulativeMedicationDuration</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscumulativemedicationduration-medicationrequestperiod"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Now that we have a ToDaily function, we can approach calculation of the
duration of medication for an order. First, consider the definitions
for each element:
* 1 and only 1 dosageInstruction
* 1 and only 1 doseAndRate
* 1 timing with 1 repeat
* frequency, frequencyMax, defaulting to 1
* period, periodUnit, defaulting to 1 'd'
* doseQuantity or doseRange
* timeOfDay
* authoredOn: The date the prescription was written
* dispenseRequest.validityPeriod: Time period supply is authorized for
* dispenseRequest.quantity: amount of medication supplied per dispense
* dispenseRequest.numberOfRepeatsAllowed: number of refills authorized
* dispenseRequest.expectedSupplyDuration: number of days supply per dispense
* dosageInstruction.timing.repeat.boundsDuration: total duration of the repeat
* dosageInstruction.timing.repeat.boundsRange: range of durations of the repeat
* dosageInstruction.timing.repeat.boundsPeriod: period bounds of the repeat
* dosageInstruction.timing.repeat.count: number of times to repeat
* dosageInstruction.timing.repeat.countMax: maximum number of times to repeat
* dosageInstruction.timing.repeat.frequency: event occurs frequency times per period
* dosageInstruction.timing.repeat.frequencyMax: event occurs up to frequencyMax times per period
* dosageInstruction.timing.repeat.period: event occurs frequency times per period
* dosageInstruction.timing.repeat.periodMax: upper limit of period
* dosageInstruction.timing.repeat.periodUnit: period duration (s | min | h | d | wk | mo | a)
* dosageInstruction.timing.repeat.timeOfDay: time of day for the event (0..*)
* dosageInstruction.timing.repeat.when: event timing (HS | WAKE | C | CM | CD | CV | AC | ACM...)
* dosageInstruction.timing.code: BID | TID | QID | AM | PM | QD | QOD...
* dosageInstruction.asNeeded
* dosageInstruction.doseAndRate.doseQuantity
* dosageInstruction.doseAndRate.doseRange
If expectedSupplyDuration is present, then the duration is
    expectedSupplyDuration * (1 + numberOfRepeatsAllowed)
If expectedSupplyDuration is not present, then it must be calculated based on the quantity, dosage, and frequency:
    (quantity / (dosage * frequency)) * (1 + numberOfRepeatsAllowed)
    dosage: Coalesce(end of doseAndRate.doseRange, doseAndRate.doseQuantity)
    frequency: Coalesce(frequencyMax, frequency)
    period: Quantity(period, periodUnit)
If expectedSupplyDuration is not present and cannot be calculated, and the boundsPeriod is present (and completely specified), we can use that directly
    dosage.timing.repeat.boundsPeriod
This calculation results in a number of days, which can then be turned into a period by anchoring that to the
start of the validityPeriod or the authoredOn:
    Interval[earliestDispensable, earliestDispensable + expectedSupplyDuration - 1]
    earliestDispensable: Coalesce(start of validityPeriod, authoredOn)
The following function illustrates this completely:
*/

/*
Calculates the Medication Period for a single MedicationRequest.
MedicationRequest instances provided to this function are expected
to conform to the [MMEMedicationRequest](http://build.fhir.org/ig/cqframework/opioid-mme-r4/StructureDefinition-mmemedicationrequest.html)
profile, which expects:
* 1 and only 1 dosageInstruction, multiple dosageInstruction elements will result in an error
* 1 and only 1 doseAndRate, multiple doseAndRate elements will result in an error
* 1 timing with 1 repeat, missing timing or repeat elements will result in a null
* frequency, frequencyMax, defaulting to 1
* period, periodUnit, defaulting to 1 'd'
* timeOfDay
* doseQuantity or doseRange, missing doseQuantity and doseRange will result in a null
Note that MedicationRequest status is not considered by this calculation, as the
list of MedicationRequest instances provided to this function should already have
considered appropriate statuses, depending on the use case, typically `completed`.
*/

define fluent function medicationRequestPeriod(sourceRequest &quot;MedicationRequest&quot;):
  sourceRequest R
    let
      dosage: singleton from R.dosageInstruction,
      doseAndRate: singleton from dosage.doseAndRate,
      timing: dosage.timing,
      frequency: Coalesce(timing.repeat.frequencyMax.value, timing.repeat.frequency.value, 1),
      period: Quantity(
        Coalesce(timing.repeat.period.value, 1.0),
        Coalesce(timing.repeat.periodUnit, 'd')
      ),
      doseChoice: doseAndRate.dose,
      dose:
        case
          when doseChoice is FHIR.Range then FHIRHelpers.ToQuantity((doseChoice as FHIR.Range).high)
          when doseChoice is FHIR.SimpleQuantity then FHIRHelpers.ToQuantity(doseChoice as FHIR.SimpleQuantity)
          else null
        end,
      dosesPerDay: Coalesce(ToDaily(frequency, period), Count(timing.repeat.timeOfDay), 1.0),
      boundsPeriod: timingBoundsToInterval(timing.repeat.bounds),
      daysSupply:
        (convert FHIRHelpers.ToQuantity(R.dispenseRequest.expectedSupplyDuration as FHIR.Duration) to days).value,
      quantity: FHIRHelpers.ToQuantity(R.dispenseRequest.quantity as FHIR.Quantity),
      refills: Coalesce(R.dispenseRequest.numberOfRepeatsAllowed.value, 0),
      startDate:
        Coalesce(
          date from start of boundsPeriod,
          date from FHIRHelpers.ToDateTime(R.authoredOn as FHIR.dateTime),
          date from start of FHIRHelpers.ToInterval(R.dispenseRequest.validityPeriod as FHIR.Period)
        ),
      totalDaysSupplied: Coalesce(daysSupply, quantity.value / (dose.value * dosesPerDay)) * (1 + refills)
    return
      if startDate is not null and totalDaysSupplied is not null then
        Interval[startDate, startDate + Quantity(totalDaysSupplied - 1, 'day') ]
      else if startDate is not null and boundsPeriod.&quot;high&quot; is not null then
        Interval[startDate, date from end of boundsPeriod]
      else
        null</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscumulativemedicationduration-quantity"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/**********************************************************************/
/* Functions in this region are copied from opioid-mme-r4             */
/**********************************************************************/

define function Quantity(value Decimal, unit String):
  if value is not null then
    System.Quantity { value: value, unit: unit }
  else
    null</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscumulativemedicationduration-todaily"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
 Goal is to get to number of days
 Two broad approaches to the calculation:
  1) Based on supply and frequency, calculate the number of expected days the medication will cover/has covered
  2) Based on relevant period, determine a covered interval and calculate the length of that interval in days
This topic covers several use cases and illustrates how to calculate Cumulative
Medication Duration for each type of medication resource using the supply and
frequency approach.
*/

/*
  For the first approach, we need to get from frequency to a frequency/day
  So we define ToDaily
*/

/*
  Calculates daily frequency given frequency within a period
*/
define function ToDaily(frequency System.Integer, period System.Quantity):
  case period.unit
    when 'h' then frequency * (24.0 / period.value)
    when 'min' then frequency * (24.0 / period.value) * 60
    when 's' then frequency * (24.0 / period.value) * 60 * 60
    when 'd' then frequency * (24.0 / period.value) / 24
    when 'wk' then frequency * (24.0 / period.value) / (24 * 7)
    when 'mo' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */
    when 'a' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */
    when 'hour' then frequency * (24.0 / period.value)
    when 'minute' then frequency * (24.0 / period.value) * 60
    when 'second' then frequency * (24.0 / period.value) * 60 * 60
    when 'day' then frequency * (24.0 / period.value) / 24
    when 'week' then frequency * (24.0 / period.value) / (24 * 7)
    when 'month' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */
    when 'year' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */
    when 'hours' then frequency * (24.0 / period.value)
    when 'minutes' then frequency * (24.0 / period.value) * 60
    when 'seconds' then frequency * (24.0 / period.value) * 60 * 60
    when 'days' then frequency * (24.0 / period.value) / 24
    when 'weeks' then frequency * (24.0 / period.value) / (24 * 7)
    when 'months' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */
    when 'years' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */
    else Message(null, true, 'CMDLogic.ToDaily.UnknownUnit', ErrorLevel, 'Unknown unit ' &amp; period.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> AtriusCumulativeMedicationDuration</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscumulativemedicationduration-timingboundstointerval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Normalizes Timing.repeat.bounds (Duration | Range | Period) to Interval&lt;DateTime&gt;.
@deprecated: Use AtriusCommon.toTimingBoundsInterval(); retained for include compatibility.
*/
define function timingBoundsToInterval(bounds Choice&lt;FHIR.Duration, FHIR.Range, FHIR.Period&gt;):
  bounds.toTimingBoundsInterval()</code></pre>
  </td>

</tr>



        




        
        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-getid"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
@comment: This function can be used to determine the logical id of a given resource. It can be used in
a single-server environment to trace references. However, this function does not attempt to resolve
or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
*/
define fluent function getId(uri String):
  Last(Split(uri, '/'))</code></pre>
  </td>

</tr>



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-prevalenceinterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
*/
define fluent function prevalenceInterval(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  if condition.isActive() then
    Interval[start of condition.onset.toConditionTimingInterval(), end of condition.abatementInterval()]
  else
    (end of condition.abatementInterval()) abatementDate
      return if abatementDate is null then
        Interval[start of condition.onset.toConditionTimingInterval(), abatementDate)
      else
        Interval[start of condition.onset.toConditionTimingInterval(), abatementDate]</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-isactive"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
*/
define fluent function isActive(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  FHIRHelpers.ToConcept(condition.clinicalStatus) ~ &quot;active&quot;
    or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ &quot;recurrence&quot;
    or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ &quot;relapse&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> AtriusCommon</td>

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-toconditiontiminginterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function toConditionTimingInterval(choice Choice&lt;FHIR.dateTime, FHIR.Age, FHIR.Period, FHIR.Range, FHIR.string&gt;):
  choice.toInterval()</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-abatementinterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns an interval representing the normalized abatement of a given Condition.
*/
define fluent function abatementInterval(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  condition.abatement.toConditionTimingInterval()</code></pre>
  </td>

</tr>



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-toobservationeffectiveinterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function toObservationEffectiveInterval(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant&gt;):
  choice.toInterval()</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-toperformedinterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function toPerformedInterval(performed Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.string, FHIR.Age, FHIR.Range&gt;):
  performed.toInterval()</code></pre>
  </td>

</tr>



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-observationeffectiveinterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Normalizes Observation.effective[x] for any Observation retrieve.
*/
define fluent function observationEffectiveInterval(observation Observation):
  observation.effective.toObservationEffectiveInterval()</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        


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

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

</tr>
<tr>

  <td>
    
    
    
    
      <a name="atriuscommon-totimingboundsinterval"> </a>
    
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function toTimingBoundsInterval(bounds Choice&lt;FHIR.Duration, FHIR.Range, FHIR.Period&gt;):
  bounds.toInterval()</code></pre>
  </td>

</tr>





  
  


  <tr>


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


</tr>
  
  
  

 

 

 

 

 

 

 

 

 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system LOINC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/6.0.2/CodeSystem-v3-loinc.html">Logical Observation Identifiers, Names and Codes (LOINC)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://loinc.org</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system ActCode
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.2.0/CodeSystem-v3-ActCode.html">ActCode</a> version: 10.0.0
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode|10.0.0</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.2.0/CodeSystem-condition-ver-status.html">ConditionVerificationStatus</a> version: 2.0.1
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status|2.0.1</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system ConditionClinicalStatusCodes
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.2.0/CodeSystem-condition-clinical.html">Condition Clinical Status Codes</a> version: 3.0.0
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical|3.0.0</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system DischargeDisposition
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/7.2.0/CodeSystem-discharge-disposition.html">Discharge disposition</a> version: 1.0.1
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/discharge-disposition|1.0.1</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


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


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Encounter Inpatient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-encounter-inpatient.html">Atrius Encounter Inpatient</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Emergency Department Evaluation and Management Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-ed-em-visit.html">Atrius Emergency Department Evaluation and Management Visit</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-ed-em-visit|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Essential Hypertension
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-essential-hypertension.html">Atrius Essential Hypertension</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-essential-hypertension|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Office Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-office-visit.html">Atrius Office Visit</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Annual Wellness Visit
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-annual-wellness-visit.html">Atrius Annual Wellness Visit</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Preventive Care Services Established Office Visit, 18 and Up
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-preventive-established-18up.html">Atrius Preventive Care Services Established Office Visit, 18 and Up</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Preventive Care Services Initial Office Visit, 18 and Up
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-preventive-initial-18up.html">Atrius Preventive Care Services Initial Office Visit, 18 and Up</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Home Healthcare Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-home-healthcare.html">Atrius Home Healthcare Services</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Virtual Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-virtual-encounter.html">Atrius Virtual Encounter</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-virtual-encounter|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Telephone Visits
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-telephone-visits.html">Atrius Telephone Visits</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hospice Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-hospice-encounter.html">Atrius Hospice Encounter</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hospice Care Ambulatory
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-hospice-care-ambulatory.html">Atrius Hospice Care Ambulatory</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Hospice Diagnosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-hospice-diagnosis.html">Atrius Hospice Diagnosis</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Pregnancy
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-pregnancy.html">Atrius Pregnancy</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-pregnancy|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set End Stage Renal Disease
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-esrd.html">Atrius End Stage Renal Disease</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-esrd|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Kidney Transplant Recipient
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-kidney-transplant-recipient.html">Atrius Kidney Transplant Recipient</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-kidney-transplant-recipient|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Chronic Kidney Disease, Stage 5
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-ckd-stage-5.html">Atrius Chronic Kidney Disease, Stage 5</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-ckd-stage-5|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Kidney Transplant
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-kidney-transplant.html">Atrius Kidney Transplant</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-kidney-transplant|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Dialysis Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-dialysis-services.html">Atrius Dialysis Services</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dialysis-services|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set ESRD Monthly Outpatient Services
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-esrd-monthly-outpatient.html">Atrius ESRD Monthly Outpatient Services</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-esrd-monthly-outpatient|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Device
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-frailty-device.html">Atrius Frailty Device</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Diagnosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-frailty-diagnosis.html">Atrius Frailty Diagnosis</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-frailty-encounter.html">Atrius Frailty Encounter</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Frailty Symptom
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-frailty-symptom.html">Atrius Frailty Symptom</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Advanced Illness
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-advanced-illness.html">Atrius Advanced Illness</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Dementia Medications
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-dementia-medications.html">Atrius Dementia Medications</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Palliative Care Diagnosis
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-palliative-care-diagnosis.html">Atrius Palliative Care Diagnosis</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Palliative Care Encounter
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-palliative-care-encounter.html">Atrius Palliative Care Encounter</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Palliative Care Intervention
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-atrius-vs-palliative-care-intervention.html">Atrius Palliative Care Intervention</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0</tt>
    
  </td>
</tr>
 


  
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Blood pressure panel with all children optional
        <br/>
      
      <em>Code</em>: 85354-9
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: emergency
        <br/>
      
      <em>Code</em>: EMER
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: inpatient encounter
        <br/>
      
      <em>Code</em>: IMP
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: inpatient acute
        <br/>
      
      <em>Code</em>: ACUTE
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: inpatient non-acute
        <br/>
      
      <em>Code</em>: NONAC
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: pre-admission
        <br/>
      
      <em>Code</em>: PRENC
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: short stay
        <br/>
      
      <em>Code</em>: SS
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/v3-ActCode</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Systolic blood pressure
        <br/>
      
      <em>Code</em>: 8480-6
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Diastolic blood pressure
        <br/>
      
      <em>Code</em>: 8462-4
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

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

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

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

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

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

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

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

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

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

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Hospice care [Minimum Data Set]
        <br/>
      
      <em>Code</em>: 45755-6
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Medical equipment used
        <br/>
      
      <em>Code</em>: 98181-1
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Housing status
        <br/>
      
      <em>Code</em>: 71802-3
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Lives in a nursing home
        <br/>
      
      <em>Code</em>: 160734000
      <br/>
      <em>System</em>: <tt>http://snomed.info/sct</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)
        <br/>
      
      <em>Code</em>: 71007-9
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  
  


  <tr>


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


</tr>
  
  
  


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: AtriusIn model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-AtriusIn-ModelInfo.html">Atrius India Core Model Definition</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusIn-ModelInfo|0.1.0</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>: <code>https://atrius.in/fhir/r4/atrius-in/Library/FHIRHelpers|4.4.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/FHIRHelpers|4.4.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>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusStatus|1.15.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusStatus|1.15.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library Common
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-AtriusCommon.html">Atrius Common CQL</a> version: 0.1.0
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCommon|0.1.0</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library AdultOutpatientEncounters
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdultOutpatientEncounters|4.19.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdultOutpatientEncounters|4.19.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library Hospice
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusHospice|6.18.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusHospice|6.18.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library AIFrailLTCF
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdvancedIllnessAndFrailty|1.27.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdvancedIllnessAndFrailty|1.27.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library AtriusCumulativeMedicationDuration
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCumulativeMedicationDuration|6.0.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCumulativeMedicationDuration|6.0.000</tt>
    
  </td>
</tr>
 


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library PalliativeCare
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusPalliativeCare|1.18.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusPalliativeCare|1.18.000</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>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-encounter-inpatient.html">Atrius Encounter Inpatient</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-ed-em-visit.html">Atrius Emergency Department Evaluation and Management Visit</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: id, status, period
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-office-visit.html">Atrius Office Visit</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-annual-wellness-visit.html">Atrius Annual Wellness Visit</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-preventive-established-18up.html">Atrius Preventive Care Services Established Office Visit, 18 and Up</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-preventive-initial-18up.html">Atrius Preventive Care Services Initial Office Visit, 18 and Up</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-home-healthcare.html">Atrius Home Healthcare Services</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-virtual-encounter.html">Atrius Virtual Encounter</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-telephone-visits.html">Atrius Telephone Visits</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, hospitalization, hospitalization.dischargeDisposition, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-encounter-inpatient.html">Atrius Encounter Inpatient</a> version: 0.1.0
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: hospitalization.dischargeDisposition</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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-hospice-encounter.html">Atrius Hospice Encounter</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-esrd-monthly-outpatient.html">Atrius ESRD Monthly Outpatient Services</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-frailty-encounter.html">Atrius Frailty Encounter</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, status, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-palliative-care-encounter.html">Atrius Palliative Care Encounter</a> version: 0.1.0
    <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>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-observation-vital-signs.html">Atrius India Core Observation Vital Signs</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, status, component, encounter, encounter.class
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/85354-9">LOINC: 85354-9</a> (Blood pressure panel with all children optional)
      
    
    </span>
    <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> version: 4.0.1
    <br/>        
  
   
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-essential-hypertension.html">Atrius Essential Hypertension</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-hospice-diagnosis.html">Atrius Hospice Diagnosis</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-pregnancy.html">Atrius Pregnancy</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-esrd.html">Atrius End Stage Renal Disease</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-kidney-transplant-recipient.html">Atrius Kidney Transplant Recipient</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-ckd-stage-5.html">Atrius Chronic Kidney Disease, Stage 5</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus
    <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="ValueSet-atrius-vs-frailty-diagnosis.html">Atrius Frailty Diagnosis</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus
    <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="ValueSet-atrius-vs-advanced-illness.html">Atrius Advanced Illness</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-problems-health-concerns.html">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus
    <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="ValueSet-atrius-vs-palliative-care-diagnosis.html">Atrius Palliative Care Diagnosis</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-essential-hypertension.html">Atrius Essential Hypertension</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-hospice-diagnosis.html">Atrius Hospice Diagnosis</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-pregnancy.html">Atrius Pregnancy</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-esrd.html">Atrius End Stage Renal Disease</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-kidney-transplant-recipient.html">Atrius Kidney Transplant Recipient</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-ckd-stage-5.html">Atrius Chronic Kidney Disease, Stage 5</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus
    <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="ValueSet-atrius-vs-frailty-diagnosis.html">Atrius Frailty Diagnosis</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus
    <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="ValueSet-atrius-vs-advanced-illness.html">Atrius Advanced Illness</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-condition-encounter-diagnosis.html">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, verificationStatus
    <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="ValueSet-atrius-vs-palliative-care-diagnosis.html">Atrius Palliative Care Diagnosis</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-observation-general-assessment.html">Atrius India Core Observation General Assessment</a> version: 0.1.0
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, value, effective
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/45755-6">LOINC: 45755-6</a> (Hospice care [Minimum Data Set])
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: value</span>
    <br/>
  
  
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="StructureDefinition-atrius-in-observation-general-assessment.html">Atrius India Core Observation General Assessment</a> version: 0.1.0
    <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>Code(s)</em>: 
    
      
      <a href="https://loinc.org/71007-9">LOINC: 71007-9</a> (Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal))
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: ServiceRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/servicerequest.html">ServiceRequest</a> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, authoredOn, 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="ValueSet-atrius-vs-hospice-care-ambulatory.html">Atrius Hospice Care Ambulatory</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, status
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-hospice-care-ambulatory.html">Atrius Hospice Care Ambulatory</a> version: 0.1.0
    <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> version: 4.0.1
    <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="ValueSet-atrius-vs-kidney-transplant.html">Atrius Kidney Transplant</a> version: 0.1.0
    <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> version: 4.0.1
    <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="ValueSet-atrius-vs-dialysis-services.html">Atrius Dialysis Services</a> version: 0.1.0
    <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> version: 4.0.1
    <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="ValueSet-atrius-vs-palliative-care-intervention.html">Atrius Palliative Care Intervention</a> version: 0.1.0
    <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>: DeviceRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/devicerequest.html">DeviceRequest</a> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, intent, authoredOn
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-frailty-device.html">Atrius Frailty Device</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/98181-1">LOINC: 98181-1</a> (Medical equipment used)
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: value</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-atrius-vs-frailty-device.html">Atrius Frailty Device</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a> version: 4.0.1
    <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="ValueSet-atrius-vs-frailty-symptom.html">Atrius Frailty Symptom</a> version: 0.1.0
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a> version: 4.0.1
    <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>Code(s)</em>: 
    
      
      <a href="https://loinc.org/71802-3">LOINC: 71802-3</a> (Housing status)
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, status, value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
  
    <span class="tab-one"><em>Code(s)</em>: 
    
      
      <a href="https://loinc.org/71802-3">LOINC: 71802-3</a> (Housing status)
      
    
    </span>
    <br/>
  
  
  
    <span class="tab-one"><em>Path</em>: value</span>
    <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> version: 4.0.1
    <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="ValueSet-atrius-vs-dementia-medications.html">Atrius Dementia Medications</a> version: 0.1.0
    <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> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication.reference, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, dispenseRequest.numberOfRepeatsAllowed.value, authoredOn, dispenseRequest.validityPeriod, status, intent
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: MedicationRequest
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a> version: 4.0.1
    <br/>        
  
   
   
    <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, dispenseRequest.numberOfRepeatsAllowed.value, authoredOn, dispenseRequest.validityPeriod, 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="ValueSet-atrius-vs-dementia-medications.html">Atrius Dementia Medications</a> version: 0.1.0
    <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>ErrorLevel</td>
          <td>In</td>
          <td>0..1</td>
          <td>string</td>
          <td/>
        </tr>
      
        <tr>
          <td>Numerator</td>
          <td>Out</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
        </tr>
      
        <tr>
          <td>Denominator</td>
          <td>Out</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
        </tr>
      
        <tr>
          <td>Initial Population</td>
          <td>Out</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
        </tr>
      
        <tr>
          <td>Denominator Exclusions</td>
          <td>Out</td>
          <td>0..1</td>
          <td>boolean</td>
          <td/>
        </tr>
      
      </tbody>
    </table>
  </td>
</tr>

  
  

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

    </tbody>
  </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="85354-9"/>
          <display value="Blood pressure panel with all children optional"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          <code value="EMER"/>
          <display value="emergency"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          <code value="IMP"/>
          <display value="inpatient encounter"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          <code value="ACUTE"/>
          <display value="inpatient acute"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          <code value="NONAC"/>
          <display value="inpatient non-acute"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          <code value="PRENC"/>
          <display value="pre-admission"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          <code value="SS"/>
          <display value="short stay"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="8480-6"/>
          <display value="Systolic blood pressure"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="8462-4"/>
          <display value="Diastolic blood pressure"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="confirmed"/>
          <display value="Confirmed"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="unconfirmed"/>
          <display value="Unconfirmed"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="provisional"/>
          <display value="Provisional"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="differential"/>
          <display value="Differential"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="active"/>
          <display value="Active"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="recurrence"/>
          <display value="Recurrence"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
          <code value="relapse"/>
          <display value="Relapse"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://terminology.hl7.org/CodeSystem/discharge-disposition"/>
          <code value="hosp"/>
          <display value="Hospice"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="373066001"/>
          <display value="Yes"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="45755-6"/>
          <display value="Hospice care [Minimum Data Set]"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="98181-1"/>
          <display value="Medical equipment used"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="71802-3"/>
          <display value="Housing status"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="160734000"/>
          <display value="Lives in a nursing home"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="71007-9"/>
          <display value="Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"/>
        </valueCoding>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Inpatient and ED Encounters"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Inpatient and ED Encounters&quot;:&#xA;  ( [Encounter: &quot;Encounter Inpatient&quot;]&#xA;      union [Encounter: &quot;Emergency Department Evaluation and Management Visit&quot;]&#xA;  ).isEncounterPerformed()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Blood Pressure Reading"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Qualifying Blood Pressure Reading&quot;:&#xA;  (&#xA;    [ObservationVitalSigns: &quot;Blood pressure panel with all children optional&quot;] BloodPressure&#xA;      without &quot;Inpatient and ED Encounters&quot; DisqualifyingEncounter&#xA;        such that BloodPressure.effective.latest()&#xA;          during day of FHIRHelpers.ToInterval(DisqualifyingEncounter.period as FHIR.Period)&#xA;      where BloodPressure.status in { 'final', 'amended', 'corrected' }&#xA;        and BloodPressure.effective.latest() during day of &quot;Measurement Period&quot;&#xA;  )&#xA;    union (&#xA;      [ObservationVitalSigns: &quot;Blood pressure panel with all children optional&quot;] BloodPressure&#xA;        where BloodPressure.status in { 'final', 'amended', 'corrected' }&#xA;          and (&#xA;            BloodPressure.encounter is null&#xA;              or not (&#xA;                FHIRHelpers.ToCode(BloodPressure.encounter.getEncounter().class) in {&#xA;                  Common.&quot;emergency&quot;,&#xA;                  Common.&quot;inpatient encounter&quot;,&#xA;                  Common.&quot;inpatient acute&quot;,&#xA;                  Common.&quot;inpatient non-acute&quot;,&#xA;                  Common.&quot;pre-admission&quot;,&#xA;                  Common.&quot;short stay&quot;&#xA;                }&#xA;              )&#xA;          )&#xA;          and BloodPressure.effective.latest() during day of &quot;Measurement Period&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Blood Pressure Days"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Blood Pressure Days&quot;:&#xA;  &quot;Qualifying Blood Pressure Reading&quot; BPExam&#xA;    return date from BPExam.effective.latest ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Most Recent Blood Pressure Day"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Most Recent Blood Pressure Day&quot;:&#xA;  Last(&quot;Blood Pressure Days&quot; BPDays&#xA;      sort asc&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Lowest Systolic Reading on Most Recent Blood Pressure Day"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Lowest Systolic Reading on Most Recent Blood Pressure Day&quot;:&#xA;  First(&quot;Qualifying Blood Pressure Reading&quot; SBPReading&#xA;      where SBPReading.effective.latest() same day as &quot;Most Recent Blood Pressure Day&quot;&#xA;      return singleton from(SBPReading.component SBPComponent&#xA;          where SBPComponent.code ~ &quot;Systolic blood pressure&quot;&#xA;          return SBPComponent.value as Quantity&#xA;      )&#xA;      sort asc&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Has Systolic Blood Pressure Less Than 140"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Systolic Blood Pressure Less Than 140&quot;:&#xA;  &quot;Lowest Systolic Reading on Most Recent Blood Pressure Day&quot; &lt; 140 'mm[Hg]'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Lowest Diastolic Reading on Most Recent Blood Pressure Day"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Lowest Diastolic Reading on Most Recent Blood Pressure Day&quot;:&#xA;  First(&quot;Qualifying Blood Pressure Reading&quot; DBPReading&#xA;      where DBPReading.effective.latest() same day as &quot;Most Recent Blood Pressure Day&quot;&#xA;      return singleton from(DBPReading.component DBPComponent&#xA;          where DBPComponent.code ~ &quot;Diastolic blood pressure&quot;&#xA;          return DBPComponent.value as Quantity&#xA;      )&#xA;      sort asc&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Has Diastolic Blood Pressure Less Than 90"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Diastolic Blood Pressure Less Than 90&quot;:&#xA;  &quot;Lowest Diastolic Reading on Most Recent Blood Pressure Day&quot; &lt; 90 'mm[Hg]'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Numerator&quot;:&#xA;  &quot;Has Systolic Blood Pressure Less Than 140&quot;&#xA;    and &quot;Has Diastolic Blood Pressure Less Than 90&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Essential Hypertension Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Essential Hypertension Diagnosis&quot;:&#xA;  ( ( [ConditionProblemsHealthConcerns: &quot;Essential Hypertension&quot;]&#xA;      union [ConditionEncounterDiagnosis: &quot;Essential Hypertension&quot;]&#xA;  ).verified ( ) ) Hypertension&#xA;    where Hypertension.prevalenceInterval ( ) overlaps Interval[start of &quot;Measurement Period&quot;, start of &quot;Measurement Period&quot; + 6 months )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdultOutpatientEncounters"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Encounters"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Qualifying Encounters&quot;:&#xA;  (&#xA;    (&#xA;      [Encounter: &quot;Office Visit&quot;]&#xA;        union [Encounter: &quot;Annual Wellness Visit&quot;]&#xA;        union [Encounter: &quot;Preventive Care Services Established Office Visit, 18 and Up&quot;]&#xA;        union [Encounter: &quot;Preventive Care Services Initial Office Visit, 18 and Up&quot;]&#xA;        union [Encounter: &quot;Home Healthcare Services&quot;]&#xA;        union [Encounter: &quot;Virtual Encounter&quot;]&#xA;        union [Encounter: &quot;Telephone Visits&quot;]&#xA;    ).isEncounterPerformed()&#xA;  ) ValidEncounter&#xA;    where FHIRHelpers.ToInterval(ValidEncounter.period as FHIR.Period) during day of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Initial Population&quot;:&#xA;  AgeInYearsAt(end of &quot;Measurement Period&quot;) in Interval[18, 85]&#xA;    and exists &quot;Essential Hypertension Diagnosis&quot;&#xA;    and exists AdultOutpatientEncounters.&quot;Qualifying Encounters&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator&quot;:&#xA;  &quot;Initial Population&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusHospice"/>
        </extension>
        <extension url="name">
          <valueString value="Has Hospice Services"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Hospice Services&quot;:&#xA;  exists ( ( ( [Encounter: &quot;Encounter Inpatient&quot;] ).isEncounterPerformed() ) InpatientEncounter&#xA;      where FHIRHelpers.ToConcept(InpatientEncounter.hospitalization.dischargeDisposition) ~ &quot;Hospice (HL7 discharge)&quot;&#xA;        and FHIRHelpers.ToInterval(InpatientEncounter.period as FHIR.Period) ends during day of &quot;Measurement Period&quot;&#xA;  )&#xA;    or exists ( ( ( [Encounter: &quot;Hospice Encounter&quot;] ).isEncounterPerformed() ) HospiceEncounter&#xA;        where FHIRHelpers.ToInterval(HospiceEncounter.period as FHIR.Period) overlaps day of &quot;Measurement Period&quot;&#xA;    )&#xA;    or exists ( ( ( [ObservationGeneralAssessment: &quot;Hospice care [Minimum Data Set]&quot;] ).isAssessmentPerformed() ) HospiceAssessment&#xA;        where FHIRHelpers.ToConcept(HospiceAssessment.value as FHIR.CodeableConcept) ~ &quot;Yes (qualifier value)&quot;&#xA;          and HospiceAssessment.effective.toObservationEffectiveInterval() overlaps day of &quot;Measurement Period&quot;&#xA;    )&#xA;    or exists ( ( ( [ServiceRequest: &quot;Hospice Care Ambulatory&quot;] ).isInterventionOrder() ) HospiceOrder&#xA;        where FHIRHelpers.ToDateTime(HospiceOrder.authoredOn) during day of &quot;Measurement Period&quot;&#xA;    )&#xA;    or exists ( ( ( [Procedure: &quot;Hospice Care Ambulatory&quot;] ).isInterventionPerformed() ) HospicePerformed&#xA;        where HospicePerformed.performed.toPerformedInterval() overlaps day of &quot;Measurement Period&quot;&#xA;    )&#xA;    or exists ( ( (&#xA;        [ConditionProblemsHealthConcerns: &quot;Hospice Diagnosis&quot;]&#xA;          union [ConditionEncounterDiagnosis: &quot;Hospice Diagnosis&quot;]&#xA;    ).verified() ) HospiceCareDiagnosis&#xA;        where HospiceCareDiagnosis.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Pregnancy or Renal Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Pregnancy or Renal Diagnosis&quot;:&#xA;  ( ( [ConditionProblemsHealthConcerns: &quot;Pregnancy&quot;]&#xA;      union [ConditionEncounterDiagnosis: &quot;Pregnancy&quot;]&#xA;      union [ConditionProblemsHealthConcerns: &quot;End Stage Renal Disease&quot;]&#xA;      union [ConditionEncounterDiagnosis: &quot;End Stage Renal Disease&quot;]&#xA;      union [ConditionProblemsHealthConcerns: &quot;Kidney Transplant Recipient&quot;]&#xA;      union [ConditionEncounterDiagnosis: &quot;Kidney Transplant Recipient&quot;]&#xA;      union [ConditionProblemsHealthConcerns: &quot;Chronic Kidney Disease, Stage 5&quot;]&#xA;      union [ConditionEncounterDiagnosis: &quot;Chronic Kidney Disease, Stage 5&quot;]&#xA;  ).verified ( ) ) PregnancyESRDDiagnosis&#xA;    where PregnancyESRDDiagnosis.prevalenceInterval ( ) overlaps &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="End Stage Renal Disease Procedures"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;End Stage Renal Disease Procedures&quot;:&#xA;  ( ([Procedure: &quot;Kidney Transplant&quot;]&#xA;      union [Procedure: &quot;Dialysis Services&quot;]&#xA;  ).isProcedurePerformed() ) ESRDProcedure&#xA;    where ESRDProcedure.performed.toPerformedInterval() ends on or before end of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="End Stage Renal Disease Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;End Stage Renal Disease Encounter&quot;:&#xA;  ( ([Encounter: &quot;ESRD Monthly Outpatient Services&quot;]).isEncounterPerformed() ) ESRDEncounter&#xA;    where FHIRHelpers.ToInterval(ESRDEncounter.period as FHIR.Period) starts on or before end of &quot;Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Frailty Device Order"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Frailty Device Order&quot;:&#xA;  exists (&#xA;    [DeviceRequest: &quot;Frailty Device&quot;] FrailtyDeviceOrder&#xA;      where FrailtyDeviceOrder.status in { 'active', 'completed' }&#xA;        and FrailtyDeviceOrder.intent in {&#xA;          'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'&#xA;        }&#xA;        and Interval[&#xA;          FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn),&#xA;          FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn)&#xA;        ] during day of &quot;Measurement Period&quot;&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Frailty Equipment Observation"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Frailty Equipment Observation&quot;:&#xA;  exists (&#xA;    [Observation: &quot;Medical equipment used&quot;] EquipmentUsed&#xA;      where EquipmentUsed.status in { 'final', 'amended', 'corrected' }&#xA;        and EquipmentUsed.value is FHIR.CodeableConcept&#xA;        and FHIRHelpers.ToConcept(EquipmentUsed.value as FHIR.CodeableConcept) in &quot;Frailty Device&quot;&#xA;        and end of EquipmentUsed.observationEffectiveInterval() during day of &quot;Measurement Period&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="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Frailty Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Frailty Diagnosis&quot;:&#xA;  exists (&#xA;    [ConditionProblemsHealthConcerns: &quot;Frailty Diagnosis&quot;] FrailtyProblem&#xA;      where (&#xA;        FrailtyProblem.verificationStatus is null&#xA;          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;confirmed&quot;&#xA;          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;unconfirmed&quot;&#xA;          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;provisional&quot;&#xA;          or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ &quot;differential&quot;&#xA;      )&#xA;        and FrailtyProblem.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;&#xA;  )&#xA;    or exists (&#xA;      [ConditionEncounterDiagnosis: &quot;Frailty Diagnosis&quot;] FrailtyEncounterDiagnosis&#xA;        where (&#xA;          FrailtyEncounterDiagnosis.verificationStatus is null&#xA;            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;confirmed&quot;&#xA;            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;unconfirmed&quot;&#xA;            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;provisional&quot;&#xA;            or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ &quot;differential&quot;&#xA;        )&#xA;          and FrailtyEncounterDiagnosis.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Frailty Encounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Frailty Encounter&quot;:&#xA;  exists (&#xA;    [Encounter: &quot;Frailty Encounter&quot;] FrailtyEncounter&#xA;      where FrailtyEncounter.status = 'finished'&#xA;        and FHIRHelpers.ToInterval(FrailtyEncounter.period as FHIR.Period) overlaps day of &quot;Measurement Period&quot;&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Frailty Symptom Observation"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Frailty Symptom Observation&quot;:&#xA;  exists (&#xA;    [Observation: &quot;Frailty Symptom&quot;] FrailtySymptom&#xA;      where FrailtySymptom.status in { 'preliminary', 'final', 'amended', 'corrected' }&#xA;        and FrailtySymptom.observationEffectiveInterval() overlaps day of &quot;Measurement Period&quot;&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Criteria Indicating Frailty"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Criteria Indicating Frailty&quot;:&#xA;  &quot;Has Frailty Device Order&quot;&#xA;    or &quot;Has Frailty Equipment Observation&quot;&#xA;    or &quot;Has Frailty Diagnosis&quot;&#xA;    or &quot;Has Frailty Encounter&quot;&#xA;    or &quot;Has Frailty Symptom Observation&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Advanced Illness in Year Before or During Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Advanced Illness in Year Before or During Measurement Period&quot;:&#xA;  exists (&#xA;    [ConditionProblemsHealthConcerns: &quot;Advanced Illness&quot;] AdvancedIllnessProblem&#xA;      where (&#xA;        AdvancedIllnessProblem.verificationStatus is null&#xA;          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;confirmed&quot;&#xA;          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;unconfirmed&quot;&#xA;          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;provisional&quot;&#xA;          or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ &quot;differential&quot;&#xA;      )&#xA;        and start of AdvancedIllnessProblem.prevalenceInterval() during day of Interval[&#xA;          start of &quot;Measurement Period&quot; - 1 year,&#xA;          end of &quot;Measurement Period&quot;&#xA;        ]&#xA;  )&#xA;    or exists (&#xA;      [ConditionEncounterDiagnosis: &quot;Advanced Illness&quot;] AdvancedIllnessEncounterDiagnosis&#xA;        where (&#xA;          AdvancedIllnessEncounterDiagnosis.verificationStatus is null&#xA;            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;confirmed&quot;&#xA;            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;unconfirmed&quot;&#xA;            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;provisional&quot;&#xA;            or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ &quot;differential&quot;&#xA;        )&#xA;          and start of AdvancedIllnessEncounterDiagnosis.prevalenceInterval() during day of Interval[&#xA;            start of &quot;Measurement Period&quot; - 1 year,&#xA;            end of &quot;Measurement Period&quot;&#xA;          ]&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Has Dementia Medications in Year Before or During Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Dementia Medications in Year Before or During Measurement Period&quot;:&#xA;  exists (&#xA;    [MedicationRequest: &quot;Dementia Medications&quot;] DementiaMedication&#xA;      where DementiaMedication.status = 'active'&#xA;        and DementiaMedication.intent in {&#xA;          'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'&#xA;        }&#xA;        and DementiaMedication.medicationRequestPeriod() overlaps day of Interval[&#xA;          start of &quot;Measurement Period&quot; - 1 year,&#xA;          end of &quot;Measurement Period&quot;&#xA;        ]&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty&quot;:&#xA;  (&#xA;    AgeInYearsAt(date from end of &quot;Measurement Period&quot;) in Interval[66, 80]&#xA;      and &quot;Has Criteria Indicating Frailty&quot;&#xA;      and (&#xA;        &quot;Has Advanced Illness in Year Before or During Measurement Period&quot;&#xA;          or &quot;Has Dementia Medications in Year Before or During Measurement Period&quot;&#xA;      )&#xA;  )&#xA;    or (&#xA;      AgeInYearsAt(date from end of &quot;Measurement Period&quot;) &gt;= 81&#xA;        and &quot;Has Criteria Indicating Frailty&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Has Advanced Illness Frailty Exclusion"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Advanced Illness Frailty Exclusion&quot;:&#xA;  AIFrailLTCF.&quot;Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusAdvancedIllnessAndFrailty"/>
        </extension>
        <extension url="name">
          <valueString value="Is Age 66 or Older Living Long Term in a Nursing Home"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Is Age 66 or Older Living Long Term in a Nursing Home&quot;:&#xA;  AgeInYearsAt(date from end of &quot;Measurement Period&quot;) &gt;= 66&#xA;    and (&#xA;      (&#xA;        Last(&#xA;          [Observation: &quot;Housing status&quot;] HousingStatus&#xA;            where HousingStatus.status in { 'final', 'amended', 'corrected' }&#xA;              and end of HousingStatus.observationEffectiveInterval() on or before day of end of &quot;Measurement Period&quot;&#xA;               sort by end of observationEffectiveInterval() asc&#xA;        )&#xA;      ) LastHousingStatus&#xA;        where LastHousingStatus.value is FHIR.CodeableConcept&#xA;          and FHIRHelpers.ToConcept(LastHousingStatus.value as FHIR.CodeableConcept) ~ &quot;Lives in nursing home (finding)&quot;&#xA;    ) is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Has Long Term Care Exclusion"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Long Term Care Exclusion&quot;:&#xA;  AIFrailLTCF.&quot;Is Age 66 or Older Living Long Term in a Nursing Home&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="28"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusPalliativeCare"/>
        </extension>
        <extension url="name">
          <valueString value="Has Palliative Care in the Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Palliative Care in the Measurement Period&quot;:&#xA;  exists (&#xA;    [ObservationGeneralAssessment: &quot;Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)&quot;] PalliativeAssessment&#xA;      where PalliativeAssessment.status in { 'final', 'amended', 'corrected' }&#xA;        and PalliativeAssessment.effective.toObservationEffectiveInterval() overlaps day of &quot;Measurement Period&quot;&#xA;  )&#xA;    or exists (&#xA;      [ConditionProblemsHealthConcerns: &quot;Palliative Care Diagnosis&quot;] PalliativeProblem&#xA;        where (&#xA;          PalliativeProblem.verificationStatus is null&#xA;            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;confirmed&quot;&#xA;            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;unconfirmed&quot;&#xA;            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;provisional&quot;&#xA;            or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ &quot;differential&quot;&#xA;        )&#xA;          and PalliativeProblem.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;&#xA;    )&#xA;    or exists (&#xA;      [ConditionEncounterDiagnosis: &quot;Palliative Care Diagnosis&quot;] PalliativeEncounterDiagnosis&#xA;        where (&#xA;          PalliativeEncounterDiagnosis.verificationStatus is null&#xA;            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;confirmed&quot;&#xA;            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;unconfirmed&quot;&#xA;            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;provisional&quot;&#xA;            or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ &quot;differential&quot;&#xA;        )&#xA;          and PalliativeEncounterDiagnosis.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;&#xA;    )&#xA;    or exists (&#xA;      [Encounter: &quot;Palliative Care Encounter&quot;] PalliativeEncounter&#xA;        where PalliativeEncounter.status = 'finished'&#xA;          and FHIRHelpers.ToInterval(PalliativeEncounter.period as FHIR.Period) overlaps day of &quot;Measurement Period&quot;&#xA;    )&#xA;    or exists (&#xA;      [Procedure: &quot;Palliative Care Intervention&quot;] PalliativeIntervention&#xA;        where PalliativeIntervention.status = 'completed'&#xA;          and PalliativeIntervention.performed.toPerformedInterval() overlaps day of &quot;Measurement Period&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="29"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Has Palliative Care Exclusion"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Has Palliative Care Exclusion&quot;:&#xA;  PalliativeCare.&quot;Has Palliative Care in the Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="30"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusions"/>
        </extension>
        <extension url="statement">
          <valueString value="define &quot;Denominator Exclusions&quot;:&#xA;  Hospice.&quot;Has Hospice Services&quot;&#xA;    or exists ( &quot;Pregnancy or Renal Diagnosis&quot; )&#xA;    or exists ( &quot;End Stage Renal Disease Procedures&quot; )&#xA;    or exists ( &quot;End Stage Renal Disease Encounter&quot; )&#xA;    or &quot;Has Advanced Illness Frailty Exclusion&quot;&#xA;    or &quot;Has Long Term Care Exclusion&quot;&#xA;    or &quot;Has Palliative Care Exclusion&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="31"/>
        </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="32"/>
        </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="33"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusStatus"/>
        </extension>
        <extension url="name">
          <valueString value="isEncounterPerformed"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isEncounterPerformed(Enc List&lt;Encounter&gt;):&#xA;  Enc E&#xA;    where E.status = 'finished'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="34"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value EncounterStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="35"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="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="36"/>
        </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="37"/>
        </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="38"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCMS165ControllingHighBP"/>
        </extension>
        <extension url="name">
          <valueString value="getEncounter"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function getEncounter(reference Reference):&#xA;  singleton from ( [Encounter] E&#xA;      where E.id = reference.reference.getId ( )&#xA;  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="39"/>
        </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="40"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getId"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).&#xA;@comment: This function can be used to determine the logical id of a given resource. It can be used in&#xA;a single-server environment to trace references. However, this function does not attempt to resolve&#xA;or distinguish the base of the given url, and so cannot be used safely in multi-server environments.&#xA;*/&#xA;define fluent function getId(uri String):&#xA;  Last(Split(uri, '/'))"/>
        </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="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="42"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusStatus"/>
        </extension>
        <extension url="name">
          <valueString value="verified"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function verified(&#xA;  conditions List&lt;Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;&gt;&#xA;):&#xA;  conditions C&#xA;    where C.verificationStatus is not null implies (&#xA;      FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;confirmed&quot;&#xA;        or FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;unconfirmed&quot;&#xA;        or FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;provisional&quot;&#xA;        or FHIRHelpers.ToConcept(C.verificationStatus) ~ &quot;differential&quot;&#xA;    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="43"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="prevalenceInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns an interval representing the normalized prevalence period of a given Condition.&#xA;*/&#xA;define fluent function prevalenceInterval(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):&#xA;  if condition.isActive() then&#xA;    Interval[start of condition.onset.toConditionTimingInterval(), end of condition.abatementInterval()]&#xA;  else&#xA;    (end of condition.abatementInterval()) abatementDate&#xA;      return if abatementDate is null then&#xA;        Interval[start of condition.onset.toConditionTimingInterval(), abatementDate)&#xA;      else&#xA;        Interval[start of condition.onset.toConditionTimingInterval(), abatementDate]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="44"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="isActive"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse&#xA;*/&#xA;define fluent function isActive(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):&#xA;  FHIRHelpers.ToConcept(condition.clinicalStatus) ~ &quot;active&quot;&#xA;    or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ &quot;recurrence&quot;&#xA;    or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ &quot;relapse&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="45"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toConditionTimingInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function toConditionTimingInterval(choice Choice&lt;FHIR.dateTime, FHIR.Age, FHIR.Period, FHIR.Range, FHIR.string&gt;):&#xA;  choice.toInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="46"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="abatementInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Returns an interval representing the normalized abatement of a given Condition.&#xA;*/&#xA;define fluent function abatementInterval(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):&#xA;  condition.abatement.toConditionTimingInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="47"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusStatus"/>
        </extension>
        <extension url="name">
          <valueString value="isAssessmentPerformed"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isAssessmentPerformed(Obs List&lt;Observation&gt;):&#xA;  Obs O&#xA;    where O.status in { 'final', 'amended', 'corrected' }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="48"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toObservationEffectiveInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function toObservationEffectiveInterval(choice Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant&gt;):&#xA;  choice.toInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="49"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusStatus"/>
        </extension>
        <extension url="name">
          <valueString value="isInterventionOrder"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isInterventionOrder(ServiceRequest List&lt;ServiceRequest&gt;):&#xA;  ServiceRequest S&#xA;    where S.status in { 'active', 'completed' }&#xA;      and S.intent in {&#xA;        'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'&#xA;      }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="50"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ServiceRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="51"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value ServiceRequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="52"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToDateTime(value dateTime): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="53"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusStatus"/>
        </extension>
        <extension url="name">
          <valueString value="isInterventionPerformed"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isInterventionPerformed(Proc List&lt;Procedure&gt;):&#xA;  Proc P&#xA;    where P.status = 'completed'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="54"/>
        </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="55"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toPerformedInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function toPerformedInterval(performed Choice&lt;FHIR.dateTime, FHIR.Period, FHIR.string, FHIR.Age, FHIR.Range&gt;):&#xA;  performed.toInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="56"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusStatus"/>
        </extension>
        <extension url="name">
          <valueString value="isProcedurePerformed"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function isProcedurePerformed(Proc List&lt;Procedure&gt;):&#xA;  Proc P&#xA;    where P.status = 'completed'"/>
        </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 DeviceRequestStatus): 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="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value RequestIntent): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="59"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="observationEffectiveInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Normalizes Observation.effective[x] for any Observation retrieve.&#xA;*/&#xA;define fluent function observationEffectiveInterval(observation Observation):&#xA;  observation.effective.toObservationEffectiveInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="60"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value MedicationRequestStatus): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="61"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="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="62"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCumulativeMedicationDuration"/>
        </extension>
        <extension url="name">
          <valueString value="medicationRequestPeriod"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;Now that we have a ToDaily function, we can approach calculation of the&#xA;duration of medication for an order. First, consider the definitions&#xA;for each element:&#xA;* 1 and only 1 dosageInstruction&#xA;* 1 and only 1 doseAndRate&#xA;* 1 timing with 1 repeat&#xA;* frequency, frequencyMax, defaulting to 1&#xA;* period, periodUnit, defaulting to 1 'd'&#xA;* doseQuantity or doseRange&#xA;* timeOfDay&#xA;* authoredOn: The date the prescription was written&#xA;* dispenseRequest.validityPeriod: Time period supply is authorized for&#xA;* dispenseRequest.quantity: amount of medication supplied per dispense&#xA;* dispenseRequest.numberOfRepeatsAllowed: number of refills authorized&#xA;* dispenseRequest.expectedSupplyDuration: number of days supply per dispense&#xA;* dosageInstruction.timing.repeat.boundsDuration: total duration of the repeat&#xA;* dosageInstruction.timing.repeat.boundsRange: range of durations of the repeat&#xA;* dosageInstruction.timing.repeat.boundsPeriod: period bounds of the repeat&#xA;* dosageInstruction.timing.repeat.count: number of times to repeat&#xA;* dosageInstruction.timing.repeat.countMax: maximum number of times to repeat&#xA;* dosageInstruction.timing.repeat.frequency: event occurs frequency times per period&#xA;* dosageInstruction.timing.repeat.frequencyMax: event occurs up to frequencyMax times per period&#xA;* dosageInstruction.timing.repeat.period: event occurs frequency times per period&#xA;* dosageInstruction.timing.repeat.periodMax: upper limit of period&#xA;* dosageInstruction.timing.repeat.periodUnit: period duration (s | min | h | d | wk | mo | a)&#xA;* dosageInstruction.timing.repeat.timeOfDay: time of day for the event (0..*)&#xA;* dosageInstruction.timing.repeat.when: event timing (HS | WAKE | C | CM | CD | CV | AC | ACM...)&#xA;* dosageInstruction.timing.code: BID | TID | QID | AM | PM | QD | QOD...&#xA;* dosageInstruction.asNeeded&#xA;* dosageInstruction.doseAndRate.doseQuantity&#xA;* dosageInstruction.doseAndRate.doseRange&#xA;If expectedSupplyDuration is present, then the duration is&#xA;    expectedSupplyDuration * (1 + numberOfRepeatsAllowed)&#xA;If expectedSupplyDuration is not present, then it must be calculated based on the quantity, dosage, and frequency:&#xA;    (quantity / (dosage * frequency)) * (1 + numberOfRepeatsAllowed)&#xA;    dosage: Coalesce(end of doseAndRate.doseRange, doseAndRate.doseQuantity)&#xA;    frequency: Coalesce(frequencyMax, frequency)&#xA;    period: Quantity(period, periodUnit)&#xA;If expectedSupplyDuration is not present and cannot be calculated, and the boundsPeriod is present (and completely specified), we can use that directly&#xA;    dosage.timing.repeat.boundsPeriod&#xA;This calculation results in a number of days, which can then be turned into a period by anchoring that to the&#xA;start of the validityPeriod or the authoredOn:&#xA;    Interval[earliestDispensable, earliestDispensable + expectedSupplyDuration - 1]&#xA;    earliestDispensable: Coalesce(start of validityPeriod, authoredOn)&#xA;The following function illustrates this completely:&#xA;*/&#xA;&#xA;/*&#xA;Calculates the Medication Period for a single MedicationRequest.&#xA;MedicationRequest instances provided to this function are expected&#xA;to conform to the [MMEMedicationRequest](http://build.fhir.org/ig/cqframework/opioid-mme-r4/StructureDefinition-mmemedicationrequest.html)&#xA;profile, which expects:&#xA;* 1 and only 1 dosageInstruction, multiple dosageInstruction elements will result in an error&#xA;* 1 and only 1 doseAndRate, multiple doseAndRate elements will result in an error&#xA;* 1 timing with 1 repeat, missing timing or repeat elements will result in a null&#xA;* frequency, frequencyMax, defaulting to 1&#xA;* period, periodUnit, defaulting to 1 'd'&#xA;* timeOfDay&#xA;* doseQuantity or doseRange, missing doseQuantity and doseRange will result in a null&#xA;Note that MedicationRequest status is not considered by this calculation, as the&#xA;list of MedicationRequest instances provided to this function should already have&#xA;considered appropriate statuses, depending on the use case, typically `completed`.&#xA;*/&#xA;&#xA;define fluent function medicationRequestPeriod(sourceRequest &quot;MedicationRequest&quot;):&#xA;  sourceRequest R&#xA;    let&#xA;      dosage: singleton from R.dosageInstruction,&#xA;      doseAndRate: singleton from dosage.doseAndRate,&#xA;      timing: dosage.timing,&#xA;      frequency: Coalesce(timing.repeat.frequencyMax.value, timing.repeat.frequency.value, 1),&#xA;      period: Quantity(&#xA;        Coalesce(timing.repeat.period.value, 1.0),&#xA;        Coalesce(timing.repeat.periodUnit, 'd')&#xA;      ),&#xA;      doseChoice: doseAndRate.dose,&#xA;      dose:&#xA;        case&#xA;          when doseChoice is FHIR.Range then FHIRHelpers.ToQuantity((doseChoice as FHIR.Range).high)&#xA;          when doseChoice is FHIR.SimpleQuantity then FHIRHelpers.ToQuantity(doseChoice as FHIR.SimpleQuantity)&#xA;          else null&#xA;        end,&#xA;      dosesPerDay: Coalesce(ToDaily(frequency, period), Count(timing.repeat.timeOfDay), 1.0),&#xA;      boundsPeriod: timingBoundsToInterval(timing.repeat.bounds),&#xA;      daysSupply:&#xA;        (convert FHIRHelpers.ToQuantity(R.dispenseRequest.expectedSupplyDuration as FHIR.Duration) to days).value,&#xA;      quantity: FHIRHelpers.ToQuantity(R.dispenseRequest.quantity as FHIR.Quantity),&#xA;      refills: Coalesce(R.dispenseRequest.numberOfRepeatsAllowed.value, 0),&#xA;      startDate:&#xA;        Coalesce(&#xA;          date from start of boundsPeriod,&#xA;          date from FHIRHelpers.ToDateTime(R.authoredOn as FHIR.dateTime),&#xA;          date from start of FHIRHelpers.ToInterval(R.dispenseRequest.validityPeriod as FHIR.Period)&#xA;        ),&#xA;      totalDaysSupplied: Coalesce(daysSupply, quantity.value / (dose.value * dosesPerDay)) * (1 + refills)&#xA;    return&#xA;      if startDate is not null and totalDaysSupplied is not null then&#xA;        Interval[startDate, startDate + Quantity(totalDaysSupplied - 1, 'day') ]&#xA;      else if startDate is not null and boundsPeriod.&quot;high&quot; is not null then&#xA;        Interval[startDate, date from end of boundsPeriod]&#xA;      else&#xA;        null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="63"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCumulativeMedicationDuration"/>
        </extension>
        <extension url="name">
          <valueString value="Quantity"/>
        </extension>
        <extension url="statement">
          <valueString value="/**********************************************************************/&#xA;/* Functions in this region are copied from opioid-mme-r4             */&#xA;/**********************************************************************/&#xA;&#xA;define function Quantity(value Decimal, unit String):&#xA;  if value is not null then&#xA;    System.Quantity { value: value, unit: unit }&#xA;  else&#xA;    null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="64"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString value="define function ToString(value UnitsOfTime): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="65"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCumulativeMedicationDuration"/>
        </extension>
        <extension url="name">
          <valueString value="ToDaily"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA; Goal is to get to number of days&#xA; Two broad approaches to the calculation:&#xA;  1) Based on supply and frequency, calculate the number of expected days the medication will cover/has covered&#xA;  2) Based on relevant period, determine a covered interval and calculate the length of that interval in days&#xA;This topic covers several use cases and illustrates how to calculate Cumulative&#xA;Medication Duration for each type of medication resource using the supply and&#xA;frequency approach.&#xA;*/&#xA;&#xA;/*&#xA;  For the first approach, we need to get from frequency to a frequency/day&#xA;  So we define ToDaily&#xA;*/&#xA;&#xA;/*&#xA;  Calculates daily frequency given frequency within a period&#xA;*/&#xA;define function ToDaily(frequency System.Integer, period System.Quantity):&#xA;  case period.unit&#xA;    when 'h' then frequency * (24.0 / period.value)&#xA;    when 'min' then frequency * (24.0 / period.value) * 60&#xA;    when 's' then frequency * (24.0 / period.value) * 60 * 60&#xA;    when 'd' then frequency * (24.0 / period.value) / 24&#xA;    when 'wk' then frequency * (24.0 / period.value) / (24 * 7)&#xA;    when 'mo' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */&#xA;    when 'a' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */&#xA;    when 'hour' then frequency * (24.0 / period.value)&#xA;    when 'minute' then frequency * (24.0 / period.value) * 60&#xA;    when 'second' then frequency * (24.0 / period.value) * 60 * 60&#xA;    when 'day' then frequency * (24.0 / period.value) / 24&#xA;    when 'week' then frequency * (24.0 / period.value) / (24 * 7)&#xA;    when 'month' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */&#xA;    when 'year' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */&#xA;    when 'hours' then frequency * (24.0 / period.value)&#xA;    when 'minutes' then frequency * (24.0 / period.value) * 60&#xA;    when 'seconds' then frequency * (24.0 / period.value) * 60 * 60&#xA;    when 'days' then frequency * (24.0 / period.value) / 24&#xA;    when 'weeks' then frequency * (24.0 / period.value) / (24 * 7)&#xA;    when 'months' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */&#xA;    when 'years' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */&#xA;    else Message(null, true, 'CMDLogic.ToDaily.UnknownUnit', ErrorLevel, 'Unknown unit ' &amp; period.unit)&#xA;  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="66"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCumulativeMedicationDuration"/>
        </extension>
        <extension url="name">
          <valueString value="timingBoundsToInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="/*&#xA;@description: Normalizes Timing.repeat.bounds (Duration | Range | Period) to Interval&lt;DateTime&gt;.&#xA;@deprecated: Use AtriusCommon.toTimingBoundsInterval(); retained for include compatibility.&#xA;*/&#xA;define function timingBoundsToInterval(bounds Choice&lt;FHIR.Duration, FHIR.Range, FHIR.Period&gt;):&#xA;  bounds.toTimingBoundsInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="67"/>
        </extension>
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="AtriusCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toTimingBoundsInterval"/>
        </extension>
        <extension url="statement">
          <valueString value="define fluent function toTimingBoundsInterval(bounds Choice&lt;FHIR.Duration, FHIR.Range, FHIR.Period&gt;):&#xA;  bounds.toInterval()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="68"/>
        </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="AtriusIn model information"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusIn-ModelInfo|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Status"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusStatus|1.15.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Common"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusCommon|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AdultOutpatientEncounters"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdultOutpatientEncounters|4.19.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library Hospice"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusHospice|6.18.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AIFrailLTCF"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdvancedIllnessAndFrailty|1.27.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library AtriusCumulativeMedicationDuration"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusCumulativeMedicationDuration|6.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library PalliativeCare"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusPalliativeCare|1.18.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system LOINC"/>
        <resource value="http://loinc.org"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ActCode"/>
        <resource value="http://terminology.hl7.org/CodeSystem/v3-ActCode|10.0.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionVerificationStatusCodes"/>
        <resource value="http://terminology.hl7.org/CodeSystem/condition-ver-status|2.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionClinicalStatusCodes"/>
        <resource value="http://terminology.hl7.org/CodeSystem/condition-clinical|3.0.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system DischargeDisposition"/>
        <resource value="http://terminology.hl7.org/CodeSystem/discharge-disposition|1.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system SNOMEDCT"/>
        <resource value="http://snomed.info/sct"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Encounter Inpatient"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Emergency Department Evaluation and Management Visit"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-ed-em-visit|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Essential Hypertension"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-essential-hypertension|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Office Visit"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Annual Wellness Visit"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Preventive Care Services Established Office Visit, 18 and Up"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Preventive Care Services Initial Office Visit, 18 and Up"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Home Healthcare Services"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Virtual Encounter"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-virtual-encounter|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Telephone Visits"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Encounter"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Care Ambulatory"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Hospice Diagnosis"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Pregnancy"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-pregnancy|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set End Stage Renal Disease"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-esrd|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Kidney Transplant Recipient"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-kidney-transplant-recipient|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Chronic Kidney Disease, Stage 5"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-ckd-stage-5|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Kidney Transplant"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-kidney-transplant|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Dialysis Services"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dialysis-services|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set ESRD Monthly Outpatient Services"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-esrd-monthly-outpatient|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Device"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Diagnosis"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Encounter"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Frailty Symptom"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Advanced Illness"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Dementia Medications"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Palliative Care Diagnosis"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Palliative Care Encounter"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Palliative Care Intervention"/>
        <resource value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="ErrorLevel"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Denominator Exclusions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-ed-em-visit|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="id"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-virtual-encounter|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="hospitalization"/>
        <mustSupport value="hospitalization.dischargeDisposition"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0"/>
        </codeFilter>
        <codeFilter>
          <path value="hospitalization.dischargeDisposition"/>
        </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|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-esrd-monthly-outpatient|0.1.0"/>
        </codeFilter>
        <dateFilter>
          <path value="period"/>
        </dateFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1"/>
        <mustSupport value="type"/>
        <mustSupport value="status"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="finished"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-observation-vital-signs|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="component"/>
        <mustSupport value="encounter"/>
        <mustSupport value="encounter.class"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="85354-9"/>
            <display value="Blood pressure panel with all children optional"/>
          </code>
        </codeFilter>
        <dateFilter>
          <path value="effective"/>
          <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="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient|4.0.1"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-essential-hypertension|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-pregnancy|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-esrd|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-kidney-transplant-recipient|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-ckd-stage-5|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-essential-hypertension|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-pregnancy|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-esrd|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-kidney-transplant-recipient|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-ckd-stage-5|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-observation-general-assessment|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="value"/>
        <mustSupport value="effective"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="45755-6"/>
            <display value="Hospice care [Minimum Data Set]"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="value"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-observation-general-assessment|0.1.0"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="effective"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="71007-9"/>
            <display value="Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="ServiceRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0"/>
        </codeFilter>
        <dateFilter>
          <path value="authoredOn"/>
          <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="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-kidney-transplant|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dialysis-services|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="performed"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0"/>
        </codeFilter>
        <codeFilter>
          <path value="status"/>
          <code>
            <code value="completed"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="DeviceRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/DeviceRequest|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <mustSupport value="authoredOn"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="98181-1"/>
            <display value="Medical equipment used"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="value"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="71802-3"/>
            <display value="Housing status"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation|4.0.1"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="71802-3"/>
            <display value="Housing status"/>
          </code>
        </codeFilter>
        <codeFilter>
          <path value="value"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <extension url="http://hl7.org/fhir/StructureDefinition/cqf-relatedRequirement">
          <extension url="targetId">
            <valueString value="831"/>
          </extension>
          <extension url="targetProperty">
            <valueString value="medication"/>
          </extension>
        </extension>
        <type value="Medication"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication|4.0.1"/>
        <mustSupport value="id"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement id="831">
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest|4.0.1"/>
        <mustSupport value="medication.reference"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed.value"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
      </dataRequirement>
      <dataRequirement>
        <type value="MedicationRequest"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest|4.0.1"/>
        <mustSupport value="medication"/>
        <mustSupport value="dosageInstruction"/>
        <mustSupport value="dispenseRequest"/>
        <mustSupport value="dispenseRequest.expectedSupplyDuration"/>
        <mustSupport value="dispenseRequest.quantity"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed"/>
        <mustSupport value="dispenseRequest.numberOfRepeatsAllowed.value"/>
        <mustSupport value="authoredOn"/>
        <mustSupport value="dispenseRequest.validityPeriod"/>
        <mustSupport value="status"/>
        <mustSupport value="intent"/>
        <codeFilter>
          <path value="medication"/>
          <valueSet value="https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
    <valueCode value="boolean"/>
  </extension>
  <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance">
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension url="guidance">
      <valueMarkdown value="SDE Sex uses Patient.gender mapped to the same SNOMED Male/Female findings as CMS. SDE Payer uses AtriusIn coverage payer type (PM-JAY, ESIS, private, public, self-pay). SDE Residence (state/district) and SDE Urban Rural replace US Core race and ethnicity and are not US-comparable."/>
    </extension>
  </extension>
  <extension url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <url value="https://atrius.in/fhir/r4/atrius-in/Measure/AtriusCMS165ControllingHighBP"/>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:55c0d0bf-c4c1-5f4b-8b6a-4e2d3494e027"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:ffa5ae60-f510-50b7-9afe-c38ab337fd41"/>
  </identifier>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="short-name"/>
      </coding>
    </type>
    <value value="CMS165"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <system value="https://atrius.in/fhir/r4/atrius-in"/>
    <value value="AtriusCMS165ControllingHighBP"/>
  </identifier>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:1.3.6.1.4.1.66219.1.29.1"/>
  </identifier>
  <version value="0.1.0"/>
  <name value="AtriusCMS165ControllingHighBP"/>
  <title value="Controlling High Blood Pressure (Atrius CMS165)"/>
  <status value="draft"/>
  <experimental value="true"/>
  <date value="2026-09-21"/>
  <publisher value="Atrius"/>
  <contact>
    <name value="Atrius"/>
    <telecom>
      <system value="url"/>
      <value value="https://atrius.in"/>
    </telecom>
  </contact>
  <description value="Proportion measure: adults 18–85 with hypertension and a qualifying outpatient encounter who have controlled BP (&lt;140/&lt;90). CMS labels this intermediate-outcome; THO measure-type 3.0.1 has no such code, so type is outcome."/>
  <relatedArtifact>
    <type value="depends-on"/>
    <display value="Atrius CMS165 CQL Library"/>
    <resource value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS165ControllingHighBP|0.1.0"/>
  </relatedArtifact>
  <library value="https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS165ControllingHighBP|0.1.0"/>
  <scoring>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
      <code value="proportion"/>
    </coding>
  </scoring>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
      <code value="outcome"/>
    </coding>
  </type>
  <improvementNotation>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
      <code value="increase"/>
    </coding>
  </improvementNotation>
  <group id="group-1">
    <population id="initial-population">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
        </coding>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="denominator">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
        </coding>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="denominator-exclusion">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exclusion"/>
        </coding>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exclusions"/>
      </criteria>
    </population>
    <population id="numerator">
      <code>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
        </coding>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
  </group>
</Measure>