PSGWPI ;BHAM ISC/MPH,CML-Print AOU Inventory Sheet ; 14 Feb 1989 2:08 PM
;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
I '$D(PSGWSITE) D ^PSGWSET Q:'$D(PSGWSITE) S PSGWFLG=1
W !,"Right margin for this printout is 132!",!! S PSGWDT=DT I '$D(PSGWIDA) S DIC="^PSI(58.19,",DIC(0)="QEAMZ" D ^DIC K DIC G:Y<0 KILL S PSGWIDA=+Y
DEV K %ZIS,IOP S %ZIS="QM",%ZIS("B")="" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!" G KILL
I $D(BARFLG),'$D(^%ZIS(2,^%ZIS(1,IOS,"SUBTYPE"),"BAR0"))!('$D(^%ZIS(2,^%ZIS(1,IOS,"SUBTYPE"),"BAR1"))) W *7,!!,"THE DEVICE YOU HAVE SELECTED IS NOT SET UP TO PRINT BAR CODES!!",! G DEV
I $D(IO("Q")) K IO("Q") S ZTRTN="EN1^PSGWPI",ZTDESC=$S($D(BARFLG):"Print Bar Coded Inventory Sheet",1:"Print Inventory Sheet") F G="PSGWIDA","PSGWDT","PSGWSITE","BARFLG" S:$D(G) ZTSAVE(G)=""
I D ^%ZTLOAD,HOME^%ZIS K ZTSK G KILL
EN1 U IO D EN1^PSGWPI1
KILL K PSGW("PO"),PSG1,PSG2,PSG3,PSGDA,PSGDDA,PSGDR,PSGINAD,PSGNT,PSGPAGE,PSGSORTK,STKCHG,PSGTN,PSGTODAY,PSGWIDA,PSGWIN,PSGWN,PSGTYP,PSGWGRP,PSGWLP,PSGWPC,PSGD,PSGISORT,PSGLSORT,PSGSORT,PSGT,PSGW,PSGWDUP,PSGWN,PSGWPGD,PSI,PSGWDT,DIE,DR
K CHK,GROUP,ZTSK,BARFLG,PSGWBARS,PSGWBAR0,PSGWBAR1,I,LOC,STLEV,DRGDA,J,K,G,K1,EXP,LN,LN1,LN2,LNCNT,TAB1,TAB2,TYPE,Q,LFC,SK,X,Y,MH,NN,AA,D1,DA,PSGSW,SKK,GRP,LP,PC,IO("Q") D ^%ZISC
K:$D(PSGWFLG) PSGWFLG,PSGWSITE
S:$D(ZTQUEUED) ZTREQ="@" Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSGWPI 1367 printed Dec 13, 2024@01:39:50 Page 2
PSGWPI ;BHAM ISC/MPH,CML-Print AOU Inventory Sheet ; 14 Feb 1989 2:08 PM
+1 ;;2.3; Automatic Replenishment/Ward Stock ;;4 JAN 94
+2 IF '$DATA(PSGWSITE)
DO ^PSGWSET
if '$DATA(PSGWSITE)
QUIT
SET PSGWFLG=1
+3 WRITE !,"Right margin for this printout is 132!",!!
SET PSGWDT=DT
IF '$DATA(PSGWIDA)
SET DIC="^PSI(58.19,"
SET DIC(0)="QEAMZ"
DO ^DIC
KILL DIC
if Y<0
GOTO KILL
SET PSGWIDA=+Y
DEV KILL %ZIS,IOP
SET %ZIS="QM"
SET %ZIS("B")=""
DO ^%ZIS
IF POP
WRITE !,"NO DEVICE SELECTED OR REPORT PRINTED!"
GOTO KILL
+1 IF $DATA(BARFLG)
IF '$DATA(^%ZIS(2,^%ZIS(1,IOS,"SUBTYPE"),"BAR0"))!('$DATA(^%ZIS(2,^%ZIS(1,IOS,"SUBTYPE"),"BAR1")))
WRITE *7,!!,"THE DEVICE YOU HAVE SELECTED IS NOT SET UP TO PRINT BAR CODES!!",!
GOTO DEV
+2 IF $DATA(IO("Q"))
KILL IO("Q")
SET ZTRTN="EN1^PSGWPI"
SET ZTDESC=$SELECT($DATA(BARFLG):"Print Bar Coded Inventory Sheet",1:"Print Inventory Sheet")
FOR G="PSGWIDA","PSGWDT","PSGWSITE","BARFLG"
if $DATA(G)
SET ZTSAVE(G)=""
+3 IF $TEST
DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
GOTO KILL
EN1 USE IO
DO EN1^PSGWPI1
KILL KILL PSGW("PO"),PSG1,PSG2,PSG3,PSGDA,PSGDDA,PSGDR,PSGINAD,PSGNT,PSGPAGE,PSGSORTK,STKCHG,PSGTN,PSGTODAY,PSGWIDA,PSGWIN,PSGWN,PSGTYP,PSGWGRP,PSGWLP,PSGWPC,PSGD,PSGISORT,PSGLSORT,PSGSORT,PSGT,PSGW,PSGWDUP,PSGWN,PSGWPGD,PSI,PSGWDT,DIE,DR
+1 KILL CHK,GROUP,ZTSK,BARFLG,PSGWBARS,PSGWBAR0,PSGWBAR1,I,LOC,STLEV,DRGDA,J,K,G,K1,EXP,LN,LN1,LN2,LNCNT,TAB1,TAB2,TYPE,Q,LFC,SK,X,Y,MH,NN,AA,D1,DA,PSGSW,SKK,GRP,LP,PC,IO("Q")
DO ^%ZISC
+2 if $DATA(PSGWFLG)
KILL PSGWFLG,PSGWSITE
+3 if $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT