Newbie with VFE.
I'm trying to put the below in a data display. Not working to good. Any help or suggestions would be appreciated.
{if
(obsnow("bmi") > 25) and (patient_age() < 65 ) or
(obsnow("bmi") > 30) and (patient_age() = > 65 ) or
(obsnow("bmi") < 18.5) and (patient_age() <65 ) or
(obsnow("bmi") < 22) and (patient_age() = < 65 )
then
"Follow-up Plan Needed"
else
"No Plan Needed"
endif
Thank you.
Two things, the 'and' and 'or' are at the same level, i would take out the inner paranthesis so the ands are evaluated first, and then the or. And when doing <= or >= always put the equal sign second
{if
(obsnow("bmi") > 25 and patient_age() < 65 ) or
(obsnow("bmi") > 30 and patient_age() >= 65 ) or
(obsnow("bmi") < 18.5 and patient_age() < 65 ) or
(obsnow("bmi") < 22 and patient_age() <= 65 )
then
"Follow-up Plan Needed"
else
"No Plan Needed"
endif}
If that doesnt work try changing the obsnow("bmi") to val(obsnow("bmi"))
Thanks Michael,
I will give it a shot.
Nona