Id: ControllingHighBloodPressureFHIR Version: 0.1.0 Url: ControllingHighBloodPressureFHIR Experimental: true Type: system: http://terminology.hl7.org/CodeSystem/library-type code: logic-library Date: 2026-05-11 22:31:14+0000 Publisher: Clinical Quality Framework Jurisdiction: 001 Related Artifacts: Dependencies http://fhir.org/guides/cqf/aphl/chronic-ds/Library/FHIRHelpers|4.1.000 FHIRCommon http://fhir.org/guides/cqf/aphl/chronic-ds/Library/MATGlobalCommonFunctionsFHIR4|6.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AdultOutpatientEncountersFHIR4|2.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SupplementalDataElementsFHIR4|2.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/AdvancedIllnessandFrailtyExclusionECQMFHIR4|5.12.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/HospiceFHIR4|2.0.000 http://fhir.org/guides/cqf/aphl/chronic-ds/Library/SurveillanceDataElementsFHIR4|1.0.000 PalliativeCareFHIR LOINC Chronic Kidney Disease, Stage 5 Dialysis Services ED Encounter Inpatient End Stage Renal Disease ESRD Monthly Outpatient Services Essential Hypertension Ethnicity Kidney Transplant Kidney Transplant Recipient ONC Administrative Sex Payer Pregnancy Race Vascular Access for Dialysis Emergency Department Visit Parameters: Name Type Min Max In/Out Measurement Period Period 0 1 In Patient Patient 0 1 Out SDE Ethnicity Coding 0 * Out SDE Payer Resource 0 * Out SDE Race Coding 0 * Out SDE Sex Coding 0 1 Out SDE Age integer 0 1 Out Stratifier Age Group Coding 0 1 Out SDE State of Residence string 0 1 Out SDE Postal Code of Residence string 0 1 Out SDE Food Insecurity Risk Status CodeableConcept 0 1 Out Qualifying Diastolic Blood Pressure Reading Observation 0 * Out Qualifying Systolic Blood Pressure Reading Observation 0 * Out Blood Pressure Days dateTime 0 * Out Most Recent Blood Pressure Day dateTime 0 1 Out Lowest Diastolic Reading on Most Recent Blood Pressure Day Quantity 0 1 Out Has Diastolic Blood Pressure Less Than 90 boolean 0 1 Out Lowest Systolic Reading on Most Recent Blood Pressure Day Quantity 0 1 Out Has Systolic Blood Pressure Less Than 140 boolean 0 1 Out Numerator boolean 0 1 Out Essential Hypertension Diagnosis Condition 0 * Out Initial Population boolean 0 1 Out Pregnancy Or Renal Diagnosis Condition 0 * Out Denominator boolean 0 1 Out End Stage Renal Disease Encounter Encounter 0 * Out End Stage Renal Disease Procedures Procedure 0 * Out Denominator Exclusion boolean 0 1 Out Data Requirements: Type Profile MS Code Filter Patient http://hl7.org/fhir/StructureDefinition/Patient Observation http://hl7.org/fhir/StructureDefinition/Observation ;;;; code filter: path: code system: http://loinc.org code: 85354-9 display: blood pressure Encounter http://hl7.org/fhir/StructureDefinition/Encounter ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307 Encounter http://hl7.org/fhir/StructureDefinition/Encounter ;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010 Encounter http://hl7.org/fhir/StructureDefinition/Encounter ;;; code filter: path: type value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014 Condition http://hl7.org/fhir/StructureDefinition/Condition ;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.104.12.1011 Condition http://hl7.org/fhir/StructureDefinition/Condition ;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378 Condition http://hl7.org/fhir/StructureDefinition/Condition ;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.353 Condition http://hl7.org/fhir/StructureDefinition/Condition ;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1029 Condition http://hl7.org/fhir/StructureDefinition/Condition ;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1002 Procedure http://hl7.org/fhir/StructureDefinition/Procedure ;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1012 Procedure http://hl7.org/fhir/StructureDefinition/Procedure ;;; code filter: path: code value set: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1013 Content: text/cql /*#xD; FHIR Translation of CMS165v9: Controlling High Blood Pressure (CBP)#xD; */#xD; library ControllingHighBloodPressureFHIR version '9.0.000'#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include FHIRHelpers version '4.1.000' called FHIRHelpers#xD; include FHIRCommon called FC#xD; include MATGlobalCommonFunctionsFHIR4 version '6.0.000' called Common#xD; include AdultOutpatientEncountersFHIR4 version '2.0.000' called AdultOutpatientEncounters#xD; include SupplementalDataElementsFHIR4 version '2.0.000' called SDE#xD; include AdvancedIllnessandFrailtyExclusionECQMFHIR4 version '5.12.000' called FrailtyLTI#xD; include HospiceFHIR4 version '2.0.000' called Hospice#xD; include SurveillanceDataElementsFHIR4 version '1.0.000' called SurveillanceDataElements#xD; include PalliativeCareFHIR called PalliativeCare#xD; #xD; codesystem "LOINC": 'http://loinc.org'#xD; #xD; valueset "Chronic Kidney Disease, Stage 5": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.1002'#xD; valueset "Dialysis Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1013'#xD; valueset "ED": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1085'#xD; valueset "Encounter Inpatient": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'#xD; valueset "End Stage Renal Disease": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.353'#xD; valueset "ESRD Monthly Outpatient Services": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1014'#xD; valueset "Essential Hypertension": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.104.12.1011'#xD; valueset "Ethnicity": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.837'#xD; valueset "Kidney Transplant": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1012'#xD; valueset "Kidney Transplant Recipient": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1029'#xD; valueset "ONC Administrative Sex": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1'#xD; valueset "Payer": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591'#xD; valueset "Pregnancy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378'#xD; valueset "Race": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.836'#xD; valueset "Vascular Access for Dialysis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.109.12.1011'#xD; valueset "Emergency Department Evaluation and Management Visit": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.101.12.1010'#xD; #xD; code "Birth date": '21112-8' from "LOINC" display 'Birth date'#xD; code "Blood pressure": '85354-9' from "LOINC" display 'blood pressure'#xD; code "Diastolic blood pressure": '8462-4' from "LOINC" display 'Diastolic blood pressure'#xD; code "Systolic blood pressure": '8480-6' from "LOINC" display 'Systolic blood pressure'#xD; #xD; parameter "Measurement Period" Interval<DateTime> default Interval[@2025-01-01T00:00:00.0-06:00, @2025-12-31T23:59:59.999-06:00]#xD; #xD; context Patient#xD; #xD; define "SDE Ethnicity":#xD; SDE."SDE Ethnicity"#xD; #xD; define "SDE Payer":#xD; SDE."SDE Payer"#xD; #xD; define "SDE Race":#xD; SDE."SDE Race"#xD; #xD; define "SDE Sex":#xD; SDE."SDE Sex"#xD; #xD; define "SDE Age":#xD; SurveillanceDataElements."Age"#xD; #xD; define "Stratifier Age Group":#xD; SurveillanceDataElements."Age Group"#xD; #xD; define "SDE State of Residence":#xD; SurveillanceDataElements."State of Residence"#xD; #xD; define "SDE Postal Code of Residence":#xD; SurveillanceDataElements."Postal Code of Residence"#xD; #xD; define "SDE Food Insecurity Risk Status":#xD; SurveillanceDataElements."Food Insecurity Risk Status"#xD; #xD; define "Has Diastolic Blood Pressure Less Than 90":#xD; "Lowest Diastolic Reading on Most Recent Blood Pressure Day" < 90 'mm[Hg]'#xD; #xD; define "Has Systolic Blood Pressure Less Than 140":#xD; "Lowest Systolic Reading on Most Recent Blood Pressure Day" < 140 'mm[Hg]'#xD; #xD; define "Lowest Diastolic Reading on Most Recent Blood Pressure Day":#xD; First(#xD; "Qualifying Diastolic Blood Pressure Reading" DBPReading#xD; where Common.Earliest(DBPReading.effective) same day as "Most Recent Blood Pressure Day"#xD; return singleton from (#xD; DBPReading.component C#xD; where C.code ~ "Diastolic blood pressure"#xD; return C.value as FHIR.Quantity#xD; ) sort ascending#xD; )#xD; #xD; define "Lowest Systolic Reading on Most Recent Blood Pressure Day":#xD; First(#xD; "Qualifying Systolic Blood Pressure Reading" SBPReading#xD; where Common.Latest(SBPReading.effective) same day as "Most Recent Blood Pressure Day"#xD; return singleton from (#xD; SBPReading.component C#xD; where C.code ~ "Systolic blood pressure"#xD; return C.value as FHIR.Quantity#xD; ) sort ascending#xD; )#xD; #xD; define "Blood Pressure Days":#xD; ("Qualifying Diastolic Blood Pressure Reading" DBPExam #xD; return Common.Latest(DBPExam.effective)#xD; ) #xD; intersect ("Qualifying Systolic Blood Pressure Reading" SBPExam #xD; return Common.Latest(SBPExam.effective)#xD; )#xD; #xD; define "Most Recent Blood Pressure Day":#xD; Max("Blood Pressure Days")#xD; #xD; define "Qualifying Diastolic Blood Pressure Reading":#xD; [Observation: "Blood pressure"] BloodPressure#xD; without ([Encounter: "Encounter Inpatient"]#xD; union [Encounter: "Emergency Department Evaluation and Management Visit"]) DisqualifyingEncounter#xD; such that Common.Latest(BloodPressure.effective) during day of DisqualifyingEncounter.period#xD; where BloodPressure.status in {'final', 'amended'}#xD; and Common.Latest(BloodPressure.effective) during "Measurement Period"#xD; and exists (#xD; BloodPressure.component DiastolicBP#xD; where DiastolicBP.code ~ "Diastolic blood pressure"#xD; and (DiastolicBP.value as Quantity).code.value = 'mm[Hg]'#xD; )#xD; #xD; define "Qualifying Systolic Blood Pressure Reading":#xD; [Observation: "Blood pressure"] BloodPressure#xD; without ([Encounter: "Encounter Inpatient"]#xD; union [Encounter: "Emergency Department Evaluation and Management Visit"]) DisqualifyingEncounter#xD; such that Common.Latest(BloodPressure.effective) during day of DisqualifyingEncounter.period#xD; where BloodPressure.status in {'final', 'amended'}#xD; and Common.Latest(BloodPressure.effective) during "Measurement Period"#xD; and exists (#xD; BloodPressure.component SystolicBP#xD; where SystolicBP.code ~ "Systolic blood pressure"#xD; and (SystolicBP.value as Quantity).code.value = 'mm[Hg]'#xD; )#xD; #xD; define "Numerator":#xD; "Has Diastolic Blood Pressure Less Than 90"#xD; and "Has Systolic Blood Pressure Less Than 140"#xD; #xD; define "Initial Population":#xD; AgeInYearsAt(date from end of "Measurement Period") in Interval[18, 85]#xD; and exists "Essential Hypertension Diagnosis"#xD; and exists AdultOutpatientEncounters."Qualifying Encounters"#xD; #xD; define "Pregnancy Or Renal Diagnosis":#xD; ( [Condition: "Pregnancy"]#xD; union [Condition: "End Stage Renal Disease"]#xD; union [Condition: "Kidney Transplant Recipient"]#xD; union [Condition: "Chronic Kidney Disease, Stage 5"] ) PregnancyESRDDiagnosis#xD; where PregnancyESRDDiagnosis.verificationStatus ~ Common."confirmed"#xD; and PregnancyESRDDiagnosis.recordedDate during "Measurement Period"#xD; #xD; define "Denominator":#xD; "Initial Population"#xD; #xD; define "End Stage Renal Disease Encounter":#xD; [Encounter: "ESRD Monthly Outpatient Services"] ESRDEncounter#xD; where ESRDEncounter.status in { 'arrived', 'triaged', 'in-progress', 'onleave', 'finished' }#xD; and ESRDEncounter.period starts on or before end of "Measurement Period"#xD; #xD; define "End Stage Renal Disease Procedures":#xD; ([Procedure: "Kidney Transplant"]#xD; union [Procedure: "Dialysis Services"]) ESRDProcedure#xD; where ESRDProcedure.status = 'completed'#xD; and end of Common."Normalize Interval"(ESRDProcedure.performed) on or before end of "Measurement Period"#xD; #xD; define "Essential Hypertension Diagnosis":#xD; [Condition: "Essential Hypertension"] Hypertension#xD; where Hypertension.verificationStatus ~ Common."confirmed"#xD; and Common."Prevalence Period"(Hypertension) overlaps Interval[start of "Measurement Period", start of "Measurement Period" + 6 months]#xD; #xD; define "Denominator Exclusion":#xD; Hospice."Has Hospice"#xD; or exists ("Pregnancy Or Renal Diagnosis")#xD; or exists ("End Stage Renal Disease Procedures")#xD; or exists ("End Stage Renal Disease Encounter")#xD; or FrailtyLTI."Is Age 66 to 80 with Advanced Illness and Frailty or Is Age 81 or Older with Frailty"#xD; or FrailtyLTI."Is Age 66 or Older Living Long Term in a Nursing Home"#xD; or PalliativeCare."Palliative Care in the Measurement Period" Content: application/elm+xml Encoded data (170872 characters) Content: application/elm+json Encoded data (314060 characters)
Value set Chronic Kidney Disease, Stage 5
Value set ESRD Monthly Outpatient Services
Value set Emergency Department Evaluation and Management Visit
Qualifying Diastolic Blood Pressure Reading
Qualifying Systolic Blood Pressure Reading
Lowest Diastolic Reading on Most Recent Blood Pressure Day
Has Diastolic Blood Pressure Less Than 90
Lowest Systolic Reading on Most Recent Blood Pressure Day
Has Systolic Blood Pressure Less Than 140