Not sure what i got wrong here but here it is:
{if OBSNOW("ORD PROVIDER") = "Semer MD" then
OBSNOW("CLINPROVOTHR") = "111"
else if OBSNOW("ORD PROVIDER") = "White MD" then
OBSNOW("CLINPROVOTHR") = "222"
else if OBSNOW("ORD PROVIDER") = "Lee MD" then
OBSNOW("CLINPROVOTHR") = "333"
else if OBSNOW("ORD PROVIDER") = "Picton MD" then
OBSNOW("CLINPROVOTHR") = "444"
else if OBSNOW("ORD PROVIDER") = "Herdman PA-C" then
OBSNOW("CLINPROVOTHR") = "555"
endif endif endif endif endif}
So the selection from a dropdown (OBSNOW("ORD PROVIDER")) should show OBSNOW("CLINPROVOTHR") in a data display but it doesn't. Although the text translation is working for the data display is doesn't appear in the form nor on the clinical list changes. Any help is greatly appreciated, thanks!
Maybe this:
{If OBSNOW(“ORD PROVIDER”) == “Semer MD” then
OBSNOW(“CLINPROVOTHR”,"111")
else if OBSNOW(“ORD PROVIDER”) == “White MD” then
OBSNOW(“CLINPROVOTHR”,"222")
else if OBSNOW(“ORD PROVIDER”) == “Lee MD” then
OBSNOW(“CLINPROVOTHR”,"333")
else if OBSNOW(“ORD PROVIDER”) == “Picton MD” then
OBSNOW(“CLINPROVOTHR”,"444")
else if OBSNOW(“ORD PROVIDER”) == “Herdman PA-C” then
OBSNOW(“CLINPROVOTHR”,"555")
endif endif endif endif endif}
You want to do OBSNOW("TERM","VALUE") for assignment. And this for checking values: OBSNOW("TERM") == VALUE . I mix those up sometimes. Also generally if you aren't assigning a value you want to use the double equal sign -- although MEL seems to be relatively passive about that.
Hopefully that helps. Those are the only two things that jumped out at me.
Brad
Yup. Agree with your comments about "==". Well put, bhoover.
It is very true. I have seen forms run just as designed while "=" is being used instead of "==", when doing a comparison.
Dave