eCQM QICore Content Implementation Guide
2024.0.0 - CI Build

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

Measure: Preventive Care and Screening Body Mass Index Screening and Follow Up PlanFHIR

Official URL: https://madie.cms.gov/Measure/PCSBMIScreenAndFollowUpFHIR Version: 0.2.000
Draft as of 2024-07-09 Responsible: Centers for Medicare & Medicaid Services (CMS) Computable Name: PCSBMIScreenAndFollowUpFHIR
Other Identifiers: Short Name (use: usual, ), UUID:5d929142-0109-4dc3-97b5-27c9296b3cf9 (use: official, ), UUID:be7d6a31-0eae-454a-9524-bcb105417ca3 (use: official, ), Publisher (use: official, )

Copyright/Legal: Limited proprietary coding is contained in the measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. CPT(R) contained in the Measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) is copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 World Health Organization. All Rights Reserved.

Percentage of patients aged 18 years and older with a BMI documented during the current encounter or during the measurement period AND who had a follow-up plan documented if BMI was outside of normal parameters

UNKNOWN

Title: Preventive Care and Screening Body Mass Index Screening and Follow Up PlanFHIR
Id: PCSBMIScreenAndFollowUpFHIR
Version: 0.2.000
Url: Preventive Care and Screening Body Mass Index Screening and Follow Up PlanFHIR
short-name identifier:

CMS69FHIR

version-independent identifier:

urn:uuid:5d929142-0109-4dc3-97b5-27c9296b3cf9

version-specific identifier:

urn:uuid:be7d6a31-0eae-454a-9524-bcb105417ca3

publisher (CMS) identifier:

69FHIR

Effective Period: 2025-01-01..2025-12-31
Status: draft
Publisher: Centers for Medicare & Medicaid Services (CMS)
Author: Mathematica
Description:

Percentage of patients aged 18 years and older with a BMI documented during the current encounter or during the measurement period AND who had a follow-up plan documented if BMI was outside of normal parameters

Purpose:

UNKNOWN

Copyright:

Limited proprietary coding is contained in the measure specifications for convenience. Users of the proprietary code sets should obtain all necessary licenses from the owners of these code sets. CPT(R) contained in the Measure specifications is copyright 2004-2023 American Medical Association. LOINC(R) is copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 is copyright 2023 World Health Organization. All Rights Reserved.

Disclaimer:

These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. THE MEASURES 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:

