OHSUCMP / htnu18ig

Repository for Hypertension U18 grant's Implementation Guide
Apache License 2.0
2 stars 0 forks source link

Patients with no BP observations do not get recommendation #148

Closed aeyates closed 1 year ago

aeyates commented 1 year ago

If a patient has no BP observations at all, they do not get a recommendation. This is because "HTN Crisis" evaluates to null instead of true or false, a side effect of this definition also evaluating to null:

define "BP Within 14 days":
  "Most Recent BP Reading" BP
  return BP.effective + 14 days >= Today()
aeyates commented 1 year ago

After "fixing" this bug, the consequences are somewhat worse. Instead of getting no recommendation at all, they get the language "You recently had a high blood pressure reading, but we do not have enough blood pressure measurements to obtain a full picture of your current health...". This is inaccurate, so they are probably better off with no recommendation at all like before.

If we decide this is something that should be fixed later, here's the change needed:

define "BP Within 14 days":
  "Most Recent BP Reading" is not null and 
  "Most Recent BP Reading".effective + 14 days >= Today()

Note that you can't assign "Most Recent BP Reading" to a variable because CQL won't allow the null comparison, so this does not work:

define "BP Within 14 days":
  "Most Recent BP Reading" BP 
  return BP is not null and BP.effective + 14 days >= Today()