I have a radio button that I would like to have a special translation if the criteria are met and then if it does not meet the criteria then it would function just like a radio button should. I know that the else option is doing nothing however, I can't make it stop vomiting when I try to program it
{if OBSNOW("INJ_RE_1") == "No reaction." and DOCUMENT.VIAL_1 <> "" then OBSNOW("INJ_RE_1","Patient was observed for 10 minutes. No redness or swelling to injection site.
")
else OBSNOW("INJ_RE_1"),"","","","")
endif}
In the else clause you have OBSNOW taking four paramters. Off the top of my head I believe that it can only take two or three. Also there was an extra paraenthesis For obsnow either:
OBSNOW("TERMNAME","VALUE") or OBSNOW("TERMNAME","VALUE",DATE)
In this case, this should do the tick:
OBSNOW(“INJ_RE_1″,””)
Brad
I tried but that gave me no return on the one that didn't fit my original if then.
Are you mixing double and single quotes when referring to obsterm INJ_RE_1? Each reference to INJ_RE_1 appears to be started with a double-quote and ended with a single quote.
Kim,
I'm noticing a couple things here.
1. Your obsnow calls are going to be stepping all over themselves
2. Based on the way some of your double quotes look, I'm guessing you copied and pasted from Word (or something similar) into VFE/CPS which can cause issues.
3. If you're trying to work with text translation you should be using the CFMT or FMT data symbols.
If you're trying to generate text translation for the condition you supplied, I'd do it like this. If the condition is met the statement you want should be generated with two hard returns after it. If the condition is not met there will be no text.
{if OBSNOW("INJ_RE_1") == "No reaction." and DOCUMENT.VIAL_1 <> "" then CFMT("Patient was observed for 10 minutes. No redness or swelling to injection site.","","","",HRET+HRET) else "" endif}