DVBAXP ; GENERATED FROM 'DVBA STATUS' PRINT TEMPLATE (#517) ; 08/19/96 ; (FILE 396, MARGIN=80)
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(517,"DXS",X)) Q:'X S Y=$O(^(X,"")) F X=X:0 Q:Y="" S DXS(X,Y)=^(Y),Y=$O(^(Y))
F Y=0:0 Q:$Y>-1 W !
W ?0 X DXS(1,9.2) S X=$E(DIP(3),DIP(4),X) S Y=X,X=DIP(1),X=X_Y K DIP K:DN Y W X
F Y=0:0 Q:$Y>-1 W !
D N:$X>41 Q:'DN W ?41 X DXS(2,9) K DIP K:DN Y W X
F Y=0:0 Q:$Y>-1 W !
D N:$X>57 Q:'DN W ?57 S DIP(1)=$S($D(^DVB(396,D0,0)):^(0),1:"") S X=$P(DIP(1),U,4) S:X X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3) K DIP K:DN Y W X
F Y=0:0 Q:$Y>0 W !
D N:$X>10 Q:'DN W ?10 X $P(^DD(396,2,0),U,5,99) S DIP(1)=X S X="SSN: "_DIP(1) K DIP K:DN Y W X
F Y=0:0 Q:$Y>0 W !
D N:$X>43 Q:'DN W ?43 X $P(^DD(396,1,0),U,5,99) S DIP(1)=X S X="Claim Number: "_DIP(1) K DIP K:DN Y W X
F Y=0:0 Q:$Y>1 W !
W ?0 S DIP(1)=$S($D(^DVB(396,D0,2)):^(2),1:"") S X="Receiving Div: "_$S('$D(^DG(40.8,+$P(DIP(1),U,9),0)):"",1:$P(^(0),U,1)) K DIP K:DN Y W X
F Y=0:0 Q:$Y>2 W !
D N:$X>4 Q:'DN W ?4 W "Requisition"
D N:$X>22 Q:'DN W ?22 W "Status"
D N:$X>34 Q:'DN W ?34 W "Status Date"
D N:$X>49 Q:'DN W ?49 W "Operator"
D N:$X>61 Q:'DN W ?61 W "Current Division"
D T Q:'DN W ?2 W "---------------------------------------------------------------------------"
F Y=0:0 Q:$Y>4 W !
D N:$X>2 Q:'DN W ?2 W "Notice/Discharge:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,9) W:Y]"" $S($D(DXS(6,Y)):DXS(6,Y),1:Y)
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,10) D DT
S X=$G(^DVB(396,D0,1)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,13),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,9) S Y=$S(Y="":Y,$D(^DG(40.8,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,16)
F Y=0:0 Q:$Y>5 W !
D N:$X>2 Q:'DN W ?2 W "Hospital Summary:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,11) W:Y]"" $S($D(DXS(7,Y)):DXS(7,Y),1:Y)
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,12) D DT
S X=$G(^DVB(396,D0,1)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,14),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,11) S Y=$S(Y="":Y,$D(^DG(40.8,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,16)
F Y=0:0 Q:$Y>6 W !
W ?0 W "21-day Certificate:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,13) W:Y]"" $S($D(DXS(8,Y)):DXS(8,Y),1:Y)
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,14) D DT
S X=$G(^DVB(396,D0,1)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,15),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,13) S Y=$S(Y="":Y,$D(^DG(40.8,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,16)
F Y=0:0 Q:$Y>7 W !
D N:$X>8 Q:'DN W ?8 W "Other/Exam:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,15) W:Y]"" $S($D(DXS(9,Y)):DXS(9,Y),1:Y)
S X=$G(^DVB(396,D0,1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,2) D DT
D N:$X>49 Q:'DN W ?49,$E($P(X,U,16),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,15) S Y=$S(Y="":Y,$D(^DG(40.8,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,16)
F Y=0:0 Q:$Y>8 W !
D N:$X>4 Q:'DN W ?4 W "Special Report:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,17) W:Y]"" $S($D(DXS(10,Y)):DXS(10,Y),1:Y)
S X=$G(^DVB(396,D0,1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,3) D DT
D N:$X>49 Q:'DN W ?49,$E($P(X,U,17),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,17) S Y=$S(Y="":Y,$D(^DG(40.8,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,16)
F Y=0:0 Q:$Y>9 W !
D N:$X>1 Q:'DN W ?1 W "Competency Report:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,19) W:Y]"" $S($D(DXS(11,Y)):DXS(11,Y),1:Y)
S X=$G(^DVB(396,D0,1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,4) D DT
D N:$X>49 Q:'DN W ?49,$E($P(X,U,18),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,19) S Y=$S(Y="":Y,$D(^DG(40.8,Y,0))#2:$P(^(0),U,1),1:Y) W $E(Y,1,16)
F Y=0:0 Q:$Y>10 W !
D N:$X>6 Q:'DN W ?6 W "Form 21-2680:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,21) W:Y]"" $S($D(DXS(12,Y)):DXS(12,Y),1:Y)
G ^DVBAXP1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAXP 4418 printed Dec 13, 2024@01:42:53 Page 2
DVBAXP ; GENERATED FROM 'DVBA STATUS' PRINT TEMPLATE (#517) ; 08/19/96 ; (FILE 396, MARGIN=80)
+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(517,"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 FOR Y=0:0
if $Y>-1
QUIT
WRITE !
+4 WRITE ?0
XECUTE DXS(1,9.2)
SET X=$EXTRACT(DIP(3),DIP(4),X)
SET Y=X
SET X=DIP(1)
SET X=X_Y
KILL DIP
if DN
KILL Y
WRITE X
+5 FOR Y=0:0
if $Y>-1
QUIT
WRITE !
+6 if $X>41
DO N
if 'DN
QUIT
WRITE ?41
XECUTE DXS(2,9)
KILL DIP
if DN
KILL Y
WRITE X
+7 FOR Y=0:0
if $Y>-1
QUIT
WRITE !
+8 if $X>57
DO N
if 'DN
QUIT
WRITE ?57
SET DIP(1)=$SELECT($DATA(^DVB(396,D0,0)):^(0),1:"")
SET X=$PIECE(DIP(1),U,4)
if X
SET X=$EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
KILL DIP
if DN
KILL Y
WRITE X
+9 FOR Y=0:0
if $Y>0
QUIT
WRITE !
+10 if $X>10
DO N
if 'DN
QUIT
WRITE ?10
XECUTE $PIECE(^DD(396,2,0),U,5,99)
SET DIP(1)=X
SET X="SSN: "_DIP(1)
KILL DIP
if DN
KILL Y
WRITE X
+11 FOR Y=0:0
if $Y>0
QUIT
WRITE !
+12 if $X>43
DO N
if 'DN
QUIT
WRITE ?43
XECUTE $PIECE(^DD(396,1,0),U,5,99)
SET DIP(1)=X
SET X="Claim Number: "_DIP(1)
KILL DIP
if DN
KILL Y
WRITE X
+13 FOR Y=0:0
if $Y>1
QUIT
WRITE !
+14 WRITE ?0
SET DIP(1)=$SELECT($DATA(^DVB(396,D0,2)):^(2),1:"")
SET X="Receiving Div: "_$SELECT('$DATA(^DG(40.8,+$PIECE(DIP(1),U,9),0)):"",1:$PIECE(^(0),U,1))
KILL DIP
if DN
KILL Y
WRITE X
+15 FOR Y=0:0
if $Y>2
QUIT
WRITE !
+16 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "Requisition"
+17 if $X>22
DO N
if 'DN
QUIT
WRITE ?22
WRITE "Status"
+18 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
WRITE "Status Date"
+19 if $X>49
DO N
if 'DN
QUIT
WRITE ?49
WRITE "Operator"
+20 if $X>61
DO N
if 'DN
QUIT
WRITE ?61
WRITE "Current Division"
+21 DO T
if 'DN
QUIT
WRITE ?2
WRITE "---------------------------------------------------------------------------"
+22 FOR Y=0:0
if $Y>4
QUIT
WRITE !
+23 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Notice/Discharge:"
+24 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,9)
if Y]""
WRITE $SELECT($DATA(DXS(6,Y)):DXS(6,Y),1:Y)
+25 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,10)
DO DT
+26 SET X=$GET(^DVB(396,D0,1))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,13),1,11)
+27 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,9)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+28 FOR Y=0:0
if $Y>5
QUIT
WRITE !
+29 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Hospital Summary:"
+30 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,11)
if Y]""
WRITE $SELECT($DATA(DXS(7,Y)):DXS(7,Y),1:Y)
+31 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,12)
DO DT
+32 SET X=$GET(^DVB(396,D0,1))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,14),1,11)
+33 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,11)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+34 FOR Y=0:0
if $Y>6
QUIT
WRITE !
+35 WRITE ?0
WRITE "21-day Certificate:"
+36 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,13)
if Y]""
WRITE $SELECT($DATA(DXS(8,Y)):DXS(8,Y),1:Y)
+37 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,14)
DO DT
+38 SET X=$GET(^DVB(396,D0,1))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,15),1,11)
+39 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,13)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+40 FOR Y=0:0
if $Y>7
QUIT
WRITE !
+41 if $X>8
DO N
if 'DN
QUIT
WRITE ?8
WRITE "Other/Exam:"
+42 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,15)
if Y]""
WRITE $SELECT($DATA(DXS(9,Y)):DXS(9,Y),1:Y)
+43 SET X=$GET(^DVB(396,D0,1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,2)
DO DT
+44 if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,16),1,11)
+45 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,15)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+46 FOR Y=0:0
if $Y>8
QUIT
WRITE !
+47 if $X>4
DO N
if 'DN
QUIT
WRITE ?4
WRITE "Special Report:"
+48 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,17)
if Y]""
WRITE $SELECT($DATA(DXS(10,Y)):DXS(10,Y),1:Y)
+49 SET X=$GET(^DVB(396,D0,1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,3)
DO DT
+50 if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,17),1,11)
+51 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,17)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+52 FOR Y=0:0
if $Y>9
QUIT
WRITE !
+53 if $X>1
DO N
if 'DN
QUIT
WRITE ?1
WRITE "Competency Report:"
+54 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,19)
if Y]""
WRITE $SELECT($DATA(DXS(11,Y)):DXS(11,Y),1:Y)
+55 SET X=$GET(^DVB(396,D0,1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,4)
DO DT
+56 if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,18),1,11)
+57 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,19)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+58 FOR Y=0:0
if $Y>10
QUIT
WRITE !
+59 if $X>6
DO N
if 'DN
QUIT
WRITE ?6
WRITE "Form 21-2680:"
+60 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,21)
if Y]""
WRITE $SELECT($DATA(DXS(12,Y)):DXS(12,Y),1:Y)
+61 GOTO ^DVBAXP1