PSGLBA ;BIR/CML3-LABEL ALIGNMENT ;16 DEC 97 / 1:36 PM
;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
;
ENLP ; please do NOT place an IF statement in this paragraph
U IO W "\------------- FIRST LINE OF LABEL ------------/"
W !,"<",?47,">",!,"<------------- LABEL BOUNDARIES --------------->"
W !,"<",?47,">",!,"/--------------LAST LINE OF LABEL--------------\"
L2 W !!," XX/XX | XX/XX | XX/XX/XX XX:XX (PXXXX) | A T",?52,"PATIENT NAME",?87,"ROOM-BED"
W !," DRUG NAME",?30,"SCHEDULE TYPE| D I",?52,"XXX-XX-XXXX",?70,"DOB"," (AGE)",?91,"TEAM"
W !," DOSAGE ORDERED MED ROUTE SCHEDULE | M M",?52,"SEX",?65,"DIAGNOSIS"
W !," SPECIAL INSTRUCTIONS",?43,"| I E",?52,"ACTIVITY DATE/TIME",?72,"ACTIVITY"
W !," WS HSM NF",?25,"RPH:_____ RN:_____",?43,"| N S",?52,"WARD GROUP",?91,"WARD",!! Q
;
EN1 ; alignment upon entry into package
I IO=IO(0),$E(IOST,1,2)'="C-" D SLAVE G DONE
D ASK G:Y DONE S %ZIS="Q"
E1 F Q=1:1:5 S IOP=$P(PSJSYSL,"^",2) D ^%ZIS I 'POP Q
E R " DEVICE [BUSY] ... WAIT? ",X:DTIME I X]"","YES"[X!("yes"[X) W " (WAITING)",! G E1
E W " (NO)" G DONE
D DEV G DONE
;
EN2 ;
I IO=IO(0),$E(IOST)'="C" D SLAVE S IOP=PSGLBA D ^%ZIS G DONE
D ASK,DEV:'Y
;
DONE ;
K IOP,POP,PSGLBA Q
;
ENAL ; for align option
D ENCV^PSGSETU Q:$D(XQUIT)
K %ZIS,IOP S %ZIS="Q",%ZIS("A")="Select LABEL PRINTER: ",%ZIS("B")=$P(PSJSYSL,"^",2) W ! D ^%ZIS I POP D ^%ZISC W !!,"No printer selected; labels not aligned." G ALDONE
I IO=IO(0),$E(IOST)'="C" D G ALDONE
.S PSGLBA=ION_";132" K %ZIS F D ENLP,^%ZISC,OK Q:Y S IOP=PSGLBA D ^%ZIS
D DEV,^%ZISC
;
ALDONE ;
D ENKV^PSGSETU K PSGLBA Q
;
DEV ;
I '$D(IO("Q")) F D ENLP,OK Q:Y
Q:'$D(IO("Q")) K ZTSAVE S PSGLBA=ION,PSGTINC=1 F S PSGTID=$H,ZTDESC="UD LABEL ALIGN",PSGTIR="ENLP^PSGLBA" D ENTSK^PSGTI,OK Q:Y
K PSGTINC Q
;
SLAVE ;
S PSGLBA=ION_";132",%ZIS="" D ^%ZISC D ASK Q:Y F S IOP=PSGLBA D ^%ZIS,ENLP D ^%ZISC D OK Q:Y
Q
;
ASK ;
F W !,"Do you need to align the UNIT DOSE label stock" S %=2 D YN^DICN Q:% D H1
S Y=%'=1 Q
;
H1 ;
W !!?2,"Enter 'Y' to print test labels on the printer just selected to check the",!,"alignment of the label stock. If the test labels are not needed, enter an 'N' (or simply press the RETURN key).",! Q
;
OK ;
U IO(0) F W !!," Are the labels aligned correctly" S %=1 D YN^DICN Q:% D H2
S Y=%<2 Q:Y W !!,"Re-align the labels, and then press the RETURN key for more test labels. " R X:DTIME W:'$T $C(7) S:X="^"!'$T Y=1 Q
;
H2 ;
W !!?2,"Enter 'Y' if the label stock is aligned correctly. Enter an 'N' if you need",!,"to adjust the label stock and print test labels again." Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSGLBA 2649 printed Nov 22, 2024@17:11:28 Page 2
PSGLBA ;BIR/CML3-LABEL ALIGNMENT ;16 DEC 97 / 1:36 PM
+1 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
+2 ;
ENLP ; please do NOT place an IF statement in this paragraph
+1 USE IO
WRITE "\------------- FIRST LINE OF LABEL ------------/"
+2 WRITE !,"<",?47,">",!,"<------------- LABEL BOUNDARIES --------------->"
+3 WRITE !,"<",?47,">",!,"/--------------LAST LINE OF LABEL--------------\"
L2 WRITE !!," XX/XX | XX/XX | XX/XX/XX XX:XX (PXXXX) | A T",?52,"PATIENT NAME",?87,"ROOM-BED"
+1 WRITE !," DRUG NAME",?30,"SCHEDULE TYPE| D I",?52,"XXX-XX-XXXX",?70,"DOB"," (AGE)",?91,"TEAM"
+2 WRITE !," DOSAGE ORDERED MED ROUTE SCHEDULE | M M",?52,"SEX",?65,"DIAGNOSIS"
+3 WRITE !," SPECIAL INSTRUCTIONS",?43,"| I E",?52,"ACTIVITY DATE/TIME",?72,"ACTIVITY"
+4 WRITE !," WS HSM NF",?25,"RPH:_____ RN:_____",?43,"| N S",?52,"WARD GROUP",?91,"WARD",!!
QUIT
+5 ;
EN1 ; alignment upon entry into package
+1 IF IO=IO(0)
IF $EXTRACT(IOST,1,2)'="C-"
DO SLAVE
GOTO DONE
+2 DO ASK
if Y
GOTO DONE
SET %ZIS="Q"
E1 FOR Q=1:1:5
SET IOP=$PIECE(PSJSYSL,"^",2)
DO ^%ZIS
IF 'POP
QUIT
+1 IF '$TEST
READ " DEVICE [BUSY] ... WAIT? ",X:DTIME
IF X]""
IF "YES"[X!("yes"[X)
WRITE " (WAITING)",!
GOTO E1
+2 IF '$TEST
WRITE " (NO)"
GOTO DONE
+3 DO DEV
GOTO DONE
+4 ;
EN2 ;
+1 IF IO=IO(0)
IF $EXTRACT(IOST)'="C"
DO SLAVE
SET IOP=PSGLBA
DO ^%ZIS
GOTO DONE
+2 DO ASK
if 'Y
DO DEV
+3 ;
DONE ;
+1 KILL IOP,POP,PSGLBA
QUIT
+2 ;
ENAL ; for align option
+1 DO ENCV^PSGSETU
if $DATA(XQUIT)
QUIT
+2 KILL %ZIS,IOP
SET %ZIS="Q"
SET %ZIS("A")="Select LABEL PRINTER: "
SET %ZIS("B")=$PIECE(PSJSYSL,"^",2)
WRITE !
DO ^%ZIS
IF POP
DO ^%ZISC
WRITE !!,"No printer selected; labels not aligned."
GOTO ALDONE
+3 IF IO=IO(0)
IF $EXTRACT(IOST)'="C"
Begin DoDot:1
+4 SET PSGLBA=ION_";132"
KILL %ZIS
FOR
DO ENLP
DO ^%ZISC
DO OK
if Y
QUIT
SET IOP=PSGLBA
DO ^%ZIS
End DoDot:1
GOTO ALDONE
+5 DO DEV
DO ^%ZISC
+6 ;
ALDONE ;
+1 DO ENKV^PSGSETU
KILL PSGLBA
QUIT
+2 ;
DEV ;
+1 IF '$DATA(IO("Q"))
FOR
DO ENLP
DO OK
if Y
QUIT
+2 if '$DATA(IO("Q"))
QUIT
KILL ZTSAVE
SET PSGLBA=ION
SET PSGTINC=1
FOR
SET PSGTID=$HOROLOG
SET ZTDESC="UD LABEL ALIGN"
SET PSGTIR="ENLP^PSGLBA"
DO ENTSK^PSGTI
DO OK
if Y
QUIT
+3 KILL PSGTINC
QUIT
+4 ;
SLAVE ;
+1 SET PSGLBA=ION_";132"
SET %ZIS=""
DO ^%ZISC
DO ASK
if Y
QUIT
FOR
SET IOP=PSGLBA
DO ^%ZIS
DO ENLP
DO ^%ZISC
DO OK
if Y
QUIT
+2 QUIT
+3 ;
ASK ;
+1 FOR
WRITE !,"Do you need to align the UNIT DOSE label stock"
SET %=2
DO YN^DICN
if %
QUIT
DO H1
+2 SET Y=%'=1
QUIT
+3 ;
H1 ;
+1 WRITE !!?2,"Enter 'Y' to print test labels on the printer just selected to check the",!,"alignment of the label stock. If the test labels are not needed, enter an 'N' (or simply press the RETURN key).",!
QUIT
+2 ;
OK ;
+1 USE IO(0)
FOR
WRITE !!," Are the labels aligned correctly"
SET %=1
DO YN^DICN
if %
QUIT
DO H2
+2 SET Y=%<2
if Y
QUIT
WRITE !!,"Re-align the labels, and then press the RETURN key for more test labels. "
READ X:DTIME
if '$TEST
WRITE $CHAR(7)
if X="^"!'$TEST
SET Y=1
QUIT
+3 ;
H2 ;
+1 WRITE !!?2,"Enter 'Y' if the label stock is aligned correctly. Enter an 'N' if you need",!,"to adjust the label stock and print test labels again."
QUIT