Using Command-Line Arguments for Magic Systems
Command-Line Arguments can be passed in with your call to the Meditech Remote Workstation. These Command-Line Arguments can
then be parsed out.
This example will demonstrate how to create your own sign-on Program using an NPR Report Macro. This Macro will parse out the Command-Line Arguments. If there are no Command-Line Arguments, then the usual Meditech sign-on Program will be used. If there are Command-Line Arguments, then PCI will be launched for whichever patient is included in the Command-Line Arguments. This sort of Sign-On Program can make it possible for another vendor to link automatically to Meditech's PCI from their own software.
The usual Command-Line executed when accessing the Meditech Remote Workstation is:
The Arguments we will be adding will change this Command-Line to appear like this:
C:\Program Files\MEDITECH\Workstation3.x\Client.mtad MIS|UNIT.NUM|USER|FACILITY
There are four Arguments added to the end of the Command-Line. There is a blank space after the original Command-Line. The four Arguments are separated by the "pipe" character. Those Arguments are the mnemonic of the Meditech MIS (MIS), the Patient Unit Number (UNIT.NUM), the MIS User mnemonic (USER), and the MIS Facility mnemonic (FAC).
Here is how the Command-Line would appear with the following Arguments:
C:\Program Files\MEDITECH\Workstation3.x\Client.mtad ARL5.61|M000000305|SHIJO|ARL
Here are the steps for creating an NPR Report Macro to parse out the Command-Line Arguments and launch PCI:
1) Create an NPR Report with Report DPM Z and Report Name zcus.ip.bms.signon.
2) Add any Report Title you like and set the Active Field to Y, and then File and Translate your Report.
3) Add a Report Macro called signon with the following code:
4) File and Translate the Report Macro.
5) Add your Report Macro as the Sign On Program in OPS for whichever device you like.
The Pgm? prompt will be answered with Z.zcus.ip.bms.signon.M.signon
So if the Command-Line Arguments are included, then the user will automatically be brought into PCI. Otherwise, the regular MEDITEH sign-on Program will be used.