<Measure xmlns="http://hl7.org/fhir">
   <id value="CMS157FHIRPainIntensityQuantified"></id>
   <meta>
      <profile value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure"></profile>
      <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"></profile>
      <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm"></profile>
      <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"></profile>
      <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm"></profile>
      <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm"></profile>
      <profile value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm"></profile>
   </meta>
   <text>
      <status value="extensions"></status>
      <div xmlns="http://www.w3.org/1999/xhtml" class="col-12"> 
         <table class="narrative-table"> 
            <tbody> 
               <tr> 
                  <th colspan="2" scope="row" class="row-header">Metadata</th> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Title</th> 
                  <td class="content-container">Oncology: Medical and Radiation Pain Intensity QuantifiedFHIR</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">CMS157FHIR</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">GUID (Version Independent)</th> 
                  <td class="content-container">urn:uuid:b7b487bf-bc27-48c9-994f-6d095ff84500</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">GUID (Version Specific)</th> 
                  <td class="content-container">urn:uuid:0f0317d4-38c3-4b87-b0a9-9b74aaa9a466</td> 
               </tr>  
               <tr> 
                  <th scope="row" class="row-header">CMS Identifier</th> 
                  <td class="content-container">157FHIR</td> 
               </tr>   
               <tr> 
                  <th scope="row" class="row-header">CMS Consensus Based Entity Identifier</th> 
                  <td class="content-container">0384e</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">American Society of Clinical Oncology</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Developer</th> 
                  <td class="content-container">American Society of Clinical Oncology</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Description</th> 
                  <td class="content-container">
                     <p>Percentage of patient visits, regardless of patient age, with a diagnosis of cancer currently receiving chemotherapy or radiation therapy in which pain intensity is quantified</p>
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Copyright</th> 
                  <td class="content-container">
                     <p>Copyright 2025 American Society of Clinical Oncology. 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, while copyrighted, can be reproduced and distributed, without modification, for noncommercial purposes, e.g., use by health care providers in connection with their practices. Commercial use is defined as the sale, license, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain.</p> 
                     <p>Commercial uses of the Measure require a license agreement between the user and American Society of Clinical Oncology (ASCO) and prior written approval of ASCO. Contact measurement@asco.org for licensing this measure. Neither ASCO nor its members shall be responsible for any use of the Measure.</p> 
                     <p>The PCPI’s and American Medical Association’s significant past efforts and contributions to the development and updating of the Measures are acknowledged.</p> 
                     <p>ASCO is solely responsible for the review and enhancement ("Maintenance") of the Measure as of June 2020.</p> 
                     <p>ASCO encourages the use of the Measure by other health care professionals, where appropriate.</p> 
                     <p>THE MEASURE AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.</p> 
                     <p>Limited proprietary coding may be contained in the Measure specifications for convenience. A license agreement must be entered prior to a third party’s use of Current Procedural Terminology (CPT[R]) or other proprietary code set contained in the Measures. Any other use of CPT or other coding by the third party is strictly prohibited. ASCO and its members disclaim all liability for use or accuracy of any CPT or other coding contained in the specifications.</p> 
                     <p>CPT(R) contained in the Measure specifications is copyright 2004-2024 American Medical Association. LOINC(R) is copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2024 World Health Organization. All Rights Reserved.</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>Pain is a commonly occurring symptom for cancer patients as 30% to 50% (510,000 to 850,000 each year based on current statistics) will experience moderate to severe pain (Wiffen, Wee, Derry, Bell, &amp; Moore, 2017). Initial and ongoing pain assessments are essential to determine the pathophysiology of pain and ensure proper pain management. According to the National Comprehensive Cancer Network (NCCN, 2024), undertreatment of pain remains a problem among a significant subset of cancer patients, survival is linked with symptom control and pain management, and pain management contributes to broad quality of life improvement. Furthermore, NCCN notes that formal pain reevaluation is required at each contact to ensure that pain management therapies are successfully meeting patient-specific goals for comfort, function, and safety. Cancer patients have reported that pain interferes with their mood, work, relationships with other people, sleep and overall enjoyment of life (Moryl et al., 2018). Pain management is an essential part of oncologic management and contributes to a patient’s overall function and quality of life (NCCN, 2024).</p> 
                     <p>A recent analysis of registry data for chronic pain cancer patients found average pain intensity reported as mild (24.6% of patients), moderate (41.5%), and severe (33.9%). The study also indicated that patient report of pain relief is inversely related to the average pain intensity reported (Moryl et al., 2018). These data suggest that assessing and managing a cancer patient’s pain is critical and there remains significant room for improvement in assessing and mitigating cancer-related pain. A prospective study of changes in pain severity of cancer patients found that, at initial assessment, 47% of patients reported pain. At follow-up, the patients with pain at initial assessment reported reduced pain (32.2%), stable pain (48.2%) and worse pain (19.6%). Of the 53% of patients reporting no pain at initial assessment, 82.6% reported stable pain and 17.4% reported worse pain at follow-up assessment (Zhao et al., 2014). This study highlights the importance of initial and ongoing assessments of pain to identify gaps and ensure proper pain management.</p>
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Clinical Recommendation Statement</th> 
                  <td class="content-container">
                     <ul> 
                        <li>
                           <p>Screen all patients for pain at each contact.</p>
                        </li> 
                        <li>
                           <p>Routinely quantify and document pain intensity and quality as characterized by the patient (whenever possible). Include patient reporting of breakthrough pain, treatments used and their impact on pain, satisfaction with pain relief, pain interference, provider assessment of impact on function, and any special issues for the patient relevant to pain treatment and access to care. If necessary, get additional information from caregiver regarding pain and impact on function.</p>
                        </li> 
                        <li>
                           <p>Perform comprehensive pain assessment if new or worsening pain is present and regularly for persisting pain.</p>
                           <p>Various methods and tools exist to assess pain severity. Intensity of pain should be quantified using a numerical rating scale (i.e., 0-10), visual analog scale, categorical scale, or pictorial scale (e.g., The Faces Pain Rating Scale) (Category 2A) (National Comprehensive Cancer Network, 2024).</p>
                        </li> 
                     </ul>
                  </td> 
               </tr> 
               <tr>   
                  <th scope="row" class="row-header">Citation</th>  
                  <td class="content-container">  Moryl, N., Dave, V., Glare, P., Bokhari, A., Malhotra, V. T., Gulati, A., … Inturrisi, C. E. (2018). Patient-Reported Outcomes and Opioid Use by Outpatient Cancer Patients. The Journal of Pain: official journal of the American Pain Society, 19(3), 278–290. doi:10.1016/j.jpain.2017.11.001    </td> 
               </tr> 
               <tr>   
                  <th scope="row" class="row-header">Citation</th>  
                  <td class="content-container">  National Comprehensive Cancer Network (NCCN). (2024). NCCN Clinical Practice Guidelines in Oncology. Adult Cancer Pain Version 2.2024. Retrieved from http://www.nccn.org   </td> 
               </tr> 
               <tr>   
                  <th scope="row" class="row-header">Citation</th>  
                  <td class="content-container">  Wiffen, P. J., Wee, B., Derry, S., Bell, R. F., &amp; Moore, R. A. (2017). Opioids for cancer pain - an overview of Cochrane reviews. The Cochrane database of systematic reviews, 7(7), CD012592. doi:10.1002/14651858.CD012592.pub2    </td> 
               </tr> 
               <tr>   
                  <th scope="row" class="row-header">Citation</th>  
                  <td class="content-container">  Zhao, F., Chang, V. T., Cleeland, C., Cleary, J. F., Mitchell, E. P., Wagner, L. I., &amp; Fisch, M. J. (2014). Determinants of pain severity changes in ambulatory patients with cancer: an analysis from Eastern Cooperative Oncology Group trial E2Z02. Journal of clinical oncology: official journal of the American Society of Clinical Oncology, 32(4), 312–319. doi:10.1200/JCO.2013.50.6071    </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Guidance (Usage)</th> 
                  <td class="content-container">
                     <p>This eCQM is an episode-based measure. An episode is defined as each eligible encounter for patients with a diagnosis of cancer who are also currently receiving chemotherapy or radiation therapy during the measurement period.</p> 
                     <p>For patients receiving radiation therapy, pain intensity should be quantified at each radiation treatment management encounter where the patient and physician have a face-to-face interaction. Due to the nature of some applicable coding related to radiation therapy (e.g., delivered in multiple fractions), the billing date for certain codes may or may not be the same as the face-to-face encounter date. In this instance, for the reporting purposes of this measure, the billing date should be used to pull the appropriate patients into the initial population. It is expected, though, that the numerator criteria would be performed at the time of the actual face-to-face encounter during the series of treatments. A lookback (retrospective) period of 7 days, including the billing date, may be used to identify the actual face-to-face encounter, which is required to assess the numerator. Therefore, pain intensity should be quantified during the face-to-face encounter occurring on the actual billing date or within the 6 days prior to the billing date.</p> 
                     <p>For patients receiving chemotherapy, pain intensity should be quantified at each face-to-face or telehealth encounter with the physician while the patient is currently receiving chemotherapy. For purposes of identifying eligible encounters, patients "currently receiving chemotherapy" refers to patients administered chemotherapy on the same day as the encounter or during the 30 days before the date of the encounter AND during the 30 days after the date of the encounter.</p> 
                     <p>Pain intensity should be quantified using a standard instrument, such as a 0-10 numerical rating scale, visual analog scale, a categorical scale, or pictorial scale. Examples include the Faces Pain Rating Scale and the Brief Pain Inventory (BPI).</p> 
                     <p>This FHIR-based measure has been derived from the QDM-based measure: CMS157v14. 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 STU6 (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 patient visits, regardless of patient age, with a diagnosis of cancer currently receiving chemotherapy in which pain intensity is quantified</p>
                  </td> 
               </tr>  
               <tr> 
                  <th scope="row" class="row-header">Basis</th> 
                  <td class="content-container">Encounter</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Scoring</th> 
                  <td class="content-container">[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">Rate Aggregation</th> 
                  <td class="content-container">
                     <p>This measure is intended to have one reporting rate, which aggregates the following populations into a single performance rate for reporting purposes:</p> 
                     <ul> 
                        <li>
                           <p>Population 1: Visits for patients with a diagnosis of cancer who are currently receiving chemotherapy</p>
                        </li> 
                        <li>
                           <p>Population 2: Visits for patients with a diagnosis of cancer who are currently receiving radiation therapy</p>
                        </li> 
                     </ul> 
                     <p>For the purposes of this measure, a single performance rate can be calculated as follows:</p> 
                     <p>Performance Rate = (Numerator 1 + Numerator 2)/ (Denominator 1 + Denominator 2)</p>
                  </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></br>  
                     <em>Description</em>: 
                     <p style="white-space: pre-line" class="tab-one">
                        <p>All patient visits, regardless of patient age, with a diagnosis of cancer currently receiving chemotherapy</p>
                     </p>   
                     <em>Logic Definition</em>: 
                     <a href="#primary-cms157fhirpainintensityquantified-initial-population-1">Initial Population 1</a>  
                  </td> 
               </tr>  
               <tr>  
                  <th scope="row" class="row-header">Denominator</th> 
                  <td class="content-container"> 
                     <em>ID</em>: Denominator_1 
                     <br></br>  
                     <em>Description</em>: 
                     <p style="white-space: pre-line" class="tab-one">
                        <p>Equals Initial Population</p>
                     </p>   
                     <em>Logic Definition</em>: 
                     <a href="#primary-cms157fhirpainintensityquantified-denominator-1">Denominator 1</a>  
                  </td> 
               </tr>  
               <tr>  
                  <th scope="row" class="row-header">Numerator</th> 
                  <td class="content-container"> 
                     <em>ID</em>: Numerator_1 
                     <br></br>  
                     <em>Description</em>: 
                     <p style="white-space: pre-line" class="tab-one">
                        <p>Patient visits in which pain intensity is quantified</p>
                     </p>   
                     <em>Logic Definition</em>: 
                     <a href="#primary-cms157fhirpainintensityquantified-numerator-1">Numerator 1</a>  
                  </td> 
               </tr>   
               <tr> 
                  <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: Group_2)</th> 
               </tr>  
               <tr> 
                  <th scope="row" class="row-header">Summary</th> 
                  <td class="content-container">
                     <p>Percentage of patient visits, regardless of patient age, with a diagnosis of cancer currently receiving radiation therapy in which pain intensity is quantified</p>
                  </td> 
               </tr>  
               <tr> 
                  <th scope="row" class="row-header">Basis</th> 
                  <td class="content-container">Encounter</td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Scoring</th> 
                  <td class="content-container">[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">Rate Aggregation</th> 
                  <td class="content-container">
                     <p>This measure is intended to have one reporting rate, which aggregates the following populations into a single performance rate for reporting purposes:</p> 
                     <ul> 
                        <li>
                           <p>Population 1: Visits for patients with a diagnosis of cancer who are currently receiving chemotherapy</p>
                        </li> 
                        <li>
                           <p>Population 2: Visits for patients with a diagnosis of cancer who are currently receiving radiation therapy</p>
                        </li> 
                     </ul> 
                     <p>For the purposes of this measure, a single performance rate can be calculated as follows:</p> 
                     <p>Performance Rate = (Numerator 1 + Numerator 2)/ (Denominator 1 + Denominator 2)</p>
                  </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_2 
                     <br></br>  
                     <em>Description</em>: 
                     <p style="white-space: pre-line" class="tab-one">
                        <p>All patient visits, regardless of patient age, with a diagnosis of cancer currently receiving radiation therapy</p>
                     </p>   
                     <em>Logic Definition</em>: 
                     <a href="#primary-cms157fhirpainintensityquantified-initial-population-2">Initial Population 2</a>  
                  </td> 
               </tr>  
               <tr>  
                  <th scope="row" class="row-header">Denominator</th> 
                  <td class="content-container"> 
                     <em>ID</em>: Denominator_2 
                     <br></br>  
                     <em>Description</em>: 
                     <p style="white-space: pre-line" class="tab-one">
                        <p>Equals Initial Population</p>
                     </p>   
                     <em>Logic Definition</em>: 
                     <a href="#primary-cms157fhirpainintensityquantified-denominator-2">Denominator 2</a>  
                  </td> 
               </tr>  
               <tr>  
                  <th scope="row" class="row-header">Numerator</th> 
                  <td class="content-container"> 
                     <em>ID</em>: Numerator_2 
                     <br></br>  
                     <em>Description</em>: 
                     <p style="white-space: pre-line" class="tab-one">
                        <p>Patient visits in which pain intensity is quantified</p>
                     </p>   
                     <em>Logic Definition</em>: 
                     <a href="#primary-cms157fhirpainintensityquantified-numerator-2">Numerator 2</a>  
                  </td> 
               </tr>   
               <tr> 
                  <th scope="row" class="row-header">Supplemental Data Guidance</th> 
                  <td class="content-container">For every patient evaluated by this measure also identify payer, race, ethnicity and sex</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></br>   
                     <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]  
                     <br></br>  
                     <em>Description</em>: SDE Ethnicity   
                     <br></br> 
                     <em>Logic Definition</em>: 
                     <a href="#cms157fhirpainintensityquantified-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></br>   
                     <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]  
                     <br></br>  
                     <em>Description</em>: SDE Payer   
                     <br></br> 
                     <em>Logic Definition</em>: 
                     <a href="#cms157fhirpainintensityquantified-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></br>   
                     <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]  
                     <br></br>  
                     <em>Description</em>: SDE Race   
                     <br></br> 
                     <em>Logic Definition</em>: 
                     <a href="#cms157fhirpainintensityquantified-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></br>   
                     <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]  
                     <br></br>  
                     <em>Description</em>: SDE Sex   
                     <br></br> 
                     <em>Logic Definition</em>: 
                     <a href="#cms157fhirpainintensityquantified-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/CMS157FHIRPainIntensityQuantified</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></br> 
                     <em>
                        <a href="#definitions">Logic Definitions</a>
                     </em> 
                     <br></br> 
                     <em>
                        <a href="#terminology">Terminology</a>
                     </em> 
                     <br></br> 
                     <em>
                        <a href="#dependencies">Dependencies</a>
                     </em> 
                     <br></br> 
                     <em>
                        <a href="#data-requirements">Data Requirements</a>
                     </em> 
                     <br></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-cms157fhirpainintensityquantified-initial-population-1"> </a>  Initial Population  
                  </th> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population 1":
  "Face to Face or Telehealth Encounter with Ongoing Chemotherapy"</code></pre> 
                  </td> 
               </tr>                                  
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="primary-cms157fhirpainintensityquantified-denominator-1"> </a>  Denominator  
                  </th> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator 1":
  "Initial Population 1"</code></pre> 
                  </td> 
               </tr>                    
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="primary-cms157fhirpainintensityquantified-numerator-1"> </a>  Numerator  
                  </th> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator 1":
  "Face to Face or Telehealth Encounter with Ongoing Chemotherapy" FaceToFaceOrTelehealthEncounterWithChemo
    with "Standard Pain Assessment with Result" PainAssessed
      such that PainAssessed.effective.toInterval ( ) during day of FaceToFaceOrTelehealthEncounterWithChemo.period</code></pre> 
                  </td> 
               </tr>                   
               <tr> 
                  <th colspan="2" scope="row" class="row-header">Measure Group (Rate) (ID: Group_2)</th> 
               </tr>         
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="primary-cms157fhirpainintensityquantified-initial-population-2"> </a>  Initial Population  
                  </th> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population 2":
  "Radiation Treatment Management During Measurement Period with Cancer Diagnosis"</code></pre> 
                  </td> 
               </tr>                              
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="primary-cms157fhirpainintensityquantified-denominator-2"> </a>  Denominator  
                  </th> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator 2":
  "Initial Population 2"</code></pre> 
                  </td> 
               </tr>                                    
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="primary-cms157fhirpainintensityquantified-numerator-2"> </a>  Numerator  
                  </th> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator 2":
  "Radiation Treatment Management During Measurement Period with Cancer Diagnosis" RadiationManagementEncounter
    with "Standard Pain Assessment with Result" PainAssessed
      such that case
        when exists ( ( RadiationManagementEncounter.type ) RadiationManagement
            where RadiationManagement ~ "Radiation treatment management, 5 treatments"
        ) then PainAssessed.effective.toInterval ( ) 6 days or less on or before day of start of RadiationManagementEncounter.period 
        else PainAssessed.effective.toInterval ( ) during day of RadiationManagementEncounter.period end</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 "SDE Sex":
  case
    when Patient.sex = '248153007' then "Male (finding)"
    when Patient.sex = '248152002' then "Female (finding)"
    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 "SDE Payer":
  [Coverage: type in "Payer Type"] 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 "SDE Ethnicity":
  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 "SDE Race":
  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="cms157fhirpainintensityquantified-sde-sex"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Sex":
  SDE."SDE Sex"</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-radiation-treatment-management-during-measurement-period-with-cancer-diagnosis"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Radiation Treatment Management During Measurement Period with Cancer Diagnosis":
  ( [Encounter: "Radiation Treatment Management"] ) RadiationTreatmentManagement
    with ( [ConditionProblemsHealthConcerns: "Cancer"]
      union [ConditionEncounterDiagnosis: "Cancer"] ) CancerDx
      such that CancerDx.prevalenceInterval ( ) overlaps day of RadiationTreatmentManagement.period
    where RadiationTreatmentManagement.period during day of "Measurement Period"
      and RadiationTreatmentManagement.status = 'finished'</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-initial-population-2"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population 2":
  "Radiation Treatment Management During Measurement Period with Cancer Diagnosis"</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-denominator-2"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator 2":
  "Initial Population 2"</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-chemotherapy-within-31-days-prior-and-during-measurement-period"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Chemotherapy Within 31 Days Prior and During Measurement Period":
  [Procedure: "Chemotherapy Administration"] ChemoAdministration
    where ChemoAdministration.performed.toInterval ( ) during Interval[start of "Measurement Period" - 31 days, end of "Measurement Period"]
      and ChemoAdministration.status in { 'completed', 'in-progress' }</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-face-to-face-or-telehealth-encounter-with-ongoing-chemotherapy"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Face to Face or Telehealth Encounter with Ongoing Chemotherapy":
  from
    ( [Encounter: "Office Visit"]
      union [Encounter: "Audio Visual Telehealth Encounter"] ) FaceToFaceOrTelehealthEncounter,
    "Chemotherapy Within 31 Days Prior and During Measurement Period" ChemoBeforeEncounter,
    "Chemotherapy Within 31 Days Prior and During Measurement Period" ChemoAfterEncounter,
    ( [ConditionProblemsHealthConcerns: "Cancer"]
      union [ConditionEncounterDiagnosis: "Cancer"] ) CancerDx
    where CancerDx.prevalenceInterval ( ) overlaps day of FaceToFaceOrTelehealthEncounter.period
      and ChemoBeforeEncounter.performed.toInterval ( ) starts 30 days or less on or before day of end of FaceToFaceOrTelehealthEncounter.period
      and ChemoAfterEncounter.performed.toInterval ( ) starts 30 days or less on or after day of end of FaceToFaceOrTelehealthEncounter.period
      and not ( ChemoAfterEncounter.performed.toInterval ( ) same day as ChemoBeforeEncounter.performed.toInterval ( ) )
      and FaceToFaceOrTelehealthEncounter.period during day of "Measurement Period"
      and FaceToFaceOrTelehealthEncounter.status = 'finished'
    return FaceToFaceOrTelehealthEncounter</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-standard-pain-assessment-with-result"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Standard Pain Assessment with Result":
  [ObservationScreeningAssessment: "Standardized Pain Assessment Tool"] AssessedPain
    where AssessedPain.value is not null</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-numerator-1"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator 1":
  "Face to Face or Telehealth Encounter with Ongoing Chemotherapy" FaceToFaceOrTelehealthEncounterWithChemo
    with "Standard Pain Assessment with Result" PainAssessed
      such that PainAssessed.effective.toInterval ( ) during day of FaceToFaceOrTelehealthEncounterWithChemo.period</code></pre> 
                  </td> 
               </tr>  
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-sde-payer"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Payer":
  SDE."SDE Payer"</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-numerator-2"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Numerator 2":
  "Radiation Treatment Management During Measurement Period with Cancer Diagnosis" RadiationManagementEncounter
    with "Standard Pain Assessment with Result" PainAssessed
      such that case
        when exists ( ( RadiationManagementEncounter.type ) RadiationManagement
            where RadiationManagement ~ "Radiation treatment management, 5 treatments"
        ) then PainAssessed.effective.toInterval ( ) 6 days or less on or before day of start of RadiationManagementEncounter.period 
        else PainAssessed.effective.toInterval ( ) during day of RadiationManagementEncounter.period end</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-initial-population-1"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Initial Population 1":
  "Face to Face or Telehealth Encounter with Ongoing Chemotherapy"</code></pre> 
                  </td> 
               </tr>  
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-sde-ethnicity"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Ethnicity":
  SDE."SDE Ethnicity"</code></pre> 
                  </td> 
               </tr>  
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-sde-race"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "SDE Race":
  SDE."SDE Race"</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="cms157fhirpainintensityquantified-denominator-1"> </a> Logic Definition 
                  </th> 
                  <td class="content-container">
                     <em>Library Name:</em> CMS157FHIRPainIntensityQuantified
                  </td> 
               </tr> 
               <tr> 
                  <td> 
                     <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Denominator 1":
  "Initial Population 1"</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."start" is null then
            Interval(period."start".value, period."end".value]
        else
            Interval[period."start".value, period."end".value]</code></pre> 
                  </td> 
               </tr>  
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <a name="fhirhelpers-toconcept"> </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 [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }</code></pre> 
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" rowspan="2" class="row-header">  
                     <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></br>    
                     <em>Resource</em>: http://snomed.info/sct 
                     <br></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 CPT  
                     <br></br>    
                     <em>Resource</em>: http://www.ama-assn.org/go/cpt 
                     <br></br> 
                     <em>Canonical URL</em>: 
                     <tt>http://www.ama-assn.org/go/cpt</tt> 
                  </td> 
               </tr> 
               <tr>  
                  <th scope="row" class="row-header">Value Set</th>  
                  <td class="content-container"> 
                     <em>Description</em>: Value set Radiation Treatment Management  
                     <br></br>    
                     <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1026 
                     <br></br> 
                     <em>Canonical URL</em>: 
                     <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1026</tt> 
                  </td> 
               </tr> 
               <tr>  
                  <th scope="row" class="row-header">Value Set</th>  
                  <td class="content-container"> 
                     <em>Description</em>: Value set Cancer  
                     <br></br>    
                     <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1010 
                     <br></br> 
                     <em>Canonical URL</em>: 
                     <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1010</tt> 
                  </td> 
               </tr> 
               <tr>  
                  <th scope="row" class="row-header">Value Set</th>  
                  <td class="content-container"> 
                     <em>Description</em>: Value set Office Visit  
                     <br></br>    
                     <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001 
                     <br></br> 
                     <em>Canonical URL</em>: 
                     <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001</tt> 
                  </td> 
               </tr> 
               <tr>  
                  <th scope="row" class="row-header">Value Set</th>  
                  <td class="content-container"> 
                     <em>Description</em>: Value set Audio Visual Telehealth Encounter  
                     <br></br>    
                     <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.1444.5.215 
                     <br></br> 
                     <em>Canonical URL</em>: 
                     <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.1444.5.215</tt> 
                  </td> 
               </tr> 
               <tr>  
                  <th scope="row" class="row-header">Value Set</th>  
                  <td class="content-container"> 
                     <em>Description</em>: Value set Chemotherapy Administration  
                     <br></br>    
                     <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1027 
                     <br></br> 
                     <em>Canonical URL</em>: 
                     <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1027</tt> 
                  </td> 
               </tr> 
               <tr>  
                  <th scope="row" class="row-header">Value Set</th>  
                  <td class="content-container"> 
                     <em>Description</em>: Value set Standardized Pain Assessment Tool  
                     <br></br>    
                     <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1028 
                     <br></br> 
                     <em>Canonical URL</em>: 
                     <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1028</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></br>    
                     <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 
                     <br></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">Direct Reference Code</th> 
                  <td class="content-container"> 
                     <em>Display</em>: Male (finding) 
                     <br></br> 
                     <em>Code</em>: 248153007 
                     <br></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></br> 
                     <em>Code</em>: 248152002 
                     <br></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>: Radiation treatment management, 5 treatments 
                     <br></br> 
                     <em>Code</em>: 77427 
                     <br></br> 
                     <em>System</em>: 
                     <tt>http://www.ama-assn.org/go/cpt</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></br>    
                     <em>Resource</em>: http://hl7.org/fhir/Library/QICore-ModelInfo 
                     <br></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></br>    
                     <em>Resource</em>: https://madie.cms.gov/Library/SupplementalDataElements|5.1.000 
                     <br></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></br>    
                     <em>Resource</em>: https://madie.cms.gov/Library/FHIRHelpers|4.4.000 
                     <br></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></br>    
                     <em>Resource</em>: https://madie.cms.gov/Library/QICoreCommon|4.0.000 
                     <br></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></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient 
                     <br></br>   
                     <em>Must Support Elements</em>: extension, birthDate, birthDate.value, url 
                     <br></br>  
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, status, status.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1026 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, status, status.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Encounter 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period, status, status.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.1444.5.215 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1010 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Condition 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis 
                     <br></br>   
                     <em>Must Support Elements</em>: code 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1010 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Procedure 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure 
                     <br></br>   
                     <em>Must Support Elements</em>: code, performed, status, status.value 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1027 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Observation 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment 
                     <br></br>   
                     <em>Must Support Elements</em>: code, value, effective 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: code
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1028 
                     <br></br>   
                  </td> 
               </tr> 
               <tr> 
                  <th scope="row" class="row-header">Data Requirement</th> 
                  <td class="content-container"> 
                     <em>Type</em>: Coverage 
                     <br></br> 
                     <em>Profile(s)</em>:  http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage 
                     <br></br>   
                     <em>Must Support Elements</em>: type, period 
                     <br></br>  
                     <em>Code Filter(s)</em>: 
                     <br></br>  
                     <span class="tab-one">
                        <em>Path</em>: type
                     </span> 
                     <br></br>  
                     <span class="tab-one">
                        <em>ValueSet</em>:
                     </span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 
                     <br></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 xmlns="http://hl7.org/fhir">
         <id value="effective-data-requirements"></id>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
               <system value="http://snomed.info/sct"></system>
               <code value="248153007"></code>
               <display value="Male (finding)"></display>
            </valueCoding>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
               <system value="http://snomed.info/sct"></system>
               <code value="248152002"></code>
               <display value="Female (finding)"></display>
            </valueCoding>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
            <valueCoding>
               <system value="http://www.ama-assn.org/go/cpt"></system>
               <code value="77427"></code>
               <display value="Radiation treatment management, 5 treatments"></display>
            </valueCoding>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="SupplementalDataElements"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Sex"></valueString>
            </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"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="0"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Sex"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;SDE Sex&quot;:
  SDE.&quot;SDE Sex&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="1"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Radiation Treatment Management During Measurement Period with Cancer Diagnosis"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Radiation Treatment Management During Measurement Period with Cancer Diagnosis&quot;:
  ( [Encounter: &quot;Radiation Treatment Management&quot;] ) RadiationTreatmentManagement
    with ( [ConditionProblemsHealthConcerns: &quot;Cancer&quot;]
      union [ConditionEncounterDiagnosis: &quot;Cancer&quot;] ) CancerDx
      such that CancerDx.prevalenceInterval ( ) overlaps day of RadiationTreatmentManagement.period
    where RadiationTreatmentManagement.period during day of &quot;Measurement Period&quot;
      and RadiationTreatmentManagement.status = 'finished'"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="2"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Initial Population 2"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Initial Population 2&quot;:
  &quot;Radiation Treatment Management During Measurement Period with Cancer Diagnosis&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="3"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Denominator 2"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Denominator 2&quot;:
  &quot;Initial Population 2&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="4"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Chemotherapy Within 31 Days Prior and During Measurement Period"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Chemotherapy Within 31 Days Prior and During Measurement Period&quot;:
  [Procedure: &quot;Chemotherapy Administration&quot;] ChemoAdministration
    where ChemoAdministration.performed.toInterval ( ) during Interval[start of &quot;Measurement Period&quot; - 31 days, end of &quot;Measurement Period&quot;]
      and ChemoAdministration.status in { 'completed', 'in-progress' }"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="5"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Face to Face or Telehealth Encounter with Ongoing Chemotherapy"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Face to Face or Telehealth Encounter with Ongoing Chemotherapy&quot;:
  from
    ( [Encounter: &quot;Office Visit&quot;]
      union [Encounter: &quot;Audio Visual Telehealth Encounter&quot;] ) FaceToFaceOrTelehealthEncounter,
    &quot;Chemotherapy Within 31 Days Prior and During Measurement Period&quot; ChemoBeforeEncounter,
    &quot;Chemotherapy Within 31 Days Prior and During Measurement Period&quot; ChemoAfterEncounter,
    ( [ConditionProblemsHealthConcerns: &quot;Cancer&quot;]
      union [ConditionEncounterDiagnosis: &quot;Cancer&quot;] ) CancerDx
    where CancerDx.prevalenceInterval ( ) overlaps day of FaceToFaceOrTelehealthEncounter.period
      and ChemoBeforeEncounter.performed.toInterval ( ) starts 30 days or less on or before day of end of FaceToFaceOrTelehealthEncounter.period
      and ChemoAfterEncounter.performed.toInterval ( ) starts 30 days or less on or after day of end of FaceToFaceOrTelehealthEncounter.period
      and not ( ChemoAfterEncounter.performed.toInterval ( ) same day as ChemoBeforeEncounter.performed.toInterval ( ) )
      and FaceToFaceOrTelehealthEncounter.period during day of &quot;Measurement Period&quot;
      and FaceToFaceOrTelehealthEncounter.status = 'finished'
    return FaceToFaceOrTelehealthEncounter"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="6"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Standard Pain Assessment with Result"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Standard Pain Assessment with Result&quot;:
  [ObservationScreeningAssessment: &quot;Standardized Pain Assessment Tool&quot;] AssessedPain
    where AssessedPain.value is not null"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="7"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Numerator 1"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Numerator 1&quot;:
  &quot;Face to Face or Telehealth Encounter with Ongoing Chemotherapy&quot; FaceToFaceOrTelehealthEncounterWithChemo
    with &quot;Standard Pain Assessment with Result&quot; PainAssessed
      such that PainAssessed.effective.toInterval ( ) during day of FaceToFaceOrTelehealthEncounterWithChemo.period"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="8"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="SupplementalDataElements"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Payer"></valueString>
            </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
    }"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="9"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Payer"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;SDE Payer&quot;:
  SDE.&quot;SDE Payer&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="10"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Numerator 2"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Numerator 2&quot;:
  &quot;Radiation Treatment Management During Measurement Period with Cancer Diagnosis&quot; RadiationManagementEncounter
    with &quot;Standard Pain Assessment with Result&quot; PainAssessed
      such that case
        when exists ( ( RadiationManagementEncounter.type ) RadiationManagement
            where RadiationManagement ~ &quot;Radiation treatment management, 5 treatments&quot;
        ) then PainAssessed.effective.toInterval ( ) 6 days or less on or before day of start of RadiationManagementEncounter.period 
        else PainAssessed.effective.toInterval ( ) during day of RadiationManagementEncounter.period end"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="11"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Initial Population 1"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Initial Population 1&quot;:
  &quot;Face to Face or Telehealth Encounter with Ongoing Chemotherapy&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="12"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="SupplementalDataElements"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Ethnicity"></valueString>
            </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
    }"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="13"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Ethnicity"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;SDE Ethnicity&quot;:
  SDE.&quot;SDE Ethnicity&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="14"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="SupplementalDataElements"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Race"></valueString>
            </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
    }"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="15"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="SDE Race"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;SDE Race&quot;:
  SDE.&quot;SDE Race&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="16"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="CMS157FHIRPainIntensityQuantified"></valueString>
            </extension>
            <extension url="name">
               <valueString value="Denominator 1"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define &quot;Denominator 1&quot;:
  &quot;Initial Population 1&quot;"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="17"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="FHIRHelpers"></valueString>
            </extension>
            <extension url="name">
               <valueString value="ToString"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="define function ToString(value uri): value.value"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="18"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="FHIRHelpers"></valueString>
            </extension>
            <extension url="name">
               <valueString value="ToInterval"></valueString>
            </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]"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="19"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="QICoreCommon"></valueString>
            </extension>
            <extension url="name">
               <valueString value="toInterval"></valueString>
            </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"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="20"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="FHIRHelpers"></valueString>
            </extension>
            <extension url="name">
               <valueString value="ToConcept"></valueString>
            </extension>
            <extension url="statement">
               <valueString value="/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="21"></valueInteger>
            </extension>
         </extension>
         <extension url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
            <extension url="libraryName">
               <valueString value="FHIRHelpers"></valueString>
            </extension>
            <extension url="name">
               <valueString value="ToCode"></valueString>
            </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
        }"></valueString>
            </extension>
            <extension url="displaySequence">
               <valueInteger value="22"></valueInteger>
            </extension>
         </extension>
         <name value="EffectiveDataRequirements"></name>
         <status value="active"></status>
         <type>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/library-type"></system>
               <code value="module-definition"></code>
            </coding>
         </type>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="QICore model information"></display>
            <resource value="http://hl7.org/fhir/Library/QICore-ModelInfo"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Library SDE"></display>
            <resource value="https://madie.cms.gov/Library/SupplementalDataElements|5.1.000"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Library FHIRHelpers"></display>
            <resource value="https://madie.cms.gov/Library/FHIRHelpers|4.4.000"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Library QICoreCommon"></display>
            <resource value="https://madie.cms.gov/Library/QICoreCommon|4.0.000"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Code system SNOMEDCT"></display>
            <resource value="http://snomed.info/sct"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Code system CPT"></display>
            <resource value="http://www.ama-assn.org/go/cpt"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Value set Radiation Treatment Management"></display>
            <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1026"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Value set Cancer"></display>
            <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1010"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Value set Office Visit"></display>
            <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Value set Audio Visual Telehealth Encounter"></display>
            <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.1444.5.215"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Value set Chemotherapy Administration"></display>
            <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1027"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Value set Standardized Pain Assessment Tool"></display>
            <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1028"></resource>
         </relatedArtifact>
         <relatedArtifact>
            <type value="depends-on"></type>
            <display value="Value set Payer Type"></display>
            <resource value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"></resource>
         </relatedArtifact>
         <parameter>
            <name value="Measurement Period"></name>
            <use value="in"></use>
            <min value="0"></min>
            <max value="1"></max>
            <type value="Period"></type>
         </parameter>
         <parameter>
            <name value="Denominator 2"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="*"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="Numerator 1"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="*"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="Numerator 2"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="*"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="Initial Population 1"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="*"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="Initial Population 2"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="*"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="Denominator 1"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="*"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="SDE Sex"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="1"></max>
            <type value="Coding"></type>
         </parameter>
         <parameter>
            <name value="SDE Payer"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="*"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="SDE Ethnicity"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="1"></max>
            <type value="Resource"></type>
         </parameter>
         <parameter>
            <name value="SDE Race"></name>
            <use value="out"></use>
            <min value="0"></min>
            <max value="1"></max>
            <type value="Resource"></type>
         </parameter>
         <dataRequirement>
            <type value="Patient"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"></profile>
            <mustSupport value="extension"></mustSupport>
            <mustSupport value="birthDate"></mustSupport>
            <mustSupport value="birthDate.value"></mustSupport>
            <mustSupport value="url"></mustSupport>
         </dataRequirement>
         <dataRequirement>
            <type value="Encounter"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
            <mustSupport value="type"></mustSupport>
            <mustSupport value="period"></mustSupport>
            <mustSupport value="status"></mustSupport>
            <mustSupport value="status.value"></mustSupport>
            <codeFilter>
               <path value="type"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1026"></valueSet>
            </codeFilter>
         </dataRequirement>
         <dataRequirement>
            <type value="Encounter"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
            <mustSupport value="type"></mustSupport>
            <mustSupport value="period"></mustSupport>
            <mustSupport value="status"></mustSupport>
            <mustSupport value="status.value"></mustSupport>
            <codeFilter>
               <path value="type"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"></valueSet>
            </codeFilter>
         </dataRequirement>
         <dataRequirement>
            <type value="Encounter"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"></profile>
            <mustSupport value="type"></mustSupport>
            <mustSupport value="period"></mustSupport>
            <mustSupport value="status"></mustSupport>
            <mustSupport value="status.value"></mustSupport>
            <codeFilter>
               <path value="type"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.1444.5.215"></valueSet>
            </codeFilter>
         </dataRequirement>
         <dataRequirement>
            <type value="Condition"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns"></profile>
            <mustSupport value="code"></mustSupport>
            <codeFilter>
               <path value="code"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1010"></valueSet>
            </codeFilter>
         </dataRequirement>
         <dataRequirement>
            <type value="Condition"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis"></profile>
            <mustSupport value="code"></mustSupport>
            <codeFilter>
               <path value="code"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1010"></valueSet>
            </codeFilter>
         </dataRequirement>
         <dataRequirement>
            <type value="Procedure"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"></profile>
            <mustSupport value="code"></mustSupport>
            <mustSupport value="performed"></mustSupport>
            <mustSupport value="status"></mustSupport>
            <mustSupport value="status.value"></mustSupport>
            <codeFilter>
               <path value="code"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1027"></valueSet>
            </codeFilter>
         </dataRequirement>
         <dataRequirement>
            <type value="Observation"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment"></profile>
            <mustSupport value="code"></mustSupport>
            <mustSupport value="value"></mustSupport>
            <mustSupport value="effective"></mustSupport>
            <codeFilter>
               <path value="code"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1028"></valueSet>
            </codeFilter>
         </dataRequirement>
         <dataRequirement>
            <type value="Coverage"></type>
            <profile value="http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"></profile>
            <mustSupport value="type"></mustSupport>
            <mustSupport value="period"></mustSupport>
            <codeFilter>
               <path value="type"></path>
               <valueSet value="http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"></valueSet>
            </codeFilter>
         </dataRequirement>
      </Library>
   </contained>
   <extension id="supplementalDataGuidance" url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance">
      <extension url="guidance">
         <valueString value="For every patient evaluated by this measure also identify payer, race, ethnicity and sex"></valueString>
      </extension>
      <extension url="usage">
         <valueCodeableConcept>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"></system>
               <code value="supplemental-data"></code>
               <display value="Supplemental Data"></display>
            </coding>
            <text value="Supplemental Data Guidance"></text>
         </valueCodeableConcept>
      </extension>
   </extension>
   <extension url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
      <valueReference>
         <reference value="#effective-data-requirements"></reference>
      </valueReference>
   </extension>
   <url value="https://madie.cms.gov/Measure/CMS157FHIRPainIntensityQuantified"></url>
   <identifier>
      <use value="usual"></use>
      <type>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"></system>
            <code value="short-name"></code>
            <display value="Short Name"></display>
         </coding>
      </type>
      <system value="https://madie.cms.gov/measure/shortName"></system>
      <value value="CMS157FHIR"></value>
   </identifier>
   <identifier>
      <use value="official"></use>
      <type>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"></system>
            <code value="version-independent"></code>
            <display value="Version Independent"></display>
         </coding>
      </type>
      <system value="urn:ietf:rfc:3986"></system>
      <value value="urn:uuid:b7b487bf-bc27-48c9-994f-6d095ff84500"></value>
   </identifier>
   <identifier>
      <use value="official"></use>
      <type>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"></system>
            <code value="version-specific"></code>
            <display value="Version Specific"></display>
         </coding>
      </type>
      <system value="urn:ietf:rfc:3986"></system>
      <value value="urn:uuid:0f0317d4-38c3-4b87-b0a9-9b74aaa9a466"></value>
   </identifier>
   <identifier>
      <use value="official"></use>
      <type>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"></system>
            <code value="endorser"></code>
            <display value="Endorser"></display>
         </coding>
      </type>
      <system value="https://madie.cms.gov/measure/cbeId"></system>
      <value value="0384e"></value>
      <assigner>
         <display value="CMS Consensus Based Entity"></display>
      </assigner>
   </identifier>
   <identifier>
      <use value="official"></use>
      <type>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/artifact-identifier-type"></system>
            <code value="publisher"></code>
            <display value="Publisher"></display>
         </coding>
      </type>
      <system value="https://madie.cms.gov/measure/cmsId"></system>
      <value value="157FHIR"></value>
      <assigner>
         <display value="CMS"></display>
      </assigner>
   </identifier>
   <version value="1.0.000"></version>
   <name value="CMS157FHIRPainIntensityQuantified"></name>
   <title value="Oncology: Medical and Radiation Pain Intensity QuantifiedFHIR
