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 2025-02-19 Computable Name: HypertensiveEmergency

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

Decision logic for identifying a recent very high blood pressure

Id: HypertensiveEmergency
Url: Very High Blood Pressure Alert Logic
Version: 0.1.0
Name: HypertensiveEmergency
Title: Very High Blood Pressure Alert Logic
Status: draft
Date: 2025-02-19 23:49:00+0000
Publisher: Oregon Health and Science University
Description:

Decision logic for identifying a recent very high blood pressure

Jurisdiction: 840
Copyright:

Published by OHSU under an Apache 2.0 License

Related Artifacts:
TypeResource
depends-onhttp://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
depends-onhttp://fhir.org/guides/ohsuhypertensionig/Library/FHIRHelpers|4.0.1
depends-onCommon Logicversion: null0.1.0)
depends-onSystolic blood pressure
depends-onDiastolic Blood Pressure
depends-onBlood Pressure Measured
Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
BP Observation Countinteger01Out
Next Most Recent BP ReadingResource01Out
Two Low BPsboolean01Out
In Populationboolean01Out
Two High BPsboolean01Out
Recommendationstring01Out
Rationalestring01Out
Suggestionsstring01Out
Selection Behaviorstring01Out
Linksstring01Out
Rationale Combined Datastring01Out
Indicator Statusstring01Out
TEST Most Recent BP ReadingResource01Out
TEST Next Most Recent BP ReadingResource01Out
TEST Two High BPsboolean01Out
TEST Two Low BPsboolean01Out
TEST One Low BPboolean01Out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/StructureDefinition/Patient
Observation http://hl7.org/fhir/StructureDefinition/Observation ;
Content: text/cql
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"

Content: application/elm+xml
Encoded data (55880 characters)
Content: application/elm+json
Encoded data (96328 characters)