eCQM QICore Content Subset Implementation Guide
2024.0.0 - CI Build

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

: HIV ScreeningFHIR - XML Representation

Active as of 2024-09-09

Raw xml | Download


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

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

</tr>

<tr>

<th scope="row" class="row-header">Name (machine-readable)</th>

<td class="content-container">HIVScreeningFHIR</td>
</tr>


<tr>

<th scope="row" class="row-header">Title (human-readable)</th>

<td class="content-container">HIV ScreeningFHIR</td>
</tr>



<tr>

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

<td class="content-container">Active</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">Description</th>

<td class="content-container"><div><p>Percentage of patients aged 15-65 at the start of the measurement period who were between 15-65 years old when tested for human immunodeficiency virus (HIV).</p>
</div></td>
</tr>


<tr>

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

<td class="content-container"><div><p>UNKNOWN</p>
</div></td>
</tr>


<tr>

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

<td class="content-container">This measure evaluates the proportion of patients aged 15 to 65 at the start of the measurement period who have documentation of having received an HIV test at least once on or after their 15th birthday and before their 66th birthday. In order to satisfy the measure, the reporting provider must have documentation of the administration of the laboratory test present in the patient's medical record. In cases where the HIV test was performed elsewhere, providers cannot rely on patient attestation or self-report to meet the measure requirements, as previous research has shown that patient self-report is an unreliable indicator of previous HIV testing history. Rather, providers must request documentation of those test results. If such documentation is not available, the patient should be considered still eligible for HIV screening. If such documentation is available, but cannot be provided in a standardized, structured format (such that the lab test and results can be readily incorporated as structured data within the EHR), providers should enter the information into their EHR as a laboratory test in a manner consistent with the EHR in use. If the specific Human Immunodeficiency Virus (HIV) Laboratory Test LOINC code of the test is not known, the entry should use the more generic code LOINC panel code [75622-1].

This eCQM is a patient-based measure.

This FHIR-based measure has been derived from the QDM-based measure: CMS349v7. 

Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</td>
</tr>





<tr>

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

<td class="content-container">2025-01-01..2025-12-31</td>
</tr>



<tr>

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

<td class="content-container"><span title="{http://terminology.hl7.org/CodeSystem/usage-context-type venue}">Venue</span> = <span title="Codes:{http://hl7.org/fhir/us/cqfmeasures/CodeSystem/intended-venue-codes ec}">EC</span></td>
</tr>



<tr>

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

<td class="content-container">Mathematica: <a href="https://www.mathematica.org/">https://www.mathematica.org/</a></td>
</tr>





<tr>

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

<td class="content-container">Centers for Disease Control and Prevention (CDC)</td>
</tr>


<tr>

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

<td class="content-container"><a href="www.cdc.gov/hiv/">www.cdc.gov/hiv/</a></td>
</tr>


<tr>

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

<td class="content-container"><div><p>Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third party codes contained in the specifications.</p>
<p>CPT(R) contained in the Measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved.</p>
</div></td>
</tr>










<tr>

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

</tr>

  
<tr>

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

<td class="content-container">CMS349FHIR</td>
</tr>



  
<tr>

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

<td class="content-container">urn:uuid:40b617bf-3054-4663-bf9c-a15417c9a7dc</td>
</tr>



  
<tr>

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

<td class="content-container">urn:uuid:7623bac7-cdd6-43d3-bb92-41208ef65b87</td>
</tr>



  
    
    
<tr>

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

<td class="content-container">349FHIR</td>
</tr>

  



<tr>

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

<td class="content-container">0.2.000</td>
</tr>


<tr>

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

<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring proportion}">Proportion</span></td>
</tr>






<tr>

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

