I'm working on using BP readings to open visibility fields and I've got this working well, with the exception of one small issue. I have the "normal" to open the field using
{OBSANY("BP SYSTOLIC") =>1 AND OBSANY("BP SYSTOLIC")=<120 OR OBSANY("BP DIASTOLIC") =<80 }
And the "Elevated" using
{OBSNOW("BP SYSTOLIC") => 121 or OBSNOW("BP DIASTOLIC")=> 81}
The problem comes up, if the BP result is something that crosses both - such as 122/78 - then both visibility fields open. Any suggestions on how to resolve this issue?
You want to break it up into its parts. One 'visibility set' for systolic and one 'visibility set' for diastolic. Using that approach will permit better control. If you want to use just one 'visibility set', you would need to group the values and have more visibility layers.
(sysbp >= value and sysbp <= value) and (diabp >= value and diabp <= value)
Agreed with Lee. Also, don't be afraid to make multiple visibility regions with similar code.
one for sys AND dia high
one for sys high AND dia normal
one for dia high AND sys normal
one for sys AND dia normal
etc etc etc