I am placing an if-then-else statement within a data display in my form, for example if the responsible provider is Dr. John Metz then "TEAM RED", is there a way to have that TEAM RED value push to an observation term without any manual entry?
Yes, the syntax is
OBSNOW(obsterm,value, date[optional])
so
OBSNOW("WEIGHT","160")
or
OBSNOW("PAINCNTRCT_Y","Signed by Patient","12/10/2000")
You probably want -
{!if DOCUMENT.PROVIDER == "John Metz" then
OBSNOW("TEAM_NAME","Team Red")
else if .....
...
endif}
where TEAM_NAME is the name of the observation you are using.
Thank you so much, I got it to work!!
Do you know if I could have thie work in the patient banner? I tried and failed but I wasnt sure if I could another way.
Thanks again for your help.
You need to be in an active update to save an observation, in the banner you would just want something like -
{!if DOCUMENT.PROVIDER == "John Metz" then
"Team Red"
else if …..
…
endif}
ok thats what I thought but I didnt know if there was something special I could do.
Thank you again!!