<td class="content-container"><div><p>Human immunodeficiency virus (HIV) is a communicable infection that leads to a progressive disease with a long asymptomatic period. There were an estimated 32,100 new HIV infections in the United States in 2021 (Centers for Disease Control and Prevention, 2023a). Without treatment, most persons develop acquired immunodeficiency syndrome (AIDS) within 10 years of HIV infection. Antiretroviral therapy (ART) delays this progression and increases the length of survival, but it is most effective when initiated during the asymptomatic phase. Persons living with HIV who use ART and achieve viral suppression can have a nearly normal life expectancy (Samji et al., 2013). DHHS Guidelines for the Use of Antiretroviral Agents in HIV-1-Infected Adults and Adolescents recommends immediate antiretroviral therapy for all HIV-infected individuals, regardless of CD4 count at diagnosis, to reduce the risk of disease progression (Panel on Antiretroviral Guidelines for Adults and Adolescents, 2019).</p>
<p>CDC estimates that, in 2021, approximately 13% of the 1.2 million adults and adolescents living with HIV infection in the United States were unaware of their infection (CDC, 2023a). Among persons diagnosed with HIV in 2021, approximately 21% were diagnosed with Stage 3 HIV (AIDS) at the time of HIV diagnosis (CDC, 2023b), which is when there is a CD4 lymphocyte count of less than 200 cells/mm3 or a CD4 percentage of total lymphocytes of less than 14 or documentation of AIDS-defining condition at diagnosis  (CDC, 2023b). HIV screening identifies infected persons who were previously unaware of their infection, which enables them to seek medical and social services that can improve their health and the quality and length of their lives. Additionally, using ART with high levels of medication adherence has been shown to substantially reduce the risk of HIV transmission (Panel on Antiretroviral Guidelines for Adults and Adolescents, 2019).</p>
<p>Based on the Behavioral Risk Factor Surveillance System (BRFSS), the percentage of ever tested for HIV increased from 42.9% in 2011 to 45.9% in 2017. Despite this increase, less than half of US adults have ever been tested for HIV over ten years after CDC's recommendations (Patel et al., 2019).</p>
</div></td>
</tr>


<tr>

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

<td class="content-container"><div><p>The US Preventive Services Task Force recommends that clinicians screen for HIV infection in adolescents and adults aged 15 to 65 years. Younger adolescents and older adults who are at increased risk should also be screened (A Recommendation) (Owens, et al., 2019).</p>
<p>Since 2006, the CDC has recommended routine opt-out HIV screening (i.e., patient is notified that testing will be performed unless the patient declines) in healthcare facilities of adolescents and adults 13-64 years of age and HIV diagnostic testing of adolescents and adults with clinical signs or symptoms consistent with HIV infection (Centers for Disease Control and Prevention, 2006).</p>
</div></td>
</tr>




<tr>

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

<td class="content-container"><div><p>This measure evaluates the proportion of patients aged 15 to 65 at the start of the measurement period who have documentation of having received an HIV test at least once on or after their 15th birthday and before their 66th birthday. In order to satisfy the measure, the reporting provider must have documentation of the administration of the laboratory test present in the patient's medical record. In cases where the HIV test was performed elsewhere, providers cannot rely on patient attestation or self-report to meet the measure requirements, as previous research has shown that patient self-report is an unreliable indicator of previous HIV testing history. Rather, providers must request documentation of those test results. If such documentation is not available, the patient should be considered still eligible for HIV screening. If such documentation is available, but cannot be provided in a standardized, structured format (such that the lab test and results can be readily incorporated as structured data within the EHR), providers should enter the information into their EHR as a laboratory test in a manner consistent with the EHR in use. If the specific Human Immunodeficiency Virus (HIV) Laboratory Test LOINC code of the test is not known, the entry should use the more generic code LOINC panel code [75622-1].</p>
<p>This eCQM is a patient-based measure.</p>
<p>This FHIR-based measure has been derived from the QDM-based measure: CMS349v7.</p>
<p>Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</p>
</div></td>
</tr>


  
    
<tr>

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

<td class="content-container">For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity 
 SDE Payer 
 SDE Race 
 SDE Sex 
 </td>
</tr>

  





  
    
    <tr>

<th colspan="2" scope="row" class="row-header">Measure Population Criteria (ID: 6633d9196c1d307ea36e749d)</th>

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

      
      <td class="content-container">
        
        <em>ID</em>: C2A7E87A-490A-499A-8963-64BA2572F8E8
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Patients 15 to 65 years of age at the start of the measurement period AND who had at least one outpatient visit during the day of the measurement period</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#hivscreeningfhir-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

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

      
      <td class="content-container">
        
        <em>ID</em>: 7BA5ADB3-C957-4597-92B1-F524798034AA
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Equals Initial Population</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#hivscreeningfhir-denominator">Denominator</a> 
          
        
      </td>
    </tr>
  

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

      
      <td class="content-container">
        
        <em>ID</em>: 2FB4D48E-45CA-45E4-BF78-1A9A74E74E36
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Patients diagnosed with HIV prior to the start of the day of the measurement period</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#hivscreeningfhir-denominator-exclusions">Denominator Exclusions</a> 
          
        
      </td>
    </tr>
  

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

      
      <td class="content-container">
        
        <em>ID</em>: 5EB2EB7D-F782-4660-886D-665CE94169AC
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Patients with documentation of an HIV test performed on or after their 15th birthday and before their 66th birthday</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#hivscreeningfhir-numerator">Numerator</a> 
          
        
      </td>
    </tr>
  

  
  
  
