LRLABELG ;DALOI/JMC - 1x3 label for Zebra Stripe printer; 6/4/98
;;5.2T9;LR;**1018**;Nov 17, 2004
;;5.2;LAB SERVICE;**218**;Sep 27, 1994
; Print Lab labels 25mm X 76mm (1X3) labels.
; Label length = 200 dots.
;
N LRFONT,LRZ,ETX,STX
;
D LH
W STX
;
; Print urgency
I $P(LRURGA,"^",2) D
. I $P(LRURGA,"^",2)=2 D
. . ; Set up graphic box.
. . D GB^LRLABELD(340,0,15+($L($P(LRURGA,"^"))*12)_",20,20")
. . ; Set field reverse.
. . S LRFONT=LRFONT_"^FR"
. D PL^LRLABELD(350,3,$P(LRURGA,"^"),LRFONT)
. D FONT
;
; Print infection warning if present.
I $L($G(LRINFW)) D
. ; Make 'big' box else make 'little' box.
. I $L(LRINFW)>10 S LRZ=130_",40,40"
. E S LRZ=10+($L(LRINFW)*12)_",25,25"
. D GB^LRLABELD(442,0,LRZ)
. S LRFONT=LRFONT_"^FR"
. ; Print infection warning.
. D PL^LRLABELD(447,3,$E(LRINFW,1,10),LRFONT)
. ; Print remainder of infection warning.
. I $L(LRINFW)>10 D PL^LRLABELD(447,21,$E(LRINFW,11,20),LRFONT)
. D FONT
;
; Print patient name.
S LRFONT="^ADN,36,10"
D PL^LRLABELD(0,0,$E(PNM,1,25),LRFONT)
D FONT
;
; Print patient identifier.
S LRFONT="^ADN,36,10"
D PL^LRLABELD(0,40,SSN,LRFONT)
D FONT
;
; Print patient location.
D PL^LRLABELD(200,40,"Ward: "_LRLLOC,LRFONT)
;
; Print room-bed number.
I $L(LRRB) D PL^LRLABELD(200,60," Bed: "_LRRB,LRFONT)
;
; Print accession.
D PL^LRLABELD(0,80,LRACC,LRFONT)
;
; Print order number.
D PL^LRLABELD(188,80,"Order #"_LRCE,LRFONT)
;
; Print Identifier.
D PL^LRLABELD(0,100,LRUID,LRFONT)
;
; Print accession date.
D PL^LRLABELD(188,100,LRDAT,LRFONT)
;
; Print collection sample.
I LRXL,N-I<LRXL S X=LRTOP
E S X=LRPREF_LRTOP
D PL^LRLABELD(0,120,$E(X,1,55),LRFONT)
;
; Print list of tests
S LRTXT=$$LRTXT^LRLABLD(.LRTS,55)
D PL^LRLABELD(0,140,LRTXT,LRFONT)
;
W ETX
;
Q
;
;
LH ; Set Label Home ("LH") parameters.
;
S STX=$C(2),ETX=$C(3)
;
; Set Print Orientation ("PO") to Inverted, and Label Home ("LH") parameters.
W STX,"^POI^LH240,5",ETX
;
FONT ;
; Default font.
S LRFONT="^ADN"
Q
LRLABELG ;DALOI/JMC - 1x3 label for Zebra Stripe printer; 6/4/98
+1 ;;5.2T9;LR;**1018**;Nov 17, 2004
+2 ;;5.2;LAB SERVICE;**218**;Sep 27, 1994
+3 ; Print Lab labels 25mm X 76mm (1X3) labels.
+4 ; Label length = 200 dots.
+5 ;
+6 NEW LRFONT,LRZ,ETX,STX
+7 ;
+8 DO LH
+9 WRITE STX
+10 ;
+11 ; Print urgency
+12 IF $PIECE(LRURGA,"^",2)
Begin DoDot:1
+13 IF $PIECE(LRURGA,"^",2)=2
Begin DoDot:2
+14 ; Set up graphic box.
+15 DO GB^LRLABELD(340,0,15+($LENGTH($PIECE(LRURGA,"^"))*12)_",20,20")
+16 ; Set field reverse.
+17 SET LRFONT=LRFONT_"^FR"
End DoDot:2
+18 DO PL^LRLABELD(350,3,$PIECE(LRURGA,"^"),LRFONT)
+19 DO FONT
End DoDot:1
+20 ;
+21 ; Print infection warning if present.
+22 IF $LENGTH($GET(LRINFW))
Begin DoDot:1
+23 ; Make 'big' box else make 'little' box.
+24 IF $LENGTH(LRINFW)>10
SET LRZ=130_",40,40"
+25 IF '$TEST
SET LRZ=10+($LENGTH(LRINFW)*12)_",25,25"
+26 DO GB^LRLABELD(442,0,LRZ)
+27 SET LRFONT=LRFONT_"^FR"
+28 ; Print infection warning.
+29 DO PL^LRLABELD(447,3,$EXTRACT(LRINFW,1,10),LRFONT)
+30 ; Print remainder of infection warning.
+31 IF $LENGTH(LRINFW)>10
DO PL^LRLABELD(447,21,$EXTRACT(LRINFW,11,20),LRFONT)
+32 DO FONT
End DoDot:1
+33 ;
+34 ; Print patient name.
+35 SET LRFONT="^ADN,36,10"
+36 DO PL^LRLABELD(0,0,$EXTRACT(PNM,1,25),LRFONT)
+37 DO FONT
+38 ;
+39 ; Print patient identifier.
+40 SET LRFONT="^ADN,36,10"
+41 DO PL^LRLABELD(0,40,SSN,LRFONT)
+42 DO FONT
+43 ;
+44 ; Print patient location.
+45 DO PL^LRLABELD(200,40,"Ward: "_LRLLOC,LRFONT)
+46 ;
+47 ; Print room-bed number.
+48 IF $LENGTH(LRRB)
DO PL^LRLABELD(200,60," Bed: "_LRRB,LRFONT)
+49 ;
+50 ; Print accession.
+51 DO PL^LRLABELD(0,80,LRACC,LRFONT)
+52 ;
+53 ; Print order number.
+54 DO PL^LRLABELD(188,80,"Order #"_LRCE,LRFONT)
+55 ;
+56 ; Print Identifier.
+57 DO PL^LRLABELD(0,100,LRUID,LRFONT)
+58 ;
+59 ; Print accession date.
+60 DO PL^LRLABELD(188,100,LRDAT,LRFONT)
+61 ;
+62 ; Print collection sample.
+63 IF LRXL
IF N-I<LRXL
SET X=LRTOP
+64 IF '$TEST
SET X=LRPREF_LRTOP
+65 DO PL^LRLABELD(0,120,$EXTRACT(X,1,55),LRFONT)
+66 ;
+67 ; Print list of tests
+68 SET LRTXT=$$LRTXT^LRLABLD(.LRTS,55)
+69 DO PL^LRLABELD(0,140,LRTXT,LRFONT)
+70 ;
+71 WRITE ETX
+72 ;
+73 QUIT
+74 ;
+75 ;
LH ; Set Label Home ("LH") parameters.
+1 ;
+2 SET STX=$CHAR(2)
SET ETX=$CHAR(3)
+3 ;
+4 ; Set Print Orientation ("PO") to Inverted, and Label Home ("LH") parameters.
+5 WRITE STX,"^POI^LH240,5",ETX
+6 ;
FONT ;
+1 ; Default font.
+2 SET LRFONT="^ADN"
+3 QUIT