Our visit summary handout uses the DOCUMENT.SUMMARY symbol. If the visit summary is printed outside of an update, this causes MEL vomit (the error is something like "Invalid Row").
Is there a way for a handout to determine whether or not it is being printed from within an encounter? I haven't been able to find a way to do it.
-Eric
Try ok(), like -
{if ok(DOCUMENT.SUMMARY) then DOCUMENT.SUMMARY else "" endif}
It checks for valid arguments, Im not sure if it will work but its my best guess
A good idea, but it still throws the "Invalid Row" message.
"Ok" only seems to check whether a value is present. It can't handle other error conditions.
-Eric
Eh, it was worth a try. Have you considered saving the document.summary to an observation term? Then it at least won't throw an error...
Yeah, but it seems wasteful.
No answer but, I am trying almost the identical thing on a handout. NEed to to bypass the error, INVALID ROW, when there is no data (which means there is no encounter).
If you find an answer please let me know. Thanks.
I think there is an easy way -
getrowcount("Document")
returns 1 if there is an active document and 0 if there is not an active document, try
{if getrowcount("Document") == 1 then DOCUMENT.SUMMARY else “No Document” endif}
The getrowcount worked perfectly for me (to find out if an encounter was open). Thanks so much!