<tr>

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

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



  
<tr>

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

<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring proportion}">Proportion</span></td>
</tr>







  
<tr>

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

<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-type process}">Process</span></td>
</tr>




  
<tr>

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

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



  
<tr>

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

<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-improvement-notation decrease}">increase</span></td>
</tr>




  <tr>

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

</tr>


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

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

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

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

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

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

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

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


<tr>

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

</tr>

<tr>

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

<td class="content-container"><a href="Library-HIVScreeningFHIR.html">HIVScreeningFHIR</a></td>
</tr>




  
  

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

  
  <td class="content-container">
    
    <em>Description</em>: Library SDE
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>Library/SupplementalDataElements|3.5.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>Library/SupplementalDataElements|3.5.000</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Library FHIRHelpers
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>Library/FHIRHelpers|4.4.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>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 QICoreCommon
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>Library/QICoreCommon|2.1.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>Library/QICoreCommon|2.1.000</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Code system AdministrativeGender
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://hl7.org/fhir/R4/codesystem-administrative-gender.html">AdministrativeGender</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/administrative-gender</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Code system LOINC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/5.5.0/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">Dependency</th>

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

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

  
  <td class="content-container">
    
    <em>Description</em>: Value set Human Immunodeficiency Virus (HIV) Laboratory Test Codes (Ab and Ag)
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1056.50/expansion">Human Immunodeficiency Virus (HIV) Laboratory Test Codes (Ab and Ag)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1056.50</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Value set Preventive Care Services, Initial Office Visit, 0 to 17
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1022/expansion">Preventive Care Services, Initial Office Visit, 0 to 17</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</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="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1023/expansion">Preventive Care Services-Initial Office Visit, 18 and Up</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Value set Preventive Care, Established Office Visit, 0 to 17
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1024/expansion">Preventive Care, Established Office Visit, 0 to 17</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</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="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1025/expansion">Preventive Care Services - Established Office Visit, 18 and Up</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025</tt>
    
  </td>
</tr>

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

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

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

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

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

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


  
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Male
        <br/>
      
      <em>Code</em>: M
      <br/>
      <em>System</em>: <tt>http://hl7.org/fhir/administrative-gender</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Female
        <br/>
      
      <em>Code</em>: F
      <br/>
      <em>System</em>: <tt>http://hl7.org/fhir/administrative-gender</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: HIV 1 and 2 tests - Meaningful Use set
        <br/>
      
      <em>Code</em>: 75622-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>Code</em>: refuted
      <br/>
      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
    </td>
  </tr>

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

  <td class="content-container">
    <em>Name</em>: Measurement Period
    <br/>
    <em>Use</em>: In
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Period
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: SDE Sex
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Coding
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Numerator
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: boolean
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Denominator
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: boolean
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: SDE Payer
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: *
    <br/>
    <em>Type</em>: Resource
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Initial Population
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: boolean
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: SDE Ethnicity
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Resource
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Denominator Exclusions
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: boolean
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: SDE Race
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Resource
  </td>
</tr>
  
  
  <tr>
    <th colspan="2" scope="row" class="section-header"><a name="effective-data-requirements"> </a>Measure Logic Data Requirements</th>
  </tr>
  
  
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html">QICorePatient</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: ethnicity, race
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html">QICoreObservation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, value, effective, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1056.50/expansion">Human Immunodeficiency Virus (HIV) Laboratory Test Codes (Ab and Ag)</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-observation.html">QICoreObservation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, value, effective, status, 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</em>: </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/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1022/expansion">Preventive Care Services, Initial Office Visit, 0 to 17</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1023/expansion">Preventive Care Services-Initial Office Visit, 18 and Up</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1024/expansion">Preventive Care, Established Office Visit, 0 to 17</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1025/expansion">Preventive Care Services - Established Office Visit, 18 and Up</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html">QICoreEncounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, period, status, status.value
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.101.12.1001/expansion">Office Visit</a>
    <br/> 
  
  
  
   
  </td>