"></title>
   <status value="active"></status>
   <experimental value="false"></experimental>
   <date value="2025-08-22T14:29:20+00:00"></date>
   <publisher value="American Society of Clinical Oncology"></publisher>
   <contact>
      <telecom>
         <system value="url"></system>
         <value value="www.asco.org"></value>
      </telecom>
   </contact>
   <description value="Percentage of patient visits, regardless of patient age, with a diagnosis of cancer currently receiving chemotherapy or radiation therapy in which pain intensity is quantified
"></description>
   <usage value="This eCQM is an episode-based measure. An episode is defined as each eligible encounter for patients with a diagnosis of cancer who are also currently receiving chemotherapy or radiation therapy during the measurement period.

For patients receiving radiation therapy, pain intensity should be quantified at each radiation treatment management encounter where the patient and physician have a face-to-face interaction. Due to the nature of some applicable coding related to radiation therapy (e.g., delivered in multiple fractions), the billing date for certain codes may or may not be the same as the face-to-face encounter date. In this instance, for the reporting purposes of this measure, the billing date should be used to pull the appropriate patients into the initial population. It is expected, though, that the numerator criteria would be performed at the time of the actual face-to-face encounter during the series of treatments. A lookback (retrospective) period of 7 days, including the billing date, may be used to identify the actual face-to-face encounter, which is required to assess the numerator. Therefore, pain intensity should be quantified during the face-to-face encounter occurring on the actual billing date or within the 6 days prior to the billing date.

