Well, that's no ordinary rabbit!

Mousettributes

Versions of Meditech Workstation beginning with 4.0 respond to mouse clicks. Is there a way to use this functionality to make answering queries easier? Yes. Thanks to the challenge from Rich and the initial response from Brian I offer these options.

Option 1 - Y/N

Atribute

Attribute for Y/N queries that enters Y or N depending on mouse click - enter Y for double-click and N for single click. Replace QUERY with the mnemonic of your query.

IFE=IF{@Z.lastkey=@Z.mouse.click IF{E(/["buL"]#0)=64 "Y";
IFE="N"}^/[ANS%0,"QUERY"]|0,
IFE=P(R,S,[ANS,"QUERY"]|0)^#},1

Option 2 - Lookup

Non-Multiple Attribute

Provide a lookup in response to a double click. Replace QUERY with the mnemonic of your query.

In the second example Replace GRP MNEMONIC with the mnemonic of the group response dictionary. Position is based on group response element default length of 10.

To display just the response

IFE=IF{E(/["buL"]#0)=64 144^/Z,
IFE=P(R,S,%MIS.QUERY.check("","QUERY")^/[ANS%0,"QUERY"]|0)^#},1

To display both the response and name

IFE=IF{E(/["buL"]#0)=64 144^/Z,
IFE=P(R,S,%MIS.QUERY.check("","QUERY")^RESP^/[ANS%0,"QUERY"]|0)^#,
IFE=P(R,S+11,\GGL["GRP MNEMONIC","E",RESP]|0)^#},1

Not really an Option

Non-Multiple Attribute

Similar code can be used to provide an automatic lookup in any version of Workstation if the query has not yet been answered. The problem with this is that the lookup occurs before the user knows what query is to be answered.

IFE=IF{[ANS,"QUERY"]|0_.=. 144^/Z,
IFE=P(R,S,%MIS.QUERY.check("","QUERY")^/[ANS%0,"QUERY"]|0)^#},1


Same as above with element response also displaying. Position is based on the group response element default length of 10.

IFE=IF{[ANS,"QUERY"]|0_.=. 144^/Z,
IFE=P(R,S,%MIS.QUERY.check("","QUERY")^RESP^/[ANS%0,"QUERY"]|0)^#,
IFE=P(R,S+11,\GGL["GRP MNEMONIC","E",RESP]|0)^#},1

Not really an Option

Multiple Attribute

Same as previous except coded for a multiple type query. Will only auto-display a lookup if no responses have been entered.

IFE=IF{[ANS,"QUERY","M",1]|0_.=. 144^/Z,
IFE=P(R,S,%MIS.QUERY.check("","QUERY")^/[ANS%0,"QUERY","M",1]|0)^#},1

Same as previous with element response also displaying. Position is based on group response element default length of 10.

IFE=IF{[ANS,"QUERY","M",1]|0_.=. 144^/Z,
IFE=P(R,S,%MIS.QUERY.check("","QUERY")^RESP^
IFE=/[ANS%0,"QUERY","M",1]|0)^#,
IFE=P(R,S+11,\GGL["GRP MNEMONIC","E",RESP]|0)^#},1

Option 3 - Calendar

Attribute and Macro

Provide a calendar for date selection on double click. Requires Meditech 4.9 or higher. The attribute syntax checker does not like the Z.calendar program so a macro is needed to get around it. The macro is executed only if /aa (patient) exists. If used on a CDS where a patient does not exist the macro will need to check some other field such as /ea for MRI or /bz for BAR.

IFE=IF{E(/["buL"]#0)=64 1,
IFE=P(R,S,%Z.date.out(%MIS.zcus.pgm.M.calendar("")
IFE=^/[ANS%0,"QUERY"]|0))^#},1


Macro (MIS.zcus.pgm.M.calendar)
IF{/["aa"] @CALENDAR;/.DAT}^DTE,
DTE;


CALENDAR
%Z.calendar("","","","","","","",1,"S","")

Not really an Option

Attribute and Macro

The Z.calendar program does not require NUI, however Meditech did not provide any way to access it other than thru the 4.x toolbar. It can be accessed via attribute by modifying the attribute, removing the double click check. Again the problem is that the calendar is displayed before the user knows what query the cursor is on.

IFE=IF{[ANS,"QUERY"]|0_.=. 1,
IFE=P(R,S,%Z.date.out(%MIS.zcus.pgm.M.calendar("")
IFE=^/[ANS%0,"QUERY"]|0))^#},1


Macro (MIS.zcus.pgm.M.calendar)
IF{/["aa"] @CALENDAR;/.DAT}^DTE,
DTE;


CALENDAR
%Z.calendar("","","","","","","",1,"S","")


Other Magic Pages



Don't see what you need?  Visit one of these other sites


or email me your request (tomt at thomast357.com).