</tr>

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

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Condition
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html">QICoreCondition</a>
    <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="https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.464.1003.120.12.1003/expansion">HIV</a>
    <br/> 
  
  
  
  
    <span class="tab-one"><em>Path</em>: verificationStatus</span>
    <br/>
  
  
  
  
  
   
  </td>
</tr>

  
  <tr>

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

</tr>
  
          
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="supplementaldataelements-sde-sex"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-sde-sex"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-has-hiv-test-performed"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has HIV Test Performed&quot;:
  exists ( [&quot;Observation&quot;: &quot;Human Immunodeficiency Virus (HIV) Laboratory Test Codes (Ab and Ag)&quot;]
    union [&quot;Observation&quot;: &quot;HIV 1 and 2 tests - Meaningful Use set&quot;] ) HIVTest
    where HIVTest.value is not null
      and AgeInYearsAt(date from start of HIVTest.effective.toInterval()) in Interval[15, 65]
      and HIVTest.effective.toInterval ( ) starts before end of &quot;Measurement Period&quot;
      and ( HIVTest.status = 'final'
          or HIVTest.status = 'amended'
          or HIVTest.status = 'corrected'
      )</code></pre>
  </td>

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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  ( &quot;Has HIV Test Performed&quot; )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-qualifying-encounters"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Qualifying Encounters&quot;:
  ( [&quot;Encounter&quot;: &quot;Preventive Care Services, Initial Office Visit, 0 to 17&quot;]
    union [&quot;Encounter&quot;: &quot;Preventive Care Services-Initial Office Visit, 18 and Up&quot;]
    union [&quot;Encounter&quot;: &quot;Preventive Care, Established Office Visit, 0 to 17&quot;]
    union [&quot;Encounter&quot;: &quot;Preventive Care Services - Established Office Visit, 18 and Up&quot;]
    union [&quot;Encounter&quot;: &quot;Office Visit&quot;] ) Encounter
    where Encounter.period during day of &quot;Measurement Period&quot;
      and Encounter.status = 'finished'</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-initial-population"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  AgeInYearsAt(date from start of &quot;Measurement Period&quot;) in Interval[15, 65]
    and exists &quot;Qualifying Encounters&quot;</code></pre>
  </td>

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

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="supplementaldataelements-sde-payer"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-sde-payer"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="supplementaldataelements-sde-ethnicity"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-sde-ethnicity"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-denominator-exclusions"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
  exists ( [&quot;Condition&quot;: &quot;HIV&quot;] ) HIV
    where HIV.prevalenceInterval ( ) starts before day of start of &quot;Measurement Period&quot;
      and HIV.verificationStatus !~ &quot;refuted&quot;</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="supplementaldataelements-sde-race"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="hivscreeningfhir-sde-race"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

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

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

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

</tr>
<tr>

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

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

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

</tr>
<tr>

  <td>
    <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">
    
      
      <a name="qicorecommon-prevalenceinterval"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <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.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition Condition):
if condition.clinicalStatus ~ &quot;active&quot;
  or condition.clinicalStatus ~ &quot;recurrence&quot;
  or condition.clinicalStatus ~ &quot;relapse&quot; then
  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
    (end of condition.abatementInterval()) abatementDate
    return if abatementDate is null then
      Interval[start of condition.onset.toInterval(), abatementDate)
    else
      Interval[start of condition.onset.toInterval(), abatementDate]</code></pre>
  </td>

</tr>

  

