PSDLBLR1 ;BIR/JPW-CS pin fed Label Reprint for CS Disp Drug ; 29 Aug 94
;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
S Y=$P($G(^PSD(58.8,+PSDS,2)),"^",10),C=$P(^DD(58.8,24,0),"^",2) D Y^DIQ S PSDEV=Y
K %ZIS,IOP,IO("Q"),POP S %ZIS="QM",%ZIS("B")=PSDEV D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED!" G END
I $D(IO("Q")) K IO("Q"),ZTSAVE,ZTDTH,ZTSK S ZTRTN="START^PSDLBLR2",ZTDESC="Print Dispensing Labels for CS PHARM" D SAVE,^%ZTLOAD,HOME^%ZIS K ZTSK G END
U IO D ^PSDLBLR2
END ;kill variables and exit
K %,%DT,%H,%I,%ZIS,C,DA,DIC,DIE,DIR,DIROUT,DIRUT,DR,DRUG,DTOUT,DUOUT,JJ,JLP1,LIQ,NAOU,NAOUN,NODE,OK
K POP,PSD,PSD1,PSDA,PSDBAR0,PSDBAR1,PSDCNT,PSDEV,PSDJ,PSDN,PSDPN,PSDOUT,PSDR,PSDRG,PSDPRT,PSDRN,PSDS,PSDSN,PSDT,PSDX1,PSDX2
K QTY,STAT,TEMP,TEST,TEXT,X,Y,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK
K ^TMP("PSDLBLR",$J)
D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
Q
SAVE ;save queued variables
S (ZTSAVE("PSDS"),ZTSAVE("PSDSN"))=""
S ZTSAVE("PSD1(")=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSDLBLR1 970 printed Dec 13, 2024@01:46:39 Page 2
PSDLBLR1 ;BIR/JPW-CS pin fed Label Reprint for CS Disp Drug ; 29 Aug 94
+1 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
+2 SET Y=$PIECE($GET(^PSD(58.8,+PSDS,2)),"^",10)
SET C=$PIECE(^DD(58.8,24,0),"^",2)
DO Y^DIQ
SET PSDEV=Y
+3 KILL %ZIS,IOP,IO("Q"),POP
SET %ZIS="QM"
SET %ZIS("B")=PSDEV
DO ^%ZIS
IF POP
WRITE !,"NO DEVICE SELECTED OR REPORT PRINTED!"
GOTO END
+4 IF $DATA(IO("Q"))
KILL IO("Q"),ZTSAVE,ZTDTH,ZTSK
SET ZTRTN="START^PSDLBLR2"
SET ZTDESC="Print Dispensing Labels for CS PHARM"
DO SAVE
DO ^%ZTLOAD
DO HOME^%ZIS
KILL ZTSK
GOTO END
+5 USE IO
DO ^PSDLBLR2
END ;kill variables and exit
+1 KILL %,%DT,%H,%I,%ZIS,C,DA,DIC,DIE,DIR,DIROUT,DIRUT,DR,DRUG,DTOUT,DUOUT,JJ,JLP1,LIQ,NAOU,NAOUN,NODE,OK
+2 KILL POP,PSD,PSD1,PSDA,PSDBAR0,PSDBAR1,PSDCNT,PSDEV,PSDJ,PSDN,PSDPN,PSDOUT,PSDR,PSDRG,PSDPRT,PSDRN,PSDS,PSDSN,PSDT,PSDX1,PSDX2
+3 KILL QTY,STAT,TEMP,TEST,TEXT,X,Y,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK
+4 KILL ^TMP("PSDLBLR",$JOB)
+5 DO ^%ZISC
if $DATA(ZTQUEUED)
SET ZTREQ="@"
+6 QUIT
SAVE ;save queued variables
+1 SET (ZTSAVE("PSDS"),ZTSAVE("PSDSN"))=""
+2 SET ZTSAVE("PSD1(")=""
+3 QUIT