For patients receiving chemotherapy, pain intensity should be quantified at each face-to-face or telehealth encounter with the physician while the patient is currently receiving chemotherapy. For purposes of identifying eligible encounters, patients &quot;currently receiving chemotherapy&quot; refers to patients administered chemotherapy on the same day as the encounter or during the 30 days before the date of the encounter AND during the 30 days after the date of the encounter.

Pain intensity should be quantified using a standard instrument, such as a 0-10 numerical rating scale, visual analog scale, a categorical scale, or pictorial scale. Examples include the Faces Pain Rating Scale and the Brief Pain Inventory (BPI).

This FHIR-based measure has been derived from the QDM-based measure: CMS157v14. 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 STU6 (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).
"></usage>
   <copyright value="Copyright 2025 American Society of Clinical Oncology. All Rights Reserved.
"></copyright>
   <effectivePeriod>
      <start value="2026-01-01"></start>
      <end value="2026-12-31"></end>
   </effectivePeriod>
   <author>
      <name value="American Society of Clinical Oncology"></name>
      <telecom>
         <system value="url"></system>
         <value value="www.asco.org"></value>
      </telecom>
   </author>
   <relatedArtifact>
      <type value="citation"></type>
      <citation value="Moryl, N., Dave, V., Glare, P., Bokhari, A., Malhotra, V. T., Gulati, A., ... Inturrisi, C. E. (2018). Patient-Reported Outcomes and Opioid Use by Outpatient Cancer Patients. The Journal of Pain: official journal of the American Pain Society, 19(3), 278--290. doi:10.1016/j.jpain.2017.11.001