<tr>
  <th colspan="2" scope="row" class="row-header">Generated using version 0.4.6 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/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="M"/>
          <display value="Male"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://hl7.org/fhir/administrative-gender"/>
          <code value="F"/>
          <display value="Female"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="75622-1"/>
          <display value="HIV 1 and 2 tests - Meaningful Use set"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
          <code value="refuted"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  case
    when Patient.gender = 'male' then &quot;M&quot;
    when Patient.gender = 'female' then &quot;F&quot;
    else null
  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Has HIV Test Performed"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has HIV Test Performed&quot;:
  exists ( [&quot;Observation&quot;: &quot;Human Immunodeficiency Virus (HIV) Laboratory Test Codes (Ab and Ag)&quot;]
    union [&quot;Observation&quot;: &quot;HIV 1 and 2 tests - Meaningful Use set&quot;] ) HIVTest
    where HIVTest.value is not null
      and AgeInYearsAt(date from start of HIVTest.effective.toInterval()) in Interval[15, 65]
      and HIVTest.effective.toInterval ( ) starts before end of &quot;Measurement Period&quot;
      and ( HIVTest.status = 'final'
          or HIVTest.status = 'amended'
          or HIVTest.status = 'corrected'
      )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Numerator&quot;:
  ( &quot;Has HIV Test Performed&quot; )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Qualifying Encounters"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Qualifying Encounters&quot;:
  ( [&quot;Encounter&quot;: &quot;Preventive Care Services, Initial Office Visit, 0 to 17&quot;]
    union [&quot;Encounter&quot;: &quot;Preventive Care Services-Initial Office Visit, 18 and Up&quot;]
    union [&quot;Encounter&quot;: &quot;Preventive Care, Established Office Visit, 0 to 17&quot;]
    union [&quot;Encounter&quot;: &quot;Preventive Care Services - Established Office Visit, 18 and Up&quot;]
    union [&quot;Encounter&quot;: &quot;Office Visit&quot;] ) Encounter
    where Encounter.period during day of &quot;Measurement Period&quot;
      and Encounter.status = 'finished'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Initial Population&quot;:
  AgeInYearsAt(date from start of &quot;Measurement Period&quot;) in Interval[15, 65]
    and exists &quot;Qualifying Encounters&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator&quot;:
  &quot;Initial Population&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
  [Coverage: type in &quot;Payer Type&quot;] Payer
    return {
      code: Payer.type,
      period: Payer.period
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Payer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusions"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator Exclusions&quot;:
  exists ( [&quot;Condition&quot;: &quot;HIV&quot;] ) HIV
    where HIV.prevalenceInterval ( ) starts before day of start of &quot;Measurement Period&quot;
      and HIV.verificationStatus !~ &quot;refuted&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="HIVScreeningFHIR"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value uri): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToCode"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
    if coding is null then
        null
    else
        System.Code {
          code: coding.code.value,
          system: coding.system.value,
          version: coding.version.value,
          display: coding.display.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="prevalenceInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition Condition):
if condition.clinicalStatus ~ &quot;active&quot;
  or condition.clinicalStatus ~ &quot;recurrence&quot;
  or condition.clinicalStatus ~ &quot;relapse&quot; then
  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
    (end of condition.abatementInterval()) abatementDate
    return if abatementDate is null then
      Interval[start of condition.onset.toInterval(), abatementDate)
    else
      Interval[start of condition.onset.toInterval(), abatementDate]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource value="Library/SupplementalDataElements|3.5.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource value="Library/QICoreCommon|2.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system AdministrativeGender"/>
        <resource value="http://hl7.org/fhir/administrative-gender"/>
      </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 ConditionVerificationStatus"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Human Immunodeficiency Virus (HIV) Laboratory Test Codes (Ab and Ag)"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1056.50"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Preventive Care Services, Initial Office Visit, 0 to 17"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Preventive Care Services-Initial Office Visit, 18 and Up"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Preventive Care, Established Office Visit, 0 to 17"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display
                 value="Value set Preventive Care Services - Established Office Visit, 18 and Up"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Office Visit"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Payer Type"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set HIV"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Denominator Exclusions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Race"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"/>
        <mustSupport value="ethnicity"/>
        <mustSupport value="race"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
        <mustSupport value="code"/>
        <mustSupport value="value"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1056.50"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation"/>
        <mustSupport value="code"/>
        <mustSupport value="value"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="75622-1"/>
            <display value="HIV 1 and 2 tests - Meaningful Use set"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Encounter"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Coverage"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"/>
        <mustSupport value="type"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"/>
        <mustSupport value="code"/>
        <mustSupport value="verificationStatus"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.120.12.1003"/>
        </codeFilter>
        <codeFilter>
          <path value="verificationStatus"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
    <extension url="guidance">
      <valueString
                   value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity 
 SDE Payer 
 SDE Race 
 SDE Sex 
 "/>
    </extension>
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
          <display value="Supplemental Data"/>
        </coding>
        <text value="Supplemental Data Guidance"/>
      </valueCodeableConcept>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
    <valueReference>
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <url value="https://madie.cms.gov/Measure/HIVScreeningFHIR"/>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="short-name"/>
        <display value="Short Name"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/shortName"/>
    <value value="CMS349FHIR"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-independent"/>
        <display value="Version Independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:40b617bf-3054-4663-bf9c-a15417c9a7dc"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="version-specific"/>
        <display value="Version Specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:7623bac7-cdd6-43d3-bb92-41208ef65b87"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type"/>
        <code value="publisher"/>
        <display value="Publisher"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cmsId"/>
    <value value="349FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="0.2.000"/>
  <name value="HIVScreeningFHIR"/>
  <title value="HIV ScreeningFHIR"/>
  <status value="active"/>
  <experimental value="true"/>
  <date value="2024-09-09T19:21:02+00:00"/>
  <publisher value="Centers for Disease Control and Prevention (CDC)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="www.cdc.gov/hiv/"/>
    </telecom>
  </contact>
  <description
               value="Percentage of patients aged 15-65 at the start of the measurement period who were between 15-65 years old when tested for human immunodeficiency virus (HIV)."/>
  <useContext>
    <code>
      <system
              value="http://terminology.hl7.org/CodeSystem/usage-context-type"/>
      <code value="venue"/>
      <display value="Venue"/>
    </code>
    <valueCodeableConcept>
      <coding>
        <system
                value="http://hl7.org/fhir/us/cqfmeasures/CodeSystem/intended-venue-codes"/>
        <code value="ec"/>
        <display value="EC"/>
      </coding>
    </valueCodeableConcept>
  </useContext>
  <purpose value="UNKNOWN"/>
  <usage
         value="This measure evaluates the proportion of patients aged 15 to 65 at the start of the measurement period who have documentation of having received an HIV test at least once on or after their 15th birthday and before their 66th birthday. In order to satisfy the measure, the reporting provider must have documentation of the administration of the laboratory test present in the patient's medical record. In cases where the HIV test was performed elsewhere, providers cannot rely on patient attestation or self-report to meet the measure requirements, as previous research has shown that patient self-report is an unreliable indicator of previous HIV testing history. Rather, providers must request documentation of those test results. If such documentation is not available, the patient should be considered still eligible for HIV screening. If such documentation is available, but cannot be provided in a standardized, structured format (such that the lab test and results can be readily incorporated as structured data within the EHR), providers should enter the information into their EHR as a laboratory test in a manner consistent with the EHR in use. If the specific Human Immunodeficiency Virus (HIV) Laboratory Test LOINC code of the test is not known, the entry should use the more generic code LOINC panel code [75622-1].

This eCQM is a patient-based measure.

This FHIR-based measure has been derived from the QDM-based measure: CMS349v7. 

Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html)."/>
  <copyright
             value="Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third party codes contained in the specifications.

