OHSU Hypertension Implementation Guide
0.1.0 - CI Build Unknown region code '840'

OHSU Hypertension Implementation Guide, published by Oregon Health and Science University. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/OHSUCMP/htnu18ig/ and changes regularly. See the Directory of published versions

Library: Very High Blood Pressure Alert Logic

Official URL: http://fhir.org/guides/ohsuhypertensionig/Library/HypertensiveEmergency Version: 0.1.0
Draft as of 2026-04-24 Computable Name: HypertensiveEmergency

Copyright/Legal: Published by OHSU under an Apache 2.0 License

Decision logic for identifying a recent very high blood pressure

Metadata
Title Very High Blood Pressure Alert Logic
Version 0.1.0
Status Draft
Jurisdiction 840 from http://unstats.un.org/unsd/methods/m49/m49.htm
Steward (Publisher) Oregon Health and Science University
Steward Contact Oregon Health and Science University
Description

Decision logic for identifying a recent very high blood pressure

Copyright

Published by OHSU under an Apache 2.0 License

Dependency Description: FHIR model information
Resource: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Dependency Description: Library FHIRHelpers
Resource: http://fhir.org/guides/ohsuhypertensionig/Library/FHIRHelpers|4.0.1
Canonical URL: http://fhir.org/guides/ohsuhypertensionig/Library/FHIRHelpers|4.0.1
Dependency Description: Library Common
Resource: Common Logic version: 0.1.0
Canonical URL: http://fhir.org/guides/ohsuhypertensionig/Library/OHSUHTNCommon|0.1
Dependency Description: Value set Systolic Blood Pressure
Resource: Systolic blood pressure
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1104.2
Dependency Description: Value set Diastolic Blood Pressure
Resource: Diastolic Blood Pressure
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.2.1045
Dependency Description: Value set Blood Pressure Measured
Resource: Blood Pressure Measured
Canonical URL: http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.2012
Data Requirement Type: Patient
Profile(s): Patient
Data Requirement Type: Observation
Profile(s): Observation
Must Support Elements: code
Parameters
Name Use Card. Type Documentation
Patient Out 0..1 Patient
BP Observation Count Out 0..1 integer
Next Most Recent BP Reading Out 0..1 Resource
Two Low BPs Out 0..1 boolean
In Population Out 0..1 boolean
Two High BPs Out 0..1 boolean
Recommendation Out 0..1 string
Rationale Out 0..1 string
Suggestions Out 0..1 string
Selection Behavior Out 0..1 string
Links Out 0..1 string
Rationale Combined Data Out 0..1 string
Indicator Status Out 0..1 string
TEST Most Recent BP Reading Out 0..1 Resource
TEST Next Most Recent BP Reading Out 0..1 Resource
TEST Two High BPs Out 0..1 boolean
TEST Two Low BPs Out 0..1 boolean
TEST One Low BP Out 0..1 boolean
Library Content
CQL Content
library HypertensiveEmergency version '0.1'

using FHIR version '4.0.1'

include FHIRHelpers version '4.0.1' called FHIRHelpers
include OHSUHTNCommon version '0.1' called Common

context Patient

define function "BP Within 14 Days"(O Tuple { id String, effective DateTime, systolic Decimal, diastolic Decimal, readingType String }):
  O.effective + 14 days >= Today()

// Two Low BPs are handled through an adverse event creation
define "In Population":
  Common."HTN Crisis" and not "Two Low BPs"

define "BP Observation Count":
  Count(Common."All BP Observations" O)

define "Next Most Recent BP Reading":
  if "BP Observation Count" > 1 then (Common."All BP Observations" O sort by effective)["BP Observation Count"-2]
  else null

define "Two High BPs":
  Common."HTN High Crisis" and "BP Within 14 Days"(Common."Most Recent BP Reading") and 
  "BP Within 14 Days"("Next Most Recent BP Reading") and Common."HTN Crisis BP"("Next Most Recent BP Reading")

define "Two Low BPs":
  Common."HTN Low Crisis" and "BP Within 14 Days"(Common."Most Recent BP Reading") and 
  "BP Within 14 Days"("Next Most Recent BP Reading") and Common."HTN Low Crisis BP"("Next Most Recent BP Reading")

define "Recommendation":
  'Blank.Summary'

define "Rationale Combined Data":
  "Rationale" + '|' + "Suggestions" + '|' + "Selection Behavior" + '|' + "Links"

define "Rationale":
  if "Two High BPs" then 'Your last two BP readings >=180 mmHg systolic and/or >=120 mmHg diastolic) are very high. <strong>If you <a href="/resources/symptoms-911">do not feel well</a>, call 911; otherwise, it is strongly recommended that you now contact your clinic.</strong>'
  else if Common."HTN High Crisis" then 'Remain calm and check your BP again following these <a href="/vitals#instructions">instructions</a> in 5 to 30 minutes. Read more about managing very high blood pressure in the link below.'
  else if Common."HTN Low Crisis" then 'Remain calm and check your BP again following these <a href="/vitals#instructions">instructions</a> in 5 to 30 minutes. Read more about symptoms from low blood pressure in the link below.'
  else null

define "Indicator Status":
  if "Two High BPs" then 'critical'
  else if "In Population" then 'critical'
  else null

define "Suggestions":
  if "Two High BPs" then '[{"id": "display-clinic-contact", "label": "", "type": "clinic-contact"}]'
  else if Common."HTN Crisis" then '[ { "id": "enter-bp-suggestion", "label": "Enter Blood Pressure", "type": "suggestion-link", "actions": [{"label":"Check your BP again (strongly recommended)", "url":"/vitals"}] } ]'
  else null

define "Selection Behavior":
  'at-most-one'

define "Links":
if "Two High BPs" or Common."HTN High Crisis" then '[{"label":"American Heart Association: When to call 911 for high blood pressure", "url":"https://www.heart.org/en/health-topics/high-blood-pressure/understanding-blood-pressure-readings/hypertensive-crisis-when-you-should-call-911-for-high-blood-pressure"}]'
else if Common."HTN Low Crisis" then '[{"label":"American Heart Association: When Blood Pressure is too Low", "url":"https://www.heart.org/en/health-topics/high-blood-pressure/the-facts-about-high-blood-pressure/low-blood-pressure-when-blood-pressure-is-too-low"}]'
else null

define "TEST Most Recent BP Reading":
  Common."Most Recent BP Reading"

define "TEST Next Most Recent BP Reading":
  "Next Most Recent BP Reading"

define "TEST Two High BPs":
  "Two High BPs"

define "TEST Two Low BPs":
  "Two Low BPs"

define "TEST One Low BP":
  Common."HTN Low Crisis"

ELM XML Content
Encoded data 
ELM JSON Content
Encoded data 
Generated using version 0.5.4 of the sample-content-ig Liquid templates