"></citation>
   </relatedArtifact>
   <relatedArtifact>
      <type value="citation"></type>
      <citation value="National Comprehensive Cancer Network (NCCN). (2024). NCCN Clinical Practice Guidelines in Oncology. Adult Cancer Pain Version 2.2024. Retrieved from http://www.nccn.org
"></citation>
   </relatedArtifact>
   <relatedArtifact>
      <type value="citation"></type>
      <citation value="Wiffen, P. J., Wee, B., Derry, S., Bell, R. F., \&amp; Moore, R. A. (2017). Opioids for cancer pain - an overview of Cochrane reviews. The Cochrane database of systematic reviews, 7(7), CD012592. doi:10.1002/14651858.CD012592.pub2
"></citation>
   </relatedArtifact>
   <relatedArtifact>
      <type value="citation"></type>
      <citation value="Zhao, F., Chang, V. T., Cleeland, C., Cleary, J. F., Mitchell, E. P., Wagner, L. I., \&amp; Fisch, M. J. (2014). Determinants of pain severity changes in ambulatory patients with cancer: an analysis from Eastern Cooperative Oncology Group trial E2Z02. Journal of clinical oncology: official journal of the American Society of Clinical Oncology, 32(4), 312--319. doi:10.1200/JCO.2013.50.6071