BMI Above Normal Parameters “Obesity is a chronic, multifactorial disease with complex psychological, environmental (social and cultural), genetic, physiologic, metabolic and behavioral causes and consequences. The prevalence of overweight and obese people is increasing worldwide at an alarming rate in both developing and developed countries. Environmental and behavioral changes brought about by economic development, modernization and urbanization have been linked to the rise in global obesity. The health consequences are becoming apparent” (Fitch et al., 2013). More than a third of U.S. adults have a body mass index (BMI) >= 30 kg/m2 and are at increased risk for diabetes, cardiovascular disease (CVD), and obstructive sleep apnea (Flegal et al., 2012; Ogden et al., 2015; Dong et al., 2020). Hales et al. (2017), reported that the prevalence of obesity among adults and youth in the United States was 39.8 percent and 18.5 percent respectively, from 2015-2016. Furthermore, the prevalence of obesity in adults increased to 42.4 percent in 2018, with the highest percentage among adults in the 40-59 age bracket compared with other age groups (Hales et al., 2020). Hales et al. (2020) also disaggregated the data according to race/ethnicity and noted that obesity prevalence was higher among non-Hispanic Black adults and Hispanic adults when compared with other races and ethnicities. Obesity prevalence was lowest among non-Hispanic Asian men and women. Among men, obesity prevalence was higher among Hispanic men compared with non-Hispanic Black men and non-Hispanic White men. Among women, the prevalence among non-Hispanic Black women was 56.9 percent, which was higher than all other race/ethnicities. In general, the prevalence of obesity in the U.S. remains higher than the Healthy People 2020 goals of 30.5 percent among adults (Hales et al., 2020). BMI continues to be a common and reasonably reliable measurement to identify overweight and obese adults who may be at an increased risk for future morbidity. Although good quality evidence supports obtaining a BMI, it is important to recognize it is not a perfect measurement. For example, BMI and its associated disease and mortality risk appear to vary among ethnic subgroups. Black/African Americans appear to have the lowest mortality risk at a BMI of 26.2-28.5 kg/m2 in Black women and 27.1-30.2 kg/m2 in Black men. In contrast, Asian populations may experience lowest mortality rates starting at a BMI of 23 to 24 kg/m2. The correlation between BMI and diabetes risk also varies by ethnicity (LeBlanc et al., 2011). BMI is not a direct measure of adiposity and as a consequence, it can over or underestimate adiposity. However, overall, BMI is a derived value that correlates well with total body fat and markers of secondary complications, e.g., hypertension and dyslipidemia (Barlow & the Expert Committee, 2007). It is important to enhance beneficiary access to appropriate treatments for obesity, which could result in decreased healthcare costs and lower obesity rates. Behavioral weight management treatment has been identified as an effective first-line treatment for obesity with an average initial weight loss of 8-10 percent. This percentage of weight loss is associated with a significant risk reduction for diabetes and CVD (Wadden, Butryn & Wilson, 2007). Evidence also shows that when provided 14 or more high-intensity behavioral intervention sessions of face-to-face individual or group treatment across 6 months, participants lose up to 8 percent of their weight during that time and experience improvements in heart disease risk factors and quality of life (Wadden, Tronieri, & Butryn, 2020). There is also evidence that high-intensity behavioral counseling is effective, whether delivered in-person, by phone, or electronically (Tronieri et al., 2019). Moreover, intensive behavioral therapy for obesity provided by registered dietitian nutritionists for 6-12 months shows significant mean weight loss of up to 10 percent of body weight, maintained over one year’s time (Raynor & Champagne, 2016). Despite the evidence that supports weight management counseling, the rate of use in primary care for patients with obesity decreased by 10 percent from 39.9 percent in 1995-1996 to 29.9 percent in 2007-2008 (Kraschnewski et al., 2013). Weight management counseling during primary care visits further declined from 33 percent to 21 percent between 2008-2009 and 2012-2013. This suggests that obesity management in primary care remains suboptimal (Fitzpatrick & Stevens, 2017). Therefore, screening for BMI and follow-up is critical and will help in reaching the quality goals of population health and cost reduction. However, due to concerns for other underlying conditions (such as bone health) or nutrition-related deficiencies, providers are cautioned to use their best clinical judgment when considering weight management programs for overweight patients, especially the elderly (National Heart, Lung, and Blood Institute [NHLBI] Obesity Education Initiative, 1998). BMI Below Normal Parameters On the other end of the body weight spectrum is underweight (BMI < 18.5 kg/m2), which is also detrimental to population health. When compared to normal weight individuals (BMI 18.5-25 kg/m2), underweight individuals have significantly higher death rates with a Hazard Ratio of 2.27 and 95 percent confidence intervals = 1.78, 2.90 (Borrell & Samuel, 2014). Individuals with a BMI < 18.5 kg/m2 have been shown to be at a higher risk for adverse events, postoperative infection, and/or mortality following a surgical procedure (Katakam, et al., 2021; Ottesen et al., 2020; Ottesen et al., 2022; Rudasill et al., 2021). BMI below normal parameters is a risk factor for developing severe illness from respiratory infections such as influenza and COVID-19 (Moser et al., 2019; Ye et al., 2021). BMI below normal parameters can negatively impact both male and female fertility (Boutari et al., 2020; Guo et al., 2019). Poor nutrition or underlying health conditions can result in underweight (Fryar & Ogden, 2012). The National Health and Nutrition Examination Survey (NHANES) results from 2007-2010 indicate that women are more likely to be underweight than men (Fryar & Ogden, 2012). However, all patients should be equally screened for underweight and followed up with nutritional counseling or another clinically appropriate intervention to reduce mortality and morbidity associated with underweight.

Clinical recommendation statement:

All adults should be screened annually using a BMI measurement. BMI measurements >= 25 kg/m2 should be used to initiate further evaluation of overweight or obesity after taking into account age, gender, ethnicity, fluid status, and muscularity; therefore, clinical evaluation and judgment must be used when BMI is employed as the anthropometric indicator of excess adiposity, particularly in athletes and those with sarcopenia (Garvey et al., 2016) (Grade A). Overweight and Underweight Categories: Underweight < 18.5; Normal weight 18.5-24.9; Overweight 25-29.9; Obese class I 30-34.9; Obese class II 35-39.9; Obese class III >= 40 (Garvey et al., 2016). BMI cutoff point value of >= 23 kg/m2 should be used in the screening and confirmation of excess adiposity in Asian adults (Garvey et al., 2016) (Grade B). Lifestyle/behavioral therapy for overweight and obesity should include behavioral interventions that enhance adherence to prescriptions for a reduced-calorie meal plan and increased physical activity (behavioral interventions can include: self-monitoring of weight, food intake, and physical activity; clear and reasonable goal-setting; education pertaining to obesity, nutrition, and physical activity; face-to-face and group meetings; stimulus control; systematic approaches for problem solving; stress reduction; cognitive restructuring [i.e., cognitive behavioral therapy], motivational interviewing; behavioral contracting; psychological counseling; and mobilization of social support structures) (Garvey et al., 2016) (Grade A). Behavioral lifestyle intervention should be tailored to a patient's ethnic, cultural, socioeconomic, and educational background (Garvey et al., 2016) (Grade B). The U.S. Preventive Services Task Force (USPSTF) recommends that clinicians offer or refer adults with a BMI of 30 kg/m2 or higher to intensive, multicomponent behavioral interventions (USPSTF, 2018) (Grade B). Interventions: - Effective intensive behavioral interventions were designed to help participants achieve or maintain weight loss of at least five percent through a combination of dietary changes and increased physical activity - Most interventions lasted for one to two years, and the majority had at least 12 sessions in the first year - Most behavioral interventions focused on problem solving to identify barriers, self-monitoring of weight, peer support, and relapse prevention - Interventions also provided tools to support weight loss or weight loss maintenance (e.g., pedometers, food scales, or exercise videos) (USPSTF, 2018) Nutritional safety for the elderly should be considered when recommending weight reduction. "A clinical decision to forego obesity treatment in older adults should be guided by an evaluation of the potential benefits of weight reduction for day-to-day functioning and reduction of the risk of future cardiovascular events, as well as the patient's motivation for weight reduction. Care must be taken to ensure that any weight reduction program minimizes the likelihood of adverse effects on bone health or other aspects of nutritional status" (NHLBI Obesity Education Initiative, 1998) (Evidence Category D). In addition, weight reduction prescriptions in older persons should be accompanied by proper nutritional counseling and regular body weight monitoring (NHLBI Obesity Education Initiative, 1998). The possibility that a standard approach to weight loss will work differently in diverse patient populations must be considered when setting expectations about treatment outcomes (NHLBI Obesity Education Initiative, 1998) (Evidence Category B).

