dQM QICore Content Implementation Guide
2025.0.0 - CI Build

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

: Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer PatientsFHIR - XML Representation

Active as of 2025-08-21

Raw xml | Download


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


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


</tr>

<tr>


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


<td class="content-container">Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer PatientsFHIR</td>
</tr>



<tr>


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


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


  
<tr>


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


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



  
<tr>


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


<td class="content-container">urn:uuid:a9fa2b95-f5f7-4ff4-931c-b47df9d6371f</td>
</tr>



  
<tr>


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


<td class="content-container">urn:uuid:2bdfa3ee-eaa5-42ae-8483-a71dc6d3521f</td>
</tr>



  
    
    
<tr>


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


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

  




  
    
    
<tr>


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


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

  















<tr>


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


<td class="content-container">Centers for Medicare &amp; Medicaid Services (CMS)</td>
</tr>






<tr>


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


<td class="content-container">American Institutes for Research (AIR)</td>
</tr>






<tr>


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


<td class="content-container"><p>Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy who did not have a bone scan performed at any time since diagnosis of prostate cancer</p></td>
</tr>



<tr>


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


<td class="content-container"><p>This electronic clinical quality measure (Measure) and related data specifications are owned and stewarded by the Centers for Medicare &amp; Medicaid Services (CMS). CMS contracted (Contract # 75FCMC18D0027/ Task Order #: 75FCMC24F0144) with the American Institutes for Research (AIR) to develop this electronic measure. AIR is not responsible for any use of the Measure. AIR makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and AIR has no liability to anyone who relies on such measures or specifications.</p>
<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.</p>
<p>AIR 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) is copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 World Health Organization. All Rights Reserved.</p></td>
</tr>


<tr>


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


<td class="content-container"><p>The Measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.</p>
<p>THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND.</p>
<p>Due to technical limitations, registered trademarks are indicated by (R) or [R].</p></td>
</tr>











<tr>


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


<td class="content-container"><p>Multiple studies have indicated that a bone scan is not clinically necessary for staging prostate cancer in patients with a low (or very low) risk of recurrence and receiving primary therapy. For patients who are categorized as low risk, bone scans are unlikely to identify their disease. Furthermore, bone scans are not necessary for low risk patients who have no history of bony involvement or if the clinical examination suggests no bony involvement. Less than 1% of low risk patients are at risk of metastatic disease.</p>
<p>While clinical practice guidelines do not recommend bone scans in low risk prostate cancer patients, overuse is still common. An analysis of prostate cancer patients in the Surveillance, Epidemiology and End Results Medicare database diagnosed from 2004-2007 found that 43% of patients for whom a bone scan was not recommended received it (Falchook, Hendrix, &amp; Chen, 2015). The analysis also found that the use of bone scans in low risk patients leads to an annual cost of $4 million dollars to Medicare. The overuse of bone scan imaging for low risk prostate cancer patients is a concept included on the American Urological Association's (AUA) list in the Choosing Wisely Initiative as a means to promote adherence to evidence-based imaging practices and to reduce health care dollars wasted (AUA, 2019). This measure is intended to promote adherence to evidence-based imaging practices, lessen the financial burden of unnecessary imaging, and ultimately to improve the quality of care for prostate cancer patients in the United States.</p></td>
</tr>


<tr>


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


<td class="content-container"><p>For symptomatic patients and/or those with a life expectancy of greater than 5 years, bone and soft tissue imaging is appropriate for patients with unfavorable intermediate-risk, high-risk, and very-high-risk prostate cancer (National Comprehensive Cancer Network, 2024) (Evidence Level: Category 2A).</p>
<p>Clinicians should not routinely perform abdominopelvic computed tomography (CT) scan or bone scan in asymptomatic patients with low- or intermediate-risk prostate cancer (Eastham, 2022) (Expert Opinion).</p>
<p>Don’t perform PET, CT, and radionuclide bone scans, or newer imaging scans in the staging of early prostate cancer at low risk for metastasis (ASCO, 2021).</p></td>
</tr>




<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    <p>American Society of Clinical Oncology (2021) American Society of Clinical Oncology Choosing Wisely; Last Reviewed 2021. Retrieved from https://www.asco.org/news-initiatives/current-initiatives/cancer-care-initiatives/value-cancer-care/choosing-wisely</p>
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    <p>American Urological Association. (2013). Five Things Physicians and Patients Should Question. Choosing Wisely. https://www.auanet.org/documents/practices-resources/quality/choosing-wisely/AUA-Choosing-Wisely-15-Things.pdf</p>
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    <p>Eastham JA, Auffenberg GB, Barocas DA, et al. (2022) Clinically localized prostate cancer: AUA/ASTRO guideline, part I: introduction, risk assessment, staging, and risk-based management. J Urol, 208(1):10-18. doi: 10.1097/JU.0000000000002757.</p>
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    <p>Falchook, A. D., Hendrix, L. H., &amp; Chen, R. C. (2015). Guideline-discordant use of imaging during work-up of newly diagnosed prostate cancer. Journal of Oncology Practice, 11(2), e239-e246. doi:10.1200/jop.2014.001818</p>
    
    
    
    
    
  </td>
</tr>

<tr>
  
  
  
  

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


  
  
  <td class="content-container">
    
    
    
    <p>National Comprehensive Cancer Network (2024) NCCN Clinical Practice Guidelines in Oncology Prostate Cancer. Retrieved from https://www.nccn.org/professionals/physician_gls/pdf/prostate.pdf</p>
    
    
    
    
    
  </td>
</tr>






  
  
<tr>


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


<td class="content-container">Bone scan: <p>Bone scan refers to the conventional technetium-99m-methyl diphosphonate bone scan as well as 18F-sodium fluoride or prostate-specific membrane antigen (PSMA) PET/CT scan</p></td>
</tr>


  
  
