Header image

CDS Info - NUR Attributes

Disclaimer: Use of the following attribute and NPR macro is done at the sole discretion of the user. Iatric Systems is not responsible for any problems arising from the use of this code. All code should be implemented and tested thoroughly in a TEST environment before moving LIVE.

Calling NUR NOTES from an Attribute

Overview

This documentation illustrates calling the NUR Notes routine for an already identified patient in a clinical module, such as OE or NUR, when the response to the attribute is "Y". This request has come through the Meditech-L user group.

Attribute

This attribute would be placed on the screen for the query asking, "Enter/Edit/View Nursing Notes?".
Using a field check (FCL) attribute, it first sets up the name of the routine to be called. In this case, it's NUR.NOTE.menu. Calling this routine directly will bypass the patient prompt screen. Next we set the value of "1" into /ARG1 (argument 1 to be passed into the routine called from the macro). Finally, checking that the response is = "Y", we call the routine in a "dummy" NPR report serving as a storage place for global NPR Report Writer macros.

FCL1=IF{"NUR.NOTE.menu"^PR,1^/ARG1,
FCL1=@.response="Y" %MIS.USER.zcus.lib.M.call.rtn(PR,/ARG1)X},1

The NPR Macro
This macro is called as a MAGIC program and can accept up to 3 additional arguments beyond the program to call. This code is re-usable, but be VERY CAREFUL if you decide to try and re-use it to call additional routines. Iatric Systems is not responsible for any potential damage caused to any system.

;------------------------------------------------------------------------------------------
;Macro calls program passed in by argument A,
;Arguments B,C,D are passed on as arguments to the 'called' program, if defined
;------------------------------------------------------------------------------------------
@INIT,
@CALL.ROUTINE,
@CLOSE.UP,
END;

;------------------------------------------------------------------------------------------

INIT
;save patient from / file into local before MEDITECH stacks current /
/ADM.PAT.urn^ADM.PAT.urn,
;allow MEDITECH to properly open to the NUR application
IF{ADM.PAT.urn %["Z.switch.appl"]("NUR")},
;restore the / file patient urn
ADM.PAT.urn^/ADM.PAT.urn

CALL.ROUTINE
%[A](B,C,D)X

CLOSE.UP
IF{ADM.PAT.urn %["Z.switch.appl"]("")}

Resources