DVBAXP1 ; GENERATED FROM 'DVBA STATUS' PRINT TEMPLATE (#517) ; 08/19/96 ; (continued)
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)
S X=$G(^DVB(396,D0,1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,5) D DT
S X=$G(^DVB(396,D0,2)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,1),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,21) 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>11 W !
D N:$X>1 Q:'DN W ?1 W "Asset Information:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,23) W:Y]"" $S($D(DXS(13,Y)):DXS(13,Y),1:Y)
S X=$G(^DVB(396,D0,1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,6) D DT
S X=$G(^DVB(396,D0,2)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,2),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,23) 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>12 W !
D N:$X>2 Q:'DN W ?2 W "Admission Report:"
S X=$G(^DVB(396,D0,1)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,7) W:Y]"" $S($D(DXS(14,Y)):DXS(14,Y),1:Y)
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,8) D DT
S X=$G(^DVB(396,D0,2)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,3),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,7) 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>13 W !
D N:$X>1 Q:'DN W ?1 W "OPT Treatment Rpt:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,26) W:Y]"" $S($D(DXS(15,Y)):DXS(15,Y),1:Y)
S X=$G(^DVB(396,D0,1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,9) D DT
S X=$G(^DVB(396,D0,2)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,4),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,26) 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>14 W !
D N:$X>5 Q:'DN W ?5 W "Beg Date/Care:"
S X=$G(^DVB(396,D0,0)) D N:$X>22 Q:'DN W ?22 S Y=$P(X,U,28) W:Y]"" $S($D(DXS(16,Y)):DXS(16,Y),1:Y)
S X=$G(^DVB(396,D0,1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,10) D DT
S X=$G(^DVB(396,D0,2)) D N:$X>49 Q:'DN W ?49,$E($P(X,U,5),1,11)
S X=$G(^DVB(396,D0,6)) D N:$X>61 Q:'DN W ?61 S Y=$P(X,U,28) 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>16 W !
W ?0 W "REMARKS:"
S I(1)=5,J(1)=396.02 F D1=0:0 Q:$O(^DVB(396,D0,5,D1))'>0 S D1=$O(^(D1)) D:$X>10 T Q:'DN D A1
G A1R
A1 ;
S X=$G(^DVB(396,D0,5,D1,0)) S DIWL=11,DIWR=78 D ^DIWP
Q
A1R ;
D A^DIWW
F Y=0:0 Q:$Y>18 W !
W ?0 W "Requesting location: "
D N:$X>22 Q:'DN W ?22 S DIP(1)=$S($D(^DVB(396,D0,2)):^(2),1:"") S X=$P(DIP(1),U,7),DIP(2)=X S X=1,DIP(3)=X S X=20,X=$E(DIP(2),DIP(3),X) K DIP K:DN Y W X
W ?33 X DXS(3,9) K DIP K:DN Y
W ?44 X DXS(4,9) K DIP K:DN Y
F Y=0:0 Q:$Y>19 W !
D N:$X>7 Q:'DN W ?7 W "Requested by: "
D N:$X>22 Q:'DN W ?22 S DIP(1)=$S($D(^DVB(396,D0,2)):^(2),1:"") S X=$P(DIP(1),U,8),DIP(2)=X S X=1,DIP(3)=X S X=25,X=$E(DIP(2),DIP(3),X) K DIP K:DN Y W X
W ?33 X DXS(5,9) K DIP K:DN Y
K Y K DIWF
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAXP1 3448 printed Nov 22, 2024@16:53:06 Page 2
DVBAXP1 ; GENERATED FROM 'DVBA STATUS' PRINT TEMPLATE (#517) ; 08/19/96 ; (continued)
+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 SET X=$GET(^DVB(396,D0,1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,5)
DO DT
+3 SET X=$GET(^DVB(396,D0,2))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,1),1,11)
+4 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,21)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+5 FOR Y=0:0
if $Y>11
QUIT
WRITE !
+6 if $X>1
DO N
if 'DN
QUIT
WRITE ?1
WRITE "Asset Information:"
+7 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,23)
if Y]""
WRITE $SELECT($DATA(DXS(13,Y)):DXS(13,Y),1:Y)
+8 SET X=$GET(^DVB(396,D0,1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,6)
DO DT
+9 SET X=$GET(^DVB(396,D0,2))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,2),1,11)
+10 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,23)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+11 FOR Y=0:0
if $Y>12
QUIT
WRITE !
+12 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Admission Report:"
+13 SET X=$GET(^DVB(396,D0,1))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,7)
if Y]""
WRITE $SELECT($DATA(DXS(14,Y)):DXS(14,Y),1:Y)
+14 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,8)
DO DT
+15 SET X=$GET(^DVB(396,D0,2))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,3),1,11)
+16 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,7)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+17 FOR Y=0:0
if $Y>13
QUIT
WRITE !
+18 if $X>1
DO N
if 'DN
QUIT
WRITE ?1
WRITE "OPT Treatment Rpt:"
+19 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,26)
if Y]""
WRITE $SELECT($DATA(DXS(15,Y)):DXS(15,Y),1:Y)
+20 SET X=$GET(^DVB(396,D0,1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,9)
DO DT
+21 SET X=$GET(^DVB(396,D0,2))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,4),1,11)
+22 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,26)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+23 FOR Y=0:0
if $Y>14
QUIT
WRITE !
+24 if $X>5
DO N
if 'DN
QUIT
WRITE ?5
WRITE "Beg Date/Care:"
+25 SET X=$GET(^DVB(396,D0,0))
if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET Y=$PIECE(X,U,28)
if Y]""
WRITE $SELECT($DATA(DXS(16,Y)):DXS(16,Y),1:Y)
+26 SET X=$GET(^DVB(396,D0,1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,10)
DO DT
+27 SET X=$GET(^DVB(396,D0,2))
if $X>49
DO N
if 'DN
QUIT
WRITE ?49,$EXTRACT($PIECE(X,U,5),1,11)
+28 SET X=$GET(^DVB(396,D0,6))
if $X>61
DO N
if 'DN
QUIT
WRITE ?61
SET Y=$PIECE(X,U,28)
SET Y=$SELECT(Y="":Y,$DATA(^DG(40.8,Y,0))#2:$PIECE(^(0),U,1),1:Y)
WRITE $EXTRACT(Y,1,16)
+29 FOR Y=0:0
if $Y>16
QUIT
WRITE !
+30 WRITE ?0
WRITE "REMARKS:"
+31 SET I(1)=5
SET J(1)=396.02
FOR D1=0:0
if $ORDER(^DVB(396,D0,5,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>10
DO T
if 'DN
QUIT
DO A1
+32 GOTO A1R
A1 ;
+1 SET X=$GET(^DVB(396,D0,5,D1,0))
SET DIWL=11
SET DIWR=78
DO ^DIWP
+2 QUIT
A1R ;
+1 DO A^DIWW
+2 FOR Y=0:0
if $Y>18
QUIT
WRITE !
+3 WRITE ?0
WRITE "Requesting location: "
+4 if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET DIP(1)=$SELECT($DATA(^DVB(396,D0,2)):^(2),1:"")
SET X=$PIECE(DIP(1),U,7)
SET DIP(2)=X
SET X=1
SET DIP(3)=X
SET X=20
SET X=$EXTRACT(DIP(2),DIP(3),X)
KILL DIP
if DN
KILL Y
WRITE X
+5 WRITE ?33
XECUTE DXS(3,9)
KILL DIP
if DN
KILL Y
+6 WRITE ?44
XECUTE DXS(4,9)
KILL DIP
if DN
KILL Y
+7 FOR Y=0:0
if $Y>19
QUIT
WRITE !
+8 if $X>7
DO N
if 'DN
QUIT
WRITE ?7
WRITE "Requested by: "
+9 if $X>22
DO N
if 'DN
QUIT
WRITE ?22
SET DIP(1)=$SELECT($DATA(^DVB(396,D0,2)):^(2),1:"")
SET X=$PIECE(DIP(1),U,8)
SET DIP(2)=X
SET X=1
SET DIP(3)=X
SET X=25
SET X=$EXTRACT(DIP(2),DIP(3),X)
KILL DIP
if DN
KILL Y
WRITE X
+10 WRITE ?33
XECUTE DXS(5,9)
KILL DIP
if DN
KILL Y
+11 KILL Y
KILL DIWF
+12 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!