I am trying to create a text component that does this, prints the OBSNOW for ETOH USE if it is in the current note. If there is no value for ETOH USE in the current note then pull the previous value OBSPREV ETOH USE. If there is no current value or previous value then print No value recorded.
I am not sure how to string these all together.
Any help appreciated.
thanks!!
OBSANY should pull the latest observation including in the current note. Then you just need some if logic stating that if it is blank print out "No value recorded".
Either of the following should work. It depends on whether you want to display custom text whether value was updated in current encounter or previous encounter.
If you don't care when value was entered...
{
if (OBSANY("ETOH USE ") <> "") then
"Latest value is: " + OBSANY("ETOH USE ")
else
"No value recorded."
endif
}
If you want custom text for each scenario...
{
cond
case OBSNOW("ETOH USE ") <> ""
"Value for this encounter: " + OBSNOW("ETOH USE ")
case OBSPREV("ETOH USE") <> ""
"Value for previous encounter: " + OBSPREV("ETOH USE ")
else
"No value recorded."
endcond
}