source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LRLABELE.m@ 1535

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

initial load of FOIAVistA 6/30/08 version

File size: 6.0 KB
Line 
1LRLABELE ;DALOI/JMC - Zebra Stripe 2.5x4 10 part label; 6/4/98
2 ;;5.2;LAB SERVICE;**218**;Sep 27, 1994
3 ;
4EN ; Print 2.5x4 10 part label format
5 ;
6 N J,LRDTXT,LRFONT,LRFMT,LRLPNM,LRTXT,LRTUBE,LRX,LRZ,ETX,STX
7 ;
8 S LRLPNM=$E(PNM,1,14),LRRB=$G(LRRB)
9 ;
10 ; Determine collection sample text
11 I LRXL,N-I<LRXL S LRTUBE=LRTOP
12 E S LRTUBE=LRPREF_LRTOP
13 ;
14 D LH
15 ;
16 ; Set specific symbology.
17 S LRFMT=+$G(LRBAR(+$G(LRAA)))
18 ;
19 ; Setup test list
20 S LRTXT=$$LRTXT^LRLABLD(.LRTS,$S(LRFMT<2:25,1:32))
21 I LRTXT[";" S LRDTXT=".............."
22 E S LRDTXT=LRTXT
23 ;
24 I LRFMT<2 D BAR1 Q
25 I LRFMT>1 D BAR2
26 ;
27 Q
28 ;
29BAR1 ; Print 2.5x4 10 part labels.
30 ; Barcode identifier - use Code 39 with check-digit.
31 ; Label length = 812 dots (8 dots/mm printhead).
32 ;
33 W STX
34 S LRFONT="^ADN,36,10^FWR"
35 ;
36 ; Patient name
37 D PL^LRLABELD(433,90,$E(PNM,1,21),LRFONT)
38 D FONT S LRFONT=LRFONT_"^FWR"
39 ;
40 ; Print patient identifier.
41 D PL^LRLABELD(418,90,SSN,LRFONT)
42 ;
43 ; Patient location/room-bed number
44 D PL^LRLABELD(418,260,$S($L(LRRB):"B:"_LRRB,1:"W:"_LRLLOC),LRFONT)
45 ;
46 ; Print barcode.
47 S LRFONT="^BY2,2"
48 I $L(LRBARID)<7 S LRFONT="^BY3,2,"
49 S LRFONT=LRFONT_",60^B3N,Y,,N,N^FWR"
50 D PL^LRLABELD(355,95,LRBARID,LRFONT)
51 ;
52 ; Print order number.
53 D FONT S LRFONT=LRFONT_"^FWR"
54 D PL^LRLABELD(330,90,"Order #"_LRCE,LRFONT)
55 ;
56 ; Print collection sample.
57 D PL^LRLABELD(315,90,$E(LRTUBE,1,$S($G(LRURG0)=1:18,1:24)),LRFONT)
58 ;
59 ; Accession urgency
60 I $G(LRURG0)=1 D
61 . ; Set up graphic box.
62 . D GB^LRLABELD(320,317,"35,63,35")
63 . S LRFONT="^ADN,36,10^FWR^FR"
64 . ; Print urgency
65 . D PL^LRLABELD(315,322,"STAT",LRFONT)
66 ;
67 ; Print test list
68 S LRFONT="^ADN,36,10^FWR"
69 D PL^LRLABELD(280,90,LRTXT,LRFONT)
70 ;
71 ; Print accession.
72 S LRFONT="^ADN,36,10"
73 D PL^LRLABELD(280,0,$$CJ^XLFSTR(LRACC,16),LRFONT),FONT
74 ;
75 ; Print accession date.
76 D PL^LRLABELD(280,40,$$CJ^XLFSTR(LRDAT,16),LRFONT)
77 ;
78 ; Print accession - 2nd 1x2.
79 S LRFONT="^ADN,36,10^FWR"
80 D PL^LRLABELD(433,406,LRACC,LRFONT)
81 ;
82 ; Print accession date - 2nd 1x2..
83 D FONT S LRFONT=LRFONT_"^FWR"
84 D PL^LRLABELD(418,406,LRDAT,LRFONT)
85 ;
86 ; Print collection sample - 2nd 1x2.
87 D PL^LRLABELD(400,406,$E(LRTUBE,1,$S($G(LRURG0)=1:21,1:30)),LRFONT)
88 ;
89 ; Accession urgency - 2nd 1x2.
90 I $G(LRURG0)=1 D
91 . ; Set up graphic box.
92 . D GB^LRLABELD(410,666,"35,63,35")
93 . S LRFONT="^ADN,36,10^FWR^FR"
94 . ; Print urgency
95 . D PL^LRLABELD(405,671,"STAT",LRFONT),FONT
96 ;
97 ; Patient name - 2nd 1x2.
98 S LRFONT="^ADN,36,10^FWR"
99 D PL^LRLABELD(360,444,$E(PNM,1,21),LRFONT),FONT
100 ;
101 ; Print patient identifier - 2nd 1x2.
102 S LRFONT=LRFONT_"^FWR"
103 D PL^LRLABELD(345,444,SSN,LRFONT)
104 ;
105 ; Print order number - 2nd 1x2.
106 D PL^LRLABELD(325,406,"Order #"_LRCE,LRFONT)
107 ;
108 ; Print test list - 2nd 1x2, redo test list for wider area on 2nd label
109 S LRFONT="^ADN,36,10^FWR"
110 S LRTXT=$$LRTXT^LRLABLD(.LRTS,32)
111 I LRTXT[";" S LRDTXT=".............."
112 E S LRDTXT=LRTXT
113 D PL^LRLABELD(280,406,LRTXT,LRFONT)
114 ;
115 D FONT,COMMON
116 W ETX
117 Q
118 ;
119BAR2 ; Print 2.5x4 10 part labels.
120 ; Barcode identifier using specified symbology for accession area.
121 ; Label length = 812 dots (8 dots/mm printhead).
122 ;
123 W STX
124 S LRFONT="^ADN,36,10^FWR"
125 ;
126 ; Patient name
127 F LRY=0,406 D PL^LRLABELD(433,LRY,$E(PNM,1,21),LRFONT)
128 ;
129 ; Accession urgency
130 I $P(LRURGA,"^",2) D
131 . S LRFONT="^ADN,36,10^FWR"
132 . I $P(LRURGA,"^",2)=2 D
133 . . ; Set up graphic box.
134 . . F LRY=295,699 D GB^LRLABELD(437,LRY,"35,"_(15+($L($P(LRURGA,"^"))*12))_",35")
135 . . ; Field reverse.
136 . . S LRFONT=LRFONT_"^FR"
137 . ; Print urgency
138 . F LRY=300,704 D PL^LRLABELD(433,LRY,$P(LRURGA,"^"),LRFONT)
139 ;
140 ; Print patient identifier.
141 D FONT S LRFONT=LRFONT_"^FWR"
142 F LRY=0,406 D PL^LRLABELD(418,LRY,SSN,LRFONT)
143 ;
144 ; Patient location/room-bed number
145 F LRY=170,576 D PL^LRLABELD(418,LRY,"W:"_LRLLOC_$S($L(LRRB):"/"_LRRB,1:""),LRFONT)
146 ;
147 ; Print barcode.
148 S LRFONT="^BY"_$S($L(LRBARID)>10:1,1:2)_","_$S($L(LRBARID)<7:3,1:2)_",60^"
149 S LRFONT=LRFONT_$S(LRFMT=2:"B3N,N,,N,N",LRFMT=3:"B3N,Y,,N,N",LRFMT=4:"BCN,,N,N",1:"BCN,,N,N")
150 S LRFONT=LRFONT_"^FWR"
151 F LRZ=10,416 D
152 . S LRY=LRZ+$S($L(LRBARID)<7:55,LRFMT=3:5,LRFMT=4:15,1:0)
153 . D PL^LRLABELD(358,LRY,LRBARID,LRFONT)
154 ;
155 ; Print human-readable ID.
156 D FONT S LRFONT=LRFONT_"^FWR"
157 F LRY=0,406 D PL^LRLABELD(335,LRY,LRBARID,LRFONT)
158 ;
159 ; Print infection warning if present.
160 I $L(LRINFW) D
161 . ; Set up graphic box.
162 . F LRY=140,544 D GB^LRLABELD(337,LRY,"16,"_(10+($L(LRINFW)*12))_",16,")
163 . D FONT S LRFONT=LRFONT_"^FWR^FR"
164 . ; Print infection warning.
165 . F LRY=145,549 D PL^LRLABELD(335,LRY,LRINFW,LRFONT)
166 . D FONT S LRFONT=LRFONT_"^FWR"
167 ;
168 ; Print accession date.
169 F LRY=0,406 D PL^LRLABELD(316,LRY,$P(LRDAT," "),LRFONT)
170 ;
171 ; Print accession.
172 F LRY=120,526 D PL^LRLABELD(316,LRY,LRACC,LRFONT)
173 ;
174 ; Print order number.
175 F LRY=0,406 D PL^LRLABELD(298,LRY,"Order #"_LRCE,LRFONT)
176 ;
177 ; Print collection sample.
178 F LRY=180,586 D PL^LRLABELD(298,LRY,$E(LRTUBE,1,17),LRFONT)
179 ;
180 ; Print test list
181 F LRY=0,406 D PL^LRLABELD(280,LRY,LRTXT,LRFONT)
182 D FONT,COMMON
183 ;
184 W ETX
185 Q
186 ;
187COMMON ; Print lower 8 sections of label - common to both formats.
188 ;
189 N LRJ
190 ;
191 S LRTXT=$$LRTXT^LRLABLD(.LRTS,200)
192 ;
193 F LRY=0,203,406,609 D
194 . ; Print accession
195 . S LRX=220,LRFONT="^ADN,36,10^FWR"
196 . D PL^LRLABELD(LRX,LRY,LRACC,LRFONT)
197 . ;
198 . ; Print collection sample
199 . S LRX=190 D FONT S LRFONT=LRFONT_"^FWR"
200 . D PL^LRLABELD(LRX,LRY,$E(LRTUBE,1,15),LRFONT)
201 . ;
202 . ; Print accession
203 . S LRX=130,LRFONT="^ADN,36,10^FWR"
204 . D PL^LRLABELD(LRX,LRY,LRACC,LRFONT)
205 . ;
206 . ; Print patient name
207 . S LRX=95
208 . D PL^LRLABELD(LRX,LRY,LRLPNM,LRFONT)
209 . ;
210 . ; Print patient identifier.
211 . S LRX=75 D FONT S LRFONT=LRFONT_"^FWR"
212 . D PL^LRLABELD(LRX,LRY,SSN,LRFONT)
213 . ;
214 . ; Print collection date/time
215 . S LRX=50
216 . D PL^LRLABELD(LRX,LRY,LRDAT,LRFONT)
217 . ;
218 . ; Print test list
219 . S LRX=0,LRFONT="^ADN,36,10^FWR"
220 . S LRJ=$S(LRY=203:2,LRY=406:3,LRY=609:4,1:1)
221 . S LRZ=$S($P(LRTXT,";",LRJ)'="":$E($P(LRTXT,";",LRJ),1,14),1:$E(LRDTXT,1,14))
222 . D PL^LRLABELD(LRX,LRY,LRZ,LRFONT)
223 Q
224 ;
225 ;
226LH ; Set Label Home ("LH") parameters.
227 ;
228 S STX=$C(2),ETX=$C(3)
229 ;
230 ; Set Print Orientation ("PO") to Inverted, and Label Home ("LH") parameters.
231 W STX,"^POI^LH360,13",ETX
232 ;
233FONT ;
234 ; Default font.
235 S LRFONT="^ADN"
236 Q
Note: See TracBrowser for help on using the repository browser.