I'm banging my head against a wall here...
I have this code set for a txt box and it does not work:
{if OBSNOW("WND APP 3") = "Lvl III (8/15)" and OBSNOW("WND APP 4") > "7" and OBSNOW("WND APP 4") < "16" then OBSNOW("WND APP 4") + " / 15 minutes spent in face-to-face counseling with the patient." else "" endif}
This code DOES work:
{if OBSNOW("UADIPSTEXPDT") = "Lvl IV (13/25)" and OBSNOW("UAMPHET") > "12" and OBSNOW("UAMPHET") < "26" then OBSNOW("UAMPHET") + " / 25 minutes spent in face-to-face counseling with the patient."
else ""
endif}
Not sure what to make of it. I've copied the working code, which is identical except I've changed the #'s and OBS terms but it will not display no matter what I do. I can provide the DLG if necessary.
Something else odd...If I use this code:
{if OBSNOW("WND APP 4") > "16" then OBSNOW("WND APP 4") + " / 15 minutes spent in face-to-face counseling with the patient."
else ""
endif}
It won't dislay for 1, or anything over 10, but 2-9 will display the correct info...So bizarre!
Have you run a MEL trace? Maybe there is a mismatch in the type of value expected in WND APP X obs terms?
David Shower
OU Tulsa School of Community Medicine
Giving us the .dlg might help with debugging this one.
The things I would change would be:
{ if OBSNOW("WND APP 3") == "Lvl III (8/15)" and val(OBSNOW("WND APP 4")) > 7 and val(OBSNOW("WND APP 4")) < 16 then OBSNOW("WND APP 4") + " / 15 minutes spent in face-to-face counseling with the patient." else "" endif } { if OBSNOW("UADIPSTEXPDT") == "Lvl IV (13/25)" and val(OBSNOW("UAMPHET")) > 12 and val(OBSNOW("UAMPHET")) < 26 then OBSNOW("UAMPHET") + " / 25 minutes spent in face-to-face counseling with the patient." else "" endif } { if val(OBSNOW("WND APP 4")) > 16 then OBSNOW("WND APP 4") + " / 15 minutes spent in face-to-face counseling with the patient." else ""endif }
Thanks for the help, apparently just dropping the " 's around the #'s did the trick...