Has any one found a MEL function, global variable, or Document.variable for use in a handout to determine whether the encounter is open, on Hold, or signed. When the handout is printed from the the CHART left side Handout icon, if the visit is not open, using DOCUMENT.CLINICALDATE for example will will give an error. Nursing seems to like to print handouts out side of the open visit.
I would like to have a
< if <var is true> then <open visit document var such as Document.ClinicalDate or run function> else < signed visit var like lastobsvalue("an obsterm") or run different function > endif
statement to be used in a handout to print different items depending on whether the Visit is actively open, placed on Hold or has been signed.
My temporary fix was using (listassessnew() <> "" or obsnow("Chief Cmplnt")<>"") to determine whether the visit was actively open, but if there is not at least one committed CPOE problem, o a chief complaint, even if the visit is open, the items does not return the correct item, or erros out
Appreciate any suggestions of a better way..
Thank you
You might try MEL_GET_SDID() if your version of Centricity supports it. Just did a quick test with a handout and when the update is opened, returns the SDID of the document. Handout with no open update returns a zero. Won't help with on hold though.
David,
Thank you for the great solution. When paired with VER_EMR() in an if then endif statement, I can successfully test the handout in both EMR 9.8.0 standalone and also have it work properly in CPS12.0.13.
Thank you