"></citation>
   </relatedArtifact>
   <library value="https://madie.cms.gov/Library/CMS157FHIRPainIntensityQuantified"></library>
   <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, while copyrighted, can be reproduced and distributed, without modification, for noncommercial purposes, e.g., use by health care providers in connection with their practices. Commercial use is defined as the sale, license, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain.

Commercial uses of the Measure require a license agreement between the user and American Society of Clinical Oncology (ASCO) and prior written approval of ASCO. Contact measurement@asco.org for licensing this measure. Neither ASCO nor its members shall be responsible for any use of the Measure.

The PCPI's and American Medical Association's significant past efforts and contributions to the development and updating of the Measures are acknowledged.

ASCO is solely responsible for the review and enhancement (&quot;Maintenance&quot;) of the Measure as of June 2020.

ASCO encourages the use of the Measure by other health care professionals, where appropriate.

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

Limited proprietary coding may be contained in the Measure specifications for convenience. A license agreement must be entered prior to a third party's use of Current Procedural Terminology (CPT\[R\]) or other proprietary code set contained in the Measures. Any other use of CPT or other coding by the third party is strictly prohibited. ASCO and its members disclaim all liability for use or accuracy of any CPT or other coding contained in the specifications.

CPT(R) contained in the Measure specifications is copyright 2004-2024 American Medical Association. LOINC(R) is copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT\[R\]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2024 World Health Organization. All Rights Reserved.

