Hello,
I am a bit new to MEL expressions and need some help. I am creating a letter to send to referring physicians.
I want to pull data from an obs term but change the text displayed in the letter: The chart note says " Sclerotherapy of varices listed above " which is tied to an obs term. I want this to display in the letter as " Sclerotherapy of non-saphenous varices. "
Can I use an if then statement to make this happen? What would it look like?
Thanks in advance for the help!
Are there any other options that could be in the obsterm? If that is the only posibility or thats the only one that needs to be altered I would just use
replacestr(OBSNOW("obsterm"),"varices listed above","non-saphenous varices")
An if-then would look like -
if obsnow("obsterm") == "Sclerotherapy of varices listed above" then
" Sclerotherapy of non-saphenous varices. "
else if.....
....
endif ....
You might have to add formatting to that depending on how you want it to read
There are other options in the obs term but that is good to know.
I guess I do not quite understand the syntax. I am hung up on the else and endif.
{if obsnow("IVCTP1") == "Sclerotherapy of the varices listed above" then "Sclerotherapy of non-saphenous varices" else "" endif}
That is obviously wrong, how would I fix it?
Try -
Else obsnow("IVCTP1") endif}
Hmm I don't get an error message but it still shows Sclerotherapy of varices listed above.
The text has to be exactly the same in the Obsterm for this to work, right down to the capital letters and extra spaces. If it still doesn't work I would recommend running a Mel trace, if you search this forum you should find instructions on how to do it, it's a very useful tool
I will double check my text. Thank you very much for the help.