Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSGTI

PSGTI.m

Go to the documentation of this file.
PSGTI ;BIR/CML3-UNIT DOSE-TASKMAN INTERFACE ;17 SEP 97 / 1:06 PM
 ;;5.0; INPATIENT MEDICATIONS ;**50**;16 DEC 97
 ;
ENPL ;
 K %ZIS,IO("Q"),IOP S PSGION=ION,%ZIS="Q",%ZIS("A")="Print on DEVICE: ",%ZIS("B")="" W ! D ^%ZIS K IOP,%ZIS I POP,'$D(IO("Q")) S IOP=PSGION D ^%ZIS S POP=1
 I '$D(IO("Q")) K PSGION,IOP Q
 K PSGTID,ZTSAVE S PSGTIR="EN^PSGPL1",ZTDESC="UNIT DOSE PICK LIST RUN" F X="PSGPLS","PSGPLF","PSGPLG","PSGPLWG","PSGPLWGP" S ZTSAVE(X)="" S:$D(PSJPRN) ZTSAVE("PSJPRN")=""
 I $G(RERUN) S ZTSAVE("OG")="",ZTSAVE("RERUN")=""
 I POP W !,?3,"The Pick List will compile, but not print." S ZTIO="" D ENNOIO S IOP=PSGION D ^%ZIS K IOP,PSGION S IO("Q")="" Q
 G ENTSK
 ;
EN3 ;
 K ZTSAVE S PSGTIR="ENQ^PSG"_RTN
 I RTN="DCT" D
 .S:$D(PSGDCLW) ZTSAVE("PSGDCLW(")="" S ZTDESC="UNIT DOSE DRUG COST REPORT" S:$D(PSGDCTD) ZTSAVE("PSGDCTD(")="" F X="PSGDCTA","PSGATTL","PSGCTTL","PSGCNT","PSGDCTB","PSGDCTL","PSGDCTS" S ZTSAVE(X)=""
 F X="PSGDCT","PSGDCLW","PSGDCTD","PRDRG","PMDRG1","PR","PSGCLS","PSGCLS1","PSGDATT","PSGDCTT","PSGDISP","PSGPM","PSGDCT(" S ZTSAVE(X)=""
 I RTN="PRVR" S (ZTSAVE("PSGPRVRF"),ZTSAVE("PSGPRVRP"))="" S:PSGPRVRF ZTSAVE("PSGPRVRF(")=""
 F X="STRT","STOP","SD","FD" S ZTSAVE(X)=""
 ;
ENDEV ;
 K %ZIS,IO("Q"),IOP,ZTSK S PSGION=ION,%ZIS="Q",%ZIS("A")="Select PRINT DEVICE: ",%ZIS("B")="" W ! D ^%ZIS K %ZIS
 I POP S IOP=PSGION D ^%ZIS S POP=1 G OUT
 K PSGION I '$D(IO("Q")) G OUT
 ;
ENTSK ;
 K ZTIO
 ;
ENNOIO ;
 K ZTDTH,ZTSK S ZTRTN="DQ^PSGTI" S:$D(PSGTID) ZTDTH=PSGTID S:$D(PSJSYSL) ZTSAVE("PSJSYSL")="" F X="PSJSYSW0","PSJSYSW","PSJSYSP","PSJSYSP0","PSJSYSL","PSJSYSU","PSGTIR" I $D(@X) S ZTSAVE(X)=""
 D ^%ZTLOAD D:'$D(PSGTINC) ^%ZISC W:'$D(ZTSK) $C(7),!?3,"(Task NOT queued.)"
 ;
OUT ;
 K %ZIS,IOP,PSGTID,PSGTIR,ZTDESC,ZTDTH,ZTRTN,ZTDESC,ZTSAVE Q
 ;
ENPAT ;
 S (ZTSAVE("PSGP"),ZTSAVE("PSGP(0)"),ZTSAVE("PSJP*"))="" G ENDEV
 ;
DQ ; all Taskman calls come through here
 D @PSGTIR S ZTREQ="@" Q