CPT(R) contained in the Measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved."/>
  <effectivePeriod>
    <start value="2025-01-01"/>
    <end value="2025-12-31"/>
  </effectivePeriod>
  <author>
    <name value="Mathematica"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.mathematica.org/"/>
    </telecom>
  </author>
  <library value="https://madie.cms.gov/Library/HIVScreeningFHIR"/>
  <disclaimer
              value="The performance measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications.

THE MEASURES AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.

Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM]."/>
  <scoring>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
      <code value="proportion"/>
      <display value="Proportion"/>
    </coding>
  </scoring>
  <rationale
             value="Human immunodeficiency virus (HIV) is a communicable infection that leads to a progressive disease with a long asymptomatic period. There were an estimated 32,100 new HIV infections in the United States in 2021 (Centers for Disease Control and Prevention, 2023a). Without treatment, most persons develop acquired immunodeficiency syndrome (AIDS) within 10 years of HIV infection. Antiretroviral therapy (ART) delays this progression and increases the length of survival, but it is most effective when initiated during the asymptomatic phase. Persons living with HIV who use ART and achieve viral suppression can have a nearly normal life expectancy (Samji et al., 2013). DHHS Guidelines for the Use of Antiretroviral Agents in HIV-1-Infected Adults and Adolescents recommends immediate antiretroviral therapy for all HIV-infected individuals, regardless of CD4 count at diagnosis, to reduce the risk of disease progression (Panel on Antiretroviral Guidelines for Adults and Adolescents, 2019).
 