Due to technical limitations, registered trademarks are indicated by (R) or \[R\].
"></disclaimer>
   <rationale value="Pain is a commonly occurring symptom for cancer patients as 30% to 50% (510,000 to 850,000 each year based on current statistics) will experience moderate to severe pain (Wiffen, Wee, Derry, Bell, \&amp; Moore, 2017). Initial and ongoing pain assessments are essential to determine the pathophysiology of pain and ensure proper pain management. According to the National Comprehensive Cancer Network (NCCN, 2024), undertreatment of pain remains a problem among a significant subset of cancer patients, survival is linked with symptom control and pain management, and pain management contributes to broad quality of life improvement. Furthermore, NCCN notes that formal pain reevaluation is required at each contact to ensure that pain management therapies are successfully meeting patient-specific goals for comfort, function, and safety. Cancer patients have reported that pain interferes with their mood, work, relationships with other people, sleep and overall enjoyment of life (Moryl et al., 2018). Pain management is an essential part of oncologic management and contributes to a patient's overall function and quality of life (NCCN, 2024).

A recent analysis of registry data for chronic pain cancer patients found average pain intensity reported as mild (24.6% of patients), moderate (41.5%), and severe (33.9%). The study also indicated that patient report of pain relief is inversely related to the average pain intensity reported (Moryl et al., 2018). These data suggest that assessing and managing a cancer patient's pain is critical and there remains significant room for improvement in assessing and mitigating cancer-related pain. A prospective study of changes in pain severity of cancer patients found that, at initial assessment, 47% of patients reported pain. At follow-up, the patients with pain at initial assessment reported reduced pain (32.2%), stable pain (48.2%) and worse pain (19.6%). Of the 53% of patients reporting no pain at initial assessment, 82.6% reported stable pain and 17.4% reported worse pain at follow-up assessment (Zhao et al., 2014). This study highlights the importance of initial and ongoing assessments of pain to identify gaps and ensure proper pain management.
"></rationale>
   <clinicalRecommendationStatement value="* Screen all patients for pain at each contact.

