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 Screening for High Blood Pressure and Follow Up DocumentedFHIR

Official URL: https://madie.cms.gov/Measure/PCSBPScreeningFollowUpFHIR Version: 0.2.000
Draft as of 2024-07-09 Responsible: Centers for Medicare & Medicaid Services (CMS) Computable Name: PCSBPScreeningFollowUpFHIR
Other Identifiers: Short Name (use: usual, ), UUID:1b17d846-cbe0-49fa-b503-518addf19fb0 (use: official, ), UUID:b7b775e9-0c0d-4f9b-8457-b7ad1a255f80 (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 patient visits for patients aged 18 years and older seen during the measurement period who were screened for high blood pressure AND a recommended follow-up plan is documented, as indicated, if blood pressure is elevated or hypertensive

UNKNOWN

Title: Preventive Care and Screening Screening for High Blood Pressure and Follow Up DocumentedFHIR
Id: PCSBPScreeningFollowUpFHIR
Version: 0.2.000
Url: Preventive Care and Screening Screening for High Blood Pressure and Follow Up DocumentedFHIR
short-name identifier:

CMS22FHIR

version-independent identifier:

urn:uuid:1b17d846-cbe0-49fa-b503-518addf19fb0

version-specific identifier:

urn:uuid:b7b775e9-0c0d-4f9b-8457-b7ad1a255f80

publisher (CMS) identifier:

22FHIR

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

Percentage of patient visits for patients aged 18 years and older seen during the measurement period who were screened for high blood pressure AND a recommended follow-up plan is documented, as indicated, if blood pressure is elevated or hypertensive

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:

Hypertension is a prevalent condition that affects approximately 66.9 million people in the United States. It is estimated that about 20-40 percent of the adult population has hypertension; the majority of people over age 65 have a hypertension diagnosis (Appleton et al., 2013 and Luehr et al., 2012). Winter (2013) noted that 1 in 3 American adults have hypertension and the lifetime risk of developing hypertension is 90 percent. The African American population or non-Hispanic Blacks, the elderly, diabetics and those with chronic kidney disease are at increased risk of stroke, myocardial infarction and renal disease. Non-Hispanic Blacks have the highest prevalence at 38.6 percent (Winter et al., 2013). Hypertension is a major risk factor for ischemic heart disease, left ventricular hypertrophy, renal failure, stroke and dementia (Luehr et al., 2012). Prevention of hypertension and the treatment of established hypertension are complementary approaches to reducing cardiovascular disease risk in the population, but prevention of hypertension provides the optimal means of reducing risk and avoiding harmful consequences. Periodic blood pressure (BP) screening can identify individuals who develop elevated BP over time. More frequent BP screening may be particularly important for individuals with elevated atherosclerotic cardiovascular disease (ASCVD) risk (Whelton et al., 2018). Hypertension is the most common reason for adult office visits other than pregnancy. Garrison (2013) stated that in 2007, 42 million ambulatory visits were attributed to hypertension (Garrison & Oberhelman, 2013). It also has the highest utilization of prescription drugs. Numerous resources and treatment options are available, yet only about 40-50 percent of the hypertensive patients have their blood pressure under control (<140/90) (Appleton et al., 2013 and Luehr et al., 2012). In addition to medication non-compliance, poor outcomes are also attributed to poor adherence to lifestyle changes such as a low-sodium diet, weight loss, increased exercise and limiting alcohol intake. Many adults find it difficult to continue medications and lifestyle changes when they are asymptomatic. Symptoms of elevated blood pressure usually do not occur until secondary problems arise such as with vascular diseases (myocardial infarction, stroke, heart failure and renal insufficiency) (Luehr et al., 2012). Appropriate follow-up after blood pressure measurement is a pivotal component in preventing the progression of hypertension and the development of heart disease. Detection of marginally or fully elevated blood pressure by a specialty clinician warrants referral to a provider familiar with the management of hypertension and prehypertension. The American College of Cardiology/American Heart Association (ACC/AHA) 2017 Guidelines provide updated recommendations for ASCVD risk. For additional information please refer to the 2017 ACC/AHA guidelines: https://www.acc.org/latest-in-cardiology/ten-points-to-remember/2017/11/09/11/41/2017-guideline-for-high-blood-pressure-in-adults. Lifestyle modifications have demonstrated effectiveness in lowering blood pressure (U.S. Department of Health and Human Services, 2003). The synergistic effect of several lifestyle modifications results in greater benefits than a single modification alone. Baseline diagnostic/laboratory testing establishes if a co-existing underlying condition is the etiology of hypertension and evaluates if end organ damage from hypertension has already occurred. Landmark trials such as the Antihypertensive and Lipid-Lowering Treatment to Prevent Heart Attack Trial (ALLHAT) have repeatedly proven the efficacy of pharmacologic therapy to control blood pressure and reduce the complications of hypertension. A review of 35 studies found that the pharmacist-led interventions involved medication counseling and patient education. Twenty-nine of the 35 studies showed statistically significant improvement in BP levels of the intervention groups at follow-up (Reeves et al., 2020). Follow-up intervals based on blood pressure control have been established by the 2017 ACC/AHA guideline and the United States Preventive Services Task Force (Whelton et al., 2018; USPSTF, 2021).

Clinical recommendation statement:

The U.S. Preventive Services Task Force (USPSTF, 2021) recommends screening for high blood pressure in adults aged 18 years and older. This is a grade A recommendation.

Guidance (Usage): This eCQM is an episode-based measure. An episode is defined as each eligible encounter for patients aged 18 years and older during the measurement period. This measure should be reported for every visit. The measure requires that blood pressure measurements (i.e., diastolic and systolic) be obtained during each visit in order to determine the blood pressure reading used to evaluate if an intervention is needed. Both the systolic and diastolic blood pressure measurements are required for inclusion. If there are multiple blood pressures obtained during a patient visit, only the last, or most recent, pressure measurement will be used to evaluate the measure requirements. The intent of this measure is to screen patients for high blood pressure and provide recommended follow-up as indicated. The documented follow-up plan must be related to the current blood pressure reading as indicated, example: "Patient referred to primary care provider for BP management." Telehealth encounters are not eligible for this measure because the measure requires a clinical action that cannot be conducted via telehealth. This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. This FHIR-based measure has been derived from the QDM-based measure: CMS 22v13. 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:
64ef76cf56d636294b157c3f
Initial Population: All patient visits for patients aged 18 years and older at the beginning of the measurement period
Denominator: Equals Initial Population
Denominator Exclusion: Patient has an active diagnosis of hypertension
Numerator: Patient visits where patients were screened for high blood pressure AND have a recommended follow-up plan documented, as indicated, if the blood pressure is elevated or hypertensive
Denominator Exception: Documentation of medical reason(s) for not screening for high blood pressure (e.g., patient is in an urgent or emergent medical situation where time is of the essence and to delay treatment would jeopardize the patient's health status). Documentation of patient reason(s) for not screening for blood pressure measurements or for not ordering an appropriate follow-up intervention if patient BP is elevated or hypertensive (e.g., patient refuses).
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:
PCSBPScreeningFollowUpFHIR
Terminology and Other Dependencies:
  • Library/SupplementalDataElements|3.5.000
  • Library/FHIRHelpers|4.4.000
  • Library/QICoreCommon|2.1.000
  • AdministrativeGender
  • ActCode
  • Logical Observation Identifiers, Names and Codes (LOINC)
  • Condition Category Codes
  • US Core Condition Category Extension Codes
  • Encounter to Screen for Blood Pressure
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.125
  • Lifestyle Recommendation
  • Weight Reduction Recommended
  • Dietary Recommendations
  • Recommendation to Increase Physical Activity
  • Referral or Counseling for Alcohol Consumption
  • Referral to Primary Care or Alternate Provider
  • Finding of Elevated Blood Pressure or Hypertension
  • Follow Up Within 4 Weeks
  • Laboratory Tests for Hypertension
  • Pharmacologic Therapy for Hypertension
  • Payer
  • Diagnosis of Hypertension
  • Patient Declined
  • Medical Reason
  • Parameters:
    name use min max type
    Measurement Period In 0 1 Period
    SDE Sex Out 0 1 Coding
    Numerator Out 0 * Resource
    Denominator Out 0 * Resource
    SDE Payer Out 0 * Resource
    Initial Population Out 0 * Resource
    SDE Ethnicity Out 0 1 Resource
    Denominator Exclusions Out 0 * Resource
    SDE Race Out 0 1 Resource
    Denominator Exceptions Out 0 * Resource
    DataRequirements:
    Resource Type Resource Elements Valueset Name Valueset
    Patient(QICorePatient) ethnicity race
    Encounter(QICoreEncounter) type period status status.value class Encounter to Screen for Blood Pressure Encounter to Screen for Blood Pressure
    Observation(Observation Blood Pressure Profile) effective status status.value component
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Lifestyle Recommendation Lifestyle Recommendation
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Weight Reduction Recommended Weight Reduction Recommended
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Dietary Recommendations Dietary Recommendations
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Recommendation to Increase Physical Activity Recommendation to Increase Physical Activity
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Referral or Counseling for Alcohol Consumption Referral or Counseling for Alcohol Consumption
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Follow Up Within 6 Months http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.125
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Laboratory Tests for Hypertension Laboratory Tests for Hypertension
    ServiceRequest(QICoreServiceRequest) code intent intent.value authoredOn authoredOn.value Follow Up Within 6 Months http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.125
    ServiceRequest(QICoreServiceRequest) code authoredOn authoredOn.value intent intent.value Follow Up Within 4 Weeks Follow Up Within 4 Weeks
    ServiceRequest(QICoreServiceRequest) code reasonCode intent intent.value authoredOn authoredOn.value Referral to Primary Care or Alternate Provider Referral to Primary Care or Alternate Provider
    Medication(QICoreMedication) id
    MedicationRequest(QICoreMedicationRequest) medication.reference authoredOn authoredOn.value status status.value
    MedicationRequest(QICoreMedicationRequest) medication authoredOn authoredOn.value status status.value Pharmacologic Therapy for Hypertension Pharmacologic Therapy for Hypertension
    Coverage(QICoreCoverage) type period Payer Type Payer
    Condition(QICoreCondition) code Diagnosis of Hypertension Diagnosis of Hypertension
    Observation(QICoreObservationNotDone) code issued issued.value extension status status.value
    Observation(QICoreObservationNotDone) code issued issued.value extension status status.value
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Lifestyle Recommendation Lifestyle Recommendation
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Lifestyle Recommendation Lifestyle Recommendation
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Weight Reduction Recommended Weight Reduction Recommended
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Weight Reduction Recommended Weight Reduction Recommended
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Dietary Recommendations Dietary Recommendations
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Dietary Recommendations Dietary Recommendations
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Recommendation to Increase Physical Activity Recommendation to Increase Physical Activity
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Recommendation to Increase Physical Activity Recommendation to Increase Physical Activity
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Referral or Counseling for Alcohol Consumption Referral or Counseling for Alcohol Consumption
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Referral or Counseling for Alcohol Consumption Referral or Counseling for Alcohol Consumption
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Laboratory Tests for Hypertension Laboratory Tests for Hypertension
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Laboratory Tests for Hypertension Laboratory Tests for Hypertension
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Follow Up Within 6 Months http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.125
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Follow Up Within 6 Months http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1108.125
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Follow Up Within 4 Weeks Follow Up Within 4 Weeks
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Follow Up Within 4 Weeks Follow Up Within 4 Weeks
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Referral to Primary Care or Alternate Provider Referral to Primary Care or Alternate Provider
    ServiceRequest(QICoreServiceNotRequested) code extension status status.value authoredOn authoredOn.value Referral to Primary Care or Alternate Provider Referral to Primary Care or Alternate Provider
    MedicationRequest(QICoreMedicationNotRequested) medication status status.value Pharmacologic Therapy for Hypertension Pharmacologic Therapy for Hypertension
    MedicationRequest(QICoreMedicationNotRequested) medication status status.value Pharmacologic Therapy for Hypertension Pharmacologic Therapy for Hypertension
    Direct Reference Codes:
    display code system
    Male M http://hl7.org/fhir/administrative-gender
    Female F http://hl7.org/fhir/administrative-gender
    virtual VR http://terminology.hl7.org/CodeSystem/v3-ActCode
    EKG 12 channel panel 34534-8 http://loinc.org
    EKG study 11524-6 http://loinc.org
    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
    Systolic blood pressure 8480-6 http://loinc.org
    Diastolic blood pressure 8462-4 http://loinc.org
    Logic Definitions:
    Group Scoring Population Criteria Expression
    64ef76cf56d636294b157c3f Group scoring: proportion
    Type:

    Process

    Rate Aggregation: None
    Improvement Notation:

    increase

    Initial Population
    define "Initial Population":
      "Qualifying Encounter during Measurement Period" QualifyingEncounter
        where AgeInYearsAt(start of "Measurement Period") >= 18
    Denominator
    define "Denominator":
      "Initial Population"
    Denominator Exclusion
    define "Denominator Exclusions":
      "Qualifying Encounter during Measurement Period" QualifyingEncounter
        with [Condition: "Diagnosis of Hypertension"] Hypertension
          such that ( Hypertension.isProblemListItem ( )
              or Hypertension.isHealthConcern ( )
          )
            and Hypertension.prevalenceInterval ( ) starts before or on day of QualifyingEncounter.period
    Numerator
    define "Numerator":
      "Encounter with Normal Blood Pressure Reading"
        union ( "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80 and Interventions" )
        union ( "Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80 and Interventions" )
        union ( "Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 and Interventions" )
        union ( "Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 and Interventions" )
    Denominator Exception
    define "Denominator Exceptions":
      "Encounter with Medical Reason for Not Obtaining or Patient Declined Blood Pressure Measurement"
        union "Encounter with Order for Hypertension Follow Up Declined by Patient"
    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
    PCSBPScreeningFollowUpFHIR SDE Sex
    define "SDE Sex":
      SDE."SDE Sex"
    Library Name Name
    PCSBPScreeningFollowUpFHIR Qualifying Encounter during Measurement Period
    define "Qualifying Encounter during Measurement Period":
      [Encounter: "Encounter to Screen for Blood Pressure"] ValidEncounter
        where ValidEncounter.period during day of "Measurement Period"
          and ValidEncounter.status ~ 'finished'
          and ValidEncounter.class !~ "virtual"
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Normal Blood Pressure Reading
    define "Encounter with Normal Blood Pressure Reading":
      "Qualifying Encounter during Measurement Period" QualifyingEncounter
        let EncounterLastBP: Last(["observation-bp"] BloodPressure
            where BloodPressure.effective.toInterval() ends during QualifyingEncounter.period
              and BloodPressure.status in { 'final', 'amended', 'corrected' }
            sort by start of effective.toInterval()
        )
        where EncounterLastBP.SystolicBP.value in Interval[1 'mm[Hg]', 120 'mm[Hg]' )
          and EncounterLastBP.DiastolicBP.value in Interval[1 'mm[Hg]', 80 'mm[Hg]' )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80
    define "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80":
      "Qualifying Encounter during Measurement Period" QualifyingEncounter
        let EncounterLastBP: Last(["observation-bp"] BloodPressure
            where BloodPressure.effective.toInterval() ends during QualifyingEncounter.period
              and BloodPressure.status in { 'final', 'amended', 'corrected' }
            sort by start of effective.toInterval()
        )
        where ( EncounterLastBP.SystolicBP.value in Interval[120 'mm[Hg]', 129 'mm[Hg]']
            and EncounterLastBP.DiastolicBP.value in Interval[1 'mm[Hg]', 80 'mm[Hg]' )
        )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Follow up with Rescreen Within 6 Months
    define "Follow up with Rescreen Within 6 Months":
      [ServiceRequest: "Follow Up Within 6 Months"] FollowUp
        where FollowUp.intent ~ 'order'
    Library Name Name
    PCSBPScreeningFollowUpFHIR NonPharmacological Interventions
    define "NonPharmacological Interventions":
      ( [ServiceRequest: "Lifestyle Recommendation"]
        union [ServiceRequest: "Weight Reduction Recommended"]
        union [ServiceRequest: "Dietary Recommendations"]
        union [ServiceRequest: "Recommendation to Increase Physical Activity"]
        union [ServiceRequest: "Referral or Counseling for Alcohol Consumption"] ) NonPharmaInterventions
        where NonPharmaInterventions.intent ~ 'order'
    Library Name Name
    PCSBPScreeningFollowUpFHIR Referral to Alternate or Primary Healthcare Professional for Hypertensive Reading
    define "Referral to Alternate or Primary Healthcare Professional for Hypertensive Reading":
      [ServiceRequest: "Referral to Primary Care or Alternate Provider"] Referral
        where Referral.reasonCode in "Finding of Elevated Blood Pressure or Hypertension"
          and Referral.intent ~ 'order'
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80 and Interventions
    define "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80 and Interventions":
      ( "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80" ElevatedEncounter
          with "Follow up with Rescreen Within 6 Months" Twoto6MonthRescreen
            such that Twoto6MonthRescreen.authoredOn during day of ElevatedEncounter.period
          with "NonPharmacological Interventions" NonPharmInterventions
            such that NonPharmInterventions.authoredOn during day of ElevatedEncounter.period
      )
        union ( "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80" ElevatedEncounter
            with "Referral to Alternate or Primary Healthcare Professional for Hypertensive Reading" Referral
              such that Referral.authoredOn during day of ElevatedEncounter.period
        )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Hypertensive Reading Within Year Prior
    define "Encounter with Hypertensive Reading Within Year Prior":
      ( "Qualifying Encounter during Measurement Period" QualifyingEncounter
          let EncounterLastBP: Last(["observation-bp"] BloodPressure
              where BloodPressure.effective.toInterval() ends 1 year or less before or on start of QualifyingEncounter.period
                and BloodPressure.status in { 'final', 'amended', 'corrected' }
              sort by start of effective.toInterval()
          )
          where ( EncounterLastBP.SystolicBP.value > 0 'mm[Hg]'
              and EncounterLastBP.DiastolicBP.value > 0 'mm[Hg]'
              and ( EncounterLastBP.SystolicBP.value >= 130 'mm[Hg]'
                  or EncounterLastBP.DiastolicBP.value >= 80 'mm[Hg]'
              )
          )
      )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80
    define "Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80":
      ( "Qualifying Encounter during Measurement Period" QualifyingEncounter
          let EncounterLastBP: Last(["observation-bp"] BloodPressure
              where BloodPressure.effective.toInterval() ends during day of QualifyingEncounter.period
              sort by start of effective.toInterval()
          )
          where ( ( EncounterLastBP.SystolicBP.value > 0 'mm[Hg]'
                and EncounterLastBP.DiastolicBP.value > 0 'mm[Hg]'
            )
              and ( EncounterLastBP.SystolicBP.value >= 130 'mm[Hg]'
                  or EncounterLastBP.DiastolicBP.value >= 80 'mm[Hg]'
              )
          )
      )
        except "Encounter with Hypertensive Reading Within Year Prior"
    Library Name Name
    PCSBPScreeningFollowUpFHIR First Hypertensive Reading Interventions or Referral to Alternate Professional
    define "First Hypertensive Reading Interventions or Referral to Alternate Professional":
      ( [ServiceRequest: "Follow Up Within 4 Weeks"] FourWeekRescreen
          with "NonPharmacological Interventions" NonPharmInterventionsHTN
            such that FourWeekRescreen.authoredOn during day of "Measurement Period"
              and NonPharmInterventionsHTN.authoredOn during day of "Measurement Period"
              and FourWeekRescreen.intent ~ 'order'
      )
        union ( "Referral to Alternate or Primary Healthcare Professional for Hypertensive Reading" )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80 and Interventions
    define "Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80 and Interventions":
      "Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80" FirstHTNEncounter
        with "First Hypertensive Reading Interventions or Referral to Alternate Professional" FirstHTNIntervention
          such that FirstHTNIntervention.authoredOn during day of FirstHTNEncounter.period
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89
    define "Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89":
      ( "Qualifying Encounter during Measurement Period" QualifyingEncounter
          let EncounterLastBP: Last(["observation-bp"] BloodPressure
              where BloodPressure.effective.toInterval() ends during day of QualifyingEncounter.period
                and BloodPressure.status in { 'final', 'amended', 'corrected' }
              sort by start of effective.toInterval()
          )
          where ( ( EncounterLastBP.SystolicBP.value in Interval[130 'mm[Hg]', 139 'mm[Hg]']
                or EncounterLastBP.DiastolicBP.value in Interval[80 'mm[Hg]', 89 'mm[Hg]']
            )
              and not ( EncounterLastBP.SystolicBP.value >= 140 'mm[Hg]'
                  or EncounterLastBP.DiastolicBP.value >= 90 'mm[Hg]'
              )
          )
            and ( exists "Encounter with Hypertensive Reading Within Year Prior" )
      )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Laboratory Test or ECG for Hypertension
    define "Laboratory Test or ECG for Hypertension":
      ( [ServiceRequest: "12 lead EKG panel"]
        union [ServiceRequest: "EKG study"]
        union [ServiceRequest: "Laboratory Tests for Hypertension"] ) EKGLab
        where EKGLab.intent ~ 'order'
    Library Name Name
    PCSBPScreeningFollowUpFHIR Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 and Interventions
    define "Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 and Interventions":
      "Follow up with Rescreen Within 6 Months" Rescreen2to6
        with "Laboratory Test or ECG for Hypertension" LabECGIntervention
          such that Rescreen2to6.authoredOn during day of "Measurement Period"
            and LabECGIntervention.authoredOn during day of "Measurement Period"
        with "NonPharmacological Interventions" NonPharmSecondIntervention
          such that NonPharmSecondIntervention.authoredOn during day of "Measurement Period"
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 and Interventions
    define "Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 and Interventions":
      ( "Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89" SecondHTNEncounterReading
          with "Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 and Interventions" EncounterInterventions
            such that EncounterInterventions.authoredOn during day of SecondHTNEncounterReading.period
      )
        union ( "Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89" SecondHTNEncounterReading
            with "Referral to Alternate or Primary Healthcare Professional for Hypertensive Reading" ReferralForHTN
              such that ReferralForHTN.authoredOn during day of SecondHTNEncounterReading.period
        )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90
    define "Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90":
      ( "Qualifying Encounter during Measurement Period" QualifyingEncounter
          let EncounterLastBP: Last(["observation-bp"] BloodPressure
              where BloodPressure.effective.toInterval() ends during QualifyingEncounter.period
                and BloodPressure.status in { 'final', 'amended', 'corrected' }
              sort by start of effective.toInterval()
          )
          where ( EncounterLastBP.SystolicBP.value > 0 'mm[Hg]'
              and EncounterLastBP.DiastolicBP.value > 0 'mm[Hg]'
              and ( EncounterLastBP.SystolicBP.value >= 140 'mm[Hg]'
                  or EncounterLastBP.DiastolicBP.value >= 90 'mm[Hg]'
              )
          )
            and ( exists "Encounter with Hypertensive Reading Within Year Prior" )
      )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 Interventions
    define "Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 Interventions":
      ( [ServiceRequest: "Follow Up Within 4 Weeks"] WeeksRescreen
          with "Laboratory Test or ECG for Hypertension" ECGLabTest
            such that WeeksRescreen.authoredOn during day of "Measurement Period"
              and ECGLabTest.authoredOn during day of "Measurement Period"
              and WeeksRescreen.intent ~ 'order'
              and ECGLabTest.intent ~ 'order'
          with "NonPharmacological Interventions" HTNInterventions
            such that HTNInterventions.authoredOn during day of "Measurement Period"
          with ["MedicationRequest": "Pharmacologic Therapy for Hypertension"] Medications
            such that Medications.authoredOn during day of "Measurement Period"
              and Medications.status ~ 'active'
      )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 and Interventions
    define "Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 and Interventions":
      ( "Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90" SecondHTNEncounterReading140Over90
          with "Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 Interventions" SecondHTN140Over90Interventions
            such that SecondHTN140Over90Interventions.authoredOn during day of SecondHTNEncounterReading140Over90.period
      )
        union "Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90" SecondHTNEncounterReading140Over90
          with "Referral to Alternate or Primary Healthcare Professional for Hypertensive Reading" ReferralToProfessional
            such that ReferralToProfessional.authoredOn during day of SecondHTNEncounterReading140Over90.period
    Library Name Name
    PCSBPScreeningFollowUpFHIR Numerator
    define "Numerator":
      "Encounter with Normal Blood Pressure Reading"
        union ( "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80 and Interventions" )
        union ( "Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80 and Interventions" )
        union ( "Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 and Interventions" )
        union ( "Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 and Interventions" )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Initial Population
    define "Initial Population":
      "Qualifying Encounter during Measurement Period" QualifyingEncounter
        where AgeInYearsAt(start of "Measurement Period") >= 18
    Library Name Name
    PCSBPScreeningFollowUpFHIR 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
    PCSBPScreeningFollowUpFHIR 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
    PCSBPScreeningFollowUpFHIR SDE Ethnicity
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
    Library Name Name
    PCSBPScreeningFollowUpFHIR Denominator Exclusions
    define "Denominator Exclusions":
      "Qualifying Encounter during Measurement Period" QualifyingEncounter
        with [Condition: "Diagnosis of Hypertension"] Hypertension
          such that ( Hypertension.isProblemListItem ( )
              or Hypertension.isHealthConcern ( )
          )
            and Hypertension.prevalenceInterval ( ) starts before or on day of QualifyingEncounter.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
    PCSBPScreeningFollowUpFHIR SDE Race
    define "SDE Race":
      SDE."SDE Race"
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Medical Reason for Not Obtaining or Patient Declined Blood Pressure Measurement
    define "Encounter with Medical Reason for Not Obtaining or Patient Declined Blood Pressure Measurement":
      "Qualifying Encounter during Measurement Period" QualifyingEncounter
        with ( [ObservationNotDone: code ~ "Systolic blood pressure"]
          union [ObservationNotDone: code ~ "Diastolic blood pressure"] ) NoBPScreen
          such that NoBPScreen.issued during day of QualifyingEncounter.period
            and ( NoBPScreen.notDoneReason in "Patient Declined"
                or NoBPScreen.notDoneReason in "Medical Reason"
            )
            and NoBPScreen.status = 'cancelled'
    Library Name Name
    PCSBPScreeningFollowUpFHIR NonPharmacological Intervention Not Ordered
    define "NonPharmacological Intervention Not Ordered":
      ( [ServiceNotRequested: "Lifestyle Recommendation"]
        union [ServiceNotRequested: "Weight Reduction Recommended"]
        union [ServiceNotRequested: "Dietary Recommendations"]
        union [ServiceNotRequested: "Recommendation to Increase Physical Activity"]
        union [ServiceNotRequested: "Referral or Counseling for Alcohol Consumption"] ) NonPharmIntervention
        where NonPharmIntervention.reasonRefused in "Patient Declined"
          and NonPharmIntervention.status = 'completed'
    Library Name Name
    PCSBPScreeningFollowUpFHIR Laboratory Test or ECG for Hypertension Not Ordered
    define "Laboratory Test or ECG for Hypertension Not Ordered":
      ( [ServiceNotRequested: code = "12 lead EKG panel"]
        union [ServiceNotRequested: code = "EKG study"]
        union [ServiceNotRequested: "Laboratory Tests for Hypertension"] ) LabECGNotDone
        where LabECGNotDone.reasonRefused in "Patient Declined"
    Library Name Name
    PCSBPScreeningFollowUpFHIR Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 Interventions Declined
    define "Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 Interventions Declined":
      ( ( ( [ServiceNotRequested: "Referral to Primary Care or Alternate Provider"]
            union [ServiceNotRequested: "Follow Up Within 6 Months"] ) SecondHTNDeclinedReferralAndFollowUp
            where SecondHTNDeclinedReferralAndFollowUp.reasonRefused in "Patient Declined"
              and SecondHTNDeclinedReferralAndFollowUp.status = 'completed'
        )
          union "Laboratory Test or ECG for Hypertension Not Ordered"
          union "NonPharmacological Intervention Not Ordered"
      )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 Interventions Declined
    define "Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 Interventions Declined":
      ( ( ( [ServiceNotRequested: "Referral to Primary Care or Alternate Provider"]
            union [ServiceNotRequested: "Follow Up Within 4 Weeks"] ) SecondHTN140Over90ReferralFollowUpNotDone
            where SecondHTN140Over90ReferralFollowUpNotDone.reasonRefused in "Patient Declined"
              and SecondHTN140Over90ReferralFollowUpNotDone.status = 'completed'
        )
          union ( [MedicationNotRequested: "Pharmacologic Therapy for Hypertension"] MedicationRequestNotOrdered
              where MedicationRequestNotOrdered.status = 'completed'
          )
          union "Laboratory Test or ECG for Hypertension Not Ordered"
          union "NonPharmacological Intervention Not Ordered"
      )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Encounter with Order for Hypertension Follow Up Declined by Patient
    define "Encounter with Order for Hypertension Follow Up Declined by Patient":
      ( ( "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80" ElevatedBPEncounter
            with ( [ServiceNotRequested: "Referral to Primary Care or Alternate Provider"]
              union [ServiceNotRequested: "Follow Up Within 6 Months"] ) ElevatedBPDeclinedInterventions
              such that ElevatedBPDeclinedInterventions.reasonRefused in "Patient Declined"
                and ElevatedBPDeclinedInterventions.authoredOn during day of ElevatedBPEncounter.period
                and ElevatedBPDeclinedInterventions.status = 'completed'
        )
          union ( "Encounter with Elevated Blood Pressure Reading SBP 120 to 129 AND DBP less than 80" ElevatedBPEncounter
              with "NonPharmacological Intervention Not Ordered" NotOrdered
                such that NotOrdered.authoredOn during day of ElevatedBPEncounter.period
          )
          union ( "Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80" FirstHTNEncounter
              with ( [ServiceNotRequested: "Follow Up Within 4 Weeks"]
                union [ServiceNotRequested: "Referral to Primary Care or Alternate Provider"] ) FirstHTNDeclinedInterventions
                such that FirstHTNDeclinedInterventions.reasonRefused in "Patient Declined"
                  and FirstHTNDeclinedInterventions.authoredOn during day of FirstHTNEncounter.period
                  and FirstHTNDeclinedInterventions.status = 'completed'
          )
          union ( "Encounter with First Hypertensive Reading SBP Greater than or Equal to 130 OR DBP Greater than or Equal to 80" FirstHTNEncounter
              with "NonPharmacological Intervention Not Ordered" NoNonPharm
                such that NoNonPharm.authoredOn during day of FirstHTNEncounter.period
          )
          union ( "Encounter with Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89" SecondHTNEncounter
              with "Second Hypertensive Reading SBP 130 to 139 OR DBP 80 to 89 Interventions Declined" SecondHTNDeclinedInterventions
                such that SecondHTNDeclinedInterventions.authoredOn during day of SecondHTNEncounter.period
          )
          union ( "Encounter with Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90" SecondHTN140Over90Encounter
              with "Second Hypertensive Reading SBP Greater than or Equal to 140 OR DBP Greater than or Equal to 90 Interventions Declined" SecondHTN140Over90DeclinedInterventions
                such that SecondHTN140Over90DeclinedInterventions.authoredOn during day of SecondHTN140Over90Encounter.period
          )
      )
    Library Name Name
    PCSBPScreeningFollowUpFHIR Denominator Exceptions
    define "Denominator Exceptions":
      "Encounter with Medical Reason for Not Obtaining or Patient Declined Blood Pressure Measurement"
        union "Encounter with Order for Hypertension Follow Up Declined by Patient"
    Library Name Name
    FHIRHelpers ToString
    define function ToString(value uri): value.value
    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
    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
    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"
      )