Guidance (Usage): BMI Measurement Guidance: - Height and Weight - An eligible clinician or their staff is required to measure both height and weight. Both height and weight must be measured during the measurement period. Self-reported values cannot be used. - The BMI may be documented in the medical record of the provider or in outside medical records obtained by the provider. - If the documented BMI is outside of normal parameters, then a follow-up plan is documented during the encounter or during the measurement period. - If more than one BMI is reported during the measurement period, and any of the documented BMI assessments is outside of normal parameters, documentation of an appropriate follow-up plan will be used to determine if performance has been met. - Review the exclusions and exceptions criteria to determine those patients that BMI measurement may not be appropriate or necessary. Follow-Up Plan Guidance: The documented follow-up plan must be based on the documented BMI, outside of normal parameters, example: "Patient referred to nutrition counseling for BMI above or below normal parameters." See the Definition section for examples of follow-up plan treatments. Variation has been noted in studies exploring optimal BMI ranges for the elderly (see Donini et al., 2012; Holme & Tonstad, 2015; Diehr et al., 2008). Notably however, all these studies have arrived at ranges that differ from the standard range for ages 18 and older, which is >= 18.5 and < 25 kg/m2. For instance, both Donini et al. and Holme and Tonstad reported findings that suggest that higher BMI (higher than the upper end of 25 kg/m2) in the elderly may be beneficial. Similarly, worse outcomes have been associated with being underweight (at a threshold higher than 18.5 kg/m2) at age 65 (Diehr et al., 2008). Because of optimal BMI range variation recommendations from these studies, no specific optimal BMI range for the elderly is used. However, it may be appropriate to exempt certain patients from a follow-up plan by applying the exception criteria. See Denominator Exception section for examples. This eCQM is a patient-based measure. This measure is to be reported a minimum of once per measurement period for patients seen during the measurement period. This measure may be reported by eligible clinicians who perform the quality actions described in the measure based on the services provided at the time of the qualifying encounter or during the measurement period and the measure-specific denominator coding. Telehealth encounters are not eligible for this measure because the measure requires a clinical action that cannot be conducted via telehealth. If a patient meets exception criteria for the denominator (i.e., the patient refuses height or weight measurement or has a documented medical reason for not documenting BMI or a follow-up plan), an eligible clinician must document those criteria on the same day as the qualifying encounter. This FHIR-based measure has been derived from the QDM-based measure: CMS 69v13. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).
Population Criteria:
64ef766456d636294b157b5f
Initial Population: All patients aged 18 and older on the date of the encounter with at least one qualifying encounter during the measurement period
Denominator: Equals Initial Population
Denominator Exclusion: Patients who are pregnant at any time during the measurement period. Patients receiving palliative or hospice care at any time during the measurement period.
Numerator: Patients with a documented BMI during the encounter or during the measurement period, AND when the BMI is outside of normal parameters, a follow-up plan is documented during the encounter or during the measurement period
Denominator Exception: Patients with a documented medical reason for not documenting BMI or for not documenting a follow-up plan for a BMI outside normal parameters (e.g., elderly patients 65 years of age or older for whom weight reduction/weight gain would complicate other underlying health conditions such as illness or physical disability, mental illness, dementia, confusion, or nutritional deficiency such as vitamin/mineral deficiency; patients in an urgent or emergent medical situation where time is of the essence and to delay treatment would jeopardize the patient’s health status). Patients who refuse measurement of height and/or weight.
Supplemental Data Elements:

SDE Ethnicity

SDE Payer

SDE Race

SDE Sex