<tr>


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


<td class="content-container">External beam radiotherapy : <p>External beam radiotherapy refers to 3D conformal radiation therapy, intensity modulated radiation therapy, stereotactic body radiotherapy, and proton beam therapy</p></td>
</tr>


  
  
<tr>


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


<td class="content-container">Risk Strata: High/Very High Risk: <p>PSA &gt; 20 ng/mL; OR Gleason score 8 to 10/Gleason grade group 4-5; OR clinically localized stage T3 to T4 (adapted from the National Comprehensive Cancer Network, 2018)</p></td>
</tr>


  
  
<tr>


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


<td class="content-container">Risk Strata: Intermediate Risk: <p>PSA 10 to 20 ng/mL; OR Gleason score 7/Gleason grade group 2-3; OR clinical stage T2b to T2c</p></td>
</tr>


  
  
<tr>


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


<td class="content-container">Risk Strata: Very Low/Low Risk: <p>PSA &lt; 10 ng/mL; AND Gleason score 6 or less/Gleason grade group 1; AND clinical stage T1 to T2a</p></td>
</tr>



<tr>


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


<td class="content-container"><p>A higher score indicates appropriate treatment of patients with prostate cancer at low (or very low) risk of recurrence. Only patients with prostate cancer with low (or very low) risk of recurrence will be counted in the performance denominator of this measure.</p>
<p>PSA test results reported in units other than ng/mL should be converted to ng/mL for reporting of this measure.</p>
<p>In 2022, the American Urological Association published guidance recommending that clinicians not perform bone scan in asymptomatic patients with low or favorable intermediate risk prostate cancer. However, this quality measure remains focused on patients with low (or very low) risk of recurrence.</p>
<p>This eCQM is a patient-based measure.</p>
<p>Telehealth encounters are not eligible for this measure because the measure does not contain telehealth-eligible codes.</p>
<p>This FHIR-based measure has been derived from the QDM-based measure CMS 129v15. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6 (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).</p></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">Summary</th>


<td class="content-container"><p>Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy who did not have a bone scan performed at any time since diagnosis of prostate cancer</p></td>
</tr>

  
  
  
<tr>


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


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



  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-scoring#proportion: 'Proportion']</td>
</tr>







  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-type#process: 'Process']</td>
</tr>





  
<tr>


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


<td class="content-container">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>
</tr>


  
  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: InitialPopulation_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>All patients, regardless of age, with a diagnosis of prostate cancer</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms129fhirprostcabonescanuse-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: Denominator_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Equals Initial Population at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms129fhirprostcabonescanuse-denominator">Denominator</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: Numerator_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Patients who did not have a bone scan performed after diagnosis of prostate cancer and before the end of the measurement period</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms129fhirprostcabonescanuse-numerator">Numerator</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        

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


      
      <td class="content-container">
        
        <em>ID</em>: DenominatorException_1
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one"><p>Documentation of reason(s) for performing a bone scan (including documented pain related to prostate cancer, salvage therapy, or other medical reasons)</p></p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#primary-cms129fhirprostcabonescanuse-denominator-exceptions">Denominator Exceptions</a> 
          
        
      </td>
    </tr>
  

  


  
    
<tr>


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


<td class="content-container"><p>For every patient evaluated by this measure also identify payer, race, ethnicity and sex</p></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>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Ethnicity
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms129fhirprostcabonescanuse-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>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Payer
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms129fhirprostcabonescanuse-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>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Race
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms129fhirprostcabonescanuse-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>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]
        
        <br/>
      
    
    
      <em>Description</em>: SDE Sex
    
    
      
        <br/>
        
        <em>Logic Definition</em>: <a href="#cms129fhirprostcabonescanuse-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">https://madie.cms.gov/Library/CMS129FHIRProstCaBoneScanUse</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/>
  </td>
</tr>


  <tr>


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


</tr>
  
  
  
  
    
    <tr>


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


</tr>
  
  
  
  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms129fhirprostcabonescanuse-initial-population"> </a>
    
    
    Initial Population
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  exists &quot;Prostate Cancer Diagnosis&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms129fhirprostcabonescanuse-denominator"> </a>
    
    
    Denominator
    
  </th>
</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;
    and &quot;First Prostate Cancer Treatment during day of Measurement Period&quot; is not null
    and &quot;Most Recent Prostate Cancer Staging Tumor Size T1a to T2a&quot; is not null
    and &quot;Most Recent PSA Test Result is Low&quot;
    and &quot;Most Recent Gleason Score is Low&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms129fhirprostcabonescanuse-numerator"> </a>
    
    
    Numerator
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  not exists &quot;Bone Scan Study Performed&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
    
      
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
            
              
            
            <tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="primary-cms129fhirprostcabonescanuse-denominator-exceptions"> </a>
    
    
    Denominator Exception
    
  </th>
</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
  &quot;Has Diagnosis of Pain related to Prostate Cancer&quot;
    or &quot;Has Salvage Therapy Performed after Prostate Cancer Diagnosis&quot;
    or &quot;Has Bone Scan Study Performed with Documented Reason&quot;</code></pre>
  </td>

</tr>

          
        
          
        
          
        
          
        
          
        
          
        
          
        
          
        
      
    
  

  
  

  
  


  <tr>


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


</tr>
  
  
          
        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <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.sex = '248153007' then &quot;Male (finding)&quot;
    when Patient.sex = '248152002' then &quot;Female (finding)&quot;
    else null
  end</code></pre>
  </td>

