source: FOIAVistA/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGLBA.m@ 1288

Last change on this file since 1288 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1PSGLBA ;BIR/CML3-LABEL ALIGNMENT ;16 DEC 97 / 1:36 PM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3 ;
4ENLP ; please do NOT place an IF statement in this paragraph
5 U IO W "\------------- FIRST LINE OF LABEL ------------/"
6 W !,"<",?47,">",!,"<------------- LABEL BOUNDARIES --------------->"
7 W !,"<",?47,">",!,"/--------------LAST LINE OF LABEL--------------\"
8L2 W !!," XX/XX | XX/XX | XX/XX/XX XX:XX (PXXXX) | A T",?52,"PATIENT NAME",?87,"ROOM-BED"
9 W !," DRUG NAME",?30,"SCHEDULE TYPE| D I",?52,"XXX-XX-XXXX",?70,"DOB"," (AGE)",?91,"TEAM"
10 W !," DOSAGE ORDERED MED ROUTE SCHEDULE | M M",?52,"SEX",?65,"DIAGNOSIS"
11 W !," SPECIAL INSTRUCTIONS",?43,"| I E",?52,"ACTIVITY DATE/TIME",?72,"ACTIVITY"
12 W !," WS HSM NF",?25,"RPH:_____ RN:_____",?43,"| N S",?52,"WARD GROUP",?91,"WARD",!! Q
13 ;
14EN1 ; alignment upon entry into package
15 I IO=IO(0),$E(IOST,1,2)'="C-" D SLAVE G DONE
16 D ASK G:Y DONE S %ZIS="Q"
17E1 F Q=1:1:5 S IOP=$P(PSJSYSL,"^",2) D ^%ZIS I 'POP Q
18 E R " DEVICE [BUSY] ... WAIT? ",X:DTIME I X]"","YES"[X!("yes"[X) W " (WAITING)",! G E1
19 E W " (NO)" G DONE
20 D DEV G DONE
21 ;
22EN2 ;
23 I IO=IO(0),$E(IOST)'="C" D SLAVE S IOP=PSGLBA D ^%ZIS G DONE
24 D ASK,DEV:'Y
25 ;
26DONE ;
27 K IOP,POP,PSGLBA Q
28 ;
29ENAL ; for align option
30 D ENCV^PSGSETU Q:$D(XQUIT)
31 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
32 I IO=IO(0),$E(IOST)'="C" D G ALDONE
33 .S PSGLBA=ION_";132" K %ZIS F D ENLP,^%ZISC,OK Q:Y S IOP=PSGLBA D ^%ZIS
34 D DEV,^%ZISC
35 ;
36ALDONE ;
37 D ENKV^PSGSETU K PSGLBA Q
38 ;
39DEV ;
40 I '$D(IO("Q")) F D ENLP,OK Q:Y
41 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
42 K PSGTINC Q
43 ;
44SLAVE ;
45 S PSGLBA=ION_";132",%ZIS="" D ^%ZISC D ASK Q:Y F S IOP=PSGLBA D ^%ZIS,ENLP D ^%ZISC D OK Q:Y
46 Q
47 ;
48ASK ;
49 F W !,"Do you need to align the UNIT DOSE label stock" S %=2 D YN^DICN Q:% D H1
50 S Y=%'=1 Q
51 ;
52H1 ;
53 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
54 ;
55OK ;
56 U IO(0) F W !!," Are the labels aligned correctly" S %=1 D YN^DICN Q:% D H2
57 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
58 ;
59H2 ;
60 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
Note: See TracBrowser for help on using the repository browser.