LRBLDPK ; GENERATED FROM 'LRBL DONOR TESTING SUPPLEMENT' PRINT TEMPLATE (#112) ; 09/23/96 ; (FILE 65.5, MARGIN=132)
G BEGIN
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
I $D(DXS)<9 F X=0:0 S X=$O(^DIPT(112,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
S I(1)=5,J(1)=65.54 F D1=0:0 Q:$O(^LRE(D0,5,D1))'>0 X:$D(DSC(65.54)) DSC(65.54) S D1=$O(^(D1)) Q:D1'>0 D:$X>0 T Q:'DN D A1
G A1R
A1 ;
S X=$G(^LRE(D0,5,D1,0)) D N:$X>0 Q:'DN W ?0 S Y=$P(X,U,1) D DT
D N:$X>14 Q:'DN W ?14,$E($P(X,U,4),1,10)
Q
A1R ;
D N:$X>26 Q:'DN W ?26 S Y=D0 W:Y]"" $J(Y,5,0)
S X=$G(^LRE(D0,0)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,10) W:Y]"" $S($D(DXS(3,Y)):DXS(3,Y),1:Y)
D N:$X>39 Q:'DN W ?39 S Y=$P(X,U,5) W:Y]"" $J($S($D(DX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X>124 Q:'DN W ?124 X DXS(1,9) K DIP K:DN Y W $E(X,1,3)
D N:$X>128 Q:'DN W ?128 X DXS(2,9) K DIP K:DN Y W $E(X,1,3)
Q
A2R ;
Q
B1R ;
K Y
Q
HEAD ;
W !,?112,"EXPIRATION"
W !,?0,"DONATION DATE",?14,"UNIT #",?26,"DONOR",?33,"PDef",?39,"PR",?42,"REC",?46,"HBcAb",?53,"ALT",?60,"HCV Ab",?68,"HIV Ag",?77,"COLL.DISP",?87,"COMPONENT",?104,"DISPO.",?112,"DATE",?124,"LTc",?128,"VTc"
W !,"------------------------------------------------------------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRBLDPK 2916 printed Dec 13, 2024@02:10:45 Page 2
LRBLDPK ; GENERATED FROM 'LRBL DONOR TESTING SUPPLEMENT' PRINT TEMPLATE (#112) ; 09/23/96 ; (FILE 65.5, MARGIN=132)
+1 GOTO BEGIN
N WRITE !
T if $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
if '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
if Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
if Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 if '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 IF $DATA(DXS)<9
FOR X=0:0
SET X=$ORDER(^DIPT(112,"DXS",X))
if 'X
QUIT
SET Y=$ORDER(^(X,""))
FOR X=X:0
if Y=""
QUIT
SET DXS(X,Y)=^(Y)
SET Y=$ORDER(^(Y))
+3 SET I(1)=5
SET J(1)=65.54
FOR D1=0:0
if $ORDER(^LRE(D0,5,D1))'>0
QUIT
if $DATA(DSC(65.54))
XECUTE DSC(65.54)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>0
DO T
if 'DN
QUIT
DO A1
+4 GOTO A1R
A1 ;
+1 SET X=$GET(^LRE(D0,5,D1,0))
if $X>0
DO N
if 'DN
QUIT
WRITE ?0
SET Y=$PIECE(X,U,1)
DO DT
+2 if $X>14
DO N
if 'DN
QUIT
WRITE ?14,$EXTRACT($PIECE(X,U,4),1,10)
+3 QUIT
A1R ;
+1 if $X>26
DO N
if 'DN
QUIT
WRITE ?26
SET Y=D0
if Y]""
WRITE $JUSTIFY(Y,5,0)
+2 SET X=$GET(^LRE(D0,0))
if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,10)
if Y]""
WRITE $SELECT($DATA(DXS(3,Y)):DXS(3,Y),1:Y)
+3 if $X>39
DO N
if 'DN
QUIT
WRITE ?39
SET Y=$PIECE(X,U,5)
if Y]""
WRITE $JUSTIFY($SELECT($DATA(DXS(4,Y)):DXS(4,Y),1:Y),2)
+4 if $X>42
DO N
if 'DN
QUIT
WRITE ?42
SET Y=$PIECE(X,U,6)
if Y]""
WRITE $SELECT($DATA(DXS(5,Y)):DXS(5,Y),1:Y)
+5 SET I(1)=5
SET J(1)=65.54
FOR D1=0:0
if $ORDER(^LRE(D0,5,D1))'>0
QUIT
if $DATA(DSC(65.54))
XECUTE DSC(65.54)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>47
DO T
if 'DN
QUIT
DO B1
+6 GOTO B1R
B1 ;
+1 SET X=$GET(^LRE(D0,5,D1,16))
if $X>46
DO N
if 'DN
QUIT
WRITE ?46
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(6,Y)):DXS(6,Y),1:Y)
+2 SET X=$GET(^LRE(D0,5,D1,17))
if $X>53
DO N
if 'DN
QUIT
WRITE ?53
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(7,Y)):DXS(7,Y),1:Y)
+3 SET X=$GET(^LRE(D0,5,D1,19))
if $X>60
DO N
if 'DN
QUIT
WRITE ?60
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(8,Y)):DXS(8,Y),1:Y)
+4 SET X=$GET(^LRE(D0,5,D1,20))
if $X>68
DO N
if 'DN
QUIT
WRITE ?68
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $SELECT($DATA(DXS(9,Y)):DXS(9,Y),1:Y)
+5 SET X=$GET(^LRE(D0,5,D1,0))
if $X>77
DO N
if 'DN
QUIT
WRITE ?77
SET Y=$PIECE(X,U,10)
if Y]""
WRITE $SELECT($DATA(DXS(10,Y)):DXS(10,Y),1:Y)
+6 SET I(2)=66
SET J(2)=65.66
FOR D2=0:0
if $ORDER(^LRE(D0,5,D1,66,D2))'>0
QUIT
if $DATA(DSC(65.66))
XECUTE DSC(65.66)
SET D2=$ORDER(^(D2))
if D2'>0
QUIT
if $X>88
DO T
if 'DN
QUIT
DO A2
+7 GOTO A2R
A2 ;
+1 SET X=$GET(^LRE(D0,5,D1,66,D2,0))
if $X>87
DO N
if 'DN
QUIT
WRITE ?87
SET Y=$PIECE(X,U,1)
SET Y=$SELECT(Y="":Y,$DATA(^LAB(66,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,15)
+2 if $X>104
DO N
if 'DN
QUIT
WRITE ?104
SET Y=$PIECE(X,U,8)
if Y]""
WRITE $SELECT($DATA(DXS(11,Y)):DXS(11,Y),1:Y)
+3 if $X>112
DO N
if 'DN
QUIT
WRITE ?112
SET Y=$PIECE(X,U,4)
DO DT
+4 if $X>124
DO N
if 'DN
QUIT
WRITE ?124
XECUTE DXS(1,9)
KILL DIP
if DN
KILL Y
WRITE $EXTRACT(X,1,3)
+5 if $X>128
DO N
if 'DN
QUIT
WRITE ?128
XECUTE DXS(2,9)
KILL DIP
if DN
KILL Y
WRITE $EXTRACT(X,1,3)
+6 QUIT
A2R ;
+1 QUIT
B1R ;
+1 KILL Y
+2 QUIT
HEAD ;
+1 WRITE !,?112,"EXPIRATION"
+2 WRITE !,?0,"DONATION DATE",?14,"UNIT #",?26,"DONOR",?33,"PDef",?39,"PR",?42,"REC",?46,"HBcAb",?53,"ALT",?60,"HCV Ab",?68,"HIV Ag",?77,"COLL.DISP",?87,"COMPONENT",?104,"DISPO.",?112,"DATE",?124,"LTc",?128,"VTc"
+3 WRITE !,"------------------------------------------------------------------------------------------------------------------------------------",!!