</tr>



        



        



        



        



        



        



        



        



        



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <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="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="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="cms129fhirprostcabonescanuse-sde-sex"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS129FHIRProstCaBoneScanUse</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="cms129fhirprostcabonescanuse-prostate-cancer-diagnosis"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Prostate Cancer Diagnosis&quot;:
  [ConditionProblemsHealthConcerns: &quot;Prostate Cancer&quot;] ProstateCancer
    where ProstateCancer.prevalenceInterval ( ) overlaps day of &quot;Measurement Period&quot;
      and ProstateCancer.isVerified ( )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms129fhirprostcabonescanuse-bone-scan-study-performed"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Bone Scan Study Performed&quot;:
  [ObservationClinicalResult: &quot;Bone Scan&quot;] BoneScan
    with &quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer
      such that BoneScan.effective.toInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
    where BoneScan.effective.toInterval ( ) ends during day of &quot;Measurement Period&quot;
      and BoneScan.status in { 'final', 'amended', 'corrected' }</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Numerator&quot;:
  not exists &quot;Bone Scan Study Performed&quot;</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Initial Population&quot;:
  exists &quot;Prostate Cancer Diagnosis&quot;</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms129fhirprostcabonescanuse-first-prostate-cancer-treatment-during-day-of-measurement-period"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;First Prostate Cancer Treatment during day of Measurement Period&quot;:
  First([Procedure: &quot;Prostate Cancer Treatment&quot;] ProstateCancerTreatment
      where ProstateCancerTreatment.performed.toInterval() ends during day of &quot;Measurement Period&quot;
        and ProstateCancerTreatment.status = 'completed'
      sort by start of performed.toInterval()
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms129fhirprostcabonescanuse-most-recent-prostate-cancer-staging-tumor-size-t1a-to-t2a"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Most Recent Prostate Cancer Staging Tumor Size T1a to T2a&quot;:
  ( Last(([ObservationClinicalResult: &quot;Tumor staging (tumor staging)&quot;] TumorStaging
    // TODO: determine feasibility of ObservationClinicalResult having basedOn reference to Condition
    // where exists(&quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer where TumorStaging.basedOn.references(ActiveProstateCancer))
    
    ) ProstateCancerStaging
      with &quot;First Prostate Cancer Treatment during day of Measurement Period&quot; FirstProstateCancerTreatment
        such that ProstateCancerStaging.effective.toInterval() starts before start of FirstProstateCancerTreatment.performed.toInterval()
          and ProstateCancerStaging.status in { 'final', 'amended', 'corrected' }
      sort by start of effective.toInterval()
  ) ) LastProstateCancerStaging
    where ( LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT1a (qualifier value)&quot;
        or LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT1b (qualifier value)&quot;
        or LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT1c (qualifier value)&quot;
        or LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT2a (qualifier value)&quot;
    )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms129fhirprostcabonescanuse-most-recent-psa-test-result-is-low"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Most Recent PSA Test Result is Low&quot;:
  ( Last([LaboratoryResultObservation: &quot;Prostate Specific Antigen Test&quot;] PSATest
      with &quot;Most Recent Prostate Cancer Staging Tumor Size T1a to T2a&quot; MostRecentProstateCancerStaging
        such that PSATest.effective.toInterval() starts before MostRecentProstateCancerStaging.effective.toInterval()
          and PSATest.status in { 'final', 'amended', 'corrected' }
      sort by start of effective.toInterval()
  ) ) LastPSATest
    return LastPSATest.value as Quantity &lt; 10 'ng/mL'</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms129fhirprostcabonescanuse-most-recent-gleason-score-is-low"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Most Recent Gleason Score is Low&quot;:
  ( Last([ObservationClinicalResult: &quot;Gleason score in Specimen Qualitative&quot;] GleasonScore
      with &quot;First Prostate Cancer Treatment during day of Measurement Period&quot; FirstProstateCancerTreatment
        such that GleasonScore.effective.toInterval() starts before start of FirstProstateCancerTreatment.performed.toInterval()
          and GleasonScore.status in { 'final', 'amended', 'corrected' }
      sort by start of effective.toInterval()
  ) ) LastGleasonScore
    return LastGleasonScore.value as Integer &lt;= 6</code></pre>
  </td>

</tr>



        


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

  <td class="content-container"><em>Library Name:</em> CMS129FHIRProstCaBoneScanUse</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;
    and &quot;First Prostate Cancer Treatment during day of Measurement Period&quot; is not null
    and &quot;Most Recent Prostate Cancer Staging Tumor Size T1a to T2a&quot; is not null
    and &quot;Most Recent PSA Test Result is Low&quot;
    and &quot;Most Recent Gleason Score is Low&quot;</code></pre>
  </td>

</tr>



        



        


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

  <td class="content-container"><em>Library Name:</em> CMS129FHIRProstCaBoneScanUse</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="cms129fhirprostcabonescanuse-sde-ethnicity"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS129FHIRProstCaBoneScanUse</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="cms129fhirprostcabonescanuse-sde-race"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> CMS129FHIRProstCaBoneScanUse</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="cms129fhirprostcabonescanuse-has-diagnosis-of-pain-related-to-prostate-cancer"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Diagnosis of Pain related to Prostate Cancer&quot;:
  exists ( ( [ConditionProblemsHealthConcerns: &quot;Pain Warranting Further Investigation for Prostate Cancer&quot;]
      union [ConditionEncounterDiagnosis: &quot;Pain Warranting Further Investigation for Prostate Cancer&quot;] ) ProstateCancerPain
      with &quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer
        such that ProstateCancerPain.prevalenceInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
          and ProstateCancerPain.isVerified ( )
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms129fhirprostcabonescanuse-has-salvage-therapy-performed-after-prostate-cancer-diagnosis"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Salvage Therapy Performed after Prostate Cancer Diagnosis&quot;:
  exists ( [Procedure: &quot;Salvage Therapy&quot;] SalvageTherapy
      with &quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer
        such that SalvageTherapy.performed.toInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
          and SalvageTherapy.status = 'completed'
  )</code></pre>
  </td>

</tr>



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="cms129fhirprostcabonescanuse-has-bone-scan-study-performed-with-documented-reason"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Has Bone Scan Study Performed with Documented Reason&quot;:
  exists &quot;Bone Scan Study Performed&quot; BoneScanAfterDiagnosis
    where BoneScanAfterDiagnosis.value ~ &quot;Procedure reason record (record artifact)&quot;</code></pre>
  </td>

</tr>



        


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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
  &quot;Has Diagnosis of Pain related to Prostate Cancer&quot;
    or &quot;Has Salvage Therapy Performed after Prostate Cancer Diagnosis&quot;
    or &quot;Has Bone Scan Study Performed with Documented Reason&quot;</code></pre>
  </td>

</tr>



        



        



        



        


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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@note: When possible, this function should be migrated to QICoreCommon.
@description: Returns true if the given Condition has a verification status of &quot;confirmed&quot;, &quot;unconfirmed&quot;, &quot;provisional&quot;, or &quot;differential&quot;
*/


define fluent function isVerified(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon.&quot;confirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;unconfirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;provisional&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;differential&quot;
  )</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 Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
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 scope="row" rowspan="2" class="row-header">
    
      
      <a name="qicorecommon-abatementinterval"> </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 abatement of a given Condition.
@comment: If the abatement element of the Condition is represented as a DateTime, the result
is an interval beginning and ending on that DateTime.
If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
result is an interval from the date the patient turned that age to immediately before one year later.
If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
before one year later than the date the patient turned the ending age of the quantity interval.
*/
define fluent function abatementInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
	if condition.abatement is DateTime then
	  Interval[condition.abatement as DateTime, condition.abatement as DateTime]
	else if condition.abatement is Quantity then
		Interval[Patient.birthDate + (condition.abatement as Quantity),
			Patient.birthDate + (condition.abatement as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;Quantity&gt; then
	  Interval[Patient.birthDate + (condition.abatement.low as Quantity),
		  Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;DateTime&gt; then
	  Interval[condition.abatement.low, condition.abatement.high)
	else null as Interval&lt;DateTime&gt;</code></pre>
  </td>

</tr>



        



        


<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="qicorecommon-tointerval"> </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: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in QICore, allowing this function to be used across any resource.
The input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
If the input is a DateTime Interval, the result is the input.
If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
*/
define fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):
  case
	  when choice is DateTime then
    	Interval[choice as DateTime, choice as DateTime]
		when choice is Interval&lt;DateTime&gt; then
  		choice as Interval&lt;DateTime&gt;
		when choice is Quantity then
		  Interval[Patient.birthDate + (choice as Quantity),
			  Patient.birthDate + (choice as Quantity) + 1 year)
		when choice is Interval&lt;Quantity&gt; then
		  Interval[Patient.birthDate + (choice.low as Quantity),
			  Patient.birthDate + (choice.high as Quantity) + 1 year)
		when choice is Timing then
      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;
		else
			null as Interval&lt;DateTime&gt;
	end</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-tointerval"> </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 [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">
    
      
      <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 colspan="2" scope="row" class="row-header"><a name="terminology"> </a>Terminology</th>


</tr>
  
  
  

 

 

 

 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system SNOMEDCT
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://snomed.info/sct
    <br/>
    <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system ConditionClinicalStatusCodes
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://terminology.hl7.org/CodeSystem/condition-clinical
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</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>: http://terminology.hl7.org/CodeSystem/condition-ver-status
    <br/>
    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>
    
  </td>
</tr>
 


<tr>
  
  
  

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


  
  <td class="content-container">
    
    <em>Description</em>: Code system LOINC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://loinc.org
    <br/>
    <em>Canonical URL</em>: <tt>http://loinc.org</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Bone Scan
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Prostate Cancer
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Prostate Cancer Treatment
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Prostate Specific Antigen Test
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


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


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Pain Warranting Further Investigation for Prostate Cancer
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451</tt>
    
  </td>
</tr>
 


<tr>
  
  

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


  
  
  <td class="content-container">
    
    <em>Description</em>: Value set Salvage Therapy
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399
    <br/>
    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399</tt>
    
  </td>
</tr>
 


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

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

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: 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>: 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>: Tumor staging (tumor staging)
        <br/>
      
      <em>Code</em>: 254292007
      <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>: American Joint Committee on Cancer cT1a (qualifier value)
        <br/>
      
      <em>Code</em>: 1228892002
      <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>: American Joint Committee on Cancer cT1b (qualifier value)
        <br/>
      
      <em>Code</em>: 1228895000
      <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>: American Joint Committee on Cancer cT1c (qualifier value)
        <br/>
      
      <em>Code</em>: 1228899006
      <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>: American Joint Committee on Cancer cT2a (qualifier value)
        <br/>
      
      <em>Code</em>: 1228931008
      <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>: Gleason score in Specimen Qualitative
        <br/>
      
      <em>Code</em>: 35266-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>: Procedure reason record (record artifact)
        <br/>
      
      <em>Code</em>: 433611000124109
      <br/>
      <em>System</em>: <tt>http://snomed.info/sct</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>: QICore model information
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: http://hl7.org/fhir/Library/QICore-ModelInfo
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/Library/QICore-ModelInfo</tt>
    
  </td>
</tr>
 


<tr>
  

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


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


<tr>
  

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


  <td class="content-container">
    
    <em>Description</em>: Library FHIRHelpers
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: https://madie.cms.gov/Library/FHIRHelpers|4.4.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/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>: https://madie.cms.gov/Library/QICoreCommon|4.0.000
    <br/>
    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/QICoreCommon|4.0.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>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient
    <br/>        
  
   
   
    <em>Must Support Elements</em>: extension, birthDate, birthDate.value, url
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
    <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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns
    <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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, status, status.value, 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result
    <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(s)</em>: 
    
      
      http://snomed.info/sct#254292007: 'Tumor staging (tumor staging)'
      
    
    </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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, status, status.value, 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>: 
    
      
      http://loinc.org#35266-6: 'Gleason score in Specimen Qualitative'
      
    
    </span>
    <br/>
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Procedure
    <br/>
  
    <em>Profile(s)</em>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, performed, 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-lab
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code, effective, status, status.value, 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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage
    <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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
    <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>: 
  
    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis
    <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> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451
    <br/> 
  
  
  
   
  </td>
</tr>

  
  

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

    </tbody>
  </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248153007"/>
          <display value="Male (finding)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="248152002"/>
          <display value="Female (finding)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/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/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://snomed.info/sct"/>
          <code value="254292007"/>
          <display value="Tumor staging (tumor staging)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="1228892002"/>
          <display
                   value="American Joint Committee on Cancer cT1a (qualifier value)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="1228895000"/>
          <display
                   value="American Joint Committee on Cancer cT1b (qualifier value)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="1228899006"/>
          <display
                   value="American Joint Committee on Cancer cT1c (qualifier value)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="1228931008"/>
          <display
                   value="American Joint Committee on Cancer cT2a (qualifier value)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="35266-6"/>
          <display value="Gleason score in Specimen Qualitative"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://snomed.info/sct"/>
          <code value="433611000124109"/>
          <display value="Procedure reason record (record artifact)"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Sex"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Sex&quot;:
  case
    when Patient.sex = '248153007' then &quot;Male (finding)&quot;
    when Patient.sex = '248152002' then &quot;Female (finding)&quot;
    else null
  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </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/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Prostate Cancer Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Prostate Cancer Diagnosis&quot;:
  [ConditionProblemsHealthConcerns: &quot;Prostate Cancer&quot;] ProstateCancer
    where ProstateCancer.prevalenceInterval ( ) overlaps day of &quot;Measurement Period&quot;
      and ProstateCancer.isVerified ( )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Bone Scan Study Performed"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Bone Scan Study Performed&quot;:
  [ObservationClinicalResult: &quot;Bone Scan&quot;] BoneScan
    with &quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer
      such that BoneScan.effective.toInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
    where BoneScan.effective.toInterval ( ) ends during day of &quot;Measurement Period&quot;
      and BoneScan.status in { 'final', 'amended', 'corrected' }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Numerator&quot;:
  not exists &quot;Bone Scan Study Performed&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Initial Population&quot;:
  exists &quot;Prostate Cancer Diagnosis&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString
                       value="First Prostate Cancer Treatment during day of Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;First Prostate Cancer Treatment during day of Measurement Period&quot;:
  First([Procedure: &quot;Prostate Cancer Treatment&quot;] ProstateCancerTreatment
      where ProstateCancerTreatment.performed.toInterval() ends during day of &quot;Measurement Period&quot;
        and ProstateCancerTreatment.status = 'completed'
      sort by start of performed.toInterval()
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Most Recent Prostate Cancer Staging Tumor Size T1a to T2a"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Most Recent Prostate Cancer Staging Tumor Size T1a to T2a&quot;:
  ( Last(([ObservationClinicalResult: &quot;Tumor staging (tumor staging)&quot;] TumorStaging
    // TODO: determine feasibility of ObservationClinicalResult having basedOn reference to Condition
    // where exists(&quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer where TumorStaging.basedOn.references(ActiveProstateCancer))
    
    ) ProstateCancerStaging
      with &quot;First Prostate Cancer Treatment during day of Measurement Period&quot; FirstProstateCancerTreatment
        such that ProstateCancerStaging.effective.toInterval() starts before start of FirstProstateCancerTreatment.performed.toInterval()
          and ProstateCancerStaging.status in { 'final', 'amended', 'corrected' }
      sort by start of effective.toInterval()
  ) ) LastProstateCancerStaging
    where ( LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT1a (qualifier value)&quot;
        or LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT1b (qualifier value)&quot;
        or LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT1c (qualifier value)&quot;
        or LastProstateCancerStaging.value ~ &quot;American Joint Committee on Cancer cT2a (qualifier value)&quot;
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Most Recent PSA Test Result is Low"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Most Recent PSA Test Result is Low&quot;:
  ( Last([LaboratoryResultObservation: &quot;Prostate Specific Antigen Test&quot;] PSATest
      with &quot;Most Recent Prostate Cancer Staging Tumor Size T1a to T2a&quot; MostRecentProstateCancerStaging
        such that PSATest.effective.toInterval() starts before MostRecentProstateCancerStaging.effective.toInterval()
          and PSATest.status in { 'final', 'amended', 'corrected' }
      sort by start of effective.toInterval()
  ) ) LastPSATest
    return LastPSATest.value as Quantity &lt; 10 'ng/mL'"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Most Recent Gleason Score is Low"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Most Recent Gleason Score is Low&quot;:
  ( Last([ObservationClinicalResult: &quot;Gleason score in Specimen Qualitative&quot;] GleasonScore
      with &quot;First Prostate Cancer Treatment during day of Measurement Period&quot; FirstProstateCancerTreatment
        such that GleasonScore.effective.toInterval() starts before start of FirstProstateCancerTreatment.performed.toInterval()
          and GleasonScore.status in { 'final', 'amended', 'corrected' }
      sort by start of effective.toInterval()
  ) ) LastGleasonScore
    return LastGleasonScore.value as Integer &lt;= 6"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator&quot;:
  &quot;Initial Population&quot;
    and &quot;First Prostate Cancer Treatment during day of Measurement Period&quot; is not null
    and &quot;Most Recent Prostate Cancer Staging Tumor Size T1a to T2a&quot; is not null
    and &quot;Most Recent PSA Test Result is Low&quot;
    and &quot;Most Recent Gleason Score is Low&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE 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="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </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="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Ethnicity"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Ethnicity&quot;:
  Patient.ethnicity E
    return Tuple {
      codes: { E.ombCategory } union E.detailed,
      display: E.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </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="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="SupplementalDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="SDE Race"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;SDE Race&quot;:
  Patient.race R
    return Tuple {
      codes: R.ombCategory union R.detailed,
      display: R.text
    }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </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="16"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Has Diagnosis of Pain related to Prostate Cancer"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Diagnosis of Pain related to Prostate Cancer&quot;:
  exists ( ( [ConditionProblemsHealthConcerns: &quot;Pain Warranting Further Investigation for Prostate Cancer&quot;]
      union [ConditionEncounterDiagnosis: &quot;Pain Warranting Further Investigation for Prostate Cancer&quot;] ) ProstateCancerPain
      with &quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer
        such that ProstateCancerPain.prevalenceInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
          and ProstateCancerPain.isVerified ( )
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Has Salvage Therapy Performed after Prostate Cancer Diagnosis"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Salvage Therapy Performed after Prostate Cancer Diagnosis&quot;:
  exists ( [Procedure: &quot;Salvage Therapy&quot;] SalvageTherapy
      with &quot;Prostate Cancer Diagnosis&quot; ActiveProstateCancer
        such that SalvageTherapy.performed.toInterval ( ) starts after start of ActiveProstateCancer.prevalenceInterval ( )
          and SalvageTherapy.status = 'completed'
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString
                       value="Has Bone Scan Study Performed with Documented Reason"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Has Bone Scan Study Performed with Documented Reason&quot;:
  exists &quot;Bone Scan Study Performed&quot; BoneScanAfterDiagnosis
    where BoneScanAfterDiagnosis.value ~ &quot;Procedure reason record (record artifact)&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exceptions"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator Exceptions&quot;:
  &quot;Has Diagnosis of Pain related to Prostate Cancer&quot;
    or &quot;Has Salvage Therapy Performed after Prostate Cancer Diagnosis&quot;
    or &quot;Has Bone Scan Study Performed with Documented Reason&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value uri): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-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 Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
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="22"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="abatementInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns an interval representing the normalized abatement of a given Condition.
@comment: If the abatement element of the Condition is represented as a DateTime, the result
is an interval beginning and ending on that DateTime.
If the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The
result is an interval from the date the patient turned that age to immediately before one year later.
If the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during
which the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately
before one year later than the date the patient turned the ending age of the quantity interval.
*/
define fluent function abatementInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):
	if condition.abatement is DateTime then
	  Interval[condition.abatement as DateTime, condition.abatement as DateTime]
	else if condition.abatement is Quantity then
		Interval[Patient.birthDate + (condition.abatement as Quantity),
			Patient.birthDate + (condition.abatement as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;Quantity&gt; then
	  Interval[Patient.birthDate + (condition.abatement.low as Quantity),
		  Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)
	else if condition.abatement is Interval&lt;DateTime&gt; then
	  Interval[condition.abatement.low, condition.abatement.high)
	else null as Interval&lt;DateTime&gt;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="CMS129FHIRProstCaBoneScanUse"/>
        </extension>
        <extension url="name">
          <valueString value="isVerified"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@note: When possible, this function should be migrated to QICoreCommon.
@description: Returns true if the given Condition has a verification status of &quot;confirmed&quot;, &quot;unconfirmed&quot;, &quot;provisional&quot;, or &quot;differential&quot;
*/


define fluent function isVerified(condition Choice&lt;ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns&gt;):
  condition.verificationStatus is not null implies ( condition.verificationStatus ~ QICoreCommon.&quot;confirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;unconfirmed&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;provisional&quot;
      or condition.verificationStatus ~ QICoreCommon.&quot;differential&quot;
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="QICoreCommon"/>
        </extension>
        <extension url="name">
          <valueString value="toInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in QICore, allowing this function to be used across any resource.
The input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
If the input is a DateTime Interval, the result is the input.
If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
*/
define fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):
  case
	  when choice is DateTime then
    	Interval[choice as DateTime, choice as DateTime]
		when choice is Interval&lt;DateTime&gt; then
  		choice as Interval&lt;DateTime&gt;
		when choice is Quantity then
		  Interval[Patient.birthDate + (choice as Quantity),
			  Patient.birthDate + (choice as Quantity) + 1 year)
		when choice is Interval&lt;Quantity&gt; then
		  Interval[Patient.birthDate + (choice.low as Quantity),
			  Patient.birthDate + (choice.high as Quantity) + 1 year)
		when choice is Timing then
      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;
		else
			null as Interval&lt;DateTime&gt;
	end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToInterval"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@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]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </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="/*
@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="27"/>
        </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="QICore model information"/>
        <resource value="http://hl7.org/fhir/Library/QICore-ModelInfo"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library SDE"/>
        <resource
                  value="https://madie.cms.gov/Library/SupplementalDataElements|5.1.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource value="https://madie.cms.gov/Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library QICoreCommon"/>
        <resource value="https://madie.cms.gov/Library/QICoreCommon|4.0.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system SNOMEDCT"/>
        <resource value="http://snomed.info/sct"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionClinicalStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-clinical"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system ConditionVerificationStatusCodes"/>
        <resource
                  value="http://terminology.hl7.org/CodeSystem/condition-ver-status"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system LOINC"/>
        <resource value="http://loinc.org"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Bone Scan"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Prostate Cancer"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Prostate Cancer Treatment"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Prostate Specific Antigen Test"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401"/>
      </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 Pain Warranting Further Investigation for Prostate Cancer"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Salvage Therapy"/>
        <resource
                  value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </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 Exceptions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="SDE Sex"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="SDE Payer"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="SDE Ethnicity"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </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="extension"/>
        <mustSupport value="birthDate"/>
        <mustSupport value="birthDate.value"/>
        <mustSupport value="url"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Condition"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.319"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.320"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result"/>
        <mustSupport value="code"/>
        <mustSupport value="value"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://snomed.info/sct"/>
            <code value="254292007"/>
            <display value="Tumor staging (tumor staging)"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-clinical-result"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <code>
            <system value="http://loinc.org"/>
            <code value="35266-6"/>
            <display value="Gleason score in Specimen Qualitative"/>
          </code>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.398"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Procedure"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"/>
        <mustSupport value="code"/>
        <mustSupport value="performed"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.399"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile
                 value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-lab"/>
        <mustSupport value="code"/>
        <mustSupport value="effective"/>
        <mustSupport value="status"/>
        <mustSupport value="status.value"/>
        <mustSupport value="value"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.401"/>
        </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-encounter-diagnosis"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.451"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" id="supplementalDataGuidance">
    <extension url="guidance">
      <valueString
                   value="&lt;p&gt;For every patient evaluated by this measure also identify payer, race, ethnicity and sex&lt;/p&gt;"/>
    </extension>
    <extension url="usage">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
          <code value="supplemental-data"/>
          <display value="Supplemental Data"/>
        </coding>
        <text value="Supplemental Data Guidance"/>
      </valueCodeableConcept>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Bone scan"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="Bone scan refers to the conventional technetium-99m-methyl diphosphonate bone scan as well as 18F-sodium fluoride or prostate-specific membrane antigen (PSMA) PET/CT scan
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="External beam radiotherapy "/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="External beam radiotherapy refers to 3D conformal radiation therapy, intensity modulated radiation therapy, stereotactic body radiotherapy, and proton beam therapy
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Risk Strata: High/Very High Risk"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="PSA \&gt; 20 ng/mL; OR Gleason score 8 to 10/Gleason grade group 4-5; OR clinically localized stage T3 to T4 (adapted from the National Comprehensive Cancer Network, 2018)
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Risk Strata: Intermediate Risk"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="PSA 10 to 20 ng/mL; OR Gleason score 7/Gleason grade group 2-3; OR clinical stage T2b to T2c
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/cqf-definitionTerm">
    <extension url="term">
      <valueString value="Risk Strata: Very Low/Low Risk"/>
    </extension>
    <extension url="definition">
      <valueMarkdown
                     value="PSA \&lt; 10 ng/mL; AND Gleason score 6 or less/Gleason grade group 1; AND clinical stage T1 to T2a
"/>
    </extension>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
    <valueReference>
      <reference value="#effective-data-requirements"/>
    </valueReference>
  </extension>
  <url value="https://madie.cms.gov/Measure/CMS129FHIRProstCaBoneScanUse"/>
  <identifier>
    <use value="usual"/>
    <type>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="short-name"/>
        <display value="Short Name"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/shortName"/>
    <value value="CMS129FHIR"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-independent"/>
        <display value="Version Independent"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:a9fa2b95-f5f7-4ff4-931c-b47df9d6371f"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="version-specific"/>
        <display value="Version Specific"/>
      </coding>
    </type>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:2bdfa3ee-eaa5-42ae-8483-a71dc6d3521f"/>
  </identifier>
  <identifier>
    <use value="official"/>
    <type>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"/>
        <code value="publisher"/>
        <display value="Publisher"/>
      </coding>
    </type>
    <system value="https://madie.cms.gov/measure/cmsId"/>
    <value value="129FHIR"/>
    <assigner>
      <display value="CMS"/>
    </assigner>
  </identifier>
  <version value="1.0.000"/>
  <name value="CMS129FHIRProstCaBoneScanUse"/>
  <title
         value="Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer PatientsFHIR
"/>
  <status value="active"/>
  <experimental value="false"/>
  <date value="2025-08-21T17:24:17+00:00"/>
  <publisher value="Centers for Medicare &amp;amp; Medicaid Services (CMS)"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="https://www.cms.gov/"/>
    </telecom>
  </contact>
  <description
               value="Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy who did not have a bone scan performed at any time since diagnosis of prostate cancer
"/>
  <usage
         value="A higher score indicates appropriate treatment of patients with prostate cancer at low (or very low) risk of recurrence. Only patients with prostate cancer with low (or very low) risk of recurrence will be counted in the performance denominator of this measure.

PSA test results reported in units other than ng/mL should be converted to ng/mL for reporting of this measure.

In 2022, the American Urological Association published guidance recommending that clinicians not perform bone scan in asymptomatic patients with low or favorable intermediate risk prostate cancer. However, this quality measure remains focused on patients with low (or very low) risk of recurrence.

This eCQM is a patient-based measure.

Telehealth encounters are not eligible for this measure because the measure does not contain telehealth-eligible codes.

This FHIR-based measure has been derived from the QDM-based measure CMS 129v15. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6 (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
"/>
  <copyright
             value="This electronic clinical quality measure (Measure) and related data specifications are owned and stewarded by the Centers for Medicare \&amp; Medicaid Services (CMS). CMS contracted (Contract # 75FCMC18D0027/ Task Order #: 75FCMC24F0144) with the American Institutes for Research (AIR) to develop this electronic measure. AIR is not responsible for any use of the Measure. AIR makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and AIR has no liability to anyone who relies on such measures or specifications.

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.

AIR 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) is copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT\[R\]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 World Health Organization. All Rights Reserved.
"/>
  <effectivePeriod>
    <start value="2026-01-01"/>
    <end value="2026-12-31"/>
  </effectivePeriod>
  <author>
    <name value="American Institutes for Research (AIR)"/>
    <telecom>
      <system value="url"/>
      <value value="https://www.air.org"/>
    </telecom>
  </author>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="American Society of Clinical Oncology (2021) American Society of Clinical Oncology Choosing Wisely; Last Reviewed 2021. Retrieved from https://www.asco.org/news-initiatives/current-initiatives/cancer-care-initiatives/value-cancer-care/choosing-wisely
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="American Urological Association. (2013). Five Things Physicians and Patients Should Question. Choosing Wisely. https://www.auanet.org/documents/practices-resources/quality/choosing-wisely/AUA-Choosing-Wisely-15-Things.pdf
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Eastham JA, Auffenberg GB, Barocas DA, et al. (2022) Clinically localized prostate cancer: AUA/ASTRO guideline, part I: introduction, risk assessment, staging, and risk-based management. J Urol, 208(1):10-18. doi: 10.1097/JU.0000000000002757.
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="Falchook, A. D., Hendrix, L. H., \&amp; Chen, R. C. (2015). Guideline-discordant use of imaging during work-up of newly diagnosed prostate cancer. Journal of Oncology Practice, 11(2), e239-e246. doi:10.1200/jop.2014.001818
"/>
  </relatedArtifact>
  <relatedArtifact>
    <type value="citation"/>
    <citation
              value="National Comprehensive Cancer Network (2024) NCCN Clinical Practice Guidelines in Oncology Prostate Cancer. Retrieved from https://www.nccn.org/professionals/physician_gls/pdf/prostate.pdf
"/>
  </relatedArtifact>
  <library
           value="https://madie.cms.gov/Library/CMS129FHIRProstCaBoneScanUse"/>
  <disclaimer
              value="The Measure is not a clinical guideline, does not establish a standard of medical care, and has not been tested for all potential applications.

THE MEASURE 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\].
"/>
  <rationale
             value="Multiple studies have indicated that a bone scan is not clinically necessary for staging prostate cancer in patients with a low (or very low) risk of recurrence and receiving primary therapy. For patients who are categorized as low risk, bone scans are unlikely to identify their disease. Furthermore, bone scans are not necessary for low risk patients who have no history of bony involvement or if the clinical examination suggests no bony involvement. Less than 1% of low risk patients are at risk of metastatic disease.

While clinical practice guidelines do not recommend bone scans in low risk prostate cancer patients, overuse is still common. An analysis of prostate cancer patients in the Surveillance, Epidemiology and End Results Medicare database diagnosed from 2004-2007 found that 43% of patients for whom a bone scan was not recommended received it (Falchook, Hendrix, \&amp; Chen, 2015). The analysis also found that the use of bone scans in low risk patients leads to an annual cost of $4 million dollars to Medicare. The overuse of bone scan imaging for low risk prostate cancer patients is a concept included on the American Urological Association's (AUA) list in the Choosing Wisely Initiative as a means to promote adherence to evidence-based imaging practices and to reduce health care dollars wasted (AUA, 2019). This measure is intended to promote adherence to evidence-based imaging practices, lessen the financial burden of unnecessary imaging, and ultimately to improve the quality of care for prostate cancer patients in the United States.
"/>
  <clinicalRecommendationStatement
                                   value="For symptomatic patients and/or those with a life expectancy of greater than 5 years, bone and soft tissue imaging is appropriate for patients with unfavorable intermediate-risk, high-risk, and very-high-risk prostate cancer (National Comprehensive Cancer Network, 2024) (Evidence Level: Category 2A).

Clinicians should not routinely perform abdominopelvic computed tomography (CT) scan or bone scan in asymptomatic patients with low- or intermediate-risk prostate cancer (Eastham, 2022) (Expert Opinion).

Don't perform PET, CT, and radionuclide bone scans, or newer imaging scans in the staging of early prostate cancer at low risk for metastasis (ASCO, 2021).
"/>
  <group id="Group_1">
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
          <code value="proportion"/>
          <display value="Proportion"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <extension
               url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
      <valueCode value="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-improvementNotation">
      <valueCodeableConcept>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
          <code value="increase"/>
          <display value="Increased score indicates improvement"/>
        </coding>
      </valueCodeableConcept>
    </extension>
    <description
                 value="Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy who did not have a bone scan performed at any time since diagnosis of prostate cancer
"/>
    <population id="InitialPopulation_1">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description
                   value="All patients, regardless of age, with a diagnosis of prostate cancer
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="Denominator_1">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description
                   value="Equals Initial Population at low (or very low) risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="Numerator_1">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description
                   value="Patients who did not have a bone scan performed after diagnosis of prostate cancer and before the end of the measurement period
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <population id="DenominatorException_1">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exception"/>
          <display value="Denominator Exception"/>
        </coding>
      </code>
      <description
                   value="Documentation of reason(s) for performing a bone scan (including documented pain related to prostate cancer, salvage therapy, or other medical reasons)
"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exceptions"/>
      </criteria>
    </population>
  </group>
  <supplementalData id="sde-ethnicity">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Ethnicity
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Ethnicity"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-payer">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Payer
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Payer"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-race">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Race
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Race"/>
    </criteria>
  </supplementalData>
  <supplementalData id="sde-sex">
    <usage>
      <coding>
        <system
                value="http://terminology.hl7.org/CodeSystem/measure-data-usage"/>
        <code value="supplemental-data"/>
      </coding>
    </usage>
    <description value="SDE Sex
"/>
    <criteria>
      <language value="text/cql-identifier"/>
      <expression value="SDE Sex"/>
    </criteria>
  </supplementalData>
</Measure>