Working in VFE to create a condition that will send an alert to review medication. I want to code it so that the alert shows up in the current user's alerts and flags.
The following MEL expression posts the alert to the patients alerts/flags, but I want the alert to also post to the current user's alerts.
{if OBSNOW("MEDPANDEC")=="Mandated" and OBSNOW("EVAL INTERVL") == "Initial 30 days" then MEL_SEND_FLAG("Alert","","I",adddates(OBSNOW("MEDPANDATE"),"0","0","16"),"","Patient is due for Involuntary Medication review in 2 weeks", "Summary","") else ""endif}
Is there a string that I can insert in the SEND_MEL_FLAG - "To" argument that will push the alert to the current user's chart desktop?
I have tried inserting (user.realname) without success.
Full disclosure, I'm not a coder. I have had some instruction in VFE and MEL but have mostly learned through trial and error and using pieces of code that I know produce a certain result.
You need to use USER.LOGINNAME and change Alert to Flag to send a flag to the current user:
MEL_SEND_FLAG("Flag",USER.LOGINNAME,"I",adddates(OBSNOW(“MEDPANDATE”),”0″,”0″,”16″),””,”Patient is due for Involuntary Medication review in 2 weeks”, “Summary”,””)
That was the ticket! Thank you so much.