{
  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [ {
    "fullUrl": "https://madie.cms.gov/Measure/CMS155FHIRWgtAssessCounseling",
    "resource": {
      "resourceType": "Measure",
      "id": "CMS155FHIRWgtAssessCounseling",
      "meta": {
        "profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure", "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm", "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm", "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm", "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm", "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm", "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm" ]
      },
      "text": {
        "status": "extensions",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"col-12\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">Weight Assessment and Counseling for Nutrition and Physical Activity for Children/AdolescentsFHIR</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">1.0.000</td>\n</tr>\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Short Name</th>\n\n\n<td class=\"content-container\">CMS155FHIR</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">GUID (Version Independent)</th>\n\n\n<td class=\"content-container\">urn:uuid:ced3e428-2d50-4738-badb-3693cb0df02c</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">GUID (Version Specific)</th>\n\n\n<td class=\"content-container\">urn:uuid:df68edd6-40f5-4549-80f9-fff557c07b99</td>\n</tr>\n\n\n\n  \n    \n    \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">CMS Identifier</th>\n\n\n<td class=\"content-container\">155FHIR</td>\n</tr>\n\n  \n\n\n\n\n  \n    \n    \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Effective Period</th>\n\n\n<td class=\"content-container\">2026-01-01 through 2026-12-31</td>\n</tr>\n\n  \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">National Committee for Quality Assurance</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Developer</th>\n\n\n<td class=\"content-container\">National Committee for Quality Assurance</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\">Percentage of patients 3-17 years of age who had an outpatient visit with a primary care physician (PCP) or obstetrician/gynecologist (OB/GYN) and who had evidence of the following during the measurement period. - Percentage of patients with height, weight, and body mass index (BMI) percentile documentation - Percentage of patients with counseling for nutrition - Percentage of patients with counseling for physical activity</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Copyright</th>\n\n\n<td class=\"content-container\">This Physician Performance Measure (Measure) and related data specifications are owned and were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties or endorsements about the quality of any product, test or protocol identified as numerator compliant or otherwise identified as meeting the requirements of the measure or specification. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure may be used for internal, noncommercial purposes (e.g., use by healthcare providers in connection with their practices) without obtaining approval from NCQA. All other uses, including a commercial use (including but not limited to vendors using or embedding the measures and specifications into any product or service to calculate measure results for customers for any purpose), must be approved by NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2025 National Committee for Quality Assurance. All Rights Reserved. Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third-party codes contained in the specifications. CPT(R) codes, descriptions and other data are copyright 2025. American Medical Association. All rights reserved. CPT is a trademark of the American Medical Association. Fee schedules, relative value units, conversion factors and/or related components are not assigned by the AMA, are not part of CPT, and the AMA is not recommending their use. The AMA does not directly or indirectly practice medicine or dispense medical services. The AMA assumes no liability for data contained or not contained herein. Applicable FARS/DFARS restrictions apply to government use. Some measure specifications contain coding from LOINC(R) (https://loinc.org). The LOINC table, LOINC codes, LOINC panels and form file, LOINC linguistic variants file, LOINC/RSNA Radiology Playbook, and LOINC/IEEE Medical Device Code Mapping Table are copyright 2004-2025 Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee, and are available at no cost under the license at https://loinc.org/kb/license/. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2025 World Health Organization. All Rights Reserved. Some measures use RxNorm, a standardized nomenclature and coding for clinical drugs and drug delivery devices, which is made publicly available courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services. NLM is not responsible for the measures and does not endorse or recommend this or any other product. “HL7” is the registered trademark of Health Level Seven International.</td>\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Disclaimer</th>\n\n\n<td class=\"content-container\">The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE AND SPECIFICATIONS ARE PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Rationale</th>\n\n\n<td class=\"content-container\">Over the last four decades, childhood obesity has more than tripled in children and adolescents 2 to 19 years of age (from a rate of approximately 5 percent to 18.5 percent) (Fryar, Carroll, &amp; Ogden, 2014; Hales et al., 2017). Non-Hispanic black and Hispanic youth are more likely to be obese than their non-Hispanic white and non-Hispanic Asian counterparts. In 2015-2016, approximately 22 percent of non-Hispanic black and 26 percent of Hispanic youth were obese compared to approximately 14 percent of non-Hispanic white and 11 percent of non-Hispanic Asian youth (Hales et al., 2017). Childhood obesity has both immediate and long-term effects on health and well-being. Children who are obese have higher rates of physical health conditions, such as risk factors for cardiovascular disease (like high blood pressure and high cholesterol), type 2 diabetes, asthma, sleep apnea, and joint problems. There is also a correlation between childhood obesity and mental health conditions, such as anxiety and depression (Centers for Disease Control and Prevention [CDC], 2016). In addition, children who are obese are more likely to be obese as adults and are therefore at risk for adult health problems, such as heart disease, type 2 diabetes, and several types of cancer (CDC, 2016). The direct medical costs associated with childhood obesity total $1.32 billion per year (Ward et al., 2021). Because obesity can become a lifelong health issue, it is important to screen for obesity in children and adolescents, and to provide interventions that promote weight loss (U.S. Preventive Services Task Force, 2017).</td>\n</tr>\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Clinical Recommendation Statement</th>\n\n\n<td class=\"content-container\">U.S. Preventive Services Task Force (2017) - The Task Force recommends that clinicians screen for obesity in children and adolescents 6 years and older and offer or refer them to comprehensive, intensive behavioral interventions to promote improvements in weight status. (B recommendation) American Academy of Pediatrics – Bright Futures (Hagan, Shaw, &amp; Duncan, 2017) - Plot and assess BMI percentiles routinely for early recognition of overweight and obesity. - Assess barriers to healthy eating and physical activity. - Provide anticipatory guidance for nutrition and physical activity.</td>\n</tr>\n\n\n\n\n<tr>\n  \n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Citation</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    \n    \n    Centers for Disease Control and Prevention. (2016). Childhood Obesity Causes &amp; Consequences. Retrieved from https://www.cdc.gov/obesity/childhood/causes.html\n    \n    \n    \n    \n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Citation</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    \n    \n    Fryar, C. D., Carroll, M. D., &amp; Ogden, C. L. (2014). Prevalence of Overweight and Obesity Among Children and Adolescents: United States, 1963-1965 through 2011-2012. Health E-Stats. Retrieved from https://www.cdc.gov/nchs/data/hestat/obesity_child_11_12/obesity_child_11_12.htm\n    \n    \n    \n    \n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Citation</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    \n    \n    Hagan, J. F., Shaw, J. S., &amp; Duncan, P. M. (eds.). (2017). Bright Futures: Guidelines for Health Supervision of Infants, Children, and Adolescents, 4th ed. Elk Grove Village, IL: American Academy of Pediatrics.\n    \n    \n    \n    \n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Citation</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    \n    \n    Hales, C.M., Carroll, M.D., Fryar, C.D., et al. (2017). Prevalence of Obesity Among Adults and Youth: United States, 2015-2016. NCHS Data Brief. Retrieved from https://www.cdc.gov/nchs/data/databriefs/db288.pdf\n    \n    \n    \n    \n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Citation</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    \n    \n    U.S. Preventive Services Task Force. (2017). Screening and interventions for overweight in children and adolescents: Recommendation statement. Rockville, MD: Agency for Healthcare Research and Quality. Retrieved from https://www.uspreventiveservicestaskforce.org/Page/Document/UpdateSummaryFinal/obesity-in-children-and-adolescents-screening1?ds=1&amp;s=obesity\n    \n    \n    \n    \n    \n  </td>\n</tr>\n\n<tr>\n  \n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Citation</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    \n    \n    Ward, Z. J., Bleich, S. N., Long, M. W., &amp; Gortmaker, S. L. (2021). Association of body mass index with health care expenditures in the United States by age and sex. PLOS ONE, 16(3), e0247307. https://doi.org/10.1371/journal.pone.0247307\n    \n    \n    \n    \n    \n  </td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Guidance (Usage)</th>\n\n\n<td class=\"content-container\">The visit must be performed by a PCP or OB/GYN. Because BMI norms for youth vary with age and sex, this measure evaluates whether BMI percentile, rather than an absolute BMI value, is assessed. This eCQM is a patient-based measure. This FHIR-based measure has been derived from the QDM-based measure: CMS155v14. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).</td>\n</tr>\n\n\n\n  \n    \n    <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: Group_1)</th>\n\n\n</tr>\n  \n  \n  \n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Basis</th>\n\n\n<td class=\"content-container\">boolean</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Scoring</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-scoring#proportion: 'Proportion']</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-type#process: 'Process']</td>\n</tr>\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Rate Aggregation</th>\n\n\n<td class=\"content-container\">None</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>\n</tr>\n\n\n  \n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Initial Population</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: InitialPopulation_1\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Patients 3-17 years of age by the end of the measurement period, with at least one outpatient visit with a primary care physician (PCP) or an obstetrician/gynecologist (OB/GYN) during the measurement period</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-initial-population\">Initial Population</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Denominator</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: Denominator_1\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Equals Initial Population</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-denominator\">Denominator</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Denominator Exclusion</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: DenominatorExclusion_1\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Exclude patients who are in hospice care for any part of the measurement period. Patients who have a diagnosis of pregnancy during the measurement period.</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-denominator-exclusions\">Denominator Exclusions</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Numerator</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: Numerator_1\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Patients who had a height, weight and body mass index (BMI) percentile recorded during the measurement period.</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-numerator-1\">Numerator 1</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: Stratification_1_1\n      \n        <br/>\n      \n    \n    \n    \n      <em>Description</em>: Report a total score, and each of the following strata: Stratum 1 - Patients age 3-11 years at the end of the measurement period\n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: Stratification_1_2\n      \n        <br/>\n      \n    \n    \n    \n      <em>Description</em>: Stratum 2 - Patients age 12-17 years at the end of the measurement period\n    \n  </td>\n</tr>\n\n\n  \n    \n    <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: Group_2)</th>\n\n\n</tr>\n  \n  \n  \n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Basis</th>\n\n\n<td class=\"content-container\">boolean</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Scoring</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-scoring#proportion: 'Proportion']</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-type#process: 'Process']</td>\n</tr>\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Rate Aggregation</th>\n\n\n<td class=\"content-container\">None</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>\n</tr>\n\n\n  \n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Initial Population</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: InitialPopulation_2\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Patients 3-17 years of age by the end of the measurement period, with at least one outpatient visit with a primary care physician (PCP) or an obstetrician/gynecologist (OB/GYN) during the measurement period</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-initial-population\">Initial Population</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Denominator</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: Denominator_2\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Equals Initial Population</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-denominator\">Denominator</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Denominator Exclusion</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: DenominatorExclusion_2\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Exclude patients who are in hospice care for any part of the measurement period. Patients who have a diagnosis of pregnancy during the measurement period.</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-denominator-exclusions\">Denominator Exclusions</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Numerator</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: Numerator_2\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Patients who had counseling for nutrition during the measurement period.</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-numerator-2\">Numerator 2</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: Stratification_2_1\n      \n        <br/>\n      \n    \n    \n    \n      <em>Description</em>: Report a total score, and each of the following strata: Stratum 1 - Patients age 3-11 years at the end of the measurement period\n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: Stratification_2_2\n      \n        <br/>\n      \n    \n    \n    \n      <em>Description</em>: Stratum 2 - Patients age 12-17 years at the end of the measurement period\n    \n  </td>\n</tr>\n\n\n  \n    \n    <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: Group_3)</th>\n\n\n</tr>\n  \n  \n  \n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Basis</th>\n\n\n<td class=\"content-container\">boolean</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Scoring</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-scoring#proportion: 'Proportion']</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-type#process: 'Process']</td>\n</tr>\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Rate Aggregation</th>\n\n\n<td class=\"content-container\">None</td>\n</tr>\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/measure-improvement-notation#increase: 'Increased score indicates improvement']</td>\n</tr>\n\n\n  \n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Initial Population</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: InitialPopulation_3\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Patients 3-17 years of age by the end of the measurement period, with at least one outpatient visit with a primary care physician (PCP) or an obstetrician/gynecologist (OB/GYN) during the measurement period</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-initial-population\">Initial Population</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Denominator</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: Denominator_3\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Equals Initial Population</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-denominator\">Denominator</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Denominator Exclusion</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: DenominatorExclusion_3\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Exclude patients who are in hospice care for any part of the measurement period. Patients who have a diagnosis of pregnancy during the measurement period.</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-denominator-exclusions\">Denominator Exclusions</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n    <tr>\n      \n        \n\n<th scope=\"row\" class=\"row-header\">Numerator</th>\n\n\n      \n      <td class=\"content-container\">\n        \n        <em>ID</em>: Numerator_3\n        <br/>\n        \n        \n          <em>Description</em>:\n          <p style=\"white-space: pre-line\" class=\"tab-one\">Patients who had counseling for physical activity during the measurement period.</p>\n        \n        \n          \n            \n            <em>Logic Definition</em>: <a href=\"#primary-cms155fhirwgtassesscounseling-numerator-3\">Numerator 3</a> \n          \n        \n      </td>\n    </tr>\n  \n\n  \n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: Stratification_3_1\n      \n        <br/>\n      \n    \n    \n    \n      <em>Description</em>: Report a total score, and each of the following strata: Stratum 1 - Patients age 3-11 years at the end of the measurement period\n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Stratifier</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: Stratification_3_2\n      \n        <br/>\n      \n    \n    \n    \n      <em>Description</em>: Stratum 2 - Patients age 12-17 years at the end of the measurement period\n    \n  </td>\n</tr>\n\n\n\n  \n    \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Supplemental Data Guidance</th>\n\n\n<td class=\"content-container\">For every patient evaluated by this measure also identify payer, race, ethnicity and sex</td>\n</tr>\n\n  \n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Supplemental Data Elements</th>\n\n\n</tr>\n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-ethnicity\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Ethnicity\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#cms155fhirwgtassesscounseling-sde-ethnicity\">SDE Ethnicity</a> \n      \n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-payer\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Payer\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#cms155fhirwgtassesscounseling-sde-payer\">SDE Payer</a> \n      \n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-race\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Race\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#cms155fhirwgtassesscounseling-sde-race\">SDE Race</a> \n      \n    \n  </td>\n</tr>\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Supplemental Data Element</th>\n\n\n  <td class=\"content-container\">\n    \n      <em>ID</em>: sde-sex\n      \n      <br/>\n      \n    \n    \n      \n        \n          <em>Usage Code</em>: [http://terminology.hl7.org/CodeSystem/measure-data-usage#supplemental-data]\n        \n        <br/>\n      \n    \n    \n      <em>Description</em>: SDE Sex\n    \n    \n      \n        <br/>\n        \n        <em>Logic Definition</em>: <a href=\"#cms155fhirwgtassesscounseling-sde-sex\">SDE Sex</a> \n      \n    \n  </td>\n</tr>\n\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Logic</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Primary Library</th>\n\n\n<td class=\"content-container\">https://madie.cms.gov/Library/CMS155FHIRWgtAssessCounseling</td>\n</tr>\n\n\n\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Contents</th>\n  <td class=\"content-container\">\n    <em><a href=\"#population-criteria\">Population Criteria</a></em>\n    <br/>\n    <em><a href=\"#definitions\">Logic Definitions</a></em>\n    <br/>\n    <em><a href=\"#terminology\">Terminology</a></em>\n    <br/>\n    <em><a href=\"#dependencies\">Dependencies</a></em>\n    <br/>\n    <em><a href=\"#data-requirements\">Data Requirements</a></em>\n    <br/>\n  </td>\n</tr>\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"population-criteria\"> </a>Population Criteria</th>\n\n\n</tr>\n  \n  \n  \n  \n    \n    <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: Group_1)</th>\n\n\n</tr>\n  \n  \n  \n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-initial-population\"> </a>\n    \n    \n    Initial Population\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 17]\n    and exists &quot;Qualifying Encounters&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-denominator\"> </a>\n    \n    \n    Denominator\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator&quot;:\n  &quot;Initial Population&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-denominator-exclusions\"> </a>\n    \n    \n    Denominator Exclusion\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator Exclusions&quot;:\n  Hospice.&quot;Has Hospice Services&quot;\n    or exists &quot;Pregnancy Diagnosis Which Overlaps Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-numerator-1\"> </a>\n    \n    \n    Numerator\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator 1&quot;:\n  exists &quot;BMI Percentile in Measurement Period&quot;\n    and exists &quot;Height in Measurement Period&quot;\n    and exists &quot;Weight in Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n  \n    \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-stratification-1\"> </a>\n    \n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 1&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 11]</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n    \n  \n\n  \n    \n        \n          \n        \n          \n        \n          \n        \n          \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-stratification-2\"> </a>\n    \n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 2&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[12, 17]</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n    \n  \n\n  \n\n  \n    \n    <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: Group_2)</th>\n\n\n</tr>\n  \n  \n  \n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-initial-population\"> </a>\n    \n    \n    Initial Population\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 17]\n    and exists &quot;Qualifying Encounters&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-denominator\"> </a>\n    \n    \n    Denominator\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator&quot;:\n  &quot;Initial Population&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-denominator-exclusions\"> </a>\n    \n    \n    Denominator Exclusion\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator Exclusions&quot;:\n  Hospice.&quot;Has Hospice Services&quot;\n    or exists &quot;Pregnancy Diagnosis Which Overlaps Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-numerator-2\"> </a>\n    \n    \n    Numerator\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator 2&quot;:\n  exists ( ( [Procedure: &quot;Counseling for Nutrition&quot;] ).isInterventionPerformed ( ) ) NutritionCounseling\n    where NutritionCounseling.performed.toInterval ( ) during day of &quot;Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n  \n    \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-stratification-1\"> </a>\n    \n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 1&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 11]</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n    \n  \n\n  \n    \n        \n          \n        \n          \n        \n          \n        \n          \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-stratification-2\"> </a>\n    \n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 2&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[12, 17]</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n    \n  \n\n  \n\n  \n    \n    <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: Group_3)</th>\n\n\n</tr>\n  \n  \n  \n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-initial-population\"> </a>\n    \n    \n    Initial Population\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 17]\n    and exists &quot;Qualifying Encounters&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-denominator\"> </a>\n    \n    \n    Denominator\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator&quot;:\n  &quot;Initial Population&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-denominator-exclusions\"> </a>\n    \n    \n    Denominator Exclusion\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator Exclusions&quot;:\n  Hospice.&quot;Has Hospice Services&quot;\n    or exists &quot;Pregnancy Diagnosis Which Overlaps Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n    \n      \n        \n          \n        \n          \n        \n          \n            \n              \n            \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-numerator-3\"> </a>\n    \n    \n    Numerator\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator 3&quot;:\n  exists ( ( [Procedure: &quot;Counseling for Physical Activity&quot;] ).isInterventionPerformed ( ) ) ActivityCounseling\n    where ActivityCounseling.performed.toInterval ( ) during day of &quot;Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n      \n    \n  \n\n  \n  \n    \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-stratification-1\"> </a>\n    \n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 1&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 11]</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n    \n  \n\n  \n    \n        \n          \n        \n          \n        \n          \n        \n          \n            <tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"primary-cms155fhirwgtassesscounseling-stratification-2\"> </a>\n    \n    \n    Stratifier\n    \n  </th>\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 2&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[12, 17]</code></pre>\n  </td>\n\n</tr>\n\n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n          \n        \n    \n  \n\n  \n\n  \n  \n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"definitions\"> </a>Logic Definitions</th>\n\n\n</tr>\n  \n  \n          \n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"hospice-has-hospice-services\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Hospice</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Has Hospice Services&quot;:\n  exists ((([Encounter: &quot;Encounter Inpatient&quot;]).isEncounterPerformed()) InpatientEncounter\n      where (InpatientEncounter.hospitalization.dischargeDisposition ~ &quot;Discharge to home for hospice care (procedure)&quot;\n          or InpatientEncounter.hospitalization.dischargeDisposition ~ &quot;Discharge to healthcare facility for hospice care (procedure)&quot;\n      )\n        and InpatientEncounter.period ends during day of &quot;Measurement Period&quot;\n  )\n    or exists ((([Encounter: &quot;Hospice Encounter&quot;]).isEncounterPerformed()) HospiceEncounter\n        where HospiceEncounter.period overlaps day of &quot;Measurement Period&quot;\n    )\n    or exists ((([ObservationScreeningAssessment: &quot;Hospice care [Minimum Data Set]&quot;]).isAssessmentPerformed()) HospiceAssessment\n        where HospiceAssessment.value ~ &quot;Yes (qualifier value)&quot;\n          and HospiceAssessment.effective.toInterval() overlaps day of &quot;Measurement Period&quot;\n    )\n    or exists ((([ServiceRequest: &quot;Hospice Care Ambulatory&quot;]).isInterventionOrder()) HospiceOrder\n        where HospiceOrder.authoredOn during day of &quot;Measurement Period&quot;\n    )\n    or exists ((([Procedure: &quot;Hospice Care Ambulatory&quot;]).isInterventionPerformed()) HospicePerformed\n        where HospicePerformed.performed.toInterval() overlaps day of &quot;Measurement Period&quot;\n    )\n    or exists ((([ConditionProblemsHealthConcerns: &quot;Hospice Diagnosis&quot;]\n        union [ConditionEncounterDiagnosis: &quot;Hospice Diagnosis&quot;]).verified()) HospiceCareDiagnosis\n        where HospiceCareDiagnosis.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;\n    )</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n\n        \n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-sex\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n  case\n    when Patient.sex = '248153007' then &quot;Male (finding)&quot;\n    when Patient.sex = '248152002' then &quot;Female (finding)&quot;\n    else null\n  end</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-payer\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n  [Coverage: type in &quot;Payer Type&quot;] Payer\n    return {\n      code: Payer.type,\n      period: Payer.period\n    }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-ethnicity\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n  Patient.ethnicity E\n    return Tuple {\n      codes: { E.ombCategory } union E.detailed,\n      display: E.text\n    }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"supplementaldataelements-sde-race\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> SupplementalDataElements</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n  Patient.race R\n    return Tuple {\n      codes: R.ombCategory union R.detailed,\n      display: R.text\n    }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n\n        \n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-sde-sex\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n  SDE.&quot;SDE Sex&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-numerator-3\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator 3&quot;:\n  exists ( ( [Procedure: &quot;Counseling for Physical Activity&quot;] ).isInterventionPerformed ( ) ) ActivityCounseling\n    where ActivityCounseling.performed.toInterval ( ) during day of &quot;Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-stratification-2\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 2&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[12, 17]</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-stratification-1\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Stratification 1&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 11]</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-qualifying-encounters\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Qualifying Encounters&quot;:\n  ( ( [Encounter: &quot;Office Visit&quot;]\n      union [Encounter: &quot;Preventive Care Services Individual Counseling&quot;]\n      union [Encounter: &quot;Preventive Care, Established Office Visit, 0 to 17&quot;]\n      union [Encounter: &quot;Preventive Care Services, Initial Office Visit, 0 to 17&quot;]\n      union [Encounter: &quot;Preventive Care Services Group Counseling&quot;]\n      union [Encounter: &quot;Home Healthcare Services&quot;]\n      union [Encounter: &quot;Telephone Visits&quot;]\n  ).isEncounterPerformed ( ) ) ValidEncounters\n    where ValidEncounters.period during day of &quot;Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-initial-population\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot;:\n  AgeInYearsAt(date from \n    end of &quot;Measurement Period&quot;\n  ) in Interval[3, 17]\n    and exists &quot;Qualifying Encounters&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-denominator\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator&quot;:\n  &quot;Initial Population&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-bmi-percentile-in-measurement-period\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;BMI Percentile in Measurement Period&quot;:\n  ( ( [USCorePediatricBMIforAgeObservationProfile] ).isObservationPediatricBMI ( ) ) BMIPercentile\n    where BMIPercentile.effective.toInterval ( ) during day of &quot;Measurement Period&quot;\n      and BMIPercentile.value is not null</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-height-in-measurement-period\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Height in Measurement Period&quot;:\n  ( ( [USCoreBodyHeightProfile] ).isObservationBodyHeight ( ) ) HeightExam\n    where HeightExam.effective.toInterval ( ) during day of &quot;Measurement Period&quot;\n      and HeightExam.value is not null</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-weight-in-measurement-period\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Weight in Measurement Period&quot;:\n  ( ( [USCoreBodyWeightProfile] ).isObservationBodyWeight ( ) ) WeightExam\n    where WeightExam.effective.toInterval ( ) during day of &quot;Measurement Period&quot;\n      and WeightExam.value is not null</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-numerator-1\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator 1&quot;:\n  exists &quot;BMI Percentile in Measurement Period&quot;\n    and exists &quot;Height in Measurement Period&quot;\n    and exists &quot;Weight in Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-sde-payer\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n  SDE.&quot;SDE Payer&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-numerator-2\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator 2&quot;:\n  exists ( ( [Procedure: &quot;Counseling for Nutrition&quot;] ).isInterventionPerformed ( ) ) NutritionCounseling\n    where NutritionCounseling.performed.toInterval ( ) during day of &quot;Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-sde-ethnicity\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n  SDE.&quot;SDE Ethnicity&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-pregnancy-diagnosis-which-overlaps-measurement-period\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Pregnancy Diagnosis Which Overlaps Measurement Period&quot;:\n  ( ( [ConditionProblemsHealthConcerns: &quot;Pregnancy&quot;]\n      union [ConditionEncounterDiagnosis: &quot;Pregnancy&quot;]\n  ).verified ( ) ) PregnancyDiag\n    where PregnancyDiag.prevalenceInterval ( ) overlaps &quot;Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-denominator-exclusions\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator Exclusions&quot;:\n  Hospice.&quot;Has Hospice Services&quot;\n    or exists &quot;Pregnancy Diagnosis Which Overlaps Measurement Period&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"cms155fhirwgtassesscounseling-sde-race\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> CMS155FHIRWgtAssessCounseling</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n  SDE.&quot;SDE Race&quot;</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n\n        \n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"qicorecommon-tointerval\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> QICoreCommon</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in QICore, allowing this function to be used across any resource.\nThe input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.\nThe intent of this function is to provide a clear and concise mechanism to treat single\nelements that have multiple possible representations as intervals so that logic doesn't have to account\nfor the variability. More complex calculations (such as medication request period or dispense period\ncalculation) need specific guidance and consideration. That guidance may make use of this function, but\nthe focus of this function is on single element calculations where the semantics are unambiguous.\nIf the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.\nIf the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,\nand the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.\nIf the input is a DateTime Interval, the result is the input.\nIf the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result\nis a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending\nimmediately before one year later than the date the patient turned the age given as the end of the quantity interval.\nIf 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\n*/\ndefine fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):\n  case\n\t  when choice is DateTime then\n    \tInterval[choice as DateTime, choice as DateTime]\n\t\twhen choice is Interval&lt;DateTime&gt; then\n  \t\tchoice as Interval&lt;DateTime&gt;\n\t\twhen choice is Quantity then\n\t\t  Interval[Patient.birthDate + (choice as Quantity),\n\t\t\t  Patient.birthDate + (choice as Quantity) + 1 year)\n\t\twhen choice is Interval&lt;Quantity&gt; then\n\t\t  Interval[Patient.birthDate + (choice.low as Quantity),\n\t\t\t  Patient.birthDate + (choice.high as Quantity) + 1 year)\n\t\twhen choice is Timing then\n      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;\n\t\telse\n\t\t\tnull as Interval&lt;DateTime&gt;\n\tend</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n\n        \n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"fhirhelpers-tostring\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value uri): value.value</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"fhirhelpers-tointerval\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.&quot;start&quot; is null then\n            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]\n        else\n            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"fhirhelpers-tocode\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n\n        \n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-isinterventionperformed\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">//Intervention, Performed\ndefine fluent function isInterventionPerformed(Proc List&lt;Procedure&gt;):\n  Proc P\n    where P.status ~ 'completed'</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-isencounterperformed\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">//Encounter, Performed\n//General usage unless required otherwise by measure intent (e.g., follow-up encounters)\ndefine fluent function isEncounterPerformed(Enc List&lt;Encounter&gt;):\n  Enc E\n    where E.status = 'finished'</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-isobservationpediatricbmi\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">//Observation Pediatric BMI\ndefine fluent function isObservationPediatricBMI(Obs List&lt;USCorePediatricBMIforAgeObservationProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-isobservationbodyheight\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function isObservationBodyHeight(Obs List&lt;USCoreBodyHeightProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-isobservationbodyweight\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function isObservationBodyWeight(Obs List&lt;USCoreBodyWeightProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-isassessmentperformed\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">//Assessment, Performed\ndefine fluent function isAssessmentPerformed(Obs List&lt;ObservationScreeningAssessment&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-isinterventionorder\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">//Intervention, Order\ndefine fluent function isInterventionOrder(ServiceRequest List&lt;ServiceRequest&gt;):\n  ServiceRequest S\n    where S.status in { 'active', 'completed' }\n      and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}</code></pre>\n  </td>\n\n</tr>\n\n\n\n        \n\n\n<tr>\n  <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n    \n      \n      <a name=\"status-verified\"> </a>\n    \n    Logic Definition\n  </th>\n\n  <td class=\"content-container\"><em>Library Name:</em> Status</td>\n\n</tr>\n<tr>\n\n  <td>\n    <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">//This library contains functions used to constrain FHIR resource elements for measures authored by NCQA, based on QICore 6.0.0 resources including IG and authoring patterns. The functions may appear similar to some QICoreCommon functions but differ in that they have constraints that are relevant for measures authored by NCQA.\n\n//Condition\n//Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential\ndefine fluent function verified(conditions List&lt;Choice&lt;ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis&gt;&gt;):\n  conditions C\n    where C.verificationStatus is not null implies\n      (C.verificationStatus ~ &quot;confirmed&quot;\n        or C.verificationStatus ~ &quot;unconfirmed&quot;\n        or C.verificationStatus ~ &quot;provisional&quot;\n        or C.verificationStatus ~ &quot;differential&quot;\n      )</code></pre>\n  </td>\n\n</tr>\n\n\n\n\n\n  \n  \n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"terminology\"> </a>Terminology</th>\n\n\n</tr>\n  \n  \n  \n\n \n\n \n\n \n\n \n\n \n\n \n\n\n<tr>\n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Code system SNOMEDCT\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://snomed.info/sct\n    <br/>\n    <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Code system LOINC\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://loinc.org\n    <br/>\n    <em>Canonical URL</em>: <tt>http://loinc.org</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n  \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Code system ConditionVerificationStatusCodes\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://terminology.hl7.org/CodeSystem/condition-ver-status\n    <br/>\n    <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Counseling for Physical Activity\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Office Visit\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Preventive Care Services Individual Counseling\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Preventive Care, Established Office Visit, 0 to 17\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Preventive Care Services, Initial Office Visit, 0 to 17\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Preventive Care Services Group Counseling\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Home Healthcare Services\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Telephone Visits\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Payer Type\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Counseling for Nutrition\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Encounter Inpatient\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Hospice Encounter\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Hospice Care Ambulatory\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Hospice Diagnosis\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n  \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n  \n  \n  <td class=\"content-container\">\n    \n    <em>Description</em>: Value set Pregnancy\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378\n    <br/>\n    <em>Canonical URL</em>: <tt>http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378</tt>\n    \n  </td>\n</tr>\n \n\n\n  \n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Male (finding)\n        <br/>\n      \n      <em>Code</em>: 248153007\n      <br/>\n      <em>System</em>: <tt>http://snomed.info/sct</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Female (finding)\n        <br/>\n      \n      <em>Code</em>: 248152002\n      <br/>\n      <em>System</em>: <tt>http://snomed.info/sct</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Discharge to home for hospice care (procedure)\n        <br/>\n      \n      <em>Code</em>: 428361000124107\n      <br/>\n      <em>System</em>: <tt>http://snomed.info/sct</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Discharge to healthcare facility for hospice care (procedure)\n        <br/>\n      \n      <em>Code</em>: 428371000124100\n      <br/>\n      <em>System</em>: <tt>http://snomed.info/sct</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Hospice care [Minimum Data Set]\n        <br/>\n      \n      <em>Code</em>: 45755-6\n      <br/>\n      <em>System</em>: <tt>http://loinc.org</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: Yes (qualifier value)\n        <br/>\n      \n      <em>Code</em>: 373066001\n      <br/>\n      <em>System</em>: <tt>http://snomed.info/sct</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: confirmed\n        <br/>\n      \n      <em>Code</em>: confirmed\n      <br/>\n      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: unconfirmed\n        <br/>\n      \n      <em>Code</em>: unconfirmed\n      <br/>\n      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: provisional\n        <br/>\n      \n      <em>Code</em>: provisional\n      <br/>\n      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n    </td>\n  </tr>\n\n  <tr>\n    <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n    <td class=\"content-container\">\n      \n        <em>Display</em>: differential\n        <br/>\n      \n      <em>Code</em>: differential\n      <br/>\n      <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n    </td>\n  </tr>\n\n  \n  \n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"dependencies\"> </a>Dependencies</th>\n\n\n</tr>\n  \n  \n  \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: QICore model information\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: http://hl7.org/fhir/Library/QICore-ModelInfo\n    <br/>\n    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/Library/QICore-ModelInfo</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library SDE\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: https://madie.cms.gov/Library/SupplementalDataElements|5.1.000\n    <br/>\n    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/SupplementalDataElements|5.1.000</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library FHIRHelpers\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: https://madie.cms.gov/Library/FHIRHelpers|4.4.000\n    <br/>\n    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/FHIRHelpers|4.4.000</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library Status\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: https://madie.cms.gov/Library/Status|1.15.000\n    <br/>\n    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/Status|1.15.000</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library QICoreCommon\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: https://madie.cms.gov/Library/QICoreCommon|4.0.000\n    <br/>\n    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/QICoreCommon|4.0.000</tt>\n    \n  </td>\n</tr>\n \n\n\n<tr>\n  \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n  <td class=\"content-container\">\n    \n    <em>Description</em>: Library Hospice\n    \n    <br/>\n    \n    \n    \n    \n    \n    \n    <em>Resource</em>: https://madie.cms.gov/Library/Hospice|6.18.000\n    <br/>\n    <em>Canonical URL</em>: <tt>https://madie.cms.gov/Library/Hospice|6.18.000</tt>\n    \n  </td>\n</tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n\n  \n  \n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"data-requirements\"> </a>Data Requirements</th>\n\n\n</tr>\n  \n  \n  \n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Patient\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: extension, birthDate, birthDate.value, url\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Procedure\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, performed, status, status.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Procedure\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, performed, status, status.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Procedure\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, performed, status, status.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1026\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1024\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1022\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1027\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1016\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, status, status.value, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1080\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, hospitalization, hospitalization.dischargeDisposition, period, status, status.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, period, status, status.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Observation\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: effective, value, status, status.value\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Observation\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-height\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: effective, value, status, status.value\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Observation\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-weight\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: effective, value, status, status.value\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Coverage\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Observation\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, value, effective, status, status.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Code(s)</em>: \n    \n      \n      http://loinc.org#45755-6: 'Hospice care [Minimum Data Set]'\n      \n    \n    </span>\n    <br/>\n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: ServiceRequest\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, authoredOn, authoredOn.value, status, status.value, intent, intent.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n  \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "contained": [ {
        "resourceType": "Library",
        "id": "effective-data-requirements",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "248153007",
            "display": "Male (finding)"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "248152002",
            "display": "Female (finding)"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "428361000124107",
            "display": "Discharge to home for hospice care (procedure)"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "428371000124100",
            "display": "Discharge to healthcare facility for hospice care (procedure)"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://loinc.org",
            "code": "45755-6",
            "display": "Hospice care [Minimum Data Set]"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://snomed.info/sct",
            "code": "373066001",
            "display": "Yes (qualifier value)"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
            "code": "confirmed",
            "display": "confirmed"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
            "code": "unconfirmed",
            "display": "unconfirmed"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
            "code": "provisional",
            "display": "provisional"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
          "valueCoding": {
            "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
            "code": "differential",
            "display": "differential"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "SupplementalDataElements"
          }, {
            "url": "name",
            "valueString": "SDE Sex"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Sex\":\n  case\n    when Patient.sex = '248153007' then \"Male (finding)\"\n    when Patient.sex = '248152002' then \"Female (finding)\"\n    else null\n  end"
          }, {
            "url": "displaySequence",
            "valueInteger": 0
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "SDE Sex"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Sex\":\n  SDE.\"SDE Sex\""
          }, {
            "url": "displaySequence",
            "valueInteger": 1
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Numerator 3"
          }, {
            "url": "statement",
            "valueString": "define \"Numerator 3\":\n  exists ( ( [Procedure: \"Counseling for Physical Activity\"] ).isInterventionPerformed ( ) ) ActivityCounseling\n    where ActivityCounseling.performed.toInterval ( ) during day of \"Measurement Period\""
          }, {
            "url": "displaySequence",
            "valueInteger": 2
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Stratification 2"
          }, {
            "url": "statement",
            "valueString": "define \"Stratification 2\":\n  AgeInYearsAt(date from \n    end of \"Measurement Period\"\n  ) in Interval[12, 17]"
          }, {
            "url": "displaySequence",
            "valueInteger": 3
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Stratification 1"
          }, {
            "url": "statement",
            "valueString": "define \"Stratification 1\":\n  AgeInYearsAt(date from \n    end of \"Measurement Period\"\n  ) in Interval[3, 11]"
          }, {
            "url": "displaySequence",
            "valueInteger": 4
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Qualifying Encounters"
          }, {
            "url": "statement",
            "valueString": "define \"Qualifying Encounters\":\n  ( ( [Encounter: \"Office Visit\"]\n      union [Encounter: \"Preventive Care Services Individual Counseling\"]\n      union [Encounter: \"Preventive Care, Established Office Visit, 0 to 17\"]\n      union [Encounter: \"Preventive Care Services, Initial Office Visit, 0 to 17\"]\n      union [Encounter: \"Preventive Care Services Group Counseling\"]\n      union [Encounter: \"Home Healthcare Services\"]\n      union [Encounter: \"Telephone Visits\"]\n  ).isEncounterPerformed ( ) ) ValidEncounters\n    where ValidEncounters.period during day of \"Measurement Period\""
          }, {
            "url": "displaySequence",
            "valueInteger": 5
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Initial Population"
          }, {
            "url": "statement",
            "valueString": "define \"Initial Population\":\n  AgeInYearsAt(date from \n    end of \"Measurement Period\"\n  ) in Interval[3, 17]\n    and exists \"Qualifying Encounters\""
          }, {
            "url": "displaySequence",
            "valueInteger": 6
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Denominator"
          }, {
            "url": "statement",
            "valueString": "define \"Denominator\":\n  \"Initial Population\""
          }, {
            "url": "displaySequence",
            "valueInteger": 7
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "BMI Percentile in Measurement Period"
          }, {
            "url": "statement",
            "valueString": "define \"BMI Percentile in Measurement Period\":\n  ( ( [USCorePediatricBMIforAgeObservationProfile] ).isObservationPediatricBMI ( ) ) BMIPercentile\n    where BMIPercentile.effective.toInterval ( ) during day of \"Measurement Period\"\n      and BMIPercentile.value is not null"
          }, {
            "url": "displaySequence",
            "valueInteger": 8
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Height in Measurement Period"
          }, {
            "url": "statement",
            "valueString": "define \"Height in Measurement Period\":\n  ( ( [USCoreBodyHeightProfile] ).isObservationBodyHeight ( ) ) HeightExam\n    where HeightExam.effective.toInterval ( ) during day of \"Measurement Period\"\n      and HeightExam.value is not null"
          }, {
            "url": "displaySequence",
            "valueInteger": 9
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Weight in Measurement Period"
          }, {
            "url": "statement",
            "valueString": "define \"Weight in Measurement Period\":\n  ( ( [USCoreBodyWeightProfile] ).isObservationBodyWeight ( ) ) WeightExam\n    where WeightExam.effective.toInterval ( ) during day of \"Measurement Period\"\n      and WeightExam.value is not null"
          }, {
            "url": "displaySequence",
            "valueInteger": 10
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Numerator 1"
          }, {
            "url": "statement",
            "valueString": "define \"Numerator 1\":\n  exists \"BMI Percentile in Measurement Period\"\n    and exists \"Height in Measurement Period\"\n    and exists \"Weight in Measurement Period\""
          }, {
            "url": "displaySequence",
            "valueInteger": 11
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "SupplementalDataElements"
          }, {
            "url": "name",
            "valueString": "SDE Payer"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Payer\":\n  [Coverage: type in \"Payer Type\"] Payer\n    return {\n      code: Payer.type,\n      period: Payer.period\n    }"
          }, {
            "url": "displaySequence",
            "valueInteger": 12
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "SDE Payer"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Payer\":\n  SDE.\"SDE Payer\""
          }, {
            "url": "displaySequence",
            "valueInteger": 13
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Numerator 2"
          }, {
            "url": "statement",
            "valueString": "define \"Numerator 2\":\n  exists ( ( [Procedure: \"Counseling for Nutrition\"] ).isInterventionPerformed ( ) ) NutritionCounseling\n    where NutritionCounseling.performed.toInterval ( ) during day of \"Measurement Period\""
          }, {
            "url": "displaySequence",
            "valueInteger": 14
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "SupplementalDataElements"
          }, {
            "url": "name",
            "valueString": "SDE Ethnicity"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Ethnicity\":\n  Patient.ethnicity E\n    return Tuple {\n      codes: { E.ombCategory } union E.detailed,\n      display: E.text\n    }"
          }, {
            "url": "displaySequence",
            "valueInteger": 15
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "SDE Ethnicity"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Ethnicity\":\n  SDE.\"SDE Ethnicity\""
          }, {
            "url": "displaySequence",
            "valueInteger": 16
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Hospice"
          }, {
            "url": "name",
            "valueString": "Has Hospice Services"
          }, {
            "url": "statement",
            "valueString": "define \"Has Hospice Services\":\n  exists ((([Encounter: \"Encounter Inpatient\"]).isEncounterPerformed()) InpatientEncounter\n      where (InpatientEncounter.hospitalization.dischargeDisposition ~ \"Discharge to home for hospice care (procedure)\"\n          or InpatientEncounter.hospitalization.dischargeDisposition ~ \"Discharge to healthcare facility for hospice care (procedure)\"\n      )\n        and InpatientEncounter.period ends during day of \"Measurement Period\"\n  )\n    or exists ((([Encounter: \"Hospice Encounter\"]).isEncounterPerformed()) HospiceEncounter\n        where HospiceEncounter.period overlaps day of \"Measurement Period\"\n    )\n    or exists ((([ObservationScreeningAssessment: \"Hospice care [Minimum Data Set]\"]).isAssessmentPerformed()) HospiceAssessment\n        where HospiceAssessment.value ~ \"Yes (qualifier value)\"\n          and HospiceAssessment.effective.toInterval() overlaps day of \"Measurement Period\"\n    )\n    or exists ((([ServiceRequest: \"Hospice Care Ambulatory\"]).isInterventionOrder()) HospiceOrder\n        where HospiceOrder.authoredOn during day of \"Measurement Period\"\n    )\n    or exists ((([Procedure: \"Hospice Care Ambulatory\"]).isInterventionPerformed()) HospicePerformed\n        where HospicePerformed.performed.toInterval() overlaps day of \"Measurement Period\"\n    )\n    or exists ((([ConditionProblemsHealthConcerns: \"Hospice Diagnosis\"]\n        union [ConditionEncounterDiagnosis: \"Hospice Diagnosis\"]).verified()) HospiceCareDiagnosis\n        where HospiceCareDiagnosis.prevalenceInterval() overlaps day of \"Measurement Period\"\n    )"
          }, {
            "url": "displaySequence",
            "valueInteger": 17
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Pregnancy Diagnosis Which Overlaps Measurement Period"
          }, {
            "url": "statement",
            "valueString": "define \"Pregnancy Diagnosis Which Overlaps Measurement Period\":\n  ( ( [ConditionProblemsHealthConcerns: \"Pregnancy\"]\n      union [ConditionEncounterDiagnosis: \"Pregnancy\"]\n  ).verified ( ) ) PregnancyDiag\n    where PregnancyDiag.prevalenceInterval ( ) overlaps \"Measurement Period\""
          }, {
            "url": "displaySequence",
            "valueInteger": 18
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "Denominator Exclusions"
          }, {
            "url": "statement",
            "valueString": "define \"Denominator Exclusions\":\n  Hospice.\"Has Hospice Services\"\n    or exists \"Pregnancy Diagnosis Which Overlaps Measurement Period\""
          }, {
            "url": "displaySequence",
            "valueInteger": 19
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "SupplementalDataElements"
          }, {
            "url": "name",
            "valueString": "SDE Race"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Race\":\n  Patient.race R\n    return Tuple {\n      codes: R.ombCategory union R.detailed,\n      display: R.text\n    }"
          }, {
            "url": "displaySequence",
            "valueInteger": 20
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "CMS155FHIRWgtAssessCounseling"
          }, {
            "url": "name",
            "valueString": "SDE Race"
          }, {
            "url": "statement",
            "valueString": "define \"SDE Race\":\n  SDE.\"SDE Race\""
          }, {
            "url": "displaySequence",
            "valueInteger": 21
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "FHIRHelpers"
          }, {
            "url": "name",
            "valueString": "ToString"
          }, {
            "url": "statement",
            "valueString": "define function ToString(value uri): value.value"
          }, {
            "url": "displaySequence",
            "valueInteger": 22
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "isInterventionPerformed"
          }, {
            "url": "statement",
            "valueString": "//Intervention, Performed\ndefine fluent function isInterventionPerformed(Proc List<Procedure>):\n  Proc P\n    where P.status ~ 'completed'"
          }, {
            "url": "displaySequence",
            "valueInteger": 23
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "QICoreCommon"
          }, {
            "url": "name",
            "valueString": "toInterval"
          }, {
            "url": "statement",
            "valueString": "/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of DateTime, Quanitty, Interval<DateTime>, or Interval<Quantity> types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in QICore, allowing this function to be used across any resource.\nThe input can be provided as a DateTime, Quantity, Interval<DateTime> or Interval<Quantity>.\nThe intent of this function is to provide a clear and concise mechanism to treat single\nelements that have multiple possible representations as intervals so that logic doesn't have to account\nfor the variability. More complex calculations (such as medication request period or dispense period\ncalculation) need specific guidance and consideration. That guidance may make use of this function, but\nthe focus of this function is on single element calculations where the semantics are unambiguous.\nIf the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.\nIf the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,\nand the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.\nIf the input is a DateTime Interval, the result is the input.\nIf the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result\nis a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending\nimmediately before one year later than the date the patient turned the age given as the end of the quantity interval.\nIf 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\n*/\ndefine fluent function toInterval(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>, Timing>):\n  case\n\t  when choice is DateTime then\n    \tInterval[choice as DateTime, choice as DateTime]\n\t\twhen choice is Interval<DateTime> then\n  \t\tchoice as Interval<DateTime>\n\t\twhen choice is Quantity then\n\t\t  Interval[Patient.birthDate + (choice as Quantity),\n\t\t\t  Patient.birthDate + (choice as Quantity) + 1 year)\n\t\twhen choice is Interval<Quantity> then\n\t\t  Interval[Patient.birthDate + (choice.low as Quantity),\n\t\t\t  Patient.birthDate + (choice.high as Quantity) + 1 year)\n\t\twhen choice is Timing then\n      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval<DateTime>\n\t\telse\n\t\t\tnull as Interval<DateTime>\n\tend"
          }, {
            "url": "displaySequence",
            "valueInteger": 24
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "isEncounterPerformed"
          }, {
            "url": "statement",
            "valueString": "//Encounter, Performed\n//General usage unless required otherwise by measure intent (e.g., follow-up encounters)\ndefine fluent function isEncounterPerformed(Enc List<Encounter>):\n  Enc E\n    where E.status = 'finished'"
          }, {
            "url": "displaySequence",
            "valueInteger": 25
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "FHIRHelpers"
          }, {
            "url": "name",
            "valueString": "ToInterval"
          }, {
            "url": "statement",
            "valueString": "/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n    if period is null then\n        null\n    else\n        if period.\"start\" is null then\n            Interval(period.\"start\".value, period.\"end\".value]\n        else\n            Interval[period.\"start\".value, period.\"end\".value]"
          }, {
            "url": "displaySequence",
            "valueInteger": 26
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "isObservationPediatricBMI"
          }, {
            "url": "statement",
            "valueString": "//Observation Pediatric BMI\ndefine fluent function isObservationPediatricBMI(Obs List<USCorePediatricBMIforAgeObservationProfile>):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }"
          }, {
            "url": "displaySequence",
            "valueInteger": 27
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "isObservationBodyHeight"
          }, {
            "url": "statement",
            "valueString": "define fluent function isObservationBodyHeight(Obs List<USCoreBodyHeightProfile>):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }"
          }, {
            "url": "displaySequence",
            "valueInteger": 28
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "isObservationBodyWeight"
          }, {
            "url": "statement",
            "valueString": "define fluent function isObservationBodyWeight(Obs List<USCoreBodyWeightProfile>):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }"
          }, {
            "url": "displaySequence",
            "valueInteger": 29
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "FHIRHelpers"
          }, {
            "url": "name",
            "valueString": "ToCode"
          }, {
            "url": "statement",
            "valueString": "/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }"
          }, {
            "url": "displaySequence",
            "valueInteger": 30
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "isAssessmentPerformed"
          }, {
            "url": "statement",
            "valueString": "//Assessment, Performed\ndefine fluent function isAssessmentPerformed(Obs List<ObservationScreeningAssessment>):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }"
          }, {
            "url": "displaySequence",
            "valueInteger": 31
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "isInterventionOrder"
          }, {
            "url": "statement",
            "valueString": "//Intervention, Order\ndefine fluent function isInterventionOrder(ServiceRequest List<ServiceRequest>):\n  ServiceRequest S\n    where S.status in { 'active', 'completed' }\n      and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}"
          }, {
            "url": "displaySequence",
            "valueInteger": 32
          } ]
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition",
          "extension": [ {
            "url": "libraryName",
            "valueString": "Status"
          }, {
            "url": "name",
            "valueString": "verified"
          }, {
            "url": "statement",
            "valueString": "//This library contains functions used to constrain FHIR resource elements for measures authored by NCQA, based on QICore 6.0.0 resources including IG and authoring patterns. The functions may appear similar to some QICoreCommon functions but differ in that they have constraints that are relevant for measures authored by NCQA.\n\n//Condition\n//Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential\ndefine fluent function verified(conditions List<Choice<ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis>>):\n  conditions C\n    where C.verificationStatus is not null implies\n      (C.verificationStatus ~ \"confirmed\"\n        or C.verificationStatus ~ \"unconfirmed\"\n        or C.verificationStatus ~ \"provisional\"\n        or C.verificationStatus ~ \"differential\"\n      )"
          }, {
            "url": "displaySequence",
            "valueInteger": 33
          } ]
        } ],
        "name": "EffectiveDataRequirements",
        "status": "active",
        "type": {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/library-type",
            "code": "module-definition"
          } ]
        },
        "relatedArtifact": [ {
          "type": "depends-on",
          "display": "QICore model information",
          "resource": "http://hl7.org/fhir/Library/QICore-ModelInfo"
        }, {
          "type": "depends-on",
          "display": "Library SDE",
          "resource": "https://madie.cms.gov/Library/SupplementalDataElements|5.1.000"
        }, {
          "type": "depends-on",
          "display": "Library FHIRHelpers",
          "resource": "https://madie.cms.gov/Library/FHIRHelpers|4.4.000"
        }, {
          "type": "depends-on",
          "display": "Library Status",
          "resource": "https://madie.cms.gov/Library/Status|1.15.000"
        }, {
          "type": "depends-on",
          "display": "Library QICoreCommon",
          "resource": "https://madie.cms.gov/Library/QICoreCommon|4.0.000"
        }, {
          "type": "depends-on",
          "display": "Library Hospice",
          "resource": "https://madie.cms.gov/Library/Hospice|6.18.000"
        }, {
          "type": "depends-on",
          "display": "Code system SNOMEDCT",
          "resource": "http://snomed.info/sct"
        }, {
          "type": "depends-on",
          "display": "Code system LOINC",
          "resource": "http://loinc.org"
        }, {
          "type": "depends-on",
          "display": "Code system ConditionVerificationStatusCodes",
          "resource": "http://terminology.hl7.org/CodeSystem/condition-ver-status"
        }, {
          "type": "depends-on",
          "display": "Value set Counseling for Physical Activity",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035"
        }, {
          "type": "depends-on",
          "display": "Value set Office Visit",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"
        }, {
          "type": "depends-on",
          "display": "Value set Preventive Care Services Individual Counseling",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026"
        }, {
          "type": "depends-on",
          "display": "Value set Preventive Care, Established Office Visit, 0 to 17",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024"
        }, {
          "type": "depends-on",
          "display": "Value set Preventive Care Services, Initial Office Visit, 0 to 17",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022"
        }, {
          "type": "depends-on",
          "display": "Value set Preventive Care Services Group Counseling",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027"
        }, {
          "type": "depends-on",
          "display": "Value set Home Healthcare Services",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"
        }, {
          "type": "depends-on",
          "display": "Value set Telephone Visits",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"
        }, {
          "type": "depends-on",
          "display": "Value set Payer Type",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
        }, {
          "type": "depends-on",
          "display": "Value set Counseling for Nutrition",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003"
        }, {
          "type": "depends-on",
          "display": "Value set Encounter Inpatient",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
        }, {
          "type": "depends-on",
          "display": "Value set Hospice Encounter",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003"
        }, {
          "type": "depends-on",
          "display": "Value set Hospice Care Ambulatory",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584"
        }, {
          "type": "depends-on",
          "display": "Value set Hospice Diagnosis",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"
        }, {
          "type": "depends-on",
          "display": "Value set Pregnancy",
          "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"
        } ],
        "parameter": [ {
          "name": "Measurement Period",
          "use": "in",
          "min": 0,
          "max": "1",
          "type": "Period"
        }, {
          "name": "Numerator 3",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }, {
          "name": "Denominator",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }, {
          "name": "Numerator 1",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }, {
          "name": "Numerator 2",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }, {
          "name": "Initial Population",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }, {
          "name": "Denominator Exclusions",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }, {
          "name": "SDE Sex",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "Coding"
        }, {
          "name": "SDE Payer",
          "use": "out",
          "min": 0,
          "max": "*",
          "type": "Resource"
        }, {
          "name": "SDE Ethnicity",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "Resource"
        }, {
          "name": "SDE Race",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "Resource"
        }, {
          "name": "Stratification 2",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        }, {
          "name": "Stratification 1",
          "use": "out",
          "min": 0,
          "max": "1",
          "type": "boolean"
        } ],
        "dataRequirement": [ {
          "type": "Patient",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient" ],
          "mustSupport": [ "extension", "birthDate", "birthDate.value", "url" ]
        }, {
          "type": "Procedure",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure" ],
          "mustSupport": [ "code", "performed", "status", "status.value" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035"
          } ]
        }, {
          "type": "Procedure",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure" ],
          "mustSupport": [ "code", "performed", "status", "status.value" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003"
          } ]
        }, {
          "type": "Procedure",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure" ],
          "mustSupport": [ "code", "performed", "status", "status.value" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "status", "status.value", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "status", "status.value", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "status", "status.value", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "status", "status.value", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "status", "status.value", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "status", "status.value", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "status", "status.value", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "hospitalization", "hospitalization.dischargeDisposition", "period", "status", "status.value" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
          } ]
        }, {
          "type": "Encounter",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
          "mustSupport": [ "type", "period", "status", "status.value" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003"
          } ]
        }, {
          "type": "Observation",
          "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age" ],
          "mustSupport": [ "effective", "value", "status", "status.value" ]
        }, {
          "type": "Observation",
          "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-height" ],
          "mustSupport": [ "effective", "value", "status", "status.value" ]
        }, {
          "type": "Observation",
          "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-body-weight" ],
          "mustSupport": [ "effective", "value", "status", "status.value" ]
        }, {
          "type": "Coverage",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage" ],
          "mustSupport": [ "type", "period" ],
          "codeFilter": [ {
            "path": "type",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
          } ]
        }, {
          "type": "Observation",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment" ],
          "mustSupport": [ "code", "value", "effective", "status", "status.value" ],
          "codeFilter": [ {
            "path": "code",
            "code": [ {
              "system": "http://loinc.org",
              "code": "45755-6",
              "display": "Hospice care [Minimum Data Set]"
            } ]
          } ]
        }, {
          "type": "ServiceRequest",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest" ],
          "mustSupport": [ "code", "authoredOn", "authoredOn.value", "status", "status.value", "intent", "intent.value" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584"
          } ]
        }, {
          "type": "Condition",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns" ],
          "mustSupport": [ "code" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"
          } ]
        }, {
          "type": "Condition",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns" ],
          "mustSupport": [ "code" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"
          } ]
        }, {
          "type": "Condition",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis" ],
          "mustSupport": [ "code" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"
          } ]
        }, {
          "type": "Condition",
          "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis" ],
          "mustSupport": [ "code" ],
          "codeFilter": [ {
            "path": "code",
            "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"
          } ]
        } ]
      } ],
      "extension": [ {
        "id": "supplementalDataGuidance",
        "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance",
        "extension": [ {
          "url": "guidance",
          "valueString": "For every patient evaluated by this measure also identify payer, race, ethnicity and sex"
        }, {
          "url": "usage",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
              "code": "supplemental-data",
              "display": "Supplemental Data"
            } ],
            "text": "Supplemental Data Guidance"
          }
        } ]
      }, {
        "url": "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements",
        "valueReference": {
          "reference": "#effective-data-requirements"
        }
      } ],
      "url": "https://madie.cms.gov/Measure/CMS155FHIRWgtAssessCounseling",
      "identifier": [ {
        "use": "usual",
        "type": {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "short-name",
            "display": "Short Name"
          } ]
        },
        "system": "https://madie.cms.gov/measure/shortName",
        "value": "CMS155FHIR"
      }, {
        "use": "official",
        "type": {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "version-independent",
            "display": "Version Independent"
          } ]
        },
        "system": "urn:ietf:rfc:3986",
        "value": "urn:uuid:ced3e428-2d50-4738-badb-3693cb0df02c"
      }, {
        "use": "official",
        "type": {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "version-specific",
            "display": "Version Specific"
          } ]
        },
        "system": "urn:ietf:rfc:3986",
        "value": "urn:uuid:df68edd6-40f5-4549-80f9-fff557c07b99"
      }, {
        "use": "official",
        "type": {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/artifact-identifier-type",
            "code": "publisher",
            "display": "Publisher"
          } ]
        },
        "system": "https://madie.cms.gov/measure/cmsId",
        "value": "155FHIR",
        "assigner": {
          "display": "CMS"
        }
      } ],
      "version": "1.0.000",
      "name": "CMS155FHIRWgtAssessCounseling",
      "title": "Weight Assessment and Counseling for Nutrition and Physical Activity for Children/AdolescentsFHIR",
      "status": "active",
      "experimental": false,
      "date": "2025-07-25T21:09:08+00:00",
      "publisher": "National Committee for Quality Assurance",
      "contact": [ {
        "telecom": [ {
          "system": "url",
          "value": "https://www.ncqa.org/"
        } ]
      } ],
      "description": "Percentage of patients 3-17 years of age who had an outpatient visit with a primary care physician (PCP) or obstetrician/gynecologist (OB/GYN) and who had evidence of the following during the measurement period. - Percentage of patients with height, weight, and body mass index (BMI) percentile documentation - Percentage of patients with counseling for nutrition - Percentage of patients with counseling for physical activity",
      "usage": "The visit must be performed by a PCP or OB/GYN. Because BMI norms for youth vary with age and sex, this measure evaluates whether BMI percentile, rather than an absolute BMI value, is assessed. This eCQM is a patient-based measure. This FHIR-based measure has been derived from the QDM-based measure: CMS155v14. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU6/) for more information on QI-Core and mapping recommendations from QDM to QI-Core STU 6. (https://hl7.org/fhir/us/qicore/STU6/qdm-to-qicore.html).",
      "copyright": "This Physician Performance Measure (Measure) and related data specifications are owned and were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties or endorsements about the quality of any product, test or protocol identified as numerator compliant or otherwise identified as meeting the requirements of the measure or specification. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure may be used for internal, noncommercial purposes (e.g., use by healthcare providers in connection with their practices) without obtaining approval from NCQA. All other uses, including a commercial use (including but not limited to vendors using or embedding the measures and specifications into any product or service to calculate measure results for customers for any purpose), must be approved by NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2025 National Committee for Quality Assurance. All Rights Reserved. Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third-party codes contained in the specifications. CPT(R) codes, descriptions and other data are copyright 2025. American Medical Association. All rights reserved. CPT is a trademark of the American Medical Association. Fee schedules, relative value units, conversion factors and/or related components are not assigned by the AMA, are not part of CPT, and the AMA is not recommending their use. The AMA does not directly or indirectly practice medicine or dispense medical services. The AMA assumes no liability for data contained or not contained herein. Applicable FARS/DFARS restrictions apply to government use. Some measure specifications contain coding from LOINC(R) (https://loinc.org). The LOINC table, LOINC codes, LOINC panels and form file, LOINC linguistic variants file, LOINC/RSNA Radiology Playbook, and LOINC/IEEE Medical Device Code Mapping Table are copyright 2004-2025 Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee, and are available at no cost under the license at https://loinc.org/kb/license/. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2025 World Health Organization. All Rights Reserved. Some measures use RxNorm, a standardized nomenclature and coding for clinical drugs and drug delivery devices, which is made publicly available courtesy of the U.S. National Library of Medicine (NLM), National Institutes of Health, Department of Health and Human Services. NLM is not responsible for the measures and does not endorse or recommend this or any other product. “HL7” is the registered trademark of Health Level Seven International.",
      "effectivePeriod": {
        "start": "2026-01-01",
        "end": "2026-12-31"
      },
      "author": [ {
        "name": "National Committee for Quality Assurance",
        "telecom": [ {
          "system": "url",
          "value": "https://www.ncqa.org/"
        } ]
      } ],
      "relatedArtifact": [ {
        "type": "citation",
        "citation": "Centers for Disease Control and Prevention. (2016). Childhood Obesity Causes &amp; Consequences. Retrieved from https://www.cdc.gov/obesity/childhood/causes.html"
      }, {
        "type": "citation",
        "citation": "Fryar, C. D., Carroll, M. D., &amp; Ogden, C. L. (2014). Prevalence of Overweight and Obesity Among Children and Adolescents: United States, 1963-1965 through 2011-2012. Health E-Stats. Retrieved from https://www.cdc.gov/nchs/data/hestat/obesity_child_11_12/obesity_child_11_12.htm"
      }, {
        "type": "citation",
        "citation": "Hagan, J. F., Shaw, J. S., &amp; Duncan, P. M. (eds.). (2017). Bright Futures: Guidelines for Health Supervision of Infants, Children, and Adolescents, 4th ed. Elk Grove Village, IL: American Academy of Pediatrics."
      }, {
        "type": "citation",
        "citation": "Hales, C.M., Carroll, M.D., Fryar, C.D., et al. (2017). Prevalence of Obesity Among Adults and Youth: United States, 2015-2016. NCHS Data Brief. Retrieved from https://www.cdc.gov/nchs/data/databriefs/db288.pdf"
      }, {
        "type": "citation",
        "citation": "U.S. Preventive Services Task Force. (2017). Screening and interventions for overweight in children and adolescents: Recommendation statement. Rockville, MD: Agency for Healthcare Research and Quality. Retrieved from https://www.uspreventiveservicestaskforce.org/Page/Document/UpdateSummaryFinal/obesity-in-children-and-adolescents-screening1?ds=1&amp;s=obesity"
      }, {
        "type": "citation",
        "citation": "Ward, Z. J., Bleich, S. N., Long, M. W., &amp; Gortmaker, S. L. (2021). Association of body mass index with health care expenditures in the United States by age and sex. PLOS ONE, 16(3), e0247307. https://doi.org/10.1371/journal.pone.0247307"
      } ],
      "library": [ "https://madie.cms.gov/Library/CMS155FHIRWgtAssessCounseling" ],
      "disclaimer": "The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE AND SPECIFICATIONS ARE PROVIDED \"AS IS\" WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].",
      "rationale": "Over the last four decades, childhood obesity has more than tripled in children and adolescents 2 to 19 years of age (from a rate of approximately 5 percent to 18.5 percent) (Fryar, Carroll, &amp; Ogden, 2014; Hales et al., 2017). Non-Hispanic black and Hispanic youth are more likely to be obese than their non-Hispanic white and non-Hispanic Asian counterparts. In 2015-2016, approximately 22 percent of non-Hispanic black and 26 percent of Hispanic youth were obese compared to approximately 14 percent of non-Hispanic white and 11 percent of non-Hispanic Asian youth (Hales et al., 2017). Childhood obesity has both immediate and long-term effects on health and well-being. Children who are obese have higher rates of physical health conditions, such as risk factors for cardiovascular disease (like high blood pressure and high cholesterol), type 2 diabetes, asthma, sleep apnea, and joint problems. There is also a correlation between childhood obesity and mental health conditions, such as anxiety and depression (Centers for Disease Control and Prevention [CDC], 2016). In addition, children who are obese are more likely to be obese as adults and are therefore at risk for adult health problems, such as heart disease, type 2 diabetes, and several types of cancer (CDC, 2016). The direct medical costs associated with childhood obesity total $1.32 billion per year (Ward et al., 2021). Because obesity can become a lifelong health issue, it is important to screen for obesity in children and adolescents, and to provide interventions that promote weight loss (U.S. Preventive Services Task Force, 2017).",
      "clinicalRecommendationStatement": "U.S. Preventive Services Task Force (2017) - The Task Force recommends that clinicians screen for obesity in children and adolescents 6 years and older and offer or refer them to comprehensive, intensive behavioral interventions to promote improvements in weight status. (B recommendation) American Academy of Pediatrics – Bright Futures (Hagan, Shaw, &amp; Duncan, 2017) - Plot and assess BMI percentiles routinely for early recognition of overweight and obesity. - Assess barriers to healthy eating and physical activity. - Provide anticipatory guidance for nutrition and physical activity.",
      "group": [ {
        "id": "Group_1",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-scoring",
              "code": "proportion",
              "display": "Proportion"
            } ]
          }
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
          "valueCode": "boolean"
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-type",
              "code": "process",
              "display": "Process"
            } ]
          }
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
          "valueCode": "None"
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
              "code": "increase",
              "display": "Increased score indicates improvement"
            } ]
          }
        } ],
        "population": [ {
          "id": "InitialPopulation_1",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "initial-population",
              "display": "Initial Population"
            } ]
          },
          "description": "Patients 3-17 years of age by the end of the measurement period, with at least one outpatient visit with a primary care physician (PCP) or an obstetrician/gynecologist (OB/GYN) during the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Initial Population"
          }
        }, {
          "id": "Denominator_1",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "denominator",
              "display": "Denominator"
            } ]
          },
          "description": "Equals Initial Population",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator"
          }
        }, {
          "id": "DenominatorExclusion_1",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "denominator-exclusion",
              "display": "Denominator Exclusion"
            } ]
          },
          "description": "Exclude patients who are in hospice care for any part of the measurement period. Patients who have a diagnosis of pregnancy during the measurement period.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator Exclusions"
          }
        }, {
          "id": "Numerator_1",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "numerator",
              "display": "Numerator"
            } ]
          },
          "description": "Patients who had a height, weight and body mass index (BMI) percentile recorded during the measurement period.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Numerator 1"
          }
        } ],
        "stratifier": [ {
          "id": "Stratification_1_1",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator",
                "display": "Denominator"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exclusion",
                "display": "Denominator Exclusion"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              } ]
            }
          } ],
          "description": "Report a total score, and each of the following strata: Stratum 1 - Patients age 3-11 years at the end of the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 1"
          }
        }, {
          "id": "Stratification_1_2",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator",
                "display": "Denominator"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exclusion",
                "display": "Denominator Exclusion"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              } ]
            }
          } ],
          "description": "Stratum 2 - Patients age 12-17 years at the end of the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 2"
          }
        } ]
      }, {
        "id": "Group_2",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-scoring",
              "code": "proportion",
              "display": "Proportion"
            } ]
          }
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
          "valueCode": "boolean"
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-type",
              "code": "process",
              "display": "Process"
            } ]
          }
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
          "valueCode": "None"
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
              "code": "increase",
              "display": "Increased score indicates improvement"
            } ]
          }
        } ],
        "population": [ {
          "id": "InitialPopulation_2",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "initial-population",
              "display": "Initial Population"
            } ]
          },
          "description": "Patients 3-17 years of age by the end of the measurement period, with at least one outpatient visit with a primary care physician (PCP) or an obstetrician/gynecologist (OB/GYN) during the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Initial Population"
          }
        }, {
          "id": "Denominator_2",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "denominator",
              "display": "Denominator"
            } ]
          },
          "description": "Equals Initial Population",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator"
          }
        }, {
          "id": "DenominatorExclusion_2",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "denominator-exclusion",
              "display": "Denominator Exclusion"
            } ]
          },
          "description": "Exclude patients who are in hospice care for any part of the measurement period. Patients who have a diagnosis of pregnancy during the measurement period.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator Exclusions"
          }
        }, {
          "id": "Numerator_2",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "numerator",
              "display": "Numerator"
            } ]
          },
          "description": "Patients who had counseling for nutrition during the measurement period.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Numerator 2"
          }
        } ],
        "stratifier": [ {
          "id": "Stratification_2_1",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator",
                "display": "Denominator"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exclusion",
                "display": "Denominator Exclusion"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              } ]
            }
          } ],
          "description": "Report a total score, and each of the following strata: Stratum 1 - Patients age 3-11 years at the end of the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 1"
          }
        }, {
          "id": "Stratification_2_2",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator",
                "display": "Denominator"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exclusion",
                "display": "Denominator Exclusion"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              } ]
            }
          } ],
          "description": "Stratum 2 - Patients age 12-17 years at the end of the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 2"
          }
        } ]
      }, {
        "id": "Group_3",
        "extension": [ {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-scoring",
              "code": "proportion",
              "display": "Proportion"
            } ]
          }
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
          "valueCode": "boolean"
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-type",
              "code": "process",
              "display": "Process"
            } ]
          }
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
          "valueCode": "None"
        }, {
          "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
          "valueCodeableConcept": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
              "code": "increase",
              "display": "Increased score indicates improvement"
            } ]
          }
        } ],
        "population": [ {
          "id": "InitialPopulation_3",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "initial-population",
              "display": "Initial Population"
            } ]
          },
          "description": "Patients 3-17 years of age by the end of the measurement period, with at least one outpatient visit with a primary care physician (PCP) or an obstetrician/gynecologist (OB/GYN) during the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Initial Population"
          }
        }, {
          "id": "Denominator_3",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "denominator",
              "display": "Denominator"
            } ]
          },
          "description": "Equals Initial Population",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator"
          }
        }, {
          "id": "DenominatorExclusion_3",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "denominator-exclusion",
              "display": "Denominator Exclusion"
            } ]
          },
          "description": "Exclude patients who are in hospice care for any part of the measurement period. Patients who have a diagnosis of pregnancy during the measurement period.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Denominator Exclusions"
          }
        }, {
          "id": "Numerator_3",
          "code": {
            "coding": [ {
              "system": "http://terminology.hl7.org/CodeSystem/measure-population",
              "code": "numerator",
              "display": "Numerator"
            } ]
          },
          "description": "Patients who had counseling for physical activity during the measurement period.",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Numerator 3"
          }
        } ],
        "stratifier": [ {
          "id": "Stratification_3_1",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator",
                "display": "Denominator"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exclusion",
                "display": "Denominator Exclusion"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              } ]
            }
          } ],
          "description": "Report a total score, and each of the following strata: Stratum 1 - Patients age 3-11 years at the end of the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 1"
          }
        }, {
          "id": "Stratification_3_2",
          "extension": [ {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "initial-population",
                "display": "Initial Population"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator",
                "display": "Denominator"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "denominator-exclusion",
                "display": "Denominator Exclusion"
              } ]
            }
          }, {
            "url": "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo",
            "valueCodeableConcept": {
              "coding": [ {
                "system": "http://terminology.hl7.org/CodeSystem/measure-population",
                "code": "numerator",
                "display": "Numerator"
              } ]
            }
          } ],
          "description": "Stratum 2 - Patients age 12-17 years at the end of the measurement period",
          "criteria": {
            "language": "text/cql-identifier",
            "expression": "Stratification 2"
          }
        } ]
      } ],
      "supplementalData": [ {
        "id": "sde-ethnicity",
        "usage": [ {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
            "code": "supplemental-data"
          } ]
        } ],
        "description": "SDE Ethnicity",
        "criteria": {
          "language": "text/cql-identifier",
          "expression": "SDE Ethnicity"
        }
      }, {
        "id": "sde-payer",
        "usage": [ {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
            "code": "supplemental-data"
          } ]
        } ],
        "description": "SDE Payer",
        "criteria": {
          "language": "text/cql-identifier",
          "expression": "SDE Payer"
        }
      }, {
        "id": "sde-race",
        "usage": [ {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
            "code": "supplemental-data"
          } ]
        } ],
        "description": "SDE Race",
        "criteria": {
          "language": "text/cql-identifier",
          "expression": "SDE Race"
        }
      }, {
        "id": "sde-sex",
        "usage": [ {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/measure-data-usage",
            "code": "supplemental-data"
          } ]
        } ],
        "description": "SDE Sex",
        "criteria": {
          "language": "text/cql-identifier",
          "expression": "SDE Sex"
        }
      } ]
    },
    "request": {
      "method": "POST",
      "url": "Measure/CMS155FHIRWgtAssessCounseling"
    }
  }, {
    "fullUrl": "https://madie.cms.gov/Library/CMS155FHIRWgtAssessCounseling",
    "resource": {
      "resourceType": "Library",
      "id": "CMS155FHIRWgtAssessCounseling",
      "meta": {
        "profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary", "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library" ]
      },
      "language": "en",
      "text": {
        "status": "extensions",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"col-12\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">CMS155FHIRWgtAssessCounseling</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">1.0.000</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n<td class=\"content-container\">CMS155FHIRWgtAssessCounseling</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">National Committee for Quality Assurance</td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\">CMS155FHIRWgtAssessCounseling</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/library-type#logic-library]</td>\n</tr>\n\n\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Procedure\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, performed\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Procedure\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, performed\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1026\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1024\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1022\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1027\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1016\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <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.1080\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">CQL Content</th>\n      <td>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">library CMS155FHIRWgtAssessCounseling version '1.0.000'\r\n\r\nusing QICore version '6.0.0'\r\n\r\ninclude FHIRHelpers version '4.4.000' called FHIRHelpers\r\ninclude QICoreCommon version '4.0.000' called QICoreCommon\r\ninclude SupplementalDataElements version '5.1.000' called SDE\r\ninclude Hospice version '6.18.000' called Hospice\r\ninclude Status version '1.15.000' called Status\r\n\r\nvalueset &quot;Counseling for Nutrition&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003'\r\nvalueset &quot;Counseling for Physical Activity&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035'\r\nvalueset &quot;Home Healthcare Services&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016'\r\nvalueset &quot;Office Visit&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001'\r\nvalueset &quot;Pregnancy&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378'\r\nvalueset &quot;Preventive Care Services Group Counseling&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027'\r\nvalueset &quot;Preventive Care Services, Initial Office Visit, 0 to 17&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022'\r\nvalueset &quot;Preventive Care Services Individual Counseling&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026'\r\nvalueset &quot;Preventive Care, Established Office Visit, 0 to 17&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024'\r\nvalueset &quot;Telephone Visits&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080'\r\n\r\nparameter &quot;Measurement Period&quot; Interval&lt;DateTime&gt;\r\n\r\ncontext Patient\r\n\r\ndefine &quot;SDE Ethnicity&quot;:\r\n  SDE.&quot;SDE Ethnicity&quot;\r\n\r\ndefine &quot;SDE Payer&quot;:\r\n  SDE.&quot;SDE Payer&quot;\r\n\r\ndefine &quot;SDE Race&quot;:\r\n  SDE.&quot;SDE Race&quot;\r\n\r\ndefine &quot;SDE Sex&quot;:\r\n  SDE.&quot;SDE Sex&quot;\r\n\r\ndefine &quot;Initial Population&quot;:\r\n  AgeInYearsAt(date from \r\n    end of &quot;Measurement Period&quot;\r\n  ) in Interval[3, 17]\r\n    and exists &quot;Qualifying Encounters&quot;\r\n\r\ndefine &quot;Denominator&quot;:\r\n  &quot;Initial Population&quot;\r\n\r\ndefine &quot;Denominator Exclusions&quot;:\r\n  Hospice.&quot;Has Hospice Services&quot;\r\n    or exists &quot;Pregnancy Diagnosis Which Overlaps Measurement Period&quot;\r\n\r\ndefine &quot;Pregnancy Diagnosis Which Overlaps Measurement Period&quot;:\r\n  ( ( [ConditionProblemsHealthConcerns: &quot;Pregnancy&quot;]\r\n      union [ConditionEncounterDiagnosis: &quot;Pregnancy&quot;]\r\n  ).verified ( ) ) PregnancyDiag\r\n    where PregnancyDiag.prevalenceInterval ( ) overlaps &quot;Measurement Period&quot;\r\n\r\ndefine &quot;Numerator 1&quot;:\r\n  exists &quot;BMI Percentile in Measurement Period&quot;\r\n    and exists &quot;Height in Measurement Period&quot;\r\n    and exists &quot;Weight in Measurement Period&quot;\r\n\r\ndefine &quot;Numerator 2&quot;:\r\n  exists ( ( [Procedure: &quot;Counseling for Nutrition&quot;] ).isInterventionPerformed ( ) ) NutritionCounseling\r\n    where NutritionCounseling.performed.toInterval ( ) during day of &quot;Measurement Period&quot;\r\n\r\ndefine &quot;Numerator 3&quot;:\r\n  exists ( ( [Procedure: &quot;Counseling for Physical Activity&quot;] ).isInterventionPerformed ( ) ) ActivityCounseling\r\n    where ActivityCounseling.performed.toInterval ( ) during day of &quot;Measurement Period&quot;\r\n\r\ndefine &quot;Stratification 1&quot;:\r\n  AgeInYearsAt(date from \r\n    end of &quot;Measurement Period&quot;\r\n  ) in Interval[3, 11]\r\n\r\ndefine &quot;Stratification 2&quot;:\r\n  AgeInYearsAt(date from \r\n    end of &quot;Measurement Period&quot;\r\n  ) in Interval[12, 17]\r\n\r\ndefine &quot;Qualifying Encounters&quot;:\r\n  ( ( [Encounter: &quot;Office Visit&quot;]\r\n      union [Encounter: &quot;Preventive Care Services Individual Counseling&quot;]\r\n      union [Encounter: &quot;Preventive Care, Established Office Visit, 0 to 17&quot;]\r\n      union [Encounter: &quot;Preventive Care Services, Initial Office Visit, 0 to 17&quot;]\r\n      union [Encounter: &quot;Preventive Care Services Group Counseling&quot;]\r\n      union [Encounter: &quot;Home Healthcare Services&quot;]\r\n      union [Encounter: &quot;Telephone Visits&quot;]\r\n  ).isEncounterPerformed ( ) ) ValidEncounters\r\n    where ValidEncounters.period during day of &quot;Measurement Period&quot;\r\n\r\ndefine &quot;Height in Measurement Period&quot;:\r\n  ( ( [USCoreBodyHeightProfile] ).isObservationBodyHeight ( ) ) HeightExam\r\n    where HeightExam.effective.toInterval ( ) during day of &quot;Measurement Period&quot;\r\n      and HeightExam.value is not null\r\n\r\ndefine &quot;Weight in Measurement Period&quot;:\r\n  ( ( [USCoreBodyWeightProfile] ).isObservationBodyWeight ( ) ) WeightExam\r\n    where WeightExam.effective.toInterval ( ) during day of &quot;Measurement Period&quot;\r\n      and WeightExam.value is not null\r\n\r\ndefine &quot;BMI Percentile in Measurement Period&quot;:\r\n  ( ( [USCorePediatricBMIforAgeObservationProfile] ).isObservationPediatricBMI ( ) ) BMIPercentile\r\n    where BMIPercentile.effective.toInterval ( ) during day of &quot;Measurement Period&quot;\r\n      and BMIPercentile.value is not null</code></pre>\n      </td>\n    </tr>\n    \n    \n    \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "url": "https://madie.cms.gov/Library/CMS155FHIRWgtAssessCounseling",
      "identifier": [ {
        "use": "official",
        "system": "https://madie.cms.gov/login",
        "value": "CMS155FHIRWgtAssessCounseling"
      } ],
      "version": "1.0.000",
      "name": "CMS155FHIRWgtAssessCounseling",
      "title": "CMS155FHIRWgtAssessCounseling",
      "status": "active",
      "experimental": false,
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/library-type",
          "code": "logic-library"
        } ]
      },
      "date": "2025-07-25T21:09:08+00:00",
      "publisher": "National Committee for Quality Assurance",
      "description": "CMS155FHIRWgtAssessCounseling",
      "relatedArtifact": [ {
        "type": "depends-on",
        "display": "QICore model information",
        "resource": "http://hl7.org/fhir/Library/QICore-ModelInfo"
      }, {
        "type": "depends-on",
        "display": "Library SDE",
        "resource": "https://madie.cms.gov/Library/SupplementalDataElements|5.1.000"
      }, {
        "type": "depends-on",
        "display": "Library Status",
        "resource": "https://madie.cms.gov/Library/Status|1.15.000"
      }, {
        "type": "depends-on",
        "display": "Library QICoreCommon",
        "resource": "https://madie.cms.gov/Library/QICoreCommon|4.0.000"
      }, {
        "type": "depends-on",
        "display": "Library FHIRHelpers",
        "resource": "https://madie.cms.gov/Library/FHIRHelpers|4.4.000"
      }, {
        "type": "depends-on",
        "display": "Library Hospice",
        "resource": "https://madie.cms.gov/Library/Hospice|6.18.000"
      }, {
        "type": "depends-on",
        "display": "Value set Counseling for Physical Activity",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035"
      }, {
        "type": "depends-on",
        "display": "Value set Office Visit",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"
      }, {
        "type": "depends-on",
        "display": "Value set Preventive Care Services Individual Counseling",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026"
      }, {
        "type": "depends-on",
        "display": "Value set Preventive Care, Established Office Visit, 0 to 17",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024"
      }, {
        "type": "depends-on",
        "display": "Value set Preventive Care Services, Initial Office Visit, 0 to 17",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022"
      }, {
        "type": "depends-on",
        "display": "Value set Preventive Care Services Group Counseling",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027"
      }, {
        "type": "depends-on",
        "display": "Value set Home Healthcare Services",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"
      }, {
        "type": "depends-on",
        "display": "Value set Telephone Visits",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"
      }, {
        "type": "depends-on",
        "display": "Value set Counseling for Nutrition",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003"
      }, {
        "type": "depends-on",
        "display": "Value set Pregnancy",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"
      } ],
      "dataRequirement": [ {
        "type": "Procedure",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure" ],
        "mustSupport": [ "code", "performed" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1035"
        } ]
      }, {
        "type": "Procedure",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure" ],
        "mustSupport": [ "code", "performed" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.195.12.1003"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1026"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1024"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1022"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1027"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080"
        } ]
      }, {
        "type": "Condition",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns" ],
        "mustSupport": [ "code" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"
        } ]
      }, {
        "type": "Condition",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis" ],
        "mustSupport": [ "code" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378"
        } ]
      } ],
      "content": [ {
        "contentType": "text/cql",
        "data": "[encoded data, 6248 characters]"
      }, {
        "contentType": "application/elm+json",
        "data": "[encoded data, 332840 characters]"
      } ]
    },
    "request": {
      "method": "POST",
      "url": "Library/CMS155FHIRWgtAssessCounseling"
    }
  }, {
    "fullUrl": "https://madie.cms.gov/Library/SupplementalDataElements",
    "resource": {
      "resourceType": "Library",
      "id": "SupplementalDataElements",
      "meta": {
        "profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary", "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library" ]
      },
      "language": "en",
      "text": {
        "status": "extensions",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"col-12\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">SupplementalDataElements</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">5.1.000</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n<td class=\"content-container\">67e5bc4d88f4d211353e632e</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">ICF</td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\">This is the QI-Core 6.0.0 version of the Supplemental Data Elements library containing the CMS SDE definitions for Payer, Race, Ethnicity and Sex</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/library-type#logic-library]</td>\n</tr>\n\n\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Patient\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: extension, url\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Coverage\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">CQL Content</th>\n      <td>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\r\n@update: GCW 2025-03-27 -&gt;\r\nUpdated to reflect valueset name change from CMS Sex to Federal Administrative Sex\r\n*/\r\nlibrary SupplementalDataElements version '5.1.000'\r\n\r\nusing QICore version '6.0.0'\r\n\r\ninclude FHIRHelpers version '4.4.000' called FHIRHelpers\r\n\r\ncodesystem &quot;SNOMEDCT&quot;: 'http://snomed.info/sct'\r\n\r\nvalueset &quot;Ethnicity&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837'\r\nvalueset &quot;Federal Administrative Sex&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1021.121'\r\nvalueset &quot;Payer Type&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591'\r\nvalueset &quot;Race&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836'\r\n\r\ncode &quot;Male (finding)&quot;: '248153007' from &quot;SNOMEDCT&quot; display 'Male (finding)'\r\ncode &quot;Female (finding)&quot;: '248152002' from &quot;SNOMEDCT&quot; display 'Female (finding)'\r\n\r\ncontext Patient\r\n\r\ndefine &quot;SDE Ethnicity&quot;:\r\n  Patient.ethnicity E\r\n    return Tuple {\r\n      codes: { E.ombCategory } union E.detailed,\r\n      display: E.text\r\n    }\r\n\r\ndefine &quot;SDE Payer&quot;:\r\n  [Coverage: type in &quot;Payer Type&quot;] Payer\r\n    return {\r\n      code: Payer.type,\r\n      period: Payer.period\r\n    }\r\n\r\ndefine &quot;SDE Race&quot;:\r\n  Patient.race R\r\n    return Tuple {\r\n      codes: R.ombCategory union R.detailed,\r\n      display: R.text\r\n    }\r\n\r\ndefine &quot;SDE Sex&quot;:\r\n  case\r\n    when Patient.sex = '248153007' then &quot;Male (finding)&quot;\r\n    when Patient.sex = '248152002' then &quot;Female (finding)&quot;\r\n    else null\r\n  end</code></pre>\n      </td>\n    </tr>\n    \n    \n    \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "248153007",
          "display": "Male (finding)"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "248152002",
          "display": "Female (finding)"
        }
      } ],
      "url": "https://madie.cms.gov/Library/SupplementalDataElements",
      "identifier": [ {
        "use": "official",
        "system": "https://madie.cms.gov/login",
        "value": "67e5bc4d88f4d211353e632e"
      } ],
      "version": "5.1.000",
      "name": "SupplementalDataElements",
      "title": "SupplementalDataElements",
      "status": "active",
      "experimental": false,
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/library-type",
          "code": "logic-library"
        } ]
      },
      "date": "2025-07-25T21:09:09+00:00",
      "publisher": "ICF",
      "description": "This is the QI-Core 6.0.0 version of the Supplemental Data Elements library containing the CMS SDE definitions for Payer, Race, Ethnicity and Sex",
      "relatedArtifact": [ {
        "type": "depends-on",
        "display": "QICore model information",
        "resource": "http://hl7.org/fhir/Library/QICore-ModelInfo"
      }, {
        "type": "depends-on",
        "display": "Library FHIRHelpers",
        "resource": "https://madie.cms.gov/Library/FHIRHelpers|4.4.000"
      }, {
        "type": "depends-on",
        "display": "Code system SNOMEDCT",
        "resource": "http://snomed.info/sct"
      }, {
        "type": "depends-on",
        "display": "Value set Payer Type",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
      } ],
      "dataRequirement": [ {
        "type": "Patient",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient" ],
        "mustSupport": [ "extension", "url" ]
      }, {
        "type": "Coverage",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage" ],
        "mustSupport": [ "type", "period" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
        } ]
      } ],
      "content": [ {
        "contentType": "text/cql",
        "data": "LyoNCkB1cGRhdGU6IEdDVyAyMDI1LTAzLTI3IC0+DQpVcGRhdGVkIHRvIHJlZmxlY3QgdmFsdWVzZXQgbmFtZSBjaGFuZ2UgZnJvbSBDTVMgU2V4IHRvIEZlZGVyYWwgQWRtaW5pc3RyYXRpdmUgU2V4DQoqLw0KbGlicmFyeSBTdXBwbGVtZW50YWxEYXRhRWxlbWVudHMgdmVyc2lvbiAnNS4xLjAwMCcNCg0KdXNpbmcgUUlDb3JlIHZlcnNpb24gJzYuMC4wJw0KDQppbmNsdWRlIEZISVJIZWxwZXJzIHZlcnNpb24gJzQuNC4wMDAnIGNhbGxlZCBGSElSSGVscGVycw0KDQpjb2Rlc3lzdGVtICJTTk9NRURDVCI6ICdodHRwOi8vc25vbWVkLmluZm8vc2N0Jw0KDQp2YWx1ZXNldCAiRXRobmljaXR5IjogJ2h0dHA6Ly9jdHMubmxtLm5paC5nb3YvZmhpci9WYWx1ZVNldC8yLjE2Ljg0MC4xLjExNDIyMi40LjExLjgzNycNCnZhbHVlc2V0ICJGZWRlcmFsIEFkbWluaXN0cmF0aXZlIFNleCI6ICdodHRwOi8vY3RzLm5sbS5uaWguZ292L2ZoaXIvVmFsdWVTZXQvMi4xNi44NDAuMS4xMTM3NjIuMS40LjEwMjEuMTIxJw0KdmFsdWVzZXQgIlBheWVyIFR5cGUiOiAnaHR0cDovL2N0cy5ubG0ubmloLmdvdi9maGlyL1ZhbHVlU2V0LzIuMTYuODQwLjEuMTE0MjIyLjQuMTEuMzU5MScNCnZhbHVlc2V0ICJSYWNlIjogJ2h0dHA6Ly9jdHMubmxtLm5paC5nb3YvZmhpci9WYWx1ZVNldC8yLjE2Ljg0MC4xLjExNDIyMi40LjExLjgzNicNCg0KY29kZSAiTWFsZSAoZmluZGluZykiOiAnMjQ4MTUzMDA3JyBmcm9tICJTTk9NRURDVCIgZGlzcGxheSAnTWFsZSAoZmluZGluZyknDQpjb2RlICJGZW1hbGUgKGZpbmRpbmcpIjogJzI0ODE1MjAwMicgZnJvbSAiU05PTUVEQ1QiIGRpc3BsYXkgJ0ZlbWFsZSAoZmluZGluZyknDQoNCmNvbnRleHQgUGF0aWVudA0KDQpkZWZpbmUgIlNERSBFdGhuaWNpdHkiOg0KICBQYXRpZW50LmV0aG5pY2l0eSBFDQogICAgcmV0dXJuIFR1cGxlIHsNCiAgICAgIGNvZGVzOiB7IEUub21iQ2F0ZWdvcnkgfSB1bmlvbiBFLmRldGFpbGVkLA0KICAgICAgZGlzcGxheTogRS50ZXh0DQogICAgfQ0KDQpkZWZpbmUgIlNERSBQYXllciI6DQogIFtDb3ZlcmFnZTogdHlwZSBpbiAiUGF5ZXIgVHlwZSJdIFBheWVyDQogICAgcmV0dXJuIHsNCiAgICAgIGNvZGU6IFBheWVyLnR5cGUsDQogICAgICBwZXJpb2Q6IFBheWVyLnBlcmlvZA0KICAgIH0NCg0KZGVmaW5lICJTREUgUmFjZSI6DQogIFBhdGllbnQucmFjZSBSDQogICAgcmV0dXJuIFR1cGxlIHsNCiAgICAgIGNvZGVzOiBSLm9tYkNhdGVnb3J5IHVuaW9uIFIuZGV0YWlsZWQsDQogICAgICBkaXNwbGF5OiBSLnRleHQNCiAgICB9DQoNCmRlZmluZSAiU0RFIFNleCI6DQogIGNhc2UNCiAgICB3aGVuIFBhdGllbnQuc2V4ID0gJzI0ODE1MzAwNycgdGhlbiAiTWFsZSAoZmluZGluZykiDQogICAgd2hlbiBQYXRpZW50LnNleCA9ICcyNDgxNTIwMDInIHRoZW4gIkZlbWFsZSAoZmluZGluZykiDQogICAgZWxzZSBudWxsDQogIGVuZA=="
      }, {
        "contentType": "application/elm+xml",
        "data": "[encoded data, 61716 characters]"
      }, {
        "contentType": "application/elm+json",
        "data": "[encoded data, 121536 characters]"
      } ]
    },
    "request": {
      "method": "POST",
      "url": "Library/SupplementalDataElements"
    }
  }, {
    "fullUrl": "https://madie.cms.gov/Library/Hospice",
    "resource": {
      "resourceType": "Library",
      "id": "Hospice",
      "meta": {
        "profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary", "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library" ]
      },
      "language": "en",
      "text": {
        "status": "extensions",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"col-12\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">Hospice</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">6.18.000</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n<td class=\"content-container\">684c52bf0d70b65363c69ee2</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">National Committee for Quality Assurance</td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\">This library contains a definition used to exclude patients who are in hospice care for any part of the measurement period.</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/library-type#logic-library]</td>\n</tr>\n\n\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, hospitalization, hospitalization.dischargeDisposition, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Encounter\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: type, period\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: type</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Observation\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, value, effective\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n  \n    <span class=\"tab-one\"><em>Code(s)</em>: \n    \n      \n      http://loinc.org#45755-6: 'Hospice care [Minimum Data Set]'\n      \n    \n    </span>\n    <br/>\n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: ServiceRequest\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, authoredOn, authoredOn.value\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Procedure\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code, performed\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Condition\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: code\n    <br/>\n   \n  \n    <em>Code Filter(s)</em>: \n    <br/>\n  \n  \n    <span class=\"tab-one\"><em>Path</em>: code</span>\n    <br/>\n  \n  \n  \n    <span class=\"tab-one\"><em>ValueSet</em>:</span> http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165\n    <br/> \n  \n  \n  \n   \n  </td>\n</tr>\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">CQL Content</th>\n      <td>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">library Hospice version '6.18.000'\n\nusing QICore version '6.0.0'\n\ninclude FHIRHelpers version '4.4.000' called FHIRHelpers\ninclude QICoreCommon version '4.0.000' called QICoreCommon\ninclude Status version '1.15.000' called Status\n\ncodesystem &quot;LOINC&quot;: 'http://loinc.org'\ncodesystem &quot;SNOMEDCT&quot;: 'http://snomed.info/sct'\n\nvalueset &quot;Encounter Inpatient&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'\nvalueset &quot;Hospice Care Ambulatory&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584'\nvalueset &quot;Hospice Encounter&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003'\nvalueset &quot;Hospice Diagnosis&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165'\n\ncode &quot;Discharge to healthcare facility for hospice care (procedure)&quot;: '428371000124100' from &quot;SNOMEDCT&quot; display 'Discharge to healthcare facility for hospice care (procedure)'\ncode &quot;Discharge to home for hospice care (procedure)&quot;: '428361000124107' from &quot;SNOMEDCT&quot; display 'Discharge to home for hospice care (procedure)'\ncode &quot;Hospice care [Minimum Data Set]&quot;: '45755-6' from &quot;LOINC&quot; display 'Hospice care [Minimum Data Set]'\ncode &quot;Yes (qualifier value)&quot;: '373066001' from &quot;SNOMEDCT&quot; display 'Yes (qualifier value)'\n\nparameter &quot;Measurement Period&quot; Interval&lt;DateTime&gt;\n\ncontext Patient\n\ndefine &quot;Has Hospice Services&quot;:\n  exists ((([Encounter: &quot;Encounter Inpatient&quot;]).isEncounterPerformed()) InpatientEncounter\n      where (InpatientEncounter.hospitalization.dischargeDisposition ~ &quot;Discharge to home for hospice care (procedure)&quot;\n          or InpatientEncounter.hospitalization.dischargeDisposition ~ &quot;Discharge to healthcare facility for hospice care (procedure)&quot;\n      )\n        and InpatientEncounter.period ends during day of &quot;Measurement Period&quot;\n  )\n    or exists ((([Encounter: &quot;Hospice Encounter&quot;]).isEncounterPerformed()) HospiceEncounter\n        where HospiceEncounter.period overlaps day of &quot;Measurement Period&quot;\n    )\n    or exists ((([ObservationScreeningAssessment: &quot;Hospice care [Minimum Data Set]&quot;]).isAssessmentPerformed()) HospiceAssessment\n        where HospiceAssessment.value ~ &quot;Yes (qualifier value)&quot;\n          and HospiceAssessment.effective.toInterval() overlaps day of &quot;Measurement Period&quot;\n    )\n    or exists ((([ServiceRequest: &quot;Hospice Care Ambulatory&quot;]).isInterventionOrder()) HospiceOrder\n        where HospiceOrder.authoredOn during day of &quot;Measurement Period&quot;\n    )\n    or exists ((([Procedure: &quot;Hospice Care Ambulatory&quot;]).isInterventionPerformed()) HospicePerformed\n        where HospicePerformed.performed.toInterval() overlaps day of &quot;Measurement Period&quot;\n    )\n    or exists ((([ConditionProblemsHealthConcerns: &quot;Hospice Diagnosis&quot;]\n        union [ConditionEncounterDiagnosis: &quot;Hospice Diagnosis&quot;]).verified()) HospiceCareDiagnosis\n        where HospiceCareDiagnosis.prevalenceInterval() overlaps day of &quot;Measurement Period&quot;\n    )</code></pre>\n      </td>\n    </tr>\n    \n    \n    \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "428371000124100",
          "display": "Discharge to healthcare facility for hospice care (procedure)"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "428361000124107",
          "display": "Discharge to home for hospice care (procedure)"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://loinc.org",
          "code": "45755-6",
          "display": "Hospice care [Minimum Data Set]"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "373066001",
          "display": "Yes (qualifier value)"
        }
      } ],
      "url": "https://madie.cms.gov/Library/Hospice",
      "identifier": [ {
        "use": "official",
        "system": "https://madie.cms.gov/login",
        "value": "684c52bf0d70b65363c69ee2"
      } ],
      "version": "6.18.000",
      "name": "Hospice",
      "title": "Hospice",
      "status": "active",
      "experimental": false,
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/library-type",
          "code": "logic-library"
        } ]
      },
      "date": "2025-07-25T21:09:09+00:00",
      "publisher": "National Committee for Quality Assurance",
      "description": "This library contains a definition used to exclude patients who are in hospice care for any part of the measurement period.",
      "relatedArtifact": [ {
        "type": "depends-on",
        "display": "QICore model information",
        "resource": "http://hl7.org/fhir/Library/QICore-ModelInfo"
      }, {
        "type": "depends-on",
        "display": "Library Status",
        "resource": "https://madie.cms.gov/Library/Status|1.15.000"
      }, {
        "type": "depends-on",
        "display": "Library FHIRHelpers",
        "resource": "https://madie.cms.gov/Library/FHIRHelpers|4.4.000"
      }, {
        "type": "depends-on",
        "display": "Library QICoreCommon",
        "resource": "https://madie.cms.gov/Library/QICoreCommon|4.0.000"
      }, {
        "type": "depends-on",
        "display": "Code system SNOMEDCT",
        "resource": "http://snomed.info/sct"
      }, {
        "type": "depends-on",
        "display": "Code system LOINC",
        "resource": "http://loinc.org"
      }, {
        "type": "depends-on",
        "display": "Value set Encounter Inpatient",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
      }, {
        "type": "depends-on",
        "display": "Value set Hospice Encounter",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003"
      }, {
        "type": "depends-on",
        "display": "Value set Hospice Care Ambulatory",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584"
      }, {
        "type": "depends-on",
        "display": "Value set Hospice Diagnosis",
        "resource": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"
      } ],
      "dataRequirement": [ {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type", "hospitalization", "hospitalization.dischargeDisposition", "period" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
        } ]
      }, {
        "type": "Encounter",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter" ],
        "mustSupport": [ "type", "period" ],
        "codeFilter": [ {
          "path": "type",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003"
        } ]
      }, {
        "type": "Observation",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-observation-screening-assessment" ],
        "mustSupport": [ "code", "value", "effective" ],
        "codeFilter": [ {
          "path": "code",
          "code": [ {
            "system": "http://loinc.org",
            "code": "45755-6",
            "display": "Hospice care [Minimum Data Set]"
          } ]
        } ]
      }, {
        "type": "ServiceRequest",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest" ],
        "mustSupport": [ "code", "authoredOn", "authoredOn.value" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584"
        } ]
      }, {
        "type": "Procedure",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure" ],
        "mustSupport": [ "code", "performed" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584"
        } ]
      }, {
        "type": "Condition",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-problems-health-concerns" ],
        "mustSupport": [ "code" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"
        } ]
      }, {
        "type": "Condition",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition-encounter-diagnosis" ],
        "mustSupport": [ "code" ],
        "codeFilter": [ {
          "path": "code",
          "valueSet": "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165"
        } ]
      } ],
      "content": [ {
        "contentType": "text/cql",
        "data": "bGlicmFyeSBIb3NwaWNlIHZlcnNpb24gJzYuMTguMDAwJwoKdXNpbmcgUUlDb3JlIHZlcnNpb24gJzYuMC4wJwoKaW5jbHVkZSBGSElSSGVscGVycyB2ZXJzaW9uICc0LjQuMDAwJyBjYWxsZWQgRkhJUkhlbHBlcnMKaW5jbHVkZSBRSUNvcmVDb21tb24gdmVyc2lvbiAnNC4wLjAwMCcgY2FsbGVkIFFJQ29yZUNvbW1vbgppbmNsdWRlIFN0YXR1cyB2ZXJzaW9uICcxLjE1LjAwMCcgY2FsbGVkIFN0YXR1cwoKY29kZXN5c3RlbSAiTE9JTkMiOiAnaHR0cDovL2xvaW5jLm9yZycKY29kZXN5c3RlbSAiU05PTUVEQ1QiOiAnaHR0cDovL3Nub21lZC5pbmZvL3NjdCcKCnZhbHVlc2V0ICJFbmNvdW50ZXIgSW5wYXRpZW50IjogJ2h0dHA6Ly9jdHMubmxtLm5paC5nb3YvZmhpci9WYWx1ZVNldC8yLjE2Ljg0MC4xLjExMzg4My4zLjY2Ni41LjMwNycKdmFsdWVzZXQgIkhvc3BpY2UgQ2FyZSBBbWJ1bGF0b3J5IjogJ2h0dHA6Ly9jdHMubmxtLm5paC5nb3YvZmhpci9WYWx1ZVNldC8yLjE2Ljg0MC4xLjExMzg4My4zLjUyNi4zLjE1ODQnCnZhbHVlc2V0ICJIb3NwaWNlIEVuY291bnRlciI6ICdodHRwOi8vY3RzLm5sbS5uaWguZ292L2ZoaXIvVmFsdWVTZXQvMi4xNi44NDAuMS4xMTM4ODMuMy40NjQuMTAwMy4xMDAzJwp2YWx1ZXNldCAiSG9zcGljZSBEaWFnbm9zaXMiOiAnaHR0cDovL2N0cy5ubG0ubmloLmdvdi9maGlyL1ZhbHVlU2V0LzIuMTYuODQwLjEuMTEzODgzLjMuNDY0LjEwMDMuMTE2NScKCmNvZGUgIkRpc2NoYXJnZSB0byBoZWFsdGhjYXJlIGZhY2lsaXR5IGZvciBob3NwaWNlIGNhcmUgKHByb2NlZHVyZSkiOiAnNDI4MzcxMDAwMTI0MTAwJyBmcm9tICJTTk9NRURDVCIgZGlzcGxheSAnRGlzY2hhcmdlIHRvIGhlYWx0aGNhcmUgZmFjaWxpdHkgZm9yIGhvc3BpY2UgY2FyZSAocHJvY2VkdXJlKScKY29kZSAiRGlzY2hhcmdlIHRvIGhvbWUgZm9yIGhvc3BpY2UgY2FyZSAocHJvY2VkdXJlKSI6ICc0MjgzNjEwMDAxMjQxMDcnIGZyb20gIlNOT01FRENUIiBkaXNwbGF5ICdEaXNjaGFyZ2UgdG8gaG9tZSBmb3IgaG9zcGljZSBjYXJlIChwcm9jZWR1cmUpJwpjb2RlICJIb3NwaWNlIGNhcmUgW01pbmltdW0gRGF0YSBTZXRdIjogJzQ1NzU1LTYnIGZyb20gIkxPSU5DIiBkaXNwbGF5ICdIb3NwaWNlIGNhcmUgW01pbmltdW0gRGF0YSBTZXRdJwpjb2RlICJZZXMgKHF1YWxpZmllciB2YWx1ZSkiOiAnMzczMDY2MDAxJyBmcm9tICJTTk9NRURDVCIgZGlzcGxheSAnWWVzIChxdWFsaWZpZXIgdmFsdWUpJwoKcGFyYW1ldGVyICJNZWFzdXJlbWVudCBQZXJpb2QiIEludGVydmFsPERhdGVUaW1lPgoKY29udGV4dCBQYXRpZW50CgpkZWZpbmUgIkhhcyBIb3NwaWNlIFNlcnZpY2VzIjoKICBleGlzdHMgKCgoW0VuY291bnRlcjogIkVuY291bnRlciBJbnBhdGllbnQiXSkuaXNFbmNvdW50ZXJQZXJmb3JtZWQoKSkgSW5wYXRpZW50RW5jb3VudGVyCiAgICAgIHdoZXJlIChJbnBhdGllbnRFbmNvdW50ZXIuaG9zcGl0YWxpemF0aW9uLmRpc2NoYXJnZURpc3Bvc2l0aW9uIH4gIkRpc2NoYXJnZSB0byBob21lIGZvciBob3NwaWNlIGNhcmUgKHByb2NlZHVyZSkiCiAgICAgICAgICBvciBJbnBhdGllbnRFbmNvdW50ZXIuaG9zcGl0YWxpemF0aW9uLmRpc2NoYXJnZURpc3Bvc2l0aW9uIH4gIkRpc2NoYXJnZSB0byBoZWFsdGhjYXJlIGZhY2lsaXR5IGZvciBob3NwaWNlIGNhcmUgKHByb2NlZHVyZSkiCiAgICAgICkKICAgICAgICBhbmQgSW5wYXRpZW50RW5jb3VudGVyLnBlcmlvZCBlbmRzIGR1cmluZyBkYXkgb2YgIk1lYXN1cmVtZW50IFBlcmlvZCIKICApCiAgICBvciBleGlzdHMgKCgoW0VuY291bnRlcjogIkhvc3BpY2UgRW5jb3VudGVyIl0pLmlzRW5jb3VudGVyUGVyZm9ybWVkKCkpIEhvc3BpY2VFbmNvdW50ZXIKICAgICAgICB3aGVyZSBIb3NwaWNlRW5jb3VudGVyLnBlcmlvZCBvdmVybGFwcyBkYXkgb2YgIk1lYXN1cmVtZW50IFBlcmlvZCIKICAgICkKICAgIG9yIGV4aXN0cyAoKChbT2JzZXJ2YXRpb25TY3JlZW5pbmdBc3Nlc3NtZW50OiAiSG9zcGljZSBjYXJlIFtNaW5pbXVtIERhdGEgU2V0XSJdKS5pc0Fzc2Vzc21lbnRQZXJmb3JtZWQoKSkgSG9zcGljZUFzc2Vzc21lbnQKICAgICAgICB3aGVyZSBIb3NwaWNlQXNzZXNzbWVudC52YWx1ZSB+ICJZZXMgKHF1YWxpZmllciB2YWx1ZSkiCiAgICAgICAgICBhbmQgSG9zcGljZUFzc2Vzc21lbnQuZWZmZWN0aXZlLnRvSW50ZXJ2YWwoKSBvdmVybGFwcyBkYXkgb2YgIk1lYXN1cmVtZW50IFBlcmlvZCIKICAgICkKICAgIG9yIGV4aXN0cyAoKChbU2VydmljZVJlcXVlc3Q6ICJIb3NwaWNlIENhcmUgQW1idWxhdG9yeSJdKS5pc0ludGVydmVudGlvbk9yZGVyKCkpIEhvc3BpY2VPcmRlcgogICAgICAgIHdoZXJlIEhvc3BpY2VPcmRlci5hdXRob3JlZE9uIGR1cmluZyBkYXkgb2YgIk1lYXN1cmVtZW50IFBlcmlvZCIKICAgICkKICAgIG9yIGV4aXN0cyAoKChbUHJvY2VkdXJlOiAiSG9zcGljZSBDYXJlIEFtYnVsYXRvcnkiXSkuaXNJbnRlcnZlbnRpb25QZXJmb3JtZWQoKSkgSG9zcGljZVBlcmZvcm1lZAogICAgICAgIHdoZXJlIEhvc3BpY2VQZXJmb3JtZWQucGVyZm9ybWVkLnRvSW50ZXJ2YWwoKSBvdmVybGFwcyBkYXkgb2YgIk1lYXN1cmVtZW50IFBlcmlvZCIKICAgICkKICAgIG9yIGV4aXN0cyAoKChbQ29uZGl0aW9uUHJvYmxlbXNIZWFsdGhDb25jZXJuczogIkhvc3BpY2UgRGlhZ25vc2lzIl0KICAgICAgICB1bmlvbiBbQ29uZGl0aW9uRW5jb3VudGVyRGlhZ25vc2lzOiAiSG9zcGljZSBEaWFnbm9zaXMiXSkudmVyaWZpZWQoKSkgSG9zcGljZUNhcmVEaWFnbm9zaXMKICAgICAgICB3aGVyZSBIb3NwaWNlQ2FyZURpYWdub3Npcy5wcmV2YWxlbmNlSW50ZXJ2YWwoKSBvdmVybGFwcyBkYXkgb2YgIk1lYXN1cmVtZW50IFBlcmlvZCIKICAgICk="
      }, {
        "contentType": "application/elm+xml",
        "data": "[encoded data, 115132 characters]"
      }, {
        "contentType": "application/elm+json",
        "data": "[encoded data, 232668 characters]"
      } ]
    },
    "request": {
      "method": "POST",
      "url": "Library/Hospice"
    }
  }, {
    "fullUrl": "https://madie.cms.gov/Library/Status",
    "resource": {
      "resourceType": "Library",
      "id": "Status",
      "meta": {
        "profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary", "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library" ]
      },
      "language": "en",
      "text": {
        "status": "extensions",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"col-12\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">Status</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">1.15.000</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n<td class=\"content-container\">684c4d910d70b65363c69edf</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">National Committee for Quality Assurance</td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\">This library contains functions used to constrain FHIR resource elements for measures authored by NCQA, based on QICore 6.0.0 resources including IG and authoring patterns. The functions may appear similar to some QICoreCommon functions but differ in that they have constraints that are relevant for measures authored by NCQA.</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/library-type#logic-library]</td>\n</tr>\n\n\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">CQL Content</th>\n      <td>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">library Status version '1.15.000'\n\nusing QICore version '6.0.0'\n\ninclude FHIRHelpers version '4.4.000' called FHIRHelpers\n\ncodesystem &quot;ObservationCategoryCodes&quot;: 'http://terminology.hl7.org/CodeSystem/observation-category'\ncodesystem &quot;ConditionVerificationStatusCodes&quot;: 'http://terminology.hl7.org/CodeSystem/condition-ver-status'\n\ncode &quot;exam&quot;: 'exam' from &quot;ObservationCategoryCodes&quot; display 'exam'\ncode &quot;imaging&quot;: 'imaging' from &quot;ObservationCategoryCodes&quot; display 'imaging'\ncode &quot;confirmed&quot;: 'confirmed' from ConditionVerificationStatusCodes display 'confirmed'\ncode &quot;unconfirmed&quot;: 'unconfirmed' from ConditionVerificationStatusCodes display 'unconfirmed'\ncode &quot;provisional&quot;: 'provisional' from ConditionVerificationStatusCodes display 'provisional'\ncode &quot;differential&quot;: 'differential' from ConditionVerificationStatusCodes display 'differential'\n\ncontext Patient\n\n//This library contains functions used to constrain FHIR resource elements for measures authored by NCQA, based on QICore 6.0.0 resources including IG and authoring patterns. The functions may appear similar to some QICoreCommon functions but differ in that they have constraints that are relevant for measures authored by NCQA.\n\n//Condition\n//Returns conditions in the given list that either have no verification status or have a verification status of confirmed, unconfirmed, provisional, or differential\ndefine fluent function verified(conditions List&lt;Choice&lt;ConditionProblemsHealthConcerns, ConditionEncounterDiagnosis&gt;&gt;):\n  conditions C\n    where C.verificationStatus is not null implies\n      (C.verificationStatus ~ &quot;confirmed&quot;\n        or C.verificationStatus ~ &quot;unconfirmed&quot;\n        or C.verificationStatus ~ &quot;provisional&quot;\n        or C.verificationStatus ~ &quot;differential&quot;\n      )\n\n//Assessment, Performed\ndefine fluent function isAssessmentPerformed(Obs List&lt;ObservationScreeningAssessment&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n\n//Device, Order - Personal Use Devices\ndefine fluent function isDeviceOrderPersonalUseDevices(DeviceRequest List&lt;DeviceRequest&gt;):\n  DeviceRequest D\n    where D.status in { 'active', 'completed' }\n      and D.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}\n\n//Diagnostic Study, Order\ndefine fluent function isDiagnosticStudyOrder(ServiceRequest List&lt;ServiceRequest&gt;):\n  ServiceRequest S\n    where S.status in { 'active', 'completed' }\n      and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}\n      \n//Intervention, Order\ndefine fluent function isInterventionOrder(ServiceRequest List&lt;ServiceRequest&gt;):\n  ServiceRequest S\n    where S.status in { 'active', 'completed' }\n      and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}    \n\n//Laboratory Test, Order\ndefine fluent function isLaboratoryTestOrder(ServiceRequest List&lt;ServiceRequest&gt;):\n  ServiceRequest S\n    where S.status in { 'active', 'completed' }\n      and S.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}       \n\n//Diagnostic Study, Performed\ndefine fluent function isDiagnosticStudyPerformed(Obs List&lt;ObservationClinicalResult&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n        and exists ( O.category ObservationCategory\n        where ( ObservationCategory ) ~ &quot;imaging&quot;\n    )\n    \n//Encounter, Performed\n//General usage unless required otherwise by measure intent (e.g., follow-up encounters)\ndefine fluent function isEncounterPerformed(Enc List&lt;Encounter&gt;):\n  Enc E\n    where E.status = 'finished'\n\n//Immunization, Administered\ndefine fluent function isImmunizationAdministered(Immunization List&lt;Immunization&gt;):\n  Immunization I\n    where I.status ~ 'completed'\n\n//Intervention, Performed\ndefine fluent function isInterventionPerformed(Proc List&lt;Procedure&gt;):\n  Proc P\n    where P.status ~ 'completed'\n\n//Procedure, Performed\ndefine fluent function isProcedurePerformed(Proc List&lt;Procedure&gt;):\n  Proc P\n    where P.status ~ 'completed'\n\n//Laboratory Test, Performed\ndefine fluent function isLaboratoryTestPerformed(Obs List&lt;LaboratoryResultObservation&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n\n//Medication, Active\ndefine fluent function isMedicationActive(MedicationRequest List&lt;MedicationRequest&gt;):\n  MedicationRequest M\n    where M.status = 'active'\n      and M.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}\n\n//Medication, Dispensed\ndefine fluent function isMedicationDispensed(Med List&lt;MedicationDispense&gt;):\n  Med M\n    where M.status in { 'completed', 'in-progress', 'on-hold' }\n\n//Medication, Order\ndefine fluent function isMedicationOrder(MedicationRequest List&lt;MedicationRequest&gt;):\n  MedicationRequest M\n    where M.status in { 'active', 'completed' }\n    and M.intent in {'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'}\n\n//Physical Exam, Performed\ndefine fluent function isPhysicalExamPerformed(Obs List&lt;ObservationClinicalResult&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n      and exists ( O.category ObservationCategory\n          where ( ObservationCategory ) ~ &quot;exam&quot;\n      )\n\n//Observation Vital Signs\ndefine fluent function isObservationBP(Obs List&lt;USCoreBloodPressureProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n      \ndefine fluent function isObservationBodyHeight(Obs List&lt;USCoreBodyHeightProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n      \ndefine fluent function isObservationBodyWeight(Obs List&lt;USCoreBodyWeightProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n      \ndefine fluent function isObservationBMI(Obs List&lt;USCoreBMIProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' }\n \n//Observation Pediatric BMI\ndefine fluent function isObservationPediatricBMI(Obs List&lt;USCorePediatricBMIforAgeObservationProfile&gt;):\n  Obs O\n    where O.status in { 'final', 'amended', 'corrected' } \n   \n//Observation Smoking Status\ndefine fluent function isObservationSmokingStatus(Obs List&lt;USCoreSmokingStatusProfile&gt;):\n  Obs O\n    where O.status = 'final' \n\n//Symptom\ndefine fluent function isSymptom(Obs List&lt;SimpleObservation&gt;):\n  Obs O\n    where O.status in { 'preliminary', 'final', 'amended', 'corrected' }</code></pre>\n      </td>\n    </tr>\n    \n    \n    \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "exam",
          "display": "exam"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "imaging",
          "display": "imaging"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "confirmed",
          "display": "confirmed"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "unconfirmed",
          "display": "unconfirmed"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "provisional",
          "display": "provisional"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "differential",
          "display": "differential"
        }
      } ],
      "url": "https://madie.cms.gov/Library/Status",
      "identifier": [ {
        "use": "official",
        "system": "https://madie.cms.gov/login",
        "value": "684c4d910d70b65363c69edf"
      } ],
      "version": "1.15.000",
      "name": "Status",
      "title": "Status",
      "status": "active",
      "experimental": false,
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/library-type",
          "code": "logic-library"
        } ]
      },
      "date": "2025-07-25T21:09:09+00:00",
      "publisher": "National Committee for Quality Assurance",
      "description": "This library contains functions used to constrain FHIR resource elements for measures authored by NCQA, based on QICore 6.0.0 resources including IG and authoring patterns. The functions may appear similar to some QICoreCommon functions but differ in that they have constraints that are relevant for measures authored by NCQA.",
      "relatedArtifact": [ {
        "type": "depends-on",
        "display": "QICore model information",
        "resource": "http://hl7.org/fhir/Library/QICore-ModelInfo"
      }, {
        "type": "depends-on",
        "display": "Library FHIRHelpers",
        "resource": "https://madie.cms.gov/Library/FHIRHelpers|4.4.000"
      }, {
        "type": "depends-on",
        "display": "Code system ObservationCategoryCodes",
        "resource": "http://terminology.hl7.org/CodeSystem/observation-category"
      }, {
        "type": "depends-on",
        "display": "Code system ConditionVerificationStatusCodes",
        "resource": "http://terminology.hl7.org/CodeSystem/condition-ver-status"
      } ],
      "content": [ {
        "contentType": "text/cql",
        "data": "[encoded data, 8456 characters]"
      }, {
        "contentType": "application/elm+xml",
        "data": "[encoded data, 208832 characters]"
      }, {
        "contentType": "application/elm+json",
        "data": "[encoded data, 391068 characters]"
      } ]
    },
    "request": {
      "method": "POST",
      "url": "Library/Status"
    }
  }, {
    "fullUrl": "https://madie.cms.gov/Library/QICoreCommon",
    "resource": {
      "resourceType": "Library",
      "id": "QICoreCommon",
      "meta": {
        "profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary", "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library" ]
      },
      "language": "en",
      "text": {
        "status": "extensions",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"col-12\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">QICoreCommon</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">4.0.000</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n<td class=\"content-container\">67cb33c19e9ab93ec36dad45</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">ICF</td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\">Common terminologies and functions used in QI-Core-based CQL artifacts</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/library-type#logic-library]</td>\n</tr>\n\n\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Resource\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/StructureDefinition/Resource\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: id, id.value\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: Patient\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: birthDate, birthDate.value\n    <br/>\n   \n   \n  </td>\n</tr>\n\n<tr>\n  <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n  <td class=\"content-container\">\n    <em>Type</em>: DeviceRequest\n    <br/>\n  \n    <em>Profile(s)</em>: \n  \n    http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-devicerequest\n    <br/>        \n  \n   \n   \n    <em>Must Support Elements</em>: modifierExtension\n    <br/>\n   \n   \n  </td>\n</tr>\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">CQL Content</th>\n      <td>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">library QICoreCommon version '4.0.000'\n\nusing QICore version '6.0.0'\n\ninclude FHIRHelpers version '4.4.000' called FHIRHelpers\n\ncodesystem &quot;LOINC&quot;: 'http://loinc.org'\ncodesystem &quot;SNOMEDCT&quot;: 'http://snomed.info/sct'\ncodesystem &quot;ActCode&quot;: 'http://terminology.hl7.org/CodeSystem/v3-ActCode'\ncodesystem &quot;RoleCode&quot;: 'http://terminology.hl7.org/CodeSystem/v3-RoleCode'\ncodesystem &quot;Diagnosis Role&quot;: 'http://terminology.hl7.org/CodeSystem/diagnosis-role'\ncodesystem &quot;RequestIntent&quot;: 'http://hl7.org/fhir/request-intent'\ncodesystem &quot;MedicationRequestCategory&quot;: 'http://terminology.hl7.org/CodeSystem/medicationrequest-category'\ncodesystem &quot;ConditionClinicalStatusCodes&quot;: 'http://terminology.hl7.org/CodeSystem/condition-clinical'\ncodesystem &quot;ConditionVerificationStatusCodes&quot;: 'http://terminology.hl7.org/CodeSystem/condition-ver-status'\ncodesystem &quot;AllergyIntoleranceClinicalStatusCodes&quot;: 'http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical'\ncodesystem &quot;AllergyIntoleranceVerificationStatusCodes&quot;: 'http://terminology.hl7.org/CodeSystem/allergyintolerance-verification'\ncodesystem &quot;ObservationCategoryCodes&quot;: 'http://terminology.hl7.org/CodeSystem/observation-category'\ncodesystem &quot;USCoreObservationCategoryExtensionCodes&quot;: 'http://hl7.org/fhir/us/core/CodeSystem/us-core-observation-category'  \ncodesystem &quot;ConditionCategory&quot;: 'http://terminology.hl7.org/CodeSystem/condition-category'\ncodesystem &quot;USCoreConditionCategoryExtensionCodes&quot;: 'http://hl7.org/fhir/us/core/CodeSystem/condition-category'\ncodesystem &quot;TaskCodeSystem&quot;: 'http://hl7.org/fhir/CodeSystem/task-code' \n\n\n\ncode &quot;Birthdate&quot;: '21112-8' from &quot;LOINC&quot; display 'Birth date'\ncode &quot;Dead&quot;: '419099009' from &quot;SNOMEDCT&quot; display 'Dead'\ncode &quot;ER&quot;: 'ER' from &quot;RoleCode&quot; display 'Emergency room'\ncode &quot;ICU&quot;: 'ICU' from &quot;RoleCode&quot; display 'Intensive care unit'\ncode &quot;Billing&quot;: 'billing' from &quot;Diagnosis Role&quot; display 'Billing'\n\n//Task codes\ncode &quot;Fulfill&quot;: 'fulfill' from &quot;TaskCodeSystem&quot; display 'Fulfill'\n\n// Encounter Class Codes\ncode &quot;ambulatory&quot;: 'AMB' from ActCode display 'ambulatory'\ncode &quot;emergency&quot;: 'EMER' from ActCode display 'emergency'\ncode &quot;field&quot;: 'FLD' from ActCode display 'field'\ncode &quot;home health&quot;: 'HH' from ActCode display 'home health'\ncode &quot;inpatient encounter&quot;: 'IMP' from ActCode display 'inpatient encounter'\ncode &quot;inpatient acute&quot;: 'ACUTE' from ActCode display 'inpatient acute'\ncode &quot;inpatient non-acute&quot;: 'NONAC' from ActCode display 'inpatient non-acute'\ncode &quot;observation encounter&quot;: 'OBSENC' from ActCode display 'observation encounter'\ncode &quot;pre-admission&quot;: 'PRENC' from ActCode display 'pre-admission'\ncode &quot;short stay&quot;: 'SS' from ActCode display 'short stay'\ncode &quot;virtual&quot;: 'VR' from ActCode display 'Virtual'\n\n// Condition Category Codes\ncode &quot;problem-list-item&quot;: 'problem-list-item' from &quot;ConditionCategory&quot; display 'Problem List Item'\ncode &quot;encounter-diagnosis&quot;: 'encounter-diagnosis' from &quot;ConditionCategory&quot; display 'Encounter Diagnosis'\ncode &quot;health-concern&quot;: 'health-concern' from &quot;USCoreConditionCategoryExtensionCodes&quot; display 'Health Concern'\n\n// Condition Clinical Status Codes - Consider value sets for these\ncode &quot;active&quot;: 'active' from &quot;ConditionClinicalStatusCodes&quot; display 'Active'\ncode &quot;recurrence&quot;: 'recurrence' from &quot;ConditionClinicalStatusCodes&quot; display 'Recurrence'\ncode &quot;relapse&quot;: 'relapse' from &quot;ConditionClinicalStatusCodes&quot; display 'Relapse'\ncode &quot;inactive&quot;: 'inactive' from &quot;ConditionClinicalStatusCodes&quot; display 'Inactive'\ncode &quot;remission&quot;: 'remission' from &quot;ConditionClinicalStatusCodes&quot; display 'Remission'\ncode &quot;resolved&quot;: 'resolved' from &quot;ConditionClinicalStatusCodes&quot; display 'Resolved'\n\n// Condition Verification Status Codes - Consider value sets for these\ncode &quot;unconfirmed&quot;: 'unconfirmed' from ConditionVerificationStatusCodes display 'Unconfirmed'\ncode &quot;provisional&quot;: 'provisional' from ConditionVerificationStatusCodes display 'Provisional'\ncode &quot;differential&quot;: 'differential' from ConditionVerificationStatusCodes display 'Differential'\ncode &quot;confirmed&quot;: 'confirmed' from ConditionVerificationStatusCodes display 'Confirmed'\ncode &quot;refuted&quot;: 'refuted' from ConditionVerificationStatusCodes display 'Refuted'\ncode &quot;entered-in-error&quot;: 'entered-in-error' from ConditionVerificationStatusCodes display 'Entered in Error'\n\ncode &quot;allergy-active&quot;: 'active' from &quot;AllergyIntoleranceClinicalStatusCodes&quot; display 'Active'\ncode &quot;allergy-inactive&quot;: 'inactive' from &quot;AllergyIntoleranceClinicalStatusCodes&quot; display 'Inactive'\ncode &quot;allergy-resolved&quot;: 'resolved' from &quot;AllergyIntoleranceClinicalStatusCodes&quot; display 'Resolved'\n\n// Allergy/Intolerance Verification Status Codes - Consider value sets for these\ncode &quot;allergy-unconfirmed&quot;: 'unconfirmed' from AllergyIntoleranceVerificationStatusCodes display 'Unconfirmed'\ncode &quot;allergy-confirmed&quot;: 'confirmed' from AllergyIntoleranceVerificationStatusCodes display 'Confirmed'\ncode &quot;allergy-refuted&quot;: 'refuted' from AllergyIntoleranceVerificationStatusCodes display 'Refuted'\n\n// MedicationRequest Category Codes\ncode &quot;Inpatient&quot;: 'inpatient' from &quot;MedicationRequestCategory&quot; display 'Inpatient'\ncode &quot;Outpatient&quot;: 'outpatient' from &quot;MedicationRequestCategory&quot; display 'Outpatient'\ncode &quot;Community&quot;: 'community' from &quot;MedicationRequestCategory&quot; display 'Community'\ncode &quot;Discharge&quot;: 'discharge' from &quot;MedicationRequestCategory&quot; display 'Discharge'\n\n// Diagnosis Role Codes\ncode &quot;AD&quot;: 'AD' from &quot;Diagnosis Role&quot; display 'Admission diagnosis'\ncode &quot;DD&quot;: 'DD' from &quot;Diagnosis Role&quot; display 'Discharge diagnosis'\ncode &quot;CC&quot;: 'CC' from &quot;Diagnosis Role&quot; display 'Chief complaint'\ncode &quot;CM&quot;: 'CM' from &quot;Diagnosis Role&quot; display 'Comorbidity diagnosis'\ncode &quot;pre-op&quot;: 'pre-op' from &quot;Diagnosis Role&quot; display 'pre-op diagnosis'\ncode &quot;post-op&quot;: 'post-op' from &quot;Diagnosis Role&quot; display 'post-op diagnosis'\ncode &quot;billing&quot;: 'billing' from &quot;Diagnosis Role&quot; display 'Billing'\n\n// Observation Category Codes\ncode &quot;social-history&quot;: 'social-history' from &quot;ObservationCategoryCodes&quot; display 'Social History'\ncode &quot;vital-signs&quot;: 'vital-signs' from &quot;ObservationCategoryCodes&quot; display 'Vital Signs'\ncode &quot;imaging&quot;: 'imaging' from &quot;ObservationCategoryCodes&quot; display 'Imaging'\ncode &quot;laboratory&quot;: 'laboratory' from &quot;ObservationCategoryCodes&quot; display 'Laboratory'\ncode &quot;procedure&quot;: 'procedure' from &quot;ObservationCategoryCodes&quot; display 'Procedure'\ncode &quot;survey&quot;: 'survey' from &quot;ObservationCategoryCodes&quot; display 'Survey'\ncode &quot;exam&quot;: 'exam' from &quot;ObservationCategoryCodes&quot; display 'Exam'\ncode &quot;therapy&quot;: 'therapy' from &quot;ObservationCategoryCodes&quot; display 'Therapy'\ncode &quot;activity&quot;: 'activity' from &quot;ObservationCategoryCodes&quot; display 'Activity'\n\ncontext Patient\n\n/* Candidates for FHIRCommon */\n\n/*\n@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse\n*/\ndefine fluent function isActive(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\n  condition.clinicalStatus ~ &quot;active&quot;\n    or condition.clinicalStatus ~ &quot;recurrence&quot;\n    or condition.clinicalStatus ~ &quot;relapse&quot;\n\n/*\n@description: Returns true if the given condition has the given category\n*/\ndefine fluent function hasCategory(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;, category Code):\n  exists (condition.category C\n    where C ~ category\n  )\n\n/*\n@description: Returns true if the given condition is a problem list item.\n*/\ndefine fluent function isProblemListItem(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\n  exists (condition.category C\n    where C ~ &quot;problem-list-item&quot;\n  )\n\n/*\n@description: Returns true if the given condition is an encounter diagnosis\n*/\ndefine fluent function isEncounterDiagnosis(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\n  exists (condition.category C\n    where C ~ &quot;encounter-diagnosis&quot;\n  )\n\n/*\n@description: Returns true if the given condition is a health concern\n*/\ndefine fluent function isHealthConcern(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\n  exists (condition.category C\n    where C ~ &quot;health-concern&quot;\n  )\n\n/*\n@description: Returns true if the given observation has the given category\n*/\ndefine fluent function hasCategory(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;, \ncategory Code):\n  exists (observation.category C\n    where C ~ category\n  )\n\n/*\n@description: Returns true if the given observation is a social history observation\n*/\ndefine fluent function isSocialHistory(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;social-history&quot;\n  )\n\n/*\n@description: Returns true if the given observation is a vital sign\n*/\ndefine fluent function isVitalSign(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;vital-signs&quot;\n  )\n\n/*\n@description: Returns true if the given observation is an imaging observation\n*/\ndefine fluent function isImaging(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;imaging&quot;\n  )\n\n/*\n@description: Returns true if the given observation is a laboratory observation\n*/\ndefine fluent function isLaboratory(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;laboratory&quot;\n  )\n\n/*\n@description: Returns true if the given observation is a procedure observation\n*/\ndefine fluent function isProcedure(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;procedure&quot;\n  )\n\n/*\n@description: Returns true if the given observation is a survey observation\n*/\ndefine fluent function isSurvey(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;survey&quot;\n  )\n\n/*\n@description: Returns true if the given observation is an exam observation\n*/\ndefine fluent function isExam(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;exam&quot;\n  )\n\n/*\n@description: Returns true if the given observation is a therapy observation\n*/\ndefine fluent function isTherapy(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;therapy&quot;\n  )\n\n/*\n@description: Returns true if the given observation is an activity observation\n*/\ndefine fluent function isActivity(observation Choice&lt;&quot;SimpleObservation&quot;, \n&quot;ObservationCancelled&quot;,\n&quot;NonPatientObservation&quot;,\n&quot;LaboratoryResultObservation&quot;,\n&quot;ObservationClinicalResult&quot;,\n&quot;ObservationScreeningAssessment&quot;&gt;):\n  exists (observation.category C\n    where C ~ &quot;activity&quot;\n  )\n\n/*\n@description: Returns true if the given MedicationRequest has a category of Community\n*/\ndefine fluent function isCommunity(medicationRequest Choice&lt;MedicationRequest, MedicationNotRequested&gt;):\n  exists (medicationRequest.category C\n    where C ~ Community\n  )\n\n/*\n@description: Returns true if the given MedicationRequest has a category of Discharge\n*/\ndefine fluent function isDischarge(medicationRequest Choice&lt;MedicationRequest, MedicationNotRequested&gt;):\n  exists (medicationRequest.category C\n    where C ~ Discharge\n  )\n\n/*\n@description: Returns true if the given DeviceRequest is a negation (i.e. do not perform this order)\n@deprecated: This function is no longer required in QICore 6.0.0 and above\n*/\ndefine fluent function doNotPerform(deviceRequest DeviceRequest):\n  // KNOWN ISSUE: The translator reports this as an error but the execution still works, this is under investigation\n  deviceRequest.doNotPerform\n\n/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in QICore, allowing this function to be used across any resource.\nThe input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.\nThe intent of this function is to provide a clear and concise mechanism to treat single\nelements that have multiple possible representations as intervals so that logic doesn't have to account\nfor the variability. More complex calculations (such as medication request period or dispense period\ncalculation) need specific guidance and consideration. That guidance may make use of this function, but\nthe focus of this function is on single element calculations where the semantics are unambiguous.\nIf the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.\nIf the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,\nand the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.\nIf the input is a DateTime Interval, the result is the input.\nIf the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result\nis a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending\nimmediately before one year later than the date the patient turned the age given as the end of the quantity interval.\nIf 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\n@deprecated: This function is deprecated. Use the fluent function `toInterval()` instead\n*/\ndefine function ToInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):\n  case\n\t  when choice is DateTime then\n    \tInterval[choice as DateTime, choice as DateTime]\n\t\twhen choice is Interval&lt;DateTime&gt; then\n  \t\tchoice as Interval&lt;DateTime&gt;\n\t\twhen choice is Quantity then\n\t\t  Interval[Patient.birthDate + (choice as Quantity),\n\t\t\t  Patient.birthDate + (choice as Quantity) + 1 year)\n\t\twhen choice is Interval&lt;Quantity&gt; then\n\t\t  Interval[Patient.birthDate + (choice.low as Quantity),\n\t\t\t  Patient.birthDate + (choice.high as Quantity) + 1 year)\n\t\twhen choice is Timing then\n      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;\n\t\telse\n\t\t\tnull as Interval&lt;DateTime&gt;\n\tend\n\n/*\n@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval\n@comment: Normalizes a choice type of DateTime, Quanitty, Interval&lt;DateTime&gt;, or Interval&lt;Quantity&gt; types\nto an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible\nrepresentations for timing-valued elements in QICore, allowing this function to be used across any resource.\nThe input can be provided as a DateTime, Quantity, Interval&lt;DateTime&gt; or Interval&lt;Quantity&gt;.\nThe intent of this function is to provide a clear and concise mechanism to treat single\nelements that have multiple possible representations as intervals so that logic doesn't have to account\nfor the variability. More complex calculations (such as medication request period or dispense period\ncalculation) need specific guidance and consideration. That guidance may make use of this function, but\nthe focus of this function is on single element calculations where the semantics are unambiguous.\nIf the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.\nIf the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,\nand the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.\nIf the input is a DateTime Interval, the result is the input.\nIf the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result\nis a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending\nimmediately before one year later than the date the patient turned the age given as the end of the quantity interval.\nIf 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\n*/\ndefine fluent function toInterval(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;, Timing&gt;):\n  case\n\t  when choice is DateTime then\n    \tInterval[choice as DateTime, choice as DateTime]\n\t\twhen choice is Interval&lt;DateTime&gt; then\n  \t\tchoice as Interval&lt;DateTime&gt;\n\t\twhen choice is Quantity then\n\t\t  Interval[Patient.birthDate + (choice as Quantity),\n\t\t\t  Patient.birthDate + (choice as Quantity) + 1 year)\n\t\twhen choice is Interval&lt;Quantity&gt; then\n\t\t  Interval[Patient.birthDate + (choice.low as Quantity),\n\t\t\t  Patient.birthDate + (choice.high as Quantity) + 1 year)\n\t\twhen choice is Timing then\n      Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval&lt;DateTime&gt;\n\t\telse\n\t\t\tnull as Interval&lt;DateTime&gt;\n\tend\n\n/*\n@description: Returns an interval representing the normalized abatement of a given Condition.\n@comment: If the abatement element of the Condition is represented as a DateTime, the result\nis an interval beginning and ending on that DateTime.\nIf the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The\nresult is an interval from the date the patient turned that age to immediately before one year later.\nIf the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during\nwhich the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately\nbefore one year later than the date the patient turned the ending age of the quantity interval.\n@deprecated: This function is deprecated. Use the fluent function `abatementInterval()` instead.\n*/\ndefine function ToAbatementInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\n\tif condition.abatement is DateTime then\n\t  Interval[condition.abatement as DateTime, condition.abatement as DateTime]\n\telse if condition.abatement is Quantity then\n\t\tInterval[Patient.birthDate + (condition.abatement as Quantity),\n\t\t\tPatient.birthDate + (condition.abatement as Quantity) + 1 year)\n\telse if condition.abatement is Interval&lt;Quantity&gt; then\n\t  Interval[Patient.birthDate + (condition.abatement.low as Quantity),\n\t\t  Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)\n\telse if condition.abatement is Interval&lt;DateTime&gt; then\n\t  Interval[condition.abatement.low, condition.abatement.high)\n\telse null as Interval&lt;DateTime&gt;\n\n/*\n@description: Returns an interval representing the normalized abatement of a given Condition.\n@comment: If the abatement element of the Condition is represented as a DateTime, the result\nis an interval beginning and ending on that DateTime.\nIf the abatement is represented as a Quantity, the quantity is expected to be a calendar-duration and is interpreted as the age of the patient. The\nresult is an interval from the date the patient turned that age to immediately before one year later.\nIf the abatement is represented as a Quantity Interval, the quantities are expected to be calendar-durations and are interpreted as an age range during\nwhich the abatement occurred. The result is an interval from the date the patient turned the starting age of the quantity interval, and ending immediately\nbefore one year later than the date the patient turned the ending age of the quantity interval.\n*/\ndefine fluent function abatementInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\n\tif condition.abatement is DateTime then\n\t  Interval[condition.abatement as DateTime, condition.abatement as DateTime]\n\telse if condition.abatement is Quantity then\n\t\tInterval[Patient.birthDate + (condition.abatement as Quantity),\n\t\t\tPatient.birthDate + (condition.abatement as Quantity) + 1 year)\n\telse if condition.abatement is Interval&lt;Quantity&gt; then\n\t  Interval[Patient.birthDate + (condition.abatement.low as Quantity),\n\t\t  Patient.birthDate + (condition.abatement.high as Quantity) + 1 year)\n\telse if condition.abatement is Interval&lt;DateTime&gt; then\n\t  Interval[condition.abatement.low, condition.abatement.high)\n\telse null as Interval&lt;DateTime&gt;\n\n/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting \ninterval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.\n@deprecated: This function is deprecated. Use the `prevalenceInterval()` fluent function instead\n*/\ndefine function ToPrevalenceInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\nif condition.clinicalStatus ~ &quot;active&quot;\n  or condition.clinicalStatus ~ &quot;recurrence&quot;\n  or condition.clinicalStatus ~ &quot;relapse&quot; then\n  Interval[start of ToInterval(condition.onset), end of ToAbatementInterval(condition)]\nelse\n   (end of ToAbatementInterval(condition)) abatementDate\n    return if abatementDate is null then\n      Interval[start of ToInterval(condition.onset), abatementDate)\n    else\n      Interval[start of ToInterval(condition.onset), abatementDate]\n\n/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting \ninterval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.\n*/\ndefine fluent function prevalenceInterval(condition Choice&lt;&quot;ConditionEncounterDiagnosis&quot;, &quot;ConditionProblemsHealthConcerns&quot;&gt;):\nif condition.clinicalStatus ~ &quot;active&quot;\n  or condition.clinicalStatus ~ &quot;recurrence&quot;\n  or condition.clinicalStatus ~ &quot;relapse&quot; then\n  Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]\nelse\n    (end of condition.abatementInterval()) abatementDate\n    return if abatementDate is null then\n      Interval[start of condition.onset.toInterval(), abatementDate)\n    else\n      Interval[start of condition.onset.toInterval(), abatementDate]\n\n/*\n@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).\n@comment: This function can be used to determine the logical id of a given resource. It can be used in\na single-server environment to trace references. However, this function does not attempt to resolve\nor distinguish the base of the given url, and so cannot be used safely in multi-server environments.\n@deprecated: This function is deprecated. Use the fluent function `getId()` instead\n*/\ndefine function GetId(uri String):\n  Last(Split(uri, '/'))\n\n/*\n@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).\n@comment: This function can be used to determine the logical id of a given resource. It can be used in\na single-server environment to trace references. However, this function does not attempt to resolve\nor distinguish the base of the given url, and so cannot be used safely in multi-server environments.\n*/\ndefine fluent function getId(uri String):\n  Last(Split(uri, '/'))\n\n/*\n@description: Returns true if the given reference is to the given resource\n@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(reference Reference, resource Resource):\n  resource.id = Last(Split(reference.reference, '/'))  \n\n/*\n@description: Returns true if the given reference is to the given resourceId\n@comment: Returns true if the `resourceId` parameter exactly equals the tail of the given reference.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(reference Reference, resourceId String):\n  resourceId = Last(Split(reference.reference, '/'))\n\n/*\n@description: Returns true if any of the given references are to the given resource\n@comment: Returns true if the `id` element of the given resource exactly equals the tail of any of the given references.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(references List&lt;Reference&gt;, resource Resource):\n  exists (references R where R.references(resource))\n  \n/*\n@description: Returns true if any of the given references are to the given resourceId\n@comment: Returns true if the `resourceId` parameter exactly equals the tail of any of the given references.\nNOTE: This function assumes resources from the same source server.\n*/\ndefine fluent function references(references List&lt;Reference&gt;, resourceId String):\n  exists (references R where R.references(resourceId))\n\n/*\n@description: Returns true if the given code is in the given codeList\n@comment: Returns true if the `code` is equivalent to any of the codes in the given `codeList`, false otherwise.\n*/\ndefine fluent function includesCode(codeList List&lt;Concept&gt;, code Code):\n  exists (codeList C where C ~ code)\n\n/*\n@description: Given an interval, return true if the interval has a starting boundary specified\n(i.e. the start of the interval is not null and not the minimum DateTime value)\n@deprecated: This function is deprecated. Uee the fluent function `hasStart()` instead\n*/\ndefine function &quot;HasStart&quot;(period Interval&lt;DateTime&gt; ):\n  not ( start of period is null\n      or start of period = minimum DateTime\n  )\n\n/*\n@description: Given an interval, return true if the interval has a starting boundary specified\n(i.e. the start of the interval is not null and not the minimum DateTime value)\n*/\ndefine fluent function hasStart(period Interval&lt;DateTime&gt; ):\n  not ( start of period is null\n      or start of period = minimum DateTime\n  )\n\n/*\n@description: Given an interval, returns true if the interval has an ending boundary specified\n(i.e. the end of the interval is not null and not the maximum DateTime value)\n@deprecated: This function is deprecated. Use the fluent function `hasEnd()` instead\n*/\ndefine function &quot;HasEnd&quot;(period Interval&lt;DateTime&gt; ):\n  not (\n    end of period is null\n      or end of period = maximum DateTime\n  )\n\n/*\n@description: Given an interval, returns true if the interval has an ending boundary specified\n(i.e. the end of the interval is not null and not the maximum DateTime value)\n*/\ndefine fluent function hasEnd(period Interval&lt;DateTime&gt; ):\n  not (\n    end of period is null\n      or end of period = maximum DateTime\n  )\n\n/*\n@description: Given an interval, returns the ending point if the interval has an ending boundary specified,\notherwise, returns the starting point\n@deprecated: This function is deprecated. Use the fluent function `latest()` instead\n*/\ndefine function &quot;Latest&quot;(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):\n  (choice.toInterval()) period\n    return\n      if (HasEnd(period)) then end of period\n      else start of period\n\n/*\n@description: Given an interval, returns the ending point if the interval has an ending boundary specified,\notherwise, returns the starting point\n*/\ndefine fluent function latest(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):\n  (choice.toInterval()) period\n    return\n      if (period.&quot;hasEnd&quot;()) then end of period\n      else start of period\n\n/*\n@description: Given an interval, return the starting point if the interval has a starting boundary specified,\notherwise, return the ending point\n@deprecated: This function is deprecated. Use the fluent function `earliest()` instead\n*/\ndefine function &quot;Earliest&quot;(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):\n  (choice.toInterval()) period\n    return\n      if (HasStart(period)) then start of period\n      else end of period\n\n/*\n@description: Given an interval, return the starting point if the interval has a starting boundary specified,\notherwise, return the ending point\n*/\ndefine fluent function earliest(choice Choice&lt;DateTime, Quantity, Interval&lt;DateTime&gt;, Interval&lt;Quantity&gt;&gt; ):\n  (choice.toInterval()) period\n    return\n      if (period.&quot;hasStart&quot;()) then start of period\n      else end of period\n\n/*\n@description: Creates a list of integers from 1 to how many days are in the interval. Note, this wont create an index for\nthe final day if it is less than 24 hours. This also includes the first 24 hour period.\n@deprecated: This function is deprecated. Use the fluent function `toDayNumbers()` instead\n*/\ndefine function &quot;Interval To Day Numbers&quot;(Period Interval&lt;DateTime&gt;):\n  ( expand { Interval[1, duration in days between start of Period and end of Period]} ) DayNumber\n    return end of DayNumber\n\n/*\n@description: Creates a list of integers from 1 to how many days are in the interval. Note, this wont create an index for\nthe final day if it is less than 24 hours. This also includes the first 24 hour period.\n*/\ndefine fluent function toDayNumbers(Period Interval&lt;DateTime&gt;):\n  ( expand { Interval[1, duration in days between start of Period and end of Period]} ) DayNumber\n    return end of DayNumber\n\n/*\n@description: Creates a list of 24 hour long intervals in an interval paired with the index (1 indexed) to which 24 hour interval it is.\nNote that the result will include intervals that are closed at the beginning and open at the end\n@deprecated: This function is deprecated. Use the fluent function `daysInPeriod()` instead\n*/\ndefine function &quot;Days In Period&quot;(Period Interval&lt;DateTime&gt;):\n  ( &quot;Interval To Day Numbers&quot;(Period)) DayIndex\n    let startPeriod: start of Period + (24 hours * (DayIndex - 1)),\n    endPeriod: if (hours between startPeriod and end of Period &lt; 24) then startPeriod\n      else start of Period + (24 hours * DayIndex)\n    return Tuple {\n      dayIndex: DayIndex,\n      dayPeriod: Interval[startPeriod, endPeriod)\n    }\n\n/*\n@description: Creates a list of 24 hour long intervals in an interval paired with the index (1 indexed) to which 24 hour interval it is.\nNote that the result will include intervals that are closed at the beginning and open at the end\n*/\ndefine fluent function daysInPeriod(Period Interval&lt;DateTime&gt;):\n  ( &quot;Interval To Day Numbers&quot;(Period)) DayIndex\n    let startPeriod: start of Period + (24 hours * (DayIndex - 1)),\n    endPeriod: if (hours between startPeriod and end of Period &lt; 24) then startPeriod\n      else start of Period + (24 hours * DayIndex)\n    return Tuple {\n      dayIndex: DayIndex,\n      dayPeriod: Interval[startPeriod, endPeriod)\n    }</code></pre>\n      </td>\n    </tr>\n    \n    \n    \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://loinc.org",
          "code": "21112-8",
          "display": "Birthdate"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://snomed.info/sct",
          "code": "419099009",
          "display": "Dead"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
          "code": "ER",
          "display": "ER"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
          "code": "ICU",
          "display": "ICU"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "billing",
          "display": "Billing"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://hl7.org/fhir/CodeSystem/task-code",
          "code": "fulfill",
          "display": "Fulfill"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "AMB",
          "display": "ambulatory"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "EMER",
          "display": "emergency"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "FLD",
          "display": "field"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "HH",
          "display": "home health"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "IMP",
          "display": "inpatient encounter"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "ACUTE",
          "display": "inpatient acute"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "NONAC",
          "display": "inpatient non-acute"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "OBSENC",
          "display": "observation encounter"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "PRENC",
          "display": "pre-admission"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "SS",
          "display": "short stay"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "VR",
          "display": "virtual"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-category",
          "code": "problem-list-item",
          "display": "problem-list-item"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-category",
          "code": "encounter-diagnosis",
          "display": "encounter-diagnosis"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://hl7.org/fhir/us/core/CodeSystem/condition-category",
          "code": "health-concern",
          "display": "health-concern"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code": "active",
          "display": "active"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code": "recurrence",
          "display": "recurrence"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code": "relapse",
          "display": "relapse"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code": "inactive",
          "display": "inactive"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code": "remission",
          "display": "remission"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
          "code": "resolved",
          "display": "resolved"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "unconfirmed",
          "display": "unconfirmed"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "provisional",
          "display": "provisional"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "differential",
          "display": "differential"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "confirmed",
          "display": "confirmed"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "refuted",
          "display": "refuted"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
          "code": "entered-in-error",
          "display": "entered-in-error"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
          "code": "active",
          "display": "allergy-active"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
          "code": "inactive",
          "display": "allergy-inactive"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
          "code": "resolved",
          "display": "allergy-resolved"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
          "code": "unconfirmed",
          "display": "allergy-unconfirmed"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
          "code": "confirmed",
          "display": "allergy-confirmed"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
          "code": "refuted",
          "display": "allergy-refuted"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
          "code": "inpatient",
          "display": "Inpatient"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
          "code": "outpatient",
          "display": "Outpatient"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
          "code": "community",
          "display": "Community"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
          "code": "discharge",
          "display": "Discharge"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "AD",
          "display": "AD"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "DD",
          "display": "DD"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "CC",
          "display": "CC"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "CM",
          "display": "CM"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "pre-op",
          "display": "pre-op"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "post-op",
          "display": "post-op"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/diagnosis-role",
          "code": "billing",
          "display": "billing"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "social-history",
          "display": "social-history"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "vital-signs",
          "display": "vital-signs"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "imaging",
          "display": "imaging"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "laboratory",
          "display": "laboratory"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "procedure",
          "display": "procedure"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "survey",
          "display": "survey"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "exam",
          "display": "exam"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "therapy",
          "display": "therapy"
        }
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode",
        "valueCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "activity",
          "display": "activity"
        }
      } ],
      "url": "https://madie.cms.gov/Library/QICoreCommon",
      "identifier": [ {
        "use": "official",
        "system": "https://madie.cms.gov/login",
        "value": "67cb33c19e9ab93ec36dad45"
      } ],
      "version": "4.0.000",
      "name": "QICoreCommon",
      "title": "QICoreCommon",
      "status": "active",
      "experimental": false,
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/library-type",
          "code": "logic-library"
        } ]
      },
      "date": "2025-07-25T21:09:08+00:00",
      "publisher": "ICF",
      "description": "Common terminologies and functions used in QI-Core-based CQL artifacts",
      "relatedArtifact": [ {
        "type": "depends-on",
        "display": "QICore model information",
        "resource": "http://hl7.org/fhir/Library/QICore-ModelInfo"
      }, {
        "type": "depends-on",
        "display": "Library FHIRHelpers",
        "resource": "https://madie.cms.gov/Library/FHIRHelpers|4.4.000"
      }, {
        "type": "depends-on",
        "display": "Code system USCoreConditionCategoryExtensionCodes",
        "resource": "http://hl7.org/fhir/us/core/CodeSystem/condition-category"
      }, {
        "type": "depends-on",
        "display": "Code system ObservationCategoryCodes",
        "resource": "http://terminology.hl7.org/CodeSystem/observation-category"
      }, {
        "type": "depends-on",
        "display": "Code system ConditionClinicalStatusCodes",
        "resource": "http://terminology.hl7.org/CodeSystem/condition-clinical"
      }, {
        "type": "depends-on",
        "display": "Code system MedicationRequestCategory",
        "resource": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"
      }, {
        "type": "depends-on",
        "display": "Code system ConditionCategory",
        "resource": "http://terminology.hl7.org/CodeSystem/condition-category"
      } ],
      "dataRequirement": [ {
        "type": "Resource",
        "profile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ],
        "mustSupport": [ "id", "id.value" ]
      }, {
        "type": "Patient",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient" ],
        "mustSupport": [ "birthDate", "birthDate.value" ]
      }, {
        "type": "DeviceRequest",
        "profile": [ "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-devicerequest" ],
        "mustSupport": [ "modifierExtension" ]
      } ],
      "content": [ {
        "contentType": "text/cql",
        "data": "[encoded data, 43100 characters]"
      }, {
        "contentType": "application/elm+xml",
        "data": "[encoded data, 1733416 characters]"
      }, {
        "contentType": "application/elm+json",
        "data": "[encoded data, 2930368 characters]"
      } ]
    },
    "request": {
      "method": "POST",
      "url": "Library/QICoreCommon"
    }
  }, {
    "fullUrl": "https://madie.cms.gov/Library/FHIRHelpers",
    "resource": {
      "resourceType": "Library",
      "id": "FHIRHelpers",
      "meta": {
        "profile": [ "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-computablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablelibrary", "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-executablelibrary", "http://hl7.org/fhir/uv/cql/StructureDefinition/cql-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-json-library", "http://hl7.org/fhir/uv/cql/StructureDefinition/elm-xml-library" ]
      },
      "language": "en",
      "text": {
        "status": "extensions",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"col-12\">\n  <table class=\"narrative-table\">\n    <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">FHIRHelpers</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">4.4.000</td>\n</tr>\n\n\n\n\n\n\n\n  \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n<td class=\"content-container\">660d90bc01598d085de46056</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">ICF</td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\">This library defines functions to convert between FHIR\n data types and CQL system-defined types, as well as functions to support\n FHIRPath implementation. For more information, the FHIRHelpers wiki page:\n https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers</td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Type</th>\n\n\n<td class=\"content-container\">[http://terminology.hl7.org/CodeSystem/library-type#logic-library]</td>\n</tr>\n\n\n\n\n  <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Library Content</th>\n\n\n</tr>\n  \n    \n    <tr>\n      <th scope=\"row\" class=\"row-header\">CQL Content</th>\n      <td>\n        <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">library FHIRHelpers version '4.4.000'\n\r\nusing FHIR version '4.0.1'\r\n\r\n/*\r\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\r\nvalue to a CQL DateTime Interval\r\n@comment: If the start value of the given period is unspecified, the starting\r\nboundary of the resulting interval will be open (meaning the start of the interval\r\nis unknown, as opposed to interpreted as the beginning of time).\r\n*/\r\ndefine function ToInterval(period FHIR.Period):\r\n    if period is null then\r\n        null\r\n    else\r\n        if period.&quot;start&quot; is null then\r\n            Interval(period.&quot;start&quot;.value, period.&quot;end&quot;.value]\r\n        else\r\n            Interval[period.&quot;start&quot;.value, period.&quot;end&quot;.value]\r\n\r\n/*\r\n@description: Converts a UCUM definite duration unit to a CQL calendar duration\r\nunit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) \r\ntopic of the CQL specification.\r\n@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate\r\n*/\r\ndefine function ToCalendarUnit(unit System.String):\r\n    case unit\r\n        when 'ms' then 'millisecond'\r\n        when 's' then 'second'\r\n        when 'min' then 'minute'\r\n        when 'h' then 'hour'\r\n        when 'd' then 'day'\r\n        when 'wk' then 'week'\r\n        when 'mo' then 'month'\r\n        when 'a' then 'year'\r\n        else unit\r\n    end\r\n\r\n/*\r\n@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) \r\nvalue to a CQL Quantity\r\n@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity\r\nhas a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)\r\nan error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.\r\n@seealso: ToCalendarUnit\r\n*/\r\ndefine function ToQuantity(quantity FHIR.Quantity):\r\n    case\r\n        when quantity is null then null\r\n        when quantity.value is null then null\r\n        when quantity.comparator is not null then\r\n            Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')\r\n        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'\r\n              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then\r\n            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }\r\n        else\r\n            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')\r\n    end\r\n\r\n/*\r\n@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) value to a CQL Quantity, ignoring\r\nthe comparator element. This function should only be used when an application is justified in ignoring the comparator value (i.e. the\r\ncontext is looking for boundary).\r\n@comment: If the given quantity has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units \r\n(i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`) an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function \r\nis used.\r\n@seealso: ToCalendarUnit\r\n*/\r\ndefine function ToQuantityIgnoringComparator(quantity FHIR.Quantity):\r\n    case\r\n        when quantity is null then null\r\n        when quantity.value is null then null\r\n        when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'\r\n              or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then\r\n            System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }\r\n        else\r\n            Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' &amp; quantity.unit.value &amp; ' (' &amp; quantity.system.value &amp; '|' &amp; quantity.code.value &amp; ')')\r\n    end\r\n\r\n/*\r\n@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) value to a CQL Interval of Quantity.\r\n@comment: If the given quantity has a comparator, it is used to construct an interval based on the value of the comparator. If the comparator\r\nis less than, the resulting interval will start with a null closed boundary and end with an open boundary on the quantity. If the comparator\r\nis less than or equal, the resulting interval will start with a null closed boundary and end with a closed boundary on the quantity. If the \r\ncomparator is greater or equal, the resulting interval will start with a closed boundary on the quantity and end with a closed null boundary.\r\nIf the comparator is greatter than, the resulting interval will start with an open boundary on the quantity and end with a closed null boundary.\r\nIf no comparator is specified, the resulting interval will start and end with a closed boundary on the quantity.\r\n*/\r\ndefine function ToInterval(quantity FHIR.Quantity):\r\n    if quantity is null then null else\r\n        case quantity.comparator.value\r\n            when '&lt;' then\r\n                Interval[\r\n                    null,\r\n                    ToQuantityIgnoringComparator(quantity)\r\n                )\r\n            when '&lt;=' then\r\n                Interval[\r\n                    null,\r\n                    ToQuantityIgnoringComparator(quantity)\r\n                ]\r\n            when '&gt;=' then\r\n                Interval[\r\n                    ToQuantityIgnoringComparator(quantity),\r\n                    null\r\n                ]\r\n            when '&gt;' then\r\n                Interval(\r\n                    ToQuantityIgnoringComparator(quantity),\r\n                    null\r\n                ]\r\n            else\r\n                Interval[ToQuantity(quantity), ToQuantity(quantity)]\r\n        end\r\n\r\n/*\r\n@description: Converts the given FHIR [Ratio](https://hl7.org/fhir/datatypes.html#Ratio) value to a CQL Ratio.\r\n*/\r\ndefine function ToRatio(ratio FHIR.Ratio):\r\n    if ratio is null then\r\n        null\r\n    else\r\n        System.Ratio { numerator: ToQuantity(ratio.numerator), denominator: ToQuantity(ratio.denominator) }\r\n\r\n/*\r\n@description: Converts the given FHIR [Range](https://hl7.org/fhir/datatypes.html#Range) value to a CQL Interval of Quantity\r\n*/\r\ndefine function ToInterval(range FHIR.Range):\r\n    if range is null then\r\n        null\r\n    else\r\n        Interval[ToQuantity(range.low), ToQuantity(range.high)]\r\n\r\n/*\r\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\r\n*/\r\ndefine function ToCode(coding FHIR.Coding):\r\n    if coding is null then\r\n        null\r\n    else\r\n        System.Code {\r\n          code: coding.code.value,\r\n          system: coding.system.value,\r\n          version: coding.version.value,\r\n          display: coding.display.value\r\n        }\r\n\r\n/*\r\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\r\n*/\r\ndefine function ToConcept(concept FHIR.CodeableConcept):\r\n    if concept is null then\r\n        null\r\n    else\r\n        System.Concept {\r\n            codes: concept.coding C return ToCode(C),\r\n            display: concept.text.value\r\n        }\r\n\r\n/*\r\n@description: Converts the given value (assumed to be a URI) to a CQL [ValueSet](https://cql.hl7.org/09-b-cqlreference.html#valueset)\r\n*/\r\ndefine function ToValueSet(uri String):\r\n    if uri is null then\r\n        null\r\n    else\r\n        System.ValueSet {\r\n            id: uri\r\n        }\r\n\r\n/*\r\n@description: Constructs a FHIR [Reference](https://hl7.org/fhir/datatypes.html#Reference) from the given reference (assumed to be a FHIR resource URL)\r\n*/\r\ndefine function reference(reference String):\r\n    if reference is null then\r\n        null\r\n    else\r\n        Reference { reference: string { value: reference } }\r\n\r\n/*\r\n@description: Converts the given value to a CQL value using the appropriate accessor or conversion function.\r\n@comment: TODO: document conversion\r\n*/\r\ndefine function ToValue(value Choice&lt;base64Binary,\r\n        boolean,\r\n        canonical,\r\n        code,\r\n        date,\r\n        dateTime,\r\n        decimal,\r\n        id,\r\n        instant,\r\n        integer,\r\n        markdown,\r\n        oid,\r\n        positiveInt,\r\n        string,\r\n        time,\r\n        unsignedInt,\r\n        uri,\r\n        url,\r\n        uuid,\r\n        Address,\r\n        Age,\r\n        Annotation,\r\n        Attachment,\r\n        CodeableConcept,\r\n        Coding,\r\n        ContactPoint,\r\n        Count,\r\n        Distance,\r\n        Duration,\r\n        HumanName,\r\n        Identifier,\r\n        Money,\r\n        Period,\r\n        Quantity,\r\n        Range,\r\n        Ratio,\r\n        Reference,\r\n        SampledData,\r\n        Signature,\r\n        Timing,\r\n        ContactDetail,\r\n        Contributor,\r\n        DataRequirement,\r\n        Expression,\r\n        ParameterDefinition,\r\n        RelatedArtifact,\r\n        TriggerDefinition,\r\n        UsageContext,\r\n        Dosage,\r\n        Meta&gt;):\r\n    case\r\n      when value is base64Binary then (value as base64Binary).value\r\n      when value is boolean then (value as boolean).value\r\n      when value is canonical then (value as canonical).value\r\n      when value is code then (value as code).value\r\n      when value is date then (value as date).value\r\n      when value is dateTime then (value as dateTime).value\r\n      when value is decimal then (value as decimal).value\r\n      when value is id then (value as id).value\r\n      when value is instant then (value as instant).value\r\n      when value is integer then (value as integer).value\r\n      when value is markdown then (value as markdown).value\r\n      when value is oid then (value as oid).value\r\n      when value is positiveInt then (value as positiveInt).value\r\n      when value is string then (value as string).value\r\n      when value is time then (value as time).value\r\n      when value is unsignedInt then (value as unsignedInt).value\r\n      when value is uri then (value as uri).value\r\n      when value is url then (value as url).value\r\n      when value is uuid then (value as uuid).value\r\n      when value is Age then ToQuantity(value as Age)\r\n      when value is CodeableConcept then ToConcept(value as CodeableConcept)\r\n      when value is Coding then ToCode(value as Coding)\r\n      when value is Count then ToQuantity(value as Count)\r\n      when value is Distance then ToQuantity(value as Distance)\r\n      when value is Duration then ToQuantity(value as Duration)\r\n      when value is Quantity then ToQuantity(value as Quantity)\r\n      when value is Range then ToInterval(value as Range)\r\n      when value is Period then ToInterval(value as Period)\r\n      when value is Ratio then ToRatio(value as Ratio)\r\n      else value as Choice&lt;Address,\r\n        Annotation,\r\n        Attachment,\r\n        ContactPoint,\r\n        HumanName,\r\n        Identifier,\r\n        Money,\r\n        Reference,\r\n        SampledData,\r\n        Signature,\r\n        Timing,\r\n        ContactDetail,\r\n        Contributor,\r\n        DataRequirement,\r\n        Expression,\r\n        ParameterDefinition,\r\n        RelatedArtifact,\r\n        TriggerDefinition,\r\n        UsageContext,\r\n        Dosage,\r\n        Meta&gt;\r\n    end\r\n\r\n/*\r\n@description: Resolve the given reference as a url to a resource. If the item resolves, the Resource is returned, otherwise the result is null.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function resolve(reference String) returns Resource: external\r\n/*\r\n@description: Resolve the reference element of the given Reference. If the item resolves, the Resource is returned, otherwise the result is null.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function resolve(reference Reference) returns Resource: external\r\n/*\r\n@description: Constructs a Reference to the given Resource. The resulting reference will typically be relative, but implementations may provide a base URL if one can be unambiguously determined.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function reference(resource Resource) returns Reference: external\r\n/*\r\n@description: Returns any extensions with the given url defined on the given element.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function extension(element Element, url String) returns List&lt;Extension&gt;: external\r\n/*\r\n@description: Returns any extensions with the given url defined on the given resource.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function extension(resource DomainResource, url String) returns List&lt;Extension&gt;: external\r\n/*\r\n@description: Returns any modifier extensions with the given url defined on the given element.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function modifierExtension(element BackboneElement, url String) returns List&lt;Extension&gt;: external\r\n/*\r\n@description: Returns any modifier extensions with the given url defined on the given resource.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function modifierExtension(resource DomainResource, url String) returns List&lt;Extension&gt;: external\r\n/*\r\n@description: Returns true if the element is a FHIR primitive type with a value element (as opposed to having only extensions); false otherwise\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function hasValue(element Element) returns Boolean: external\r\n/*\r\n@description: Returns the value of the FHIR primitive; null otherwise\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function getValue(element Element) returns Any: external\r\n/*\r\n@description: Returns a list containing only those elements in the input that are of the given type, specified as a string.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function ofType(identifier String) returns List&lt;Any&gt;: external\r\n/*\r\n@description: Returns true if the input is of the given type; false otherwise\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function is(identifier String) returns Boolean: external\r\n/*\r\n@description: If the input is of the given type; returns the value as that type; null otherwise.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function as(identifier String) returns Any: external\r\n/*\r\n@description: Returns the FHIR element definition for the given element\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function elementDefinition(element Element) returns ElementDefinition: external\r\n/*\r\n@description: Returns the given slice as defined in the given structure definition. The structure argument is a uri that resolves to the structure definition, and the name must be the name of a slice within that structure definition. If the structure cannot be resolved, or the name of the slice within the resolved structure is not present, an error is thrown.\r\n@comment: For every element in the input collection, if the resolved slice is present on the element, it will be returned. If the slice does not match any element in the input collection, or if the input collection is empty, the result is an empty collection ({ }).\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function slice(element Element, url String, name String) returns List&lt;Element&gt;: external\r\n/*\r\n@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function checkModifiers(resource Resource) returns Resource: external\r\n/*\r\n@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function checkModifiers(resource Resource, modifier String) returns Resource: external\r\n/*\r\n@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function checkModifiers(element Element) returns Element: external\r\n/*\r\n@description: For each element in the input collection, verifies that there are no modifying extensions defined other than the ones given by the modifier argument. If the check passes, the input collection is returned. Otherwise, an error is thrown.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function checkModifiers(element Element, modifier String) returns Element: external\r\n/*\r\n@description: Returns true if the single input element conforms to the profile specified by the structure argument, and false otherwise. If the structure cannot be resolved to a valid profile, an error is thrown. If the input contains more than one element, an error is thrown. If the input is empty, the result is empty.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function conformsTo(resource Resource, structure String) returns Boolean: external\r\n/*\r\n@description: Returns true if the given code is equal to a code in the valueset, so long as the valueset only contains one codesystem. If the valueset contains more than one codesystem, an error is thrown.\r\n@comment: If the valueset cannot be resolved as a uri to a value set, an error is thrown.\r\nNote that implementations are encouraged to make use of a terminology service to provide this functionality.\r\nFor example:\r\n```fhirpath\r\nObservation.component.where(code.memberOf('http://hl7.org/fhir/ValueSet/observation-vitalsignresult'))\r\n```\r\nThis expression returns components that have a code that is a member of the observation-vitalsignresult valueset.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function memberOf(code code, valueSet String) returns Boolean: external\r\n/*\r\n@description: Returns true if the code is a member of the given valueset.\r\n@comment: If the valueset cannot be resolved as a uri to a value set, an error is thrown.\r\nNote that implementations are encouraged to make use of a terminology service to provide this functionality.\r\nFor example:\r\n```fhirpath\r\nObservation.component.where(code.memberOf('http://hl7.org/fhir/ValueSet/observation-vitalsignresult'))\r\n```\r\nThis expression returns components that have a code that is a member of the observation-vitalsignresult valueset.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function memberOf(coding Coding, valueSet String) returns Boolean: external\r\n/*\r\n@description: Returns true if any code in the concept is a member of the given valueset.\r\n@comment: If the valueset cannot be resolved as a uri to a value set, an error is thrown.\r\nNote that implementations are encouraged to make use of a terminology service to provide this functionality.\r\nFor example:\r\n```fhirpath\r\nObservation.component.where(code.memberOf('http://hl7.org/fhir/ValueSet/observation-vitalsignresult'))\r\n```\r\nThis expression returns components that have a code that is a member of the observation-vitalsignresult valueset.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function memberOf(concept CodeableConcept, valueSet String) returns Boolean: external\r\n/*\r\n@description: Returns true if the source code is equivalent to the given code, or if the source code subsumes the given code (i.e. the source code is an ancestor of the given code in a subsumption hierarchy), and false otherwise.\r\n@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown.\r\nNote that implementations are encouraged to make use of a terminology service to provide this functionality.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function subsumes(coding Coding, subsumedCoding Coding) returns Boolean: external\r\n/*\r\n@description: Returns true if any Coding in the source or given elements is equivalent to or subsumes the given code.\r\n@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown.\r\nNote that implementations are encouraged to make use of a terminology service to provide this functionality.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function subsumes(concept CodeableConcept, subsumedConcept CodeableConcept) returns Boolean: external\r\n/*\r\n@description: Returns true if the source code is equivalent to the given code, or if the source code is subsumed by the given code (i.e. the source code is a descendant of the given code in a subsumption hierarchy), and false otherwise.\r\n@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown.\r\nNote that implementations are encouraged to make use of a terminology service to provide this functionality.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function subsumedBy(coding Coding, subsumingCoding Coding) returns Boolean: external\r\n/*\r\n@description: Returns true if any Coding in the source or given elements is equivalent to or subsumed by the given code.\r\n@comment: If the Codings are from different code systems, the relationships between the code systems must be well-defined or a run-time error is thrown.\r\nNote that implementations are encouraged to make use of a terminology service to provide this functionality.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function subsumedBy(concept CodeableConcept, subsumingConcept CodeableConcept) returns Boolean: external\r\n/*\r\n@description: When invoked on an xhtml element, returns true if the rules around HTML usage are met, and false if they are not. The return value is undefined (null) on any other kind of element.\r\n@seealso: https://hl7.org/fhir/fhirpath.html#functions\r\n*/\r\ndefine function htmlChecks(element Element) returns Boolean: external\r\n\r\ndefine function ToString(value AccountStatus): value.value\r\ndefine function ToString(value ActionCardinalityBehavior): value.value\r\ndefine function ToString(value ActionConditionKind): value.value\r\ndefine function ToString(value ActionGroupingBehavior): value.value\r\ndefine function ToString(value ActionParticipantType): value.value\r\ndefine function ToString(value ActionPrecheckBehavior): value.value\r\ndefine function ToString(value ActionRelationshipType): value.value\r\ndefine function ToString(value ActionRequiredBehavior): value.value\r\ndefine function ToString(value ActionSelectionBehavior): value.value\r\ndefine function ToString(value ActivityDefinitionKind): value.value\r\ndefine function ToString(value ActivityParticipantType): value.value\r\ndefine function ToString(value AddressType): value.value\r\ndefine function ToString(value AddressUse): value.value\r\ndefine function ToString(value AdministrativeGender): value.value\r\ndefine function ToString(value AdverseEventActuality): value.value\r\ndefine function ToString(value AggregationMode): value.value\r\ndefine function ToString(value AllergyIntoleranceCategory): value.value\r\ndefine function ToString(value AllergyIntoleranceCriticality): value.value\r\ndefine function ToString(value AllergyIntoleranceSeverity): value.value\r\ndefine function ToString(value AllergyIntoleranceType): value.value\r\ndefine function ToString(value AppointmentStatus): value.value\r\ndefine function ToString(value AssertionDirectionType): value.value\r\ndefine function ToString(value AssertionOperatorType): value.value\r\ndefine function ToString(value AssertionResponseTypes): value.value\r\ndefine function ToString(value AuditEventAction): value.value\r\ndefine function ToString(value AuditEventAgentNetworkType): value.value\r\ndefine function ToString(value AuditEventOutcome): value.value\r\ndefine function ToString(value BindingStrength): value.value\r\ndefine function ToString(value BiologicallyDerivedProductCategory): value.value\r\ndefine function ToString(value BiologicallyDerivedProductStatus): value.value\r\ndefine function ToString(value BiologicallyDerivedProductStorageScale): value.value\r\ndefine function ToString(value BundleType): value.value\r\ndefine function ToString(value CapabilityStatementKind): value.value\r\ndefine function ToString(value CarePlanActivityKind): value.value\r\ndefine function ToString(value CarePlanActivityStatus): value.value\r\ndefine function ToString(value CarePlanIntent): value.value\r\ndefine function ToString(value CarePlanStatus): value.value\r\ndefine function ToString(value CareTeamStatus): value.value\r\ndefine function ToString(value CatalogEntryRelationType): value.value\r\ndefine function ToString(value ChargeItemDefinitionPriceComponentType): value.value\r\ndefine function ToString(value ChargeItemStatus): value.value\r\ndefine function ToString(value ClaimResponseStatus): value.value\r\ndefine function ToString(value ClaimStatus): value.value\r\ndefine function ToString(value ClinicalImpressionStatus): value.value\r\ndefine function ToString(value CodeSearchSupport): value.value\r\ndefine function ToString(value CodeSystemContentMode): value.value\r\ndefine function ToString(value CodeSystemHierarchyMeaning): value.value\r\ndefine function ToString(value CommunicationPriority): value.value\r\ndefine function ToString(value CommunicationRequestStatus): value.value\r\ndefine function ToString(value CommunicationStatus): value.value\r\ndefine function ToString(value CompartmentCode): value.value\r\ndefine function ToString(value CompartmentType): value.value\r\ndefine function ToString(value CompositionAttestationMode): value.value\r\ndefine function ToString(value CompositionStatus): value.value\r\ndefine function ToString(value ConceptMapEquivalence): value.value\r\ndefine function ToString(value ConceptMapGroupUnmappedMode): value.value\r\ndefine function ToString(value ConditionalDeleteStatus): value.value\r\ndefine function ToString(value ConditionalReadStatus): value.value\r\ndefine function ToString(value ConsentDataMeaning): value.value\r\ndefine function ToString(value ConsentProvisionType): value.value\r\ndefine function ToString(value ConsentState): value.value\r\ndefine function ToString(value ConstraintSeverity): value.value\r\ndefine function ToString(value ContactPointSystem): value.value\r\ndefine function ToString(value ContactPointUse): value.value\r\ndefine function ToString(value ContractPublicationStatus): value.value\r\ndefine function ToString(value ContractStatus): value.value\r\ndefine function ToString(value ContributorType): value.value\r\ndefine function ToString(value CoverageStatus): value.value\r\ndefine function ToString(value CurrencyCode): value.value\r\ndefine function ToString(value DayOfWeek): value.value\r\ndefine function ToString(value DaysOfWeek): value.value\r\ndefine function ToString(value DetectedIssueSeverity): value.value\r\ndefine function ToString(value DetectedIssueStatus): value.value\r\ndefine function ToString(value DeviceMetricCalibrationState): value.value\r\ndefine function ToString(value DeviceMetricCalibrationType): value.value\r\ndefine function ToString(value DeviceMetricCategory): value.value\r\ndefine function ToString(value DeviceMetricColor): value.value\r\ndefine function ToString(value DeviceMetricOperationalStatus): value.value\r\ndefine function ToString(value DeviceNameType): value.value\r\ndefine function ToString(value DeviceRequestStatus): value.value\r\ndefine function ToString(value DeviceUseStatementStatus): value.value\r\ndefine function ToString(value DiagnosticReportStatus): value.value\r\ndefine function ToString(value DiscriminatorType): value.value\r\ndefine function ToString(value DocumentConfidentiality): value.value\r\ndefine function ToString(value DocumentMode): value.value\r\ndefine function ToString(value DocumentReferenceStatus): value.value\r\ndefine function ToString(value DocumentRelationshipType): value.value\r\ndefine function ToString(value EligibilityRequestPurpose): value.value\r\ndefine function ToString(value EligibilityRequestStatus): value.value\r\ndefine function ToString(value EligibilityResponsePurpose): value.value\r\ndefine function ToString(value EligibilityResponseStatus): value.value\r\ndefine function ToString(value EnableWhenBehavior): value.value\r\ndefine function ToString(value EncounterLocationStatus): value.value\r\ndefine function ToString(value EncounterStatus): value.value\r\ndefine function ToString(value EndpointStatus): value.value\r\ndefine function ToString(value EnrollmentRequestStatus): value.value\r\ndefine function ToString(value EnrollmentResponseStatus): value.value\r\ndefine function ToString(value EpisodeOfCareStatus): value.value\r\ndefine function ToString(value EventCapabilityMode): value.value\r\ndefine function ToString(value EventTiming): value.value\r\ndefine function ToString(value EvidenceVariableType): value.value\r\ndefine function ToString(value ExampleScenarioActorType): value.value\r\ndefine function ToString(value ExplanationOfBenefitStatus): value.value\r\ndefine function ToString(value ExposureState): value.value\r\ndefine function ToString(value ExtensionContextType): value.value\r\ndefine function ToString(value FHIRAllTypes): value.value\r\ndefine function ToString(value FHIRDefinedType): value.value\r\ndefine function ToString(value FHIRDeviceStatus): value.value\r\ndefine function ToString(value FHIRResourceType): value.value\r\ndefine function ToString(value FHIRSubstanceStatus): value.value\r\ndefine function ToString(value FHIRVersion): value.value\r\ndefine function ToString(value FamilyHistoryStatus): value.value\r\ndefine function ToString(value FilterOperator): value.value\r\ndefine function ToString(value FlagStatus): value.value\r\ndefine function ToString(value GoalLifecycleStatus): value.value\r\ndefine function ToString(value GraphCompartmentRule): value.value\r\ndefine function ToString(value GraphCompartmentUse): value.value\r\ndefine function ToString(value GroupMeasure): value.value\r\ndefine function ToString(value GroupType): value.value\r\ndefine function ToString(value GuidanceResponseStatus): value.value\r\ndefine function ToString(value GuidePageGeneration): value.value\r\ndefine function ToString(value GuideParameterCode): value.value\r\ndefine function ToString(value HTTPVerb): value.value\r\ndefine function ToString(value IdentifierUse): value.value\r\ndefine function ToString(value IdentityAssuranceLevel): value.value\r\ndefine function ToString(value ImagingStudyStatus): value.value\r\ndefine function ToString(value ImmunizationEvaluationStatus): value.value\r\ndefine function ToString(value ImmunizationStatus): value.value\r\ndefine function ToString(value InvoicePriceComponentType): value.value\r\ndefine function ToString(value InvoiceStatus): value.value\r\ndefine function ToString(value IssueSeverity): value.value\r\ndefine function ToString(value IssueType): value.value\r\ndefine function ToString(value LinkType): value.value\r\ndefine function ToString(value LinkageType): value.value\r\ndefine function ToString(value ListMode): value.value\r\ndefine function ToString(value ListStatus): value.value\r\ndefine function ToString(value LocationMode): value.value\r\ndefine function ToString(value LocationStatus): value.value\r\ndefine function ToString(value MeasureReportStatus): value.value\r\ndefine function ToString(value MeasureReportType): value.value\r\ndefine function ToString(value MediaStatus): value.value\r\ndefine function ToString(value MedicationAdministrationStatus): value.value\r\ndefine function ToString(value MedicationDispenseStatus): value.value\r\ndefine function ToString(value MedicationKnowledgeStatus): value.value\r\ndefine function ToString(value MedicationRequestIntent): value.value\r\ndefine function ToString(value MedicationRequestPriority): value.value\r\ndefine function ToString(value MedicationRequestStatus): value.value\r\ndefine function ToString(value MedicationStatementStatus): value.value\r\ndefine function ToString(value MedicationStatus): value.value\r\ndefine function ToString(value MessageSignificanceCategory): value.value\r\ndefine function ToString(value Messageheader_Response_Request): value.value\r\ndefine function ToString(value MimeType): value.value\r\ndefine function ToString(value NameUse): value.value\r\ndefine function ToString(value NamingSystemIdentifierType): value.value\r\ndefine function ToString(value NamingSystemType): value.value\r\ndefine function ToString(value NarrativeStatus): value.value\r\ndefine function ToString(value NoteType): value.value\r\ndefine function ToString(value NutritiionOrderIntent): value.value\r\ndefine function ToString(value NutritionOrderStatus): value.value\r\ndefine function ToString(value ObservationDataType): value.value\r\ndefine function ToString(value ObservationRangeCategory): value.value\r\ndefine function ToString(value ObservationStatus): value.value\r\ndefine function ToString(value OperationKind): value.value\r\ndefine function ToString(value OperationParameterUse): value.value\r\ndefine function ToString(value OrientationType): value.value\r\ndefine function ToString(value ParameterUse): value.value\r\ndefine function ToString(value ParticipantRequired): value.value\r\ndefine function ToString(value ParticipantStatus): value.value\r\ndefine function ToString(value ParticipationStatus): value.value\r\ndefine function ToString(value PaymentNoticeStatus): value.value\r\ndefine function ToString(value PaymentReconciliationStatus): value.value\r\ndefine function ToString(value ProcedureStatus): value.value\r\ndefine function ToString(value PropertyRepresentation): value.value\r\ndefine function ToString(value PropertyType): value.value\r\ndefine function ToString(value ProvenanceEntityRole): value.value\r\ndefine function ToString(value PublicationStatus): value.value\r\ndefine function ToString(value QualityType): value.value\r\ndefine function ToString(value QuantityComparator): value.value\r\ndefine function ToString(value QuestionnaireItemOperator): value.value\r\ndefine function ToString(value QuestionnaireItemType): value.value\r\ndefine function ToString(value QuestionnaireResponseStatus): value.value\r\ndefine function ToString(value ReferenceHandlingPolicy): value.value\r\ndefine function ToString(value ReferenceVersionRules): value.value\r\ndefine function ToString(value ReferredDocumentStatus): value.value\r\ndefine function ToString(value RelatedArtifactType): value.value\r\ndefine function ToString(value RemittanceOutcome): value.value\r\ndefine function ToString(value RepositoryType): value.value\r\ndefine function ToString(value RequestIntent): value.value\r\ndefine function ToString(value RequestPriority): value.value\r\ndefine function ToString(value RequestStatus): value.value\r\ndefine function ToString(value ResearchElementType): value.value\r\ndefine function ToString(value ResearchStudyStatus): value.value\r\ndefine function ToString(value ResearchSubjectStatus): value.value\r\ndefine function ToString(value ResourceType): value.value\r\ndefine function ToString(value ResourceVersionPolicy): value.value\r\ndefine function ToString(value ResponseType): value.value\r\ndefine function ToString(value RestfulCapabilityMode): value.value\r\ndefine function ToString(value RiskAssessmentStatus): value.value\r\ndefine function ToString(value SPDXLicense): value.value\r\ndefine function ToString(value SearchComparator): value.value\r\ndefine function ToString(value SearchEntryMode): value.value\r\ndefine function ToString(value SearchModifierCode): value.value\r\ndefine function ToString(value SearchParamType): value.value\r\ndefine function ToString(value SectionMode): value.value\r\ndefine function ToString(value SequenceType): value.value\r\ndefine function ToString(value ServiceRequestIntent): value.value\r\ndefine function ToString(value ServiceRequestPriority): value.value\r\ndefine function ToString(value ServiceRequestStatus): value.value\r\ndefine function ToString(value SlicingRules): value.value\r\ndefine function ToString(value SlotStatus): value.value\r\ndefine function ToString(value SortDirection): value.value\r\ndefine function ToString(value SpecimenContainedPreference): value.value\r\ndefine function ToString(value SpecimenStatus): value.value\r\ndefine function ToString(value Status): value.value\r\ndefine function ToString(value StrandType): value.value\r\ndefine function ToString(value StructureDefinitionKind): value.value\r\ndefine function ToString(value StructureMapContextType): value.value\r\ndefine function ToString(value StructureMapGroupTypeMode): value.value\r\ndefine function ToString(value StructureMapInputMode): value.value\r\ndefine function ToString(value StructureMapModelMode): value.value\r\ndefine function ToString(value StructureMapSourceListMode): value.value\r\ndefine function ToString(value StructureMapTargetListMode): value.value\r\ndefine function ToString(value StructureMapTransform): value.value\r\ndefine function ToString(value SubscriptionChannelType): value.value\r\ndefine function ToString(value SubscriptionStatus): value.value\r\ndefine function ToString(value SupplyDeliveryStatus): value.value\r\ndefine function ToString(value SupplyRequestStatus): value.value\r\ndefine function ToString(value SystemRestfulInteraction): value.value\r\ndefine function ToString(value TaskIntent): value.value\r\ndefine function ToString(value TaskPriority): value.value\r\ndefine function ToString(value TaskStatus): value.value\r\ndefine function ToString(value TestReportActionResult): value.value\r\ndefine function ToString(value TestReportParticipantType): value.value\r\ndefine function ToString(value TestReportResult): value.value\r\ndefine function ToString(value TestReportStatus): value.value\r\ndefine function ToString(value TestScriptRequestMethodCode): value.value\r\ndefine function ToString(value TriggerType): value.value\r\ndefine function ToString(value TypeDerivationRule): value.value\r\ndefine function ToString(value TypeRestfulInteraction): value.value\r\ndefine function ToString(value UDIEntryType): value.value\r\ndefine function ToString(value UnitsOfTime): value.value\r\ndefine function ToString(value Use): value.value\r\ndefine function ToString(value VariableType): value.value\r\ndefine function ToString(value VisionBase): value.value\r\ndefine function ToString(value VisionEyes): value.value\r\ndefine function ToString(value VisionStatus): value.value\r\ndefine function ToString(value XPathUsageType): value.value\r\ndefine function ToString(value base64Binary): value.value\r\ndefine function ToBoolean(value boolean): value.value\r\ndefine function ToDate(value date): value.value\r\ndefine function ToDateTime(value dateTime): value.value\r\ndefine function ToDecimal(value decimal): value.value\r\ndefine function ToDateTime(value instant): value.value\r\ndefine function ToInteger(value integer): value.value\r\ndefine function ToString(value string): value.value\r\ndefine function ToTime(value time): value.value\r\ndefine function ToString(value uri): value.value\r\ndefine function ToString(value xhtml): value.value</code></pre>\n      </td>\n    </tr>\n    \n    \n    \n  \n\n<tr>\n  <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.8 of the sample-content-ig Liquid templates</th>\n</tr>\n\n    </tbody>\n  </table>\n</div>"
      },
      "url": "https://madie.cms.gov/Library/FHIRHelpers",
      "identifier": [ {
        "use": "official",
        "system": "https://madie.cms.gov/login",
        "value": "660d90bc01598d085de46056"
      } ],
      "version": "4.4.000",
      "name": "FHIRHelpers",
      "title": "FHIRHelpers",
      "status": "active",
      "experimental": false,
      "type": {
        "coding": [ {
          "system": "http://terminology.hl7.org/CodeSystem/library-type",
          "code": "logic-library"
        } ]
      },
      "date": "2025-07-25T21:09:08+00:00",
      "publisher": "ICF",
      "description": "This library defines functions to convert between FHIR\n data types and CQL system-defined types, as well as functions to support\n FHIRPath implementation. For more information, the FHIRHelpers wiki page:\n https://github.com/cqframework/clinical_quality_language/wiki/FHIRHelpers",
      "relatedArtifact": [ {
        "type": "depends-on",
        "display": "FHIR model information",
        "resource": "http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1"
      } ],
      "content": [ {
        "contentType": "text/cql",
        "data": "[encoded data, 52440 characters]"
      }, {
        "contentType": "application/elm+xml",
        "data": "[encoded data, 1342916 characters]"
      }, {
        "contentType": "application/elm+json",
        "data": "[encoded data, 2177516 characters]"
      } ]
    },
    "request": {
      "method": "POST",
      "url": "Library/FHIRHelpers"
    }
  } ]
}