Everyone,
Hi there, I was hoping for some help. I was wondering if someone had any code to change a result based on values to a specific string rather then a numeric. So, when ther result comes in if it is < .09 the value should be Negative/ Non-Immune.
Example
Varicella (VZV)
< or = 0.90 Ouput to new OBS is: Negative/ Non-Immune
0.91 - 1.09 Ouput to new OBS is: Equivocal
> or = 1.10 Ouput to new OBS is: Positive/ Immune
Thanks!
Something like this should work if you are putting the numeric values manually into a obsterm and then are wanting to write the new obsterm with the specific string.
{if obsnow("obstermhere") <= "0.90" then obsnow("newobsterm","Negative/Non-Immune")
else if
(obsnow("obstermhere") >= "0.91" and obsnow("obstermhere") <= "1.09") then obsnow("newobsterm","Equivocal")
else if
obsnow("obstermhere") >= "1.10" then obsnown("obstermhere","Positive/Immune")
else "" endif endif endif}
If the values are coming back from a lab and will already be entered on the flow sheet, you would want to change it to obsprev or obsany:
{if obsany("obstermhere") <= "0.90" then obsnow("newobsterm","Negative/Non-Immune")
else if
(obsany("obstermhere") >= "0.91" and obsany("obstermhere") <= "1.09") then obsnow("newobsterm","Equivocal")
else if
obsany("obstermhere") >= "1.10" then obsnow("obstermhere","Positive/Immune")
else "" endif endif endif}
Thank you so much Ernie, that is exactly what I needed!
Your welcome.