We are using the following function to send flags to our nursing box when patients are sent to ED. It is not working for the last LOC in the list. Any help would be appreciated.
{fn send_RN_flag(){
cond
case PATIENT.HOMELOCATIONABBREVNAME="CAR" MEL_SEND_FLAG("Flag","nursingC", "Important",str(._todaysdate),patient.firstname+" "+patient.lastname+" ED FU","Please contact patient/family regarding ED visit","summary","")
case PATIENT.HOMELOCATIONABBREVNAME="DRE" MEL_SEND_FLAG("Flag","nursingd", "Important",str(._todaysdate),patient.firstname+" "+patient.lastname+" ED FU","Please contact patient/family regarding ED visit","summary","")
case PATIENT.HOMELOCATIONABBREVNAME="MON" MEL_SEND_FLAG("Flag","rnmoncure", "Important",str(._todaysdate),patient.firstname+" "+patient.lastname+" ED FU","Please contact patient/family regarding ED visit","summary","")
case PATIENT.HOMELOCATIONABBREVNAME="PRO" MEL_SEND_FLAG("Flag","nursingh", "Important",str(._todaysdate),patient.firstname+" "+patient.lastname+" ED FU","Please contact patient/family regarding ED visit","summary","")
case PATIENT.HOMELOCATIONABBREVNAME="SIL" MEL_SEND_FLAG("Flag","nursings", "Important",str(._todaysdate),patient.firstname+" "+patient.lastname+" ED FU","Please contact patient/family regarding ED visit","summary","")
case PATIENT.HOMELOCATIONABBREVNAME="SYL" MEL_SEND_FLAG("Flag","nursingsyl","Important",str(._todaysdate),patient.firstname+" "+patient.lastname+" ED FU","Please contact patient/family regarding ED visit","summary","")
case PATIENT.HOMELOCATIONABBREVNAME="SCO" MEL_SEND_FLAG("Flag","nursingsco","Important",str(._todaysdate),patient.firstname+" "+patient.lastname+" ED FU","Please contact patient/family regarding ED visit","summary","")
else ""
endcond}}
I can't see anything wrong. Compared the last case to the case right before it and they are identical except for SCO and nursingsco. I'm assuming SCO is a good location abbreviation. Is nursingsco a good ID? What does your MEL trace say when the patient has SCO for a home location?
No errors messages so I think it is a rights issue for the user nursingsco. Thanks so much for lending me your eyes.
What about have that last option message you? That way, you rule out all the syntax issues and KNOW it is related to the user.