Url: http://ecqi.healthit.gov/ecqms/Measure/ControllingHighBloodPressureFHIR
Version: 0.0.001
Identifier:

type:

value: CMS165FHIR

Identifier:

type:

value: urn:uuid:9017d914-6748-45a9-bff1-8392ed644a7b

Identifier:

type:

value: urn:uuid:643716e4d4d7050edabb045c

Identifier:

type:

value: 165FHIR

Name: ControllingHighBloodPressureFHIR
Title: Controlling High Blood PressureFHIR
Status: draft
Experimental: false
Date: 2023-07-10T03:48:57+00:00
Publisher: National Committee for Quality Assurance
Description: Percentage of patients 18-85 years of age who had a diagnosis of essential hypertension starting before and continuing into, or starting during the first six months of the measurement period, and whose most recent blood pressure was adequately controlled (<140/90 mmHg) during the measurement period
Use Context:
codevalue
program
Purpose: UNKNOWN
Guidance (Usage): In reference to the numerator element, only blood pressure readings performed by a clinician or an automated blood pressure monitor or device are acceptable for numerator compliance with this measure. This includes blood pressures taken in person by a clinician and blood pressures measured remotely by electronic monitoring devices capable of transmitting the blood pressure data to the clinician. Blood pressure readings taken by an automated blood pressure monitor or device and conveyed by the patient to the clinician are also acceptable. It is the clinician’s responsibility and discretion to confirm the automated blood pressure monitor or device used to obtain the blood pressure is considered acceptable and reliable and whether the blood pressure reading is considered accurate before documenting it in the patient’s medical record. Do not include BP readings taken during an acute inpatient stay or an ED visit. If no blood pressure is recorded during the measurement period, the patient's blood pressure is assumed "not controlled". If there are multiple blood pressure readings on the same day, use the lowest systolic and the lowest diastolic reading as the most recent blood pressure reading. Ranges and thresholds do not meet criteria for this measure. A distinct numeric result for both the systolic and diastolic BP reading is required for numerator compliance. This eCQM is a patient-based measure. This FHIR-based measure has been derived from the QDM-based measure: CMS165v12. Please refer to the HL7 QI-Core Implementation Guide (http://hl7.org/fhir/us/qicore/index.html) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (http://hl7.org/fhir/us/qicore/qdm-to-qicore.html).
Copyright: This Physician Performance Measure (Measure) and related data specifications are owned and were developed by the National Committee for Quality Assurance (NCQA). NCQA is not responsible for any use of the Measure. NCQA makes no representations, warranties, or endorsement about the quality of any organization or physician that uses or reports performance measures and NCQA has no liability to anyone who relies on such measures or specifications. NCQA holds a copyright in the Measure. The Measure can be reproduced and distributed, without modification, for noncommercial purposes (e.g., use by healthcare providers in connection with their practices) without obtaining approval from NCQA. Commercial use is defined as the sale, licensing, or distribution of the Measure for commercial gain, or incorporation of the Measure into a product or service that is sold, licensed or distributed for commercial gain. All commercial uses or requests for modification must be approved by NCQA and are subject to a license at the discretion of NCQA. (C) 2012-2022 National Committee for Quality Assurance. All Rights Reserved. Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. NCQA disclaims all liability for use or accuracy of any third-party codes contained in the specifications. CPT(R) codes, descriptions and other data are copyright 2022. American Medical Association. All rights reserved. CPT is a trademark of the American Medical Association. No fee schedules, basic units, relative values or related listings are included in CPT. The AMA assumes no liability for the data contained herein. Applicable FARS/DFARS restrictions apply to government use. LOINC(R) copyright 2004-2022 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2022 International Health Terminology Standards Development Organisation. ICD-10 copyright 2022 World Health Organization. All Rights Reserved.
Disclaimer: The performance Measure is not a clinical guideline and does not establish a standard of medical care, and has not been tested for all potential applications. THE MEASURE AND SPECIFICATIONS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].
Approval Date: 2023-07-10
Last Review Date: 2023-07-10
Effective Period: 2024-01-01..2024-12-31
Population Criteria:
643716e4d4d7050edabb0444
Initial Population: Patients 18-85 years of age by the end of the measurement period who had a visit during the meaurement period and diagnosis of essential hypertension starting before and continuing into, or starting during the first six months of the measurement period
Denominator: Equals Initial Population
Denominator Exclusion: Patients with evidence of end stage renal disease (ESRD), dialysis or renal transplant before or during the measurement period. Also exclude patients with a diagnosis of pregnancy during the measurement period. Exclude patients who are in hospice care for any part of the measurement period. Exclude patients 66 and older by the end of the measurement period who are living long term in a nursing home any time on or before the end of the measurement period. Exclude patients 66-80 by the end of the measurement period with an indication of frailty for any part of the measurement period who also meet any of the following advanced illness criteria: - Advanced illness with two outpatient encounters during the measurement period or the year prior - OR advanced illness with one inpatient encounter during the measurement period or the year prior - OR taking dementia medications during the measurement period or the year prior Exclude patients 81 and older by the end of the measurement period with an indication of frailty for any part of the measurement period. Exclude patients receiving palliative care for any part of the measurement period.
Denominator Exception:
Numerator: Patients whose most recent blood pressure is adequately controlled (systolic blood pressure < 140 mmHg and diastolic blood pressure < 90 mmHg) during the measurement period
Numerator Exclusion:
Supplemental Data Guidance:
Supplemental Data Elements: SDE Ethnicity SDE Payer SDE Race SDE Sex
Libraries:
http://ecqi.healthit.gov/ecqms/Library/ControllingHighBloodPressureFHIR
Related Artifact Dependencies:
  • Library/SupplementalDataElements|3.2.000
  • Library/Status|1.5.000
  • Library/FHIRHelpers|4.2.000
  • Library/QICoreCommon|1.3.000
  • Library/AdultOutpatientEncounters|4.5.000
  • Library/Status|1.5.000
  • Library/FHIRHelpers|4.2.000
  • Library/Hospice|6.6.000
  • Library/FHIRHelpers|4.2.000
  • Library/AdvancedIllnessandFrailty|1.5.000
  • Library/FHIRHelpers|4.2.000
  • Library/CQMCommon|1.1.000
  • Library/CumulativeMedicationDuration|3.1.000
  • Library/PalliativeCare|1.6.000
  • http://loinc.org
  • http://snomed.info/sct
  • http://terminology.hl7.org/CodeSystem/observation-category
  • http://loinc.org
  • http://loinc.org
  • http://snomed.info/sct
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.104.12.1011
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584
  • 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.526.3.378
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.353
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1029
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1002
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1012
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1013
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1074
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1087
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1086
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1084
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.110.12.1082
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510
  • 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
  • Parameters:
    nameuseminmaxtype
    Measurement Period in 0 1 Period
    ErrorLevel in 0 1 string
    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
    DataRequirements:
    TypeMust SupportValueset NameValueset
    Patient
    Patient gender gender.value birthDate birthDate.value
    Encounter id id.value
    Reference reference reference.value
    Observation
    Observation encounter encounter.class encounter.class.code effective component
    Observation
    Observation encounter encounter.class encounter.class.code effective component
    Observation encounter encounter.class encounter.class.code effective component
    Observation encounter encounter.class encounter.class.code effective component
    Observation encounter encounter.class encounter.class.code effective component
    Observation encounter encounter.class encounter.class.code effective component
    Patient
    Condition code Essential Hypertension http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.104.12.1011
    Patient
    Encounter type Office Visit http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1001
    Encounter type Annual Wellness Visit http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1240
    Encounter type Preventive Care Services Established Office Visit, 18 and Up http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1025
    Encounter type Preventive Care Services Initial Office Visit, 18 and Up http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1023
    Encounter type Home Healthcare Services http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1016
    Encounter type Online Assessments http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1089
    Encounter type Telephone Visits http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1080
    Coverage type period Payer http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
    uri value
    Patient url extension
    Patient url extension
    Encounter type Encounter Inpatient http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
    Encounter type hospitalization hospitalization.dischargeDisposition period Encounter Inpatient http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307
    Encounter type Hospice Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
    Encounter type period Hospice Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1003
    Observation code
    Observation code value effective
    ServiceRequest code Hospice Care Ambulatory http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584
    ServiceRequest code authoredOn authoredOn.value Hospice Care Ambulatory http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584
    Procedure code Hospice Care Ambulatory http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584
    Procedure code performed Hospice Care Ambulatory http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1584
    Condition code Hospice Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1165
    Condition code Pregnancy http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378
    Condition code End Stage Renal Disease http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.353
    Condition code Kidney Transplant Recipient http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1029
    Condition code Chronic Kidney Disease, Stage 5 http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1002
    Procedure code Kidney Transplant http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1012
    Procedure code Dialysis Services http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1013
    Encounter type ESRD Monthly Outpatient Services http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014
    Encounter type period ESRD Monthly Outpatient Services http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014
    Patient
    DeviceRequest code Frailty Device http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300
    DeviceRequest code Frailty Device http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.12.1300
    Observation code
    Observation code value effective
    Condition code Frailty Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1074
    Encounter type Frailty Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088
    Encounter type period Frailty Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1088
    Observation code Frailty Symptom http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075
    Observation code effective Frailty Symptom http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.113.12.1075
    Condition id id.value
    Encounter type Outpatient http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1087
    Encounter type Observation http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1086
    Encounter type Emergency Department Evaluation and Management Visit http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010
    Encounter type Nonacute Inpatient http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1084
    Encounter type Acute Inpatient http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083
    Encounter type period Acute Inpatient http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1083
    Quantity unit value
    MedicationRequest medication Dementia Medications http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510
    MedicationRequest medication Dementia Medications http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.196.12.1510
    Observation code
    Observation code effective value
    Observation code effective value
    Observation code
    Observation code effective
    Condition code Palliative Care Diagnosis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.1167
    Encounter type Palliative Care Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
    Encounter type period Palliative Care Encounter http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1090
    Procedure code Palliative Care Intervention http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
    Procedure code performed Palliative Care Intervention http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.12.1135
    Patient url extension
    Patient url extension
    Coverage type period Payer http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591
    Patient url extension
    Patient url extension
    Direct Reference Codes:
    displaycodesystem
    Systolic blood pressure 8480-6 http://loinc.org
    Diastolic blood pressure 8462-4 http://loinc.org
    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
    Hospice care [Minimum Data Set] 45755-6 http://loinc.org
    Yes (qualifier value) 373066001 http://snomed.info/sct
    Medical equipment used 98181-1 http://loinc.org
    Housing status 71802-3 http://loinc.org
    Lives in a nursing home (finding) 160734000 http://snomed.info/sct
    Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal) 71007-9 http://loinc.org
    Logic Definitions:
    GroupScoringPopulation CriteriaExpression
    643716e4d4d7050edabb0444 Group scoring: proportion
    Initial Population
    define "Initial Population":
      AgeInYearsAt(date from 
        end of "Measurement Period"
      ) in Interval[18, 85]
        and exists "Essential Hypertension Diagnosis"
        and exists AdultOutpatientEncounters."Qualifying Encounters"
    Denominator
    define "Denominator":
      "Initial Population"
    Denominator Exclusion
    define "Denominator Exclusions":
      Hospice."Has Hospice Services"
        or exists ( "Pregnancy or Renal Diagnosis" )
        or exists ( "End Stage Renal Disease Procedures" )
        or exists ( "End Stage Renal Disease Encounter" )
        or AIFrailLTCF."Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"
        or AIFrailLTCF."Is Age 66 or Older Living Long Term in a Nursing Home"
        or PalliativeCare."Has Palliative Care in the Measurement Period"
    Denominator Exception
    Numerator
    define "Numerator":
      "Has Systolic Blood Pressure Less Than 140"
        and "Has Diastolic Blood Pressure Less Than 90"
    Numerator Exclusion
    Library NameName
    SupplementalDataElements SDE Sex
    define "SDE Sex":
      case
          when Patient.gender = 'male' then Code { code: 'M', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Male' }
          when Patient.gender = 'female' then Code { code: 'F', system: 'http://hl7.org/fhir/v3/AdministrativeGender', display: 'Female' }
          else null
        end
    Library NameName
    ControllingHighBloodPressureFHIR SDE Sex
    define "SDE Sex":
      SDE."SDE Sex"
    Library NameName
    ControllingHighBloodPressureFHIR Qualifying Systolic Blood Pressure Reading
    define "Qualifying Systolic Blood Pressure Reading":
      ( ( ["observation-bp"] ).isObservationBP ( ) ) BloodPressure
        where ( not ( ( BloodPressure.encounter.getEncounter ( ) ).class.code in { 'EMER', 'IMP', 'ACUTE', 'NONAC', 'PRENC', 'SS' } ) )
          and BloodPressure.effective.latest ( ) during day of "Measurement Period"
    Library NameName
    ControllingHighBloodPressureFHIR Qualifying Diastolic Blood Pressure Reading
    define "Qualifying Diastolic Blood Pressure Reading":
      ( ( ["observation-bp"] ).isObservationBP ( ) ) BloodPressure
        where ( not ( ( BloodPressure.encounter.getEncounter ( ) ).class.code in { 'EMER', 'IMP', 'ACUTE', 'NONAC', 'PRENC', 'SS' } ) )
          and BloodPressure.effective.latest ( ) during day of "Measurement Period"
    Library NameName
    ControllingHighBloodPressureFHIR Blood Pressure Days
    define "Blood Pressure Days":
      ( "Qualifying Diastolic Blood Pressure Reading" DBPExam
          return date from DBPExam.effective.latest ( )
      )
        intersect ( "Qualifying Systolic Blood Pressure Reading" SBPExam
            return date from SBPExam.effective.latest ( )
        )
    Library NameName
    ControllingHighBloodPressureFHIR Most Recent Blood Pressure Day
    define "Most Recent Blood Pressure Day":
      Last("Blood Pressure Days" BPDays
          sort asc
      )
    Library NameName
    ControllingHighBloodPressureFHIR Lowest Systolic Reading on Most Recent Blood Pressure Day
    define "Lowest Systolic Reading on Most Recent Blood Pressure Day":
      First("Qualifying Systolic Blood Pressure Reading" SBPReading
          where SBPReading.effective.latest() same day as "Most Recent Blood Pressure Day"
          return singleton from(SBPReading.component SBPComponent
              where SBPComponent.code ~ "Systolic blood pressure"
              return SBPComponent.value as Quantity
          )
          sort asc
      )
    Library NameName
    ControllingHighBloodPressureFHIR Has Systolic Blood Pressure Less Than 140
    define "Has Systolic Blood Pressure Less Than 140":
      "Lowest Systolic Reading on Most Recent Blood Pressure Day" < 140 'mm[Hg]'
    Library NameName
    ControllingHighBloodPressureFHIR Lowest Diastolic Reading on Most Recent Blood Pressure Day
    define "Lowest Diastolic Reading on Most Recent Blood Pressure Day":
      First("Qualifying Diastolic Blood Pressure Reading" DBPReading
          where DBPReading.effective.latest() same day as "Most Recent Blood Pressure Day"
          return singleton from(DBPReading.component DBPComponent
              where DBPComponent.code ~ "Diastolic blood pressure"
              return DBPComponent.value as Quantity
          )
          sort asc
      )
    Library NameName
    ControllingHighBloodPressureFHIR Has Diastolic Blood Pressure Less Than 90
    define "Has Diastolic Blood Pressure Less Than 90":
      "Lowest Diastolic Reading on Most Recent Blood Pressure Day" < 90 'mm[Hg]'
    Library NameName
    ControllingHighBloodPressureFHIR Numerator
    define "Numerator":
      "Has Systolic Blood Pressure Less Than 140"
        and "Has Diastolic Blood Pressure Less Than 90"
    Library NameName
    ControllingHighBloodPressureFHIR Essential Hypertension Diagnosis
    define "Essential Hypertension Diagnosis":
      ( ["Condition": "Essential Hypertension"] ) Hypertension
        where Hypertension.prevalenceInterval ( ) overlaps Interval[start of "Measurement Period", start of "Measurement Period" + 6 months )
    Library NameName
    AdultOutpatientEncounters Qualifying Encounters
    define "Qualifying Encounters":
      ( ( [Encounter: "Office Visit"]
        union [Encounter: "Annual Wellness Visit"]
        union [Encounter: "Preventive Care Services Established Office Visit, 18 and Up"]
        union [Encounter: "Preventive Care Services Initial Office Visit, 18 and Up"]
        union [Encounter: "Home Healthcare Services"]
        union [Encounter: "Online Assessments"]
        union [Encounter: "Telephone Visits"] ).isEncounterPerformed() ) ValidEncounter
        where ValidEncounter.period.toInterval() during day of "Measurement Period"
    Library NameName
    ControllingHighBloodPressureFHIR Initial Population
    define "Initial Population":
      AgeInYearsAt(date from 
        end of "Measurement Period"
      ) in Interval[18, 85]
        and exists "Essential Hypertension Diagnosis"
        and exists AdultOutpatientEncounters."Qualifying Encounters"
    Library NameName
    ControllingHighBloodPressureFHIR Denominator
    define "Denominator":
      "Initial Population"
    Library NameName
    SupplementalDataElements SDE Payer
    define "SDE Payer":
      [Coverage: type in "Payer"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }
    Library NameName
    ControllingHighBloodPressureFHIR SDE Payer
    define "SDE Payer":
      SDE."SDE Payer"
    Library NameName
    SupplementalDataElements SDE Ethnicity
    define "SDE Ethnicity":
      Patient.ethnicity E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }
    Library NameName
    ControllingHighBloodPressureFHIR SDE Ethnicity
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
    Library NameName
    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"
        )
        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 NameName
    ControllingHighBloodPressureFHIR Pregnancy or Renal Diagnosis
    define "Pregnancy or Renal Diagnosis":
      ( ["Condition": "Pregnancy"]
        union ["Condition": "End Stage Renal Disease"]
        union ["Condition": "Kidney Transplant Recipient"]
        union ["Condition": "Chronic Kidney Disease, Stage 5"] ) PregnancyESRDDiagnosis
        where PregnancyESRDDiagnosis.prevalenceInterval ( ) overlaps "Measurement Period"
    Library NameName
    ControllingHighBloodPressureFHIR End Stage Renal Disease Procedures
    define "End Stage Renal Disease Procedures":
      ( ( ["Procedure": "Kidney Transplant"]
          union ["Procedure": "Dialysis Services"]
      ).isProcedurePerformed ( ) ) ESRDProcedure
        where ESRDProcedure.performed.toInterval ( ) ends on or before end of "Measurement Period"
    Library NameName
    ControllingHighBloodPressureFHIR End Stage Renal Disease Encounter
    define "End Stage Renal Disease Encounter":
      ( ( ["Encounter": "ESRD Monthly Outpatient Services"] ).isEncounterPerformed ( ) ) ESRDEncounter
        where ESRDEncounter.period.toInterval ( ) starts on or before end of "Measurement Period"
    Library NameName
    AdvancedIllnessandFrailty Has Criteria Indicating Frailty
    define "Has Criteria Indicating Frailty":
      exists ( (([DeviceRequest: "Frailty Device"]).isDeviceOrder()) FrailtyDeviceOrder
          where FrailtyDeviceOrder.doNotPerform() is not true
          and FrailtyDeviceOrder.authoredOn.toInterval() during day of "Measurement Period"
      )
        or exists ( (([Observation: "Medical equipment used"]).isAssessmentPerformed()) EquipmentUsed
            where EquipmentUsed.value as Concept in "Frailty Device" 
            and EquipmentUsed.effective.toInterval() ends during day of "Measurement Period"
        )
        or exists ( ([Condition: "Frailty Diagnosis"]) FrailtyDiagnosis
            where FrailtyDiagnosis.prevalenceInterval() overlaps "Measurement Period"
        )
        or exists ( (([Encounter: "Frailty Encounter"]).isEncounterPerformed()) FrailtyEncounter
            where FrailtyEncounter.period.toInterval() overlaps "Measurement Period"
        )
        or exists ( (([Observation: "Frailty Symptom"]).isSymptom()) FrailtySymptom
            where FrailtySymptom.effective.toInterval() overlaps "Measurement Period"
        )
    Library NameName
    AdvancedIllnessandFrailty Outpatient Encounters with Advanced Illness
    define "Outpatient Encounters with Advanced Illness":
       (( [Encounter: "Outpatient"]
        union [Encounter: "Observation"]
        union [Encounter: "Emergency Department Evaluation and Management Visit"]
        union [Encounter: "Nonacute Inpatient"] ).isEncounterPerformed()) OutpatientEncounter
          where exists ((OutpatientEncounter.encounterDiagnosis()) Diagnosis where Diagnosis.code in "Advanced Illness")
            and OutpatientEncounter.period.toInterval() starts during day of Interval[start of "Measurement Period" - 1 year, 
            end of "Measurement Period"]
    Library NameName
    AdvancedIllnessandFrailty Has Two Outpatient Encounters with Advanced Illness on Different Dates of Service
    define "Has Two Outpatient Encounters with Advanced Illness on Different Dates of Service":
      exists ( from
          "Outpatient Encounters with Advanced Illness" OutpatientEncounter1,
          "Outpatient Encounters with Advanced Illness" OutpatientEncounter2
          where OutpatientEncounter2.period ends 1 day or more after day of 
          end of OutpatientEncounter1.period
          return OutpatientEncounter1
      )
    Library NameName
    AdvancedIllnessandFrailty Has Inpatient Encounter with Advanced Illness
    define "Has Inpatient Encounter with Advanced Illness":
      exists ( ( ([Encounter: "Acute Inpatient"]).isEncounterPerformed()) InpatientEncounter
          where exists ((InpatientEncounter.encounterDiagnosis()) Diagnosis where Diagnosis.code in "Advanced Illness")
            and InpatientEncounter.period.toInterval() starts during day of Interval[start of "Measurement Period" - 1 year, 
              end of "Measurement Period"]
      )
    Library NameName
    AdvancedIllnessandFrailty Has Dementia Medications in Year Before or During Measurement Period
    define "Has Dementia Medications in Year Before or During Measurement Period":
      exists (( ([MedicationRequest: "Dementia Medications"]).isMedicationActive()) DementiaMedication
          where DementiaMedication.doNotPerform is not true and
          CMD."MedicationRequestPeriod" ( DementiaMedication ) overlaps Interval[start of "Measurement Period" - 1 year, 
            end of "Measurement Period"]
      )
    Library NameName
    AdvancedIllnessandFrailty Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty
    define "Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty":
      ( AgeInYearsAt(date from end of "Measurement Period")in Interval[66, 80]
          and "Has Criteria Indicating Frailty"
          and ( "Has Two Outpatient Encounters with Advanced Illness on Different Dates of Service"
              or "Has Inpatient Encounter with Advanced Illness"
              or "Has Dementia Medications in Year Before or During Measurement Period"
          )
      )
        or ( AgeInYearsAt(date from end of "Measurement Period")>= 81
            and "Has Criteria Indicating Frailty"
        )
    Library NameName
    AdvancedIllnessandFrailty Is Age 66 or Older Living Long Term in a Nursing Home
    define "Is Age 66 or Older Living Long Term in a Nursing Home":
      AgeInYearsAt(date from 
         end of "Measurement Period"
      )>= 66
        and ( ( Last( (([Observation: "Housing status"]).isAssessmentPerformed()) HousingStatus    
              where HousingStatus.effective.toInterval() ends on or before 
              end of "Measurement Period"
              sort by 
              end of effective.toInterval() asc
          )) LastHousingStatus
            where LastHousingStatus.value ~ "Lives in a nursing home (finding)"
        ) is not null
    Library NameName
    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 NameName
    ControllingHighBloodPressureFHIR Denominator Exclusions
    define "Denominator Exclusions":
      Hospice."Has Hospice Services"
        or exists ( "Pregnancy or Renal Diagnosis" )
        or exists ( "End Stage Renal Disease Procedures" )
        or exists ( "End Stage Renal Disease Encounter" )
        or AIFrailLTCF."Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"
        or AIFrailLTCF."Is Age 66 or Older Living Long Term in a Nursing Home"
        or PalliativeCare."Has Palliative Care in the Measurement Period"
    Library NameName
    SupplementalDataElements SDE Race
    define "SDE Race":
      Patient.race R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }
    Library NameName
    ControllingHighBloodPressureFHIR SDE Race
    define "SDE Race":
      SDE."SDE Race"