Supplemental Data Guidance : For every patient evaluated by this measure also identify payer, race, ethnicity, and sex; SDE Ethnicity SDE Payer SDE Race SDE Sex
Libraries:
PCSBMIScreenAndFollowUpFHIR
Terminology and Other Dependencies:
  • Library/SupplementalDataElements|3.5.000
  • Library/FHIRHelpers|4.4.000
  • Library/QICoreCommon|2.1.000
  • Library/Hospice|6.12.000
  • Library/Status|1.8.000
  • Library/PalliativeCare|1.11.000
  • AdministrativeGender
  • Condition Category Codes
  • US Core Condition Category Extension Codes
  • Condition Clinical Status Codes
  • ActCode
  • SNOMED CT (all versions)
  • Observation Category Codes
  • Logical Observation Identifiers, Names and Codes (LOINC)
  • Follow Up for Above Normal BMI
  • Referrals Where Weight Assessment May Occur
  • Medications for Above Normal BMI
  • Overweight or Obese
  • Follow Up for Below Normal BMI
  • Medications for Below Normal BMI
  • Underweight
  • Encounter to Evaluate BMI
  • Payer
  • Encounter Inpatient
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
  • Hospice Care Ambulatory
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
  • Pregnancy or Other Related Diagnoses
  • Medical Reason
  • Patient Declined
  • Parameters:
    name use min max type
    Measurement Period In 0 1 Period
    SDE Sex Out 0 1 Coding
    Numerator Out 0 1 boolean
    Denominator Out 0 1 boolean
    SDE Payer Out 0 * Resource
    Initial Population Out 0 1 boolean
    SDE Ethnicity Out 0 1 Resource
    Denominator Exclusions Out 0 1 boolean
    SDE Race Out 0 1 Resource
    Denominator Exceptions Out 0 1 boolean
    DataRequirements:
    Resource Type Resource Elements Valueset Name Valueset
    Patient(QICorePatient) ethnicity race
    Observation(Observation Body Mass Index Profile) value status status.value effective
    Medication(QICoreMedication) id
    Medication(QICoreMedication) id
    MedicationRequest(QICoreMedicationRequest) medication Medications for Above Normal BMI Medications for Above Normal BMI
    MedicationRequest(QICoreMedicationRequest) medication.reference
    MedicationRequest(QICoreMedicationRequest) medication Medications for Below Normal BMI Medications for Below Normal BMI
    ServiceRequest(QICoreServiceRequest) code status status.value intent intent.value Follow Up for Above Normal BMI Follow Up for Above Normal BMI
    ServiceRequest(QICoreServiceRequest) code status status.value intent intent.value Follow Up for Below Normal BMI Follow Up for Below Normal BMI
    ServiceRequest(QICoreServiceRequest) code status status.value intent intent.value Referrals Where Weight Assessment May Occur Referrals Where Weight Assessment May Occur
    ServiceRequest(QICoreServiceRequest) code authoredOn authoredOn.value status status.value intent intent.value Hospice Care Ambulatory Hospice Care Ambulatory
    Condition(QICoreCondition) code Overweight or Obese Overweight or Obese
    Condition(QICoreCondition) code Underweight Underweight
    Condition(QICoreCondition) code Hospice Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
    Condition(QICoreCondition) code Palliative Care Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167
    Condition(QICoreCondition) code clinicalStatus Pregnancy or Other Related Diagnoses Pregnancy or Other Related Diagnoses
    Procedure(QICoreProcedure) code reasonCode performed status status.value Follow Up for Above Normal BMI Follow Up for Above Normal BMI
    Procedure(QICoreProcedure) code reasonCode status status.value performed Follow Up for Below Normal BMI Follow Up for Below Normal BMI
    Procedure(QICoreProcedure) code performed status status.value Hospice Care Ambulatory Hospice Care Ambulatory
    Procedure(QICoreProcedure) code performed status status.value Palliative Care Intervention http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
    Encounter(QICoreEncounter) type hospitalization hospitalization.dischargeDisposition period status status.value Encounter Inpatient Encounter Inpatient
    Encounter(QICoreEncounter) type period status status.value Hospice Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
    Encounter(QICoreEncounter) type period status status.value Palliative Care Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
    Encounter(QICoreEncounter) type period class status status.value Encounter to Evaluate BMI Encounter to Evaluate BMI
    Encounter(QICoreEncounter) type period class status status.value Encounter to Evaluate BMI Encounter to Evaluate BMI
    Coverage(QICoreCoverage) type period Payer Type Payer
    Observation(QICoreObservation) code value effective status status.value category
    Observation(QICoreObservation) code effective status status.value category
    ServiceRequest(QICoreServiceNotRequested) code authoredOn authoredOn.value status status.value extension Referrals Where Weight Assessment May Occur Referrals Where Weight Assessment May Occur
    ServiceRequest(QICoreServiceNotRequested) code authoredOn authoredOn.value status status.value extension Referrals Where Weight Assessment May Occur Referrals Where Weight Assessment May Occur
    ServiceRequest(QICoreServiceNotRequested) code authoredOn authoredOn.value status status.value extension Follow Up for Above Normal BMI Follow Up for Above Normal BMI
    ServiceRequest(QICoreServiceNotRequested) code authoredOn authoredOn.value status status.value extension Follow Up for Above Normal BMI Follow Up for Above Normal BMI
    ServiceRequest(QICoreServiceNotRequested) code authoredOn authoredOn.value status status.value extension Follow Up for Below Normal BMI Follow Up for Below Normal BMI
    ServiceRequest(QICoreServiceNotRequested) code authoredOn authoredOn.value status status.value extension Follow Up for Below Normal BMI Follow Up for Below Normal BMI
    MedicationRequest(QICoreMedicationNotRequested) medication authoredOn authoredOn.value status status.value reasonCode Medications for Above Normal BMI Medications for Above Normal BMI
    MedicationRequest(QICoreMedicationNotRequested) medication authoredOn authoredOn.value status status.value reasonCode Medications for Above Normal BMI Medications for Above Normal BMI
    MedicationRequest(QICoreMedicationNotRequested) medication authoredOn authoredOn.value status status.value reasonCode Medications for Below Normal BMI Medications for Below Normal BMI
    MedicationRequest(QICoreMedicationNotRequested) medication authoredOn authoredOn.value status status.value reasonCode Medications for Below Normal BMI Medications for Below Normal BMI
    Observation(QICoreObservationNotDone) code effective status status.value extension
    Direct Reference Codes:
    display code system
    Male M http://hl7.org/fhir/administrative-gender
    Female F http://hl7.org/fhir/administrative-gender
    Problem List Item problem-list-item http://terminology.hl7.org/CodeSystem/condition-category
    Health Concern health-concern http://hl7.org/fhir/us/core/CodeSystem/condition-category
    Active active http://terminology.hl7.org/CodeSystem/condition-clinical
    Recurrence recurrence http://terminology.hl7.org/CodeSystem/condition-clinical
    Relapse relapse http://terminology.hl7.org/CodeSystem/condition-clinical
    virtual VR http://terminology.hl7.org/CodeSystem/v3-ActCode
    Discharge to home for hospice care (procedure) 428361000124107 http://snomed.info/sct
    Discharge to healthcare facility for hospice care (procedure) 428371000124100 http://snomed.info/sct
    survey survey http://terminology.hl7.org/CodeSystem/observation-category
    Yes (qualifier value) 373066001 http://snomed.info/sct
    Hospice care [Minimum Data Set] 45755-6 http://loinc.org
    Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal) 71007-9 http://loinc.org
    Body mass index (BMI) [Ratio] 39156-5 http://loinc.org
    Logic Definitions:
    Group Scoring Population Criteria Expression
    64ef766456d636294b157b5f Group scoring: proportion
    Type:

    Process

    Rate Aggregation: None
    Improvement Notation:

    increase

    Initial Population
    define "Initial Population":
      exists "Qualifying Encounter during Day of Measurement Period" QualifyingEncounter
        where "AgeInYearsAt"(date from start of QualifyingEncounter.period) >= 18
    Denominator
    define "Denominator":
      "Initial Population"
    Denominator Exclusion
    define "Denominator Exclusions":
      Hospice."Has Hospice Services"
        or PalliativeCare."Has Palliative Care in the Measurement Period"
        or exists "Is Pregnant during Day of Measurement Period"
    Numerator
    define "Numerator":
      exists "High BMI and Follow up Provided"
        or exists "Low BMI and Follow up Provided"
        or "Has Normal BMI"
    Denominator Exception
    define "Denominator Exceptions":
      exists "Medical Reason for Not Documenting a Follow up Plan for Low or High BMI"
        or exists "Medical Reason or Patient Reason for Not Performing BMI Exam"
    Library Name Name
    SupplementalDataElements SDE Sex
    define "SDE Sex":
      case
        when Patient.gender = 'male' then "M"
        when Patient.gender = 'female' then "F"
        else null
      end
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR SDE Sex
    define "SDE Sex":
      SDE."SDE Sex"
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR BMI during Measurement Period
    define "BMI during Measurement Period":
      ["observation-bmi"] BMI
        where BMI.value > 0 'kg/m2'
          and BMI.status in { 'final', 'amended', 'corrected' }
          and BMI.effective.toInterval ( ) during day of "Measurement Period"
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Documented High BMI during Measurement Period
    define "Documented High BMI during Measurement Period":
      "BMI during Measurement Period" BMI
        where BMI.effective.toInterval ( ) during day of "Measurement Period"
          and BMI.value >= 25 'kg/m2'
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR High BMI Interventions Ordered
    define "High BMI Interventions Ordered":
      ( ( [ServiceRequest: "Follow Up for Above Normal BMI"]
          union [ServiceRequest: "Referrals Where Weight Assessment May Occur"]
          union [MedicationRequest: "Medications for Above Normal BMI"] ) HighInterventionsOrdered
          where HighInterventionsOrdered.reasonCode in "Overweight or Obese"
            or ( exists [Condition: "Overweight or Obese"] OverweightObese
                where ( OverweightObese.isProblemListItem ( )
                    or OverweightObese.isHealthConcern ( )
                )
                  and OverweightObese.isActive ( )
                  and OverweightObese.prevalenceInterval ( ) starts before or on day of HighInterventionsOrdered.authoredOn
            )
      )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR High BMI Interventions Performed
    define "High BMI Interventions Performed":
      ( [Procedure: "Follow Up for Above Normal BMI"] HighInterventionsPerformed
          where HighInterventionsPerformed.reasonCode in "Overweight or Obese"
            or ( exists ["Condition": "Overweight or Obese"] OverweightObese
                where OverweightObese.prevalenceInterval ( ) starts before or on day of HighInterventionsPerformed.performed
                  and not ( OverweightObese.prevalenceInterval ( ) ends before day of HighInterventionsPerformed.performed )
            )
      )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR High BMI and Follow up Provided
    define "High BMI and Follow up Provided":
      "Documented High BMI during Measurement Period" HighBMI
        with ( "High BMI Interventions Ordered"
          union "High BMI Interventions Performed" ) HighBMIInterventions
          such that Coalesce(HighBMIInterventions.performed.toInterval(), HighBMIInterventions.authoredOn.toInterval()) starts during day of "Measurement Period"
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Documented Low BMI during Measurement Period
    define "Documented Low BMI during Measurement Period":
      "BMI during Measurement Period" BMI
        where BMI.effective.toInterval ( ) during day of "Measurement Period"
          and BMI.value < 18.5 'kg/m2'
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Low BMI Interventions Ordered
    define "Low BMI Interventions Ordered":
      ( ( [ServiceRequest: "Follow Up for Below Normal BMI"]
          union [ServiceRequest: "Referrals Where Weight Assessment May Occur"]
          union [MedicationRequest: "Medications for Below Normal BMI"] ) LowInterventionsOrdered
          where LowInterventionsOrdered.reasonCode in "Underweight"
            or ( exists [Condition: "Underweight"] Underweight
                where ( Underweight.isHealthConcern ( ) )
                  and Underweight.isActive ( )
                  and Underweight.prevalenceInterval ( ) starts before or on day of LowInterventionsOrdered.authoredOn
                  and LowInterventionsOrdered.authoredOn during day of "Measurement Period"
            )
      )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Low BMI Interventions Performed
    define "Low BMI Interventions Performed":
      ( [Procedure: "Follow Up for Below Normal BMI"] LowInterventionsPerformed
          where LowInterventionsPerformed.reasonCode in "Underweight"
            and LowInterventionsPerformed.status = 'completed'
            or ( exists [Condition: "Underweight"] Underweight
                where ( Underweight.isHealthConcern ( ) )
                  and Underweight.isActive ( )
                  and Underweight.prevalenceInterval ( ) starts before or on day of LowInterventionsPerformed.performed.toInterval ( )
                  and LowInterventionsPerformed.performed.toInterval ( ) during day of "Measurement Period"
                  and not ( Underweight.prevalenceInterval ( ) ends before day of LowInterventionsPerformed.performed.toInterval ( ) )
            )
      )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Low BMI and Follow up Provided
    define "Low BMI and Follow up Provided":
      ( "Documented Low BMI during Measurement Period" LowBMI
          with ( "Low BMI Interventions Ordered"
            union "Low BMI Interventions Performed" ) LowBMIInterventions
            such that Coalesce(LowBMIInterventions.performed.toInterval(), LowBMIInterventions.authoredOn.toInterval()) starts during day of "Measurement Period"
      )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Has Normal BMI
    define "Has Normal BMI":
      exists ( "BMI during Measurement Period" BMI
          where BMI.value >= 18.5 'kg/m2'
            and BMI.value < 25 'kg/m2'
      )
        and not ( exists "Documented High BMI during Measurement Period"
            or exists "Documented Low BMI during Measurement Period"
        )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Numerator
    define "Numerator":
      exists "High BMI and Follow up Provided"
        or exists "Low BMI and Follow up Provided"
        or "Has Normal BMI"
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Qualifying Encounter during Day of Measurement Period
    define "Qualifying Encounter during Day of Measurement Period":
      [Encounter: "Encounter to Evaluate BMI"] BMIEncounter
        where BMIEncounter.period during day of "Measurement Period"
          and BMIEncounter.class !~ "virtual"
          and BMIEncounter.status = 'finished'
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Initial Population
    define "Initial Population":
      exists "Qualifying Encounter during Day of Measurement Period" QualifyingEncounter
        where "AgeInYearsAt"(date from start of QualifyingEncounter.period) >= 18
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Denominator
    define "Denominator":
      "Initial Population"
    Library Name Name
    SupplementalDataElements SDE Payer
    define "SDE Payer":
      [Coverage: type in "Payer Type"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR SDE Payer
    define "SDE Payer":
      SDE."SDE Payer"
    Library Name Name
    SupplementalDataElements SDE Ethnicity
    define "SDE Ethnicity":
      Patient.ethnicity E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR SDE Ethnicity
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
    Library Name Name
    Hospice Has Hospice Services
    define "Has Hospice Services":
      exists ((([Encounter: "Encounter Inpatient"]).isEncounterPerformed()) InpatientEncounter
          where (InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to home for hospice care (procedure)"
              or InpatientEncounter.hospitalization.dischargeDisposition ~ "Discharge to healthcare facility for hospice care (procedure)"
          )
            and InpatientEncounter.period.toInterval() ends during day of "Measurement Period"
      )
        or exists ((([Encounter: "Hospice Encounter"]).isEncounterPerformed()) HospiceEncounter
            where HospiceEncounter.period.toInterval() overlaps day of "Measurement Period"
        )
        or exists ((([Observation: "Hospice care [Minimum Data Set]"]).isAssessmentPerformed()) HospiceAssessment
            where HospiceAssessment.value ~ "Yes (qualifier value)"
              and HospiceAssessment.effective.toInterval() overlaps day of "Measurement Period"
        )
        or exists ((([ServiceRequest: "Hospice Care Ambulatory"]).isInterventionOrder()) HospiceOrder
            where HospiceOrder.authoredOn.toInterval() during day of "Measurement Period"
            // and HospiceOrder.doNotPerform is not true
            // https://oncprojectracking.healthit.gov/support/browse/CQLIT-447
        )
        or exists ((([Procedure: "Hospice Care Ambulatory"]).isInterventionPerformed()) HospicePerformed
            where HospicePerformed.performed.toInterval() overlaps day of "Measurement Period"
        )
        or exists (([Condition: "Hospice Diagnosis"]) HospiceCareDiagnosis
            where HospiceCareDiagnosis.prevalenceInterval() overlaps day of "Measurement Period"
        )
    Library Name Name
    PalliativeCare Has Palliative Care in the Measurement Period
    define "Has Palliative Care in the Measurement Period":
      exists ((([Observation: "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)"]).isAssessmentPerformed()) PalliativeAssessment
          where PalliativeAssessment.effective.toInterval() overlaps day of "Measurement Period"
      )
        or exists ([Condition: "Palliative Care Diagnosis"] PalliativeDiagnosis
            where PalliativeDiagnosis.prevalenceInterval() overlaps day of "Measurement Period"
        )
        or exists ((([Encounter: "Palliative Care Encounter"]).isEncounterPerformed()) PalliativeEncounter
            where PalliativeEncounter.period.toInterval() overlaps day of "Measurement Period"
        )
        or exists ((([Procedure: "Palliative Care Intervention"]).isInterventionPerformed()) PalliativeIntervention
            where PalliativeIntervention.performed.toInterval() overlaps day of "Measurement Period"
        )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Is Pregnant during Day of Measurement Period
    define "Is Pregnant during Day of Measurement Period":
      [Condition: "Pregnancy or Other Related Diagnoses"] PregnancyDiagnosis
        with "Qualifying Encounter during Day of Measurement Period" QualifyingEncounter
          such that PregnancyDiagnosis.clinicalStatus ~ QICoreCommon."active"
            and PregnancyDiagnosis.prevalenceInterval ( ) overlaps day of "Measurement Period"
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Denominator Exclusions
    define "Denominator Exclusions":
      Hospice."Has Hospice Services"
        or PalliativeCare."Has Palliative Care in the Measurement Period"
        or exists "Is Pregnant during Day of Measurement Period"
    Library Name Name
    SupplementalDataElements SDE Race
    define "SDE Race":
      Patient.race R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR SDE Race
    define "SDE Race":
      SDE."SDE Race"
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Medical Reason for Not Documenting a Follow up Plan for Low or High BMI
    define "Medical Reason for Not Documenting a Follow up Plan for Low or High BMI":
      ( ( [ServiceNotRequested: "Referrals Where Weight Assessment May Occur"]
          union [ServiceNotRequested: "Follow Up for Above Normal BMI"]
          union [ServiceNotRequested: "Follow Up for Below Normal BMI"] ) NoBMIFollowUp
          with "Qualifying Encounter during Day of Measurement Period" QualifyingEncounter
            such that NoBMIFollowUp.authoredOn same day as start of QualifyingEncounter.period
          where NoBMIFollowUp.status ~ 'completed'
            and NoBMIFollowUp.reasonRefused in "Medical Reason"
      )
        union ( ( [MedicationNotRequested: "Medications for Above Normal BMI"]
            union [MedicationNotRequested: "Medications for Below Normal BMI"] ) NoBMIFollowUp
            with "Qualifying Encounter during Day of Measurement Period" QualifyingEncounter
              such that NoBMIFollowUp.authoredOn same day as start of QualifyingEncounter.period
            where NoBMIFollowUp.status ~ 'completed'
              and NoBMIFollowUp.reasonCode in "Medical Reason"
        )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Medical Reason or Patient Reason for Not Performing BMI Exam
    define "Medical Reason or Patient Reason for Not Performing BMI Exam":
      [ObservationNotDone: code = "Body mass index (BMI) [Ratio]"] NoBMI
        with "Qualifying Encounter during Day of Measurement Period" QualifyingEncounter
          such that NoBMI.effective.toInterval ( ) ends same day as start of QualifyingEncounter.period
        where NoBMI.status = 'cancelled'
          and ( NoBMI.notDoneReason in "Patient Declined"
              or NoBMI.notDoneReason in "Medical Reason"
          )
    Library Name Name
    PCSBMIScreenAndFollowUpFHIR Denominator Exceptions
    define "Denominator Exceptions":
      exists "Medical Reason for Not Documenting a Follow up Plan for Low or High BMI"
        or exists "Medical Reason or Patient Reason for Not Performing BMI Exam"
    Library Name Name
    FHIRHelpers ToConcept
    /*
    @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
    */
    define function ToConcept(concept FHIR.CodeableConcept):
        if concept is null then
            null
        else
            System.Concept {
                codes: concept.coding C return ToCode(C),
                display: concept.text.value
            }
    Library Name Name
    QICoreCommon isProblemListItem
    /*
    @description: Returns true if the given condition is a problem list item.
    */
    define fluent function isProblemListItem(condition Condition):
      exists (condition.category C
        where C ~ "problem-list-item"
      )
    Library Name Name
    QICoreCommon isHealthConcern
    /*
    @description: Returns true if the given condition is a health concern
    */
    define fluent function isHealthConcern(condition Condition):
      exists (condition.category C
        where C ~ "health-concern"
      )
    Library Name Name
    QICoreCommon isActive
    /* Candidates for FHIRCommon */
    
    /*
    @description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
    */
    define fluent function isActive(condition Condition):
      condition.clinicalStatus ~ "active"
        or condition.clinicalStatus ~ "recurrence"
        or condition.clinicalStatus ~ "relapse"
    Library Name Name
    QICoreCommon prevalenceInterval
    /*
    @description: Returns an interval representing the normalized prevalence period of a given Condition.
    @comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
    onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
    interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
    */
    define fluent function prevalenceInterval(condition Condition):
    if condition.clinicalStatus ~ "active"
      or condition.clinicalStatus ~ "recurrence"
      or condition.clinicalStatus ~ "relapse" then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
        (end of condition.abatementInterval()) abatementDate
        return if abatementDate is null then
          Interval[start of condition.onset.toInterval(), abatementDate)
        else
          Interval[start of condition.onset.toInterval(), abatementDate]
    Library Name Name
    QICoreCommon toInterval
    /*
    @description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
    @comment: Normalizes a choice type of DateTime, Quanitty, Interval<DateTime>, or Interval<Quantity> types
    to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
    representations for timing-valued elements in QICore, allowing this function to be used across any resource.
    The input can be provided as a DateTime, Quantity, Interval<DateTime> or Interval<Quantity>.
    The intent of this function is to provide a clear and concise mechanism to treat single
    elements that have multiple possible representations as intervals so that logic doesn't have to account
    for the variability. More complex calculations (such as medication request period or dispense period
    calculation) need specific guidance and consideration. That guidance may make use of this function, but
    the focus of this function is on single element calculations where the semantics are unambiguous.
    If the input is a DateTime, the result a DateTime Interval beginning and ending on that DateTime.
    If the input is a Quantity, the quantity is expected to be a calendar-duration interpreted as an Age,
    and the result is a DateTime Interval beginning on the Date the patient turned that age and ending immediately before one year later.
    If the input is a DateTime Interval, the result is the input.
    If the input is a Quantity Interval, the quantities are expected to be calendar-durations interpreted as an Age, and the result
    is a DateTime Interval beginning on the date the patient turned the age given as the start of the quantity interval, and ending
    immediately before one year later than the date the patient turned the age given as the end of the quantity interval.
    If the input is a Timing, an error will be thrown indicating that Timing calculations are not implemented. Any other input will reslt in a null DateTime Interval
    */
    define fluent function toInterval(choice Choice<DateTime, Quantity, Interval<DateTime>, Interval<Quantity>, Timing>):
      case
    	  when choice is DateTime then
        	Interval[choice as DateTime, choice as DateTime]
    		when choice is Interval<DateTime> then
      		choice as Interval<DateTime>
    		when choice is Quantity then
    		  Interval[Patient.birthDate + (choice as Quantity),
    			  Patient.birthDate + (choice as Quantity) + 1 year)
    		when choice is Interval<Quantity> then
    		  Interval[Patient.birthDate + (choice.low as Quantity),
    			  Patient.birthDate + (choice.high as Quantity) + 1 year)
    		when choice is Timing then
          Message(null, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported') as Interval<DateTime>
    		else
    			null as Interval<DateTime>
    	end
    Library Name Name
    FHIRHelpers ToString
    define function ToString(value uri): value.value
    Library Name Name
    FHIRHelpers ToCode
    /*
    @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
    */
    define function ToCode(coding FHIR.Coding):
        if coding is null then
            null
        else
            System.Code {
              code: coding.code.value,
              system: coding.system.value,
              version: coding.version.value,
              display: coding.display.value
            }
    Library Name Name
    Status isEncounterPerformed
    //Encounter, Performed
    //General usage unless required otherwise by measure intent (e.g., follow-up encounters)
    define fluent function isEncounterPerformed(Enc List<Encounter>):
      Enc E
        where E.status in {'finished', 'arrived', 'triaged', 'in-progress', 'onleave'}
    Library Name Name
    Status isAssessmentPerformed
    //This library contains functions that are based on QDM 5.6 to QICore 4.1.1 March 2023 (https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/wiki/Authoring-Patterns---QICore-v4.1.1). The functions may appear similar to some QICoreCommon functions but different in that they have constraints that are relevant for measures authored by NCQA.
    
    //Assessment, Performed
    define fluent function isAssessmentPerformed(Obs List<Observation>):
      Obs O
        where O.status in { 'final', 'amended', 'corrected' }
              and exists ( O.category ObservationCategory
              where ( ObservationCategory ) ~ "survey"
          )
    Library Name Name
    Status isInterventionOrder
    //Intervention, Order: active and completed only    
    define fluent function isInterventionOrder(ServiceRequest List<ServiceRequest>):
      ServiceRequest S
        where S.status in { 'active', 'completed' }
          and S.intent = 'order'
    Library Name Name
    Status isInterventionPerformed
    //Intervention, Performed
    define fluent function isInterventionPerformed(Proc List<Procedure>):
      Proc P
        where P.status ~ 'completed'