Well, that's no ordinary rabbit!
I'm leaving this page here just in case someone still needs it, but I recommend you look elsewhere. The code I use is based on a Meditech program which has not been made fully functional when using a mouse. If I find they've updated their Z.id.vlist program so that it properly understands mouse clicks I'll note it here, but there's already a better way. Iatric Systems has provided a fully funtional and more robust solution on their website. Their method replaces the standard lookup program with their own program that is fully mouse aware. It works with the 3.x or 4.x workstations using either keyboard or mouse. It works the first time you get to a query and it works if you return to the query. And since it works via the <lookup> key it fits right in with how people are used to navigating thru a CDS. Look for Joe Cocuzzo's NPR Tips and Tricks session on the MUSE 2005 page.
Users have asked me several times for the ablility to check off multiple items in a list and have them fill in as the responses of a multiple query. Of course it was possible. There are lots of places in Meditech where checklists are used. But since we use very few multiple queries at our site the benefit to the user didn't seem to justify the time I would have to invest to figure out how to do it. After the Aug 2002 issue of Iatrics Newsletter I no longer had that excuse - Joel has done all the investigative work and posted a way to use checklists for NPR report selections. Or maybe Joe did since the reports were posted in his name (MIS.DOC.DICT.zcus.is.check.off.list and MIS.DOC.DICT.zcus.is.check.off.list.id). All that was needed now was an attribute to call the program and a few minor modifications to the program so it uses a group response dictionary for the list.
The example here is from an NUR assessment CDS we use for discharge instructions. One of the queries is for diet handouts. We have lots of patients education forms online including numerous diet forms. The user selects the diet handouts from the list and when the assessment is filed the selected handouts print automatically along with the output format attached to the assessment. The automatic printing is beyond the scope of this discussion, but since I wouldn't have the checklist without Joel's posting I will say that it makes use of FormsOnline.
Enough chatter. Let's get to it. I made it as easy to use as I could. The code should work unmodified for any multiple query that is a group response type. It uses /S.LAST.QUERY and checks the query dictionary to determine which group response dictionary to use, how many lines to display and whether to display the mnemonic, the name, or both. The only change you should have to make is to change YOUR_QUERY to the actual mnemonic of your query.
The IFE attribute calls the program if there are not any previous responses. Once a response is entered the user can get the normal lookup but will no longer get the checklist.
IFE=IF{/[ANS%0,"YOUR_QUERY","M",1]
1;
IFE=%MIS.zcus.tjt.clist.M.check.list("",R,S,ANS,"YOUR_QUERY"),1}
The macro is written in MIS so it is available to any application. It first makes sure all the / variables it uses are empty. Next it checks the group response dictionary to get the information it needs to create the list and how to display the responses. See the Aug 2002 newsletter on the Iatric site for additional documention regarding the Z.id.vlist program. The MIS.zcus.tjt report that has this macro in it is available for download there as well.
Important Note: There is one line in this macro that I have split in order to display it.. The 2 resulting lines must be recombined into the original line.
If you prefer to do less typing you can download the report that contains the macro here and upload it into your system.
;--
MIS.zcus.tjt.clist.M.check.list macro
E^QUERY,
""^RSP,
DO{+/LIST[RSP]^RSP ""^/LIST[RSP]},
^/LIST^NODE,
""^XX,
DO{+/CHOICES[XX]^XX ""^/CHOICES[XX]},
@MIS.QUERY.group.resp[QUERY]^MIS.GROUP.RESP.mnemonic,
@MIS.QUERY.multiple.line[QUERY]^LIM,
;-- The query text is used as the title of the
lookup
@MIS.QUERY.text[QUERY]^TTL,
;-- uncomment the next line to use the group
response name for the title
;@MIS.GROUP.RESP.name[MIS.GROUP.RESP.mnemonic]^TTL,
""^MIS.GROUP.RESP.element.mnemonic,
DO{@Next(MIS.GROUP.RESP.element.mnemonic) 1,
Q("Y",@MIS.GROUP.RESP.element.response)^/CHOICES[MIS.GROUP.RESP.element.mnemonic]},
+/CHOICES[A]^A,
;-- all the code until the next comment MUST
be on a single line
%Z.id.vlist(^/CHOICES,{A,"T"},(TTL:37CT),"CD:12L_([A,CD]|1)","AR",{"C","","",18},
{13,13,5},"",{NODE,"",1},"Mnemonic":12L_("Name":25L)),
;-- end of line
""^XX^ZZ,
DO{+/LIST[XX]^XX XX^/[ANS%0,QUERY,"M",ZZ+1^ZZ]|0,
IF{"Y"=@MIS.QUERY.display.desc.only[QUERY] @NAME.ONLY;
"Y"=@MIS.QUERY.echo.group.resp.desc[QUERY] @MNEMONIC.AND.NAME;
@MNEMONIC.ONLY}},
1;
MNEMONIC.ONLY
IF{ZZ'>LIM P(B+ZZ-1,C,XX)^#}
NAME.ONLY
IF{ZZ'>LIM P(B+ZZ-1,C,\GGL[QUERY,"E",XX]|0)^#}
MNEMONIC.AND.NAME
C+@MIS.QUERY.length[QUERY]+1^C2,
IF{ZZ'>LIM P(B+ZZ-1,C,XX)^#,
P(B+ZZ-1,C2,\GGL[QUERY,"E",XX]|0)^#}
When the cursor reaches the multiple query this list appears. The entries are checked using the right control key (CTRL-A on a laptop).
After pressing F12 the checked items fill in as responses in the multiple query. The query here is set to display name only.
Don't
see what you
need? Visit one of these other sites
or email me your request (tomt at thomast357.com).