Below is a copy of the code I have in a data display. The 1st portion of the code works as expected; however, if the value of Epineph Dose is greater than 0.5 I want the data display to read 0.5 not whatever the result is from the first IF statement (which is what it is doing currently). I'm sure it's something stupid...Thanks for your help!
PS: Can we get a VFE forum cause this doesn't really fit in any of the listed categories
{if OBSNOW("WEIGHT (KG)") >"0" then OBSNOW("EPINEPH DOSE")=(OBSNOW("WEIGHT (KG)")*.01) else
if OBSNOW("EPINEPH DOSE") >"0.5" then OBSNOW("EPINEPH DOSE")="0.5" else "" endif endif}
Try putting this code in the MEL section to the right
{!if OBSNOW("WEIGHT (KG)") > 0 then
OBSNOW("EPINEPH DOSE") = (OBSNOW("WEIGHT (KG)")*.01)
else ""
endif}
and this code in your data display
{!if OBSNOW("EPINEPH DOSE") > ".5" then ".5" else
OBSNOW("EPINEPH DOSE")
endif}
{if OBSNOW(“WEIGHT (KG)”) > '0' then
OBSNOW(“EPINEPH DOSE”)=(OBSNOW(“WEIGHT (KG)”)*.01)
if OBSNOW(“EPINEPH DOSE”) > '0.5' then
OBSNOW(“EPINEPH DOSE”)='0.5'
else “”
endif
else
""
endif}
Close rwilliams, just needed to add the obsterm after the first else 🙂 Thanks!
{if OBSNOW("WEIGHT (KG)") > "0" then OBSNOW("EPINEPH DOSE")=(OBSNOW("WEIGHT (KG)")*.01)
if OBSNOW("EPINEPH DOSE") > "0.5" then OBSNOW("EPINEPH DOSE")="0.5" else OBSNOW("EPINEPH DOSE") endif else "" endif}