* Routinely quantify and document pain intensity and quality as characterized by the patient (whenever possible). Include patient reporting of breakthrough pain, treatments used and their impact on pain, satisfaction with pain relief, pain interference, provider assessment of impact on function, and any special issues for the patient relevant to pain treatment and access to care. If necessary, get additional information from caregiver regarding pain and impact on function.

* Perform comprehensive pain assessment if new or worsening pain is present and regularly for persisting pain.

  Various methods and tools exist to assess pain severity. Intensity of pain should be quantified using a numerical rating scale (i.e., 0-10), visual analog scale, categorical scale, or pictorial scale (e.g., The Faces Pain Rating Scale) (Category 2A) (National Comprehensive Cancer Network, 2024).
"></clinicalRecommendationStatement>
   <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"></system>
               <code value="proportion"></code>
               <display value="Proportion"></display>
            </coding>
         </valueCodeableConcept>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
         <valueCode value="Encounter"></valueCode>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
         <valueCodeableConcept>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-type"></system>
               <code value="process"></code>
               <display value="Process"></display>
            </coding>
         </valueCodeableConcept>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation">
         <valueString value="This measure is intended to have one reporting rate, which aggregates the following populations into a single performance rate for reporting purposes:

* Population 1: Visits for patients with a diagnosis of cancer who are currently receiving chemotherapy