CDC estimates that, in 2021, approximately 13% of the 1.2 million adults and adolescents living with HIV infection in the United States were unaware of their infection (CDC, 2023a). Among persons diagnosed with HIV in 2021, approximately 21% were diagnosed with Stage 3 HIV (AIDS) at the time of HIV diagnosis (CDC, 2023b), which is when there is a CD4 lymphocyte count of less than 200 cells/mm3 or a CD4 percentage of total lymphocytes of less than 14 or documentation of AIDS-defining condition at diagnosis  (CDC, 2023b). HIV screening identifies infected persons who were previously unaware of their infection, which enables them to seek medical and social services that can improve their health and the quality and length of their lives. Additionally, using ART with high levels of medication adherence has been shown to substantially reduce the risk of HIV transmission (Panel on Antiretroviral Guidelines for Adults and Adolescents, 2019).
 
Based on the Behavioral Risk Factor Surveillance System (BRFSS), the percentage of ever tested for HIV increased from 42.9% in 2011 to 45.9% in 2017. Despite this increase, less than half of US adults have ever been tested for HIV over ten years after CDC's recommendations (Patel et al., 2019)."/>
  <clinicalRecommendationStatement
                                   value="The US Preventive Services Task Force recommends that clinicians screen for HIV infection in adolescents and adults aged 15 to 65 years. Younger adolescents and older adults who are at increased risk should also be screened (A Recommendation) (Owens, et al., 2019). 

Since 2006, the CDC has recommended routine opt-out HIV screening (i.e., patient is notified that testing will be performed unless the patient declines) in healthcare facilities of adolescents and adults 13-64 years of age and HIV diagnostic testing of adolescents and adults with clinical signs or symptoms consistent with HIV infection (Centers for Disease Control and Prevention, 2006)."/>
  <guidance
            value="This measure evaluates the proportion of patients aged 15 to 65 at the start of the measurement period who have documentation of having received an HIV test at least once on or after their 15th birthday and before their 66th birthday. In order to satisfy the measure, the reporting provider must have documentation of the administration of the laboratory test present in the patient's medical record. In cases where the HIV test was performed elsewhere, providers cannot rely on patient attestation or self-report to meet the measure requirements, as previous research has shown that patient self-report is an unreliable indicator of previous HIV testing history. Rather, providers must request documentation of those test results. If such documentation is not available, the patient should be considered still eligible for HIV screening. If such documentation is available, but cannot be provided in a standardized, structured format (such that the lab test and results can be readily incorporated as structured data within the EHR), providers should enter the information into their EHR as a laboratory test in a manner consistent with the EHR in use. If the specific Human Immunodeficiency Virus (HIV) Laboratory Test LOINC code of the test is not known, the entry should use the more generic code LOINC panel code [75622-1].

This eCQM is a patient-based measure.

This FHIR-based measure has been derived from the QDM-based measure: CMS349v7. 

Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html)."/>
  <group id="6633d9196c1d307ea36e749d">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="proportion"/>
          <display value="Proportion"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
      <valueCode value="boolean"/>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
      <valueCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
          <code value="process"/>
          <display value="Process"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation">
      <valueCode value="None"/>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
          <code value="decrease"/>
          <display value="increase"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <population id="C2A7E87A-490A-499A-8963-64BA2572F8E8">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="Patients 15 to 65 years of age at the start of the measurement period AND who had at least one outpatient visit during the day of the measurement period"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="7BA5ADB3-C957-4597-92B1-F524798034AA">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description value="Equals Initial Population"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="2FB4D48E-45CA-45E4-BF78-1A9A74E74E36">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exclusion"/>
          <display value="Denominator Exclusion"/>
        </coding>
      </code>
      <description
                   value="Patients diagnosed with HIV prior to the start of the day of the measurement period"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exclusions"/>
      </criteria>
    </population>
    <population id="5EB2EB7D-F782-4660-886D-665CE94169AC">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description
                   value="Patients with documentation of an HIV test performed on or after their 15th birthday and before their 66th birthday"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
  </group>
  <supplementalData id="sde-ethnicity">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Ethnicity"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-payer">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Payer"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Race"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-sex">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Sex"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
</Measure>