I have never worked with text components within CPS, but am starting to explore the idea of using text components within our office visits. I am trying to use the MEL coding below in a text component but when tested, only the verbiage "Injury occured on" is seen in the note. Any thoughts?
{'{(IF OBSNOW("DATEOFINJURY") <> "0" then "Injury occured on " + obsnow("DATEOFINJURY") ELSE "" ENDIF)}'}
Thank you in advance for any assistance.
Sounds like you may have an empty Obs Term, not just an OBSVALUE of "0". Maybe try something like this (spelling correction of "occurred" included):
{‘{(IF OBSNOW(“DATEOFINJURY”) <> “0" and OBSNOW(“DATEOFINJURY”) <> "" then “Injury occurred on ” + obsnow(“DATEOFINJURY”) ELSE “” ENDIF)}’}
Or try something like this:
{‘{(IF OBSNOW(“DATEOFINJURY”) <> “" then “Injury occurred on ” + obsnow(“DATEOFINJURY”) ELSE “” ENDIF)}’}
Worked great!
Thank you