* Population 2: Visits for patients with a diagnosis of cancer who are currently receiving radiation therapy

For the purposes of this measure, a single performance rate can be calculated as follows:

Performance Rate = (Numerator 1 + Numerator 2)/ (Denominator 1 + Denominator 2)
"></valueString>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
         <valueCodeableConcept>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"></system>
               <code value="increase"></code>
               <display value="Increased score indicates improvement"></display>
            </coding>
         </valueCodeableConcept>
      </extension>
      <description value="Percentage of patient visits, regardless of patient age, with a diagnosis of cancer currently receiving chemotherapy in which pain intensity is quantified
"></description>
      <population id="InitialPopulation_1">
         <code>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-population"></system>
               <code value="initial-population"></code>
               <display value="Initial Population"></display>
            </coding>
         </code>
         <description value="All patient visits, regardless of patient age, with a diagnosis of cancer currently receiving chemotherapy
"></description>
         <criteria>
            <language value="text/cql-identifier"></language>
            <expression value="Initial Population 1"></expression>
         </criteria>
      </population>
      <population id="Denominator_1">
         <code>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-population"></system>
               <code value="denominator"></code>
               <display value="Denominator"></display>
            </coding>
         </code>
         <description value="Equals Initial Population
"></description>
         <criteria>
            <language value="text/cql-identifier"></language>
            <expression value="Denominator 1"></expression>
         </criteria>
      </population>
      <population id="Numerator_1">
         <code>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-population"></system>
               <code value="numerator"></code>
               <display value="Numerator"></display>
            </coding>
         </code>
         <description value="Patient visits in which pain intensity is quantified
"></description>
         <criteria>
            <language value="text/cql-identifier"></language>
            <expression value="Numerator 1"></expression>
         </criteria>
      </population>
   </group>
   <group id="Group_2">
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring">
         <valueCodeableConcept>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"></system>
               <code value="proportion"></code>
               <display value="Proportion"></display>
            </coding>
         </valueCodeableConcept>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis">
         <valueCode value="Encounter"></valueCode>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type">
         <valueCodeableConcept>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-type"></system>
               <code value="process"></code>
               <display value="Process"></display>
            </coding>
         </valueCodeableConcept>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation">
         <valueString value="This measure is intended to have one reporting rate, which aggregates the following populations into a single performance rate for reporting purposes:

* Population 1: Visits for patients with a diagnosis of cancer who are currently receiving chemotherapy

* Population 2: Visits for patients with a diagnosis of cancer who are currently receiving radiation therapy

For the purposes of this measure, a single performance rate can be calculated as follows:

Performance Rate = (Numerator 1 + Numerator 2)/ (Denominator 1 + Denominator 2)
"></valueString>
      </extension>
      <extension url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation">
         <valueCodeableConcept>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"></system>
               <code value="increase"></code>
               <display value="Increased score indicates improvement"></display>
            </coding>
         </valueCodeableConcept>
      </extension>
      <description value="Percentage of patient visits, regardless of patient age, with a diagnosis of cancer currently receiving radiation therapy in which pain intensity is quantified
"></description>
      <population id="InitialPopulation_2">
         <code>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-population"></system>
               <code value="initial-population"></code>
               <display value="Initial Population"></display>
            </coding>
         </code>
         <description value="All patient visits, regardless of patient age, with a diagnosis of cancer currently receiving radiation therapy
"></description>
         <criteria>
            <language value="text/cql-identifier"></language>
            <expression value="Initial Population 2"></expression>
         </criteria>
      </population>
      <population id="Denominator_2">
         <code>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-population"></system>
               <code value="denominator"></code>
               <display value="Denominator"></display>
            </coding>
         </code>
         <description value="Equals Initial Population
"></description>
         <criteria>
            <language value="text/cql-identifier"></language>
            <expression value="Denominator 2"></expression>
         </criteria>
      </population>
      <population id="Numerator_2">
         <code>
            <coding>
               <system value="http://terminology.hl7.org/CodeSystem/measure-population"></system>
               <code value="numerator"></code>
               <display value="Numerator"></display>
            </coding>
         </code>
         <description value="Patient visits in which pain intensity is quantified
"></description>
         <criteria>
            <language value="text/cql-identifier"></language>
            <expression value="Numerator 2"></expression>
         </criteria>
      </population>
   </group>
   <supplementalData id="sde-ethnicity">
      <usage>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"></system>
            <code value="supplemental-data"></code>
         </coding>
      </usage>
      <description value="SDE Ethnicity
"></description>
      <criteria>
         <language value="text/cql-identifier"></language>
         <expression value="SDE Ethnicity"></expression>
      </criteria>
   </supplementalData>
   <supplementalData id="sde-payer">
      <usage>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"></system>
            <code value="supplemental-data"></code>
         </coding>
      </usage>
      <description value="SDE Payer
"></description>
      <criteria>
         <language value="text/cql-identifier"></language>
         <expression value="SDE Payer"></expression>
      </criteria>
   </supplementalData>
   <supplementalData id="sde-race">
      <usage>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"></system>
            <code value="supplemental-data"></code>
         </coding>
      </usage>
      <description value="SDE Race
"></description>
      <criteria>
         <language value="text/cql-identifier"></language>
         <expression value="SDE Race"></expression>
      </criteria>
   </supplementalData>
   <supplementalData id="sde-sex">
      <usage>
         <coding>
            <system value="http://terminology.hl7.org/CodeSystem/measure-data-usage"></system>
            <code value="supplemental-data"></code>
         </coding>
      </usage>
      <description value="SDE Sex
"></description>
      <criteria>
         <language value="text/cql-identifier"></language>
         <expression value="SDE Sex"></expression>
      </criteria>
   </supplementalData>
</Measure>