Id: Monitoring Url: Monitoring Logic Version: 0.1.0 Name: Monitoring Title: Monitoring Logic Status: draft Date: 2026-02-19 22:08:15+0000 Publisher: Oregon Health and Science University Description: Decision logic for monitoring progress in a patient previously diagnosed with hypertension Jurisdiction: 840 Copyright: Published by OHSU under an Apache 2.0 License Related Artifacts: Type Resource depends-on http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1 depends-on http://fhir.org/guides/ohsuhypertensionig/Library/FHIRHelpers|4.0.1 depends-on Common Logicversion: null0.1.0) depends-on ConditionVerificationStatus depends-on Condition Category Codes depends-on Hypertension depends-on Non essential Hypertension SNOMEDCT depends-on Systolic blood pressure depends-on Diastolic Blood Pressure depends-on Blood Pressure Measured depends-on End Stage Renal Disease depends-on Pregnancy Parameters: Name Type Min Max In/Out Patient Patient 0 1 Out Info string 0 1 Out Warning string 0 1 Out Critical string 0 1 Out Errors Resource 0 1 Out Patient Name string 0 1 Out Meets Inclusion Criteria boolean 0 1 Out Meets Exclusion Criteria boolean 0 1 Out In Population boolean 0 1 Out Provide Recommendation boolean 0 1 Out Recommendation string 0 1 Out Rationale string 0 1 Out Suggestions string 0 1 Out Selection Behavior string 0 1 Out Links string 0 1 Out Rationale Combined Data string 0 1 Out Indicator Status string 0 1 Out No Entry into Population boolean 0 1 Out Test Count All BP integer 0 1 Out Test Most Recent BP Resource 0 1 Out Test Get All BP Observation Resources Resource 0 * Out Test Get Has BP Set boolean 0 1 Out Test Get Most Recent BP Set Resource 0 * Out Test All BP Last 2 Years Resource 0 * Out Test Get Average All BP Last 2 Years Resource 0 1 Out Test Get Average Most Recent BP Set Resource 0 1 Out Test Get BP Goal Resource 0 1 Out TEST Condition Prevalence Period Period 0 * Out TEST Condition Is Valid Prevalence Period boolean 0 * Out TEST Condition Indicating Preexisting Hypertension Condition 0 * Out TEST Problem Conditions Condition 0 * Out TEST Encounter Conditions Condition 0 * Out Test Home BPs integer 0 1 Out Data Requirements: Type Profile MS Code Filter Patient http://hl7.org/fhir/StructureDefinition/Patient ;; Condition http://hl7.org/fhir/StructureDefinition/Condition ; Observation http://hl7.org/fhir/StructureDefinition/Observation ; Goal http://hl7.org/fhir/StructureDefinition/Goal ;;;;; Content: text/cql library Monitoring version '0.1'#xD; #xD; using FHIR version '4.0.1'#xD; #xD; include FHIRHelpers version '4.0.1' called FHIRHelpers#xD; include OHSUHTNCommon version '0.1' called Common#xD; #xD; context Patient#xD; #xD; define &quot;Info&quot;:#xD; 'info'#xD; #xD; define &quot;Warning&quot;:#xD; 'warning'#xD; #xD; define &quot;Critical&quot;:#xD; 'critical'#xD; #xD; define &quot;Errors&quot;:#xD; null#xD; #xD; define &quot;Patient Name&quot;:#xD; First(Patient.name.given)#xD; + ' ' +#xD; First(Patient.name.family)#xD; #xD; /* Recommendation Criteria - Monitoring Hypertension */#xD; define &quot;Meets Inclusion Criteria&quot;:#xD; exists Common.&quot;Condition Indicating Preexisting Hypertension&quot; and not Common.&quot;HTN Crisis&quot;#xD; #xD; define &quot;Meets Exclusion Criteria&quot;:#xD; Common.&quot;Patient Under Age 18&quot;#xD; or Common.&quot;Patient Over Age 100&quot;#xD; or exists Common.&quot;Condition Indicating End Stage Renal Disease&quot;#xD; or exists Common.&quot;Condition Indicating Pregnancy&quot;#xD; #xD; define &quot;In Population&quot;:#xD; // Preserve this ordering so excluded patients fail fast#xD; not &quot;Meets Exclusion Criteria&quot; and &quot;Meets Inclusion Criteria&quot;#xD; #xD; define &quot;Provide Recommendation&quot;:#xD; &quot;In Population&quot; and (not Common.&quot;Patient has a BP Goal&quot; or not Common.&quot;Has 12 Home BPs&quot; or not Common.&quot;Above Goal Average Most Recent&quot;)#xD; #xD; define &quot;Recommendation&quot;:#xD; if not &quot;Provide Recommendation&quot; then ''#xD; // 12#xD; else if not Common.&quot;Patient has a BP Goal&quot; then 'Discuss target blood pressure and set a blood pressure goal'#xD; // 13#xD; else if not Common.&quot;Has 12 Home BPs&quot; then 'Consider obtaining additional blood pressure measurements.'#xD; // Patient at Goal#xD; else 'Monitoring.Success.Summary' // COACH must look for this hack to display the green checkmark#xD; #xD; define &quot;Rationale Combined Data&quot;:#xD; &quot;Rationale&quot; + '|' + &quot;Suggestions&quot; + '|' + &quot;Selection Behavior&quot; + '|' + &quot;Links&quot;#xD; #xD; define &quot;Rationale&quot;:#xD; if not &quot;Provide Recommendation&quot; then ''#xD; else if not Common.&quot;Patient has a BP Goal&quot; then '{{#patient}}You recently received a hypertension (high blood pressure) diagnosis. Setting goals for lowering your blood pressure has been proven to help overall health and reduce your chance of stroke or other conditions.{{/patient}}{{#careTeam}}No BP Goal set: Setting a blood pressure goal can help engage patients and improve outcomes. For most patients, choosing a target between &lt;120-140/80-90 is recommended; lower targets may be for ASCVD, ASCVD risk &gt;10%, multimorbidity (CKD and diabetes), or preference; higher targets may be for age, adverse events, or frailty.{{/careTeam}}'#xD; else if not Common.&quot;Has 12 Home BPs&quot; then 'Since we do not have enough blood pressure measurements to obtain a full picture of your health, we recommend you take a full set of measurements. We consider a full set to be at least 12 home measurements.'#xD; // Patient at Goal#xD; else 'At or below your goal BP: Keep up the good work! Click the link for what to do next.'#xD; #xD; define &quot;Indicator Status&quot;:#xD; &quot;Info&quot;#xD; #xD; define &quot;Suggestions&quot;:#xD; if not &quot;Provide Recommendation&quot; then ''#xD; else if not Common.&quot;Patient has a BP Goal&quot; then '[ { &quot;id&quot;: &quot;bp-radio-goal&quot;, &quot;label&quot;: &quot;BP Goal&quot;, &quot;type&quot;: &quot;bp-goal&quot;, &quot;references&quot;:{&quot;system&quot;:&quot;https://coach.ohsu.edu&quot;, &quot;code&quot;:&quot;blood-pressure&quot;}, &quot;actions&quot;: [{&quot;label&quot;:&quot;140/90&quot;}, {&quot;label&quot;:&quot;130/80&quot;}, {&quot;label&quot;:&quot;120/80&quot;}]}]'#xD; else if not Common.&quot;Has 12 Home BPs&quot; then '[ { &quot;id&quot;: &quot;enter-bp-suggestion&quot;, &quot;label&quot;: &quot;Enter Blood Pressure&quot;, &quot;type&quot;: &quot;suggestion-link&quot;, &quot;actions&quot;: [{&quot;label&quot;:&quot;Click here to go to the Home Blood Pressure entry page.&quot;, &quot;url&quot;:&quot;/vitals&quot;}] } ]'#xD; else '[ { &quot;id&quot;: &quot;link-suggestion&quot;, &quot;label&quot;: &quot;&quot;, &quot;type&quot;: &quot;suggestion-link&quot;, &quot;actions&quot;: [{&quot;label&quot;:&quot;My blood pressure is controlled: What to do next?&quot;, &quot;url&quot;:&quot;/infographic-controlled-bp.pdf&quot;}] } ]'#xD; #xD; define &quot;Selection Behavior&quot;:#xD; 'at-most-one'#xD; #xD; define &quot;Links&quot;:#xD; if not &quot;Provide Recommendation&quot; then ''#xD; else if not Common.&quot;Patient has a BP Goal&quot; then '[{&quot;label&quot;: &quot;AHA: Understanding High Blood Pressure Readings&quot;, &quot;url&quot;: &quot;https://www.heart.org/en/health-topics/high-blood-pressure/understanding-blood-pressure-readings&quot;}]'#xD; else if not Common.&quot;Has 12 Home BPs&quot; then '[{&quot;label&quot;:&quot;Bell 2021: The potential for overdiagnosis and underdiagnosis because of blood pressure variability: a comparison of the 2017 ACC/AHA, 2018 ESC/ESH and 2019 NICE hypertension guidelines&quot;, &quot;url&quot;:&quot;https://pubmed.ncbi.nlm.nih.gov/32773652/&quot;}]'#xD; else '[]'#xD; #xD; define &quot;No Entry into Population&quot;:#xD; not &quot;Meets Inclusion Criteria&quot;#xD; and not &quot;Meets Exclusion Criteria&quot;#xD; #xD; /* TESTS */#xD; define &quot;Test Count All BP&quot;:#xD; Count(Common.&quot;Blood Pressure Observations for Last 2 Years&quot;)#xD; #xD; define &quot;Test Most Recent BP&quot;:#xD; Common.&quot;Most Recent BP Reading&quot; BP#xD; #xD; define &quot;Test Get All BP Observation Resources&quot;:#xD; Common.&quot;All BP Observations&quot; BP#xD; #xD; define &quot;Test Get Has BP Set&quot;:#xD; Common.&quot;Has BP Set&quot;#xD; #xD; define &quot;Test Get Most Recent BP Set&quot;:#xD; Common.&quot;Most Recent BP Set&quot; BPSet#xD; #xD; define &quot;Test All BP Last 2 Years&quot;:#xD; Common.&quot;Blood Pressure Observations for Last 2 Years&quot;#xD; #xD; define &quot;Test Get Average All BP Last 2 Years&quot;:#xD; Common.&quot;Avg BP&quot;(Common.&quot;Blood Pressure Observations for Last 2 Years&quot;)#xD; #xD; define &quot;Test Get Average Most Recent BP Set&quot;:#xD; Common.&quot;Avg BP&quot;(Common.&quot;Most Recent BP Set&quot;)#xD; #xD; define &quot;Test Get BP Goal&quot;:#xD; Common.&quot;BP from Most Recent Goal&quot; BPGoal#xD; return Tuple { systolic: BPGoal.systolic.value, diastolic: BPGoal.diastolic.value }#xD; #xD; define &quot;TEST Condition Prevalence Period&quot;:#xD; Common.&quot;Conditions&quot; Problem#xD; return Common.&quot;Prevalence Period&quot;(Problem)#xD; #xD; define &quot;TEST Condition Is Valid Prevalence Period&quot;:#xD; Common.&quot;Conditions&quot; Problem#xD; return Common.&quot;Is Valid Prevalence Period&quot;(Problem)#xD; #xD; define &quot;TEST Condition Indicating Preexisting Hypertension&quot;:#xD; Common.&quot;Condition Indicating Preexisting Hypertension&quot;#xD; #xD; define &quot;TEST Problem Conditions&quot;:#xD; Common.&quot;Problem Conditions&quot;#xD; #xD; define &quot;TEST Encounter Conditions&quot;:#xD; Common.&quot;Encounter Conditions&quot;#xD; #xD; define &quot;Test Home BPs&quot;:#xD; Count(Common.&quot;Home Blood Pressure Observations&quot;) Content: application/elm+xml Encoded data (89260 characters) Content: application/elm+json Encoded data (153244 characters)
Decision logic for monitoring progress in a patient previously diagnosed with hypertension
Published by OHSU under an Apache 2.0 License
Code system ConditionVerificationStatusCodes
Value set Non essential Hypertension SNOMEDCT
TEST Condition Is Valid Prevalence Period
TEST Condition Indicating Preexisting Hypertension