DVBHS5 ; ALB/JLU;Routine for HINQ screen 5 ; 7/13/05 12:58pm
;;4.0;HINQ;**12,11,20,49,61**;03/25/92;Build 19
N Y,DVBAA,DVBHH,DVBAAHB
K DVBX(1)
K DVBDIQ ;F LP2=.3611,.3616,.3612,.306,.3615,391,1901,.301,.302,.361,.36205,.3621,.36235,.3624,.36215,.3622,.36295,.3025,.303 S X="DVBDIQ(2,"_DFN_","_LP2_")" K @X
I $D(X(1)) S DVBX(1)=X(1)
S DIC="^DPT(",DIQ(0)="E",DIQ="DVBDIQ("
;S DR=".01;.09;.3611;.3616;.3612;.306;.3615;391;1901;.301;.302;.361;.36205;.3621;.36235;.3624;.36215;.3622;.36295;.3025;.303"
S DR=".01;.09;.3611;.3616;.3612;.306;.3615;391;1901;.301;.302;.361;.36205;.36235;.36215;.36295;.3025"
D EN^DIQ1
I $D(DVBX(1)) S X(1)=DVBX(1) K DVBX(1)
S DVBAA=DVBDIQ(2,DVBQDFN,".36205","E")
S DVBHB=DVBDIQ(2,DVBQDFN,".36215","E")
S DVBAAHB=""
I DVBHB="YES" S DVBAAHB="H"
I DVBAA="YES" S DVBAAHB="A"
;
S DVBSCRN=5 D SCRHD^DVBHUTIL
S DVBJS=53
W !,"Check Amt.: ",$S($D(DVBCHECK):"$"_DVBCHECK,1:"")
W ?28,"Combined %: ",$S($D(DVBDXPCT):+DVBDXPCT_"%",1:"")
W ?48,"Net Award Amt.: ",$S($D(DVBBAS(1)):"$"_$P(DVBBAS(1),U,20),1:"")
I $D(DVBP(1)) S T1=$P(DVBP(1),U,4)
;with DVB*4*49, VBA no longer sending entitlement code, so a type
;benefit is being calculated and displayed where entitlement code was
S DVBENT=$S($G(T1)="01":"Compensation",$G(T1)="0L":"Pension",1:"")
K T1,T2 W !,"Benefit Type:",?15,$S($D(DVBENT):DVBENT,1:"")
W ?40,"Income for VA Purposes: $"_$S($P($G(DVBINC),U,15)>0:$P(DVBINC,U,15)_".00",1:"0.00")
W !,"Aid & Attendance: " I $D(DVBAAHB) S Y=$S(DVBAAHB="A":2,DVBAAHB="H":3,1:"") D AAA^DVBHQM2 W Y
;W !,"Rated (HINQ) Disabilities:" I $D(DVBDXNO),DVBDXNO'=0 D S1^DVBHQZ6
I $D(DVBSCR) K DVBSCR D LINE Q
;
W !!,"--- ",DVBON,"Patient Data",DVBOFF," ---"
W !,DVBON,"(1)",DVBOFF," Elig. Stat.: ",$E(DVBDIQ(2,DFN,.3611,"E"),1,20) X DVBLIT1
W ?38,"Elig. Stat. ent. by: ",$E(DVBDIQ(2,DFN,.3616,"E"),1,18)
W !,?5,"Stat. date: ",DVBDIQ(2,DFN,.3612,"E")
W ?37,"Monetary Ben. Verif.: ",DVBDIQ(2,DFN,.306,"E")
W !,?3,"Verif. Meth.: ",$E(DVBDIQ(2,DFN,.3615,"E"),1,50)
W ?44,"Patient Elig.: "
I $D(^DPT(DFN,"E",0)),+$P(^(0),U,3) D
. N DVBE1,DVBELIG,DVBER2,DVBQ
. D GETS^DIQ(2,DFN_",","361*","EI","DVBELIG","DVBER2")
. N DVBCT
. S (DVBCT,DVBE1)=""
. S DVBQ=0
. F S DVBE1=$O(DVBELIG(2.0361,DVBE1)) Q:'DVBE1!(DVBQ=1) D
. . I DVBELIG(2.0361,DVBE1,.01,"I")'=+^DPT(DFN,"E",0) S DVBOH=DVBELIG(2.0361,DVBE1,.01,"E") S DVBQ=1
W $S($G(DVBOH)]"":$E(DVBOH,1,18),1:"")
W !!,DVBON,"(2)",DVBOFF," Pat. Type: ",$E(DVBDIQ(2,DFN,391,"E"),1,20) X DVBLIT1
W ?36,"Vet.(Y/N)?: ",DVBDIQ(2,DFN,1901,"E")
W !,?4,"Ser. Con.: ",DVBDIQ(2,DFN,.301,"E")
;W ?40,"Ser. Con. %: ",DVBDIQ(2,DFN,.302,"E")
W ?36,"Elig. Code: ",$E(DVBDIQ(2,DFN,.361,"E"),1,30)
W !!,DVBON,"(3)",DVBOFF," A&A: ",DVBDIQ(2,DFN,.36205,"E") X DVBLIT1
;W ?18,"Amt.: $",$E(DVBDIQ(2,DFN,.3621,"E"),1,11)
W ?41,"VA Pension: ",DVBDIQ(2,DFN,.36235,"E")
;W ?58,"Amt.: $",$E(DVBDIQ(2,DFN,.3624,"E"),1,11)
W !,"House Bound: ",DVBDIQ(2,DFN,.36215,"E")
;W ?18,"Amt.: $",$E(DVBDIQ(2,DFN,.3622,"E"),1,11)
W ?38,"VA Disability: ",DVBDIQ(2,DFN,.3025,"E")
;W ?58,"Amt.: $",$E(DVBDIQ(2,DFN,.303,"E"),1,11)
W !,"Tot.Ann. VA Check Amt.: $",DVBDIQ(2,DFN,.36295,"E")
S NEW=DVBDIQ(2,DFN,.01,"E"),NEW2=DVBDIQ(2,DFN,.09,"E") K DVBDIQ
S DVBDIQ(2,DFN,.01,"E")=NEW,DVBDIQ(2,DFN,.09,"E")=NEW2 K NEW,NEW2 Q
LINE W !,"------------------------------------------------------------------------------"
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBHS5 3434 printed Dec 13, 2024@01:59:08 Page 2
DVBHS5 ; ALB/JLU;Routine for HINQ screen 5 ; 7/13/05 12:58pm
+1 ;;4.0;HINQ;**12,11,20,49,61**;03/25/92;Build 19
+2 NEW Y,DVBAA,DVBHH,DVBAAHB
+3 KILL DVBX(1)
+4 ;F LP2=.3611,.3616,.3612,.306,.3615,391,1901,.301,.302,.361,.36205,.3621,.36235,.3624,.36215,.3622,.36295,.3025,.303 S X="DVBDIQ(2,"_DFN_","_LP2_")" K @X
KILL DVBDIQ
+5 IF $DATA(X(1))
SET DVBX(1)=X(1)
+6 SET DIC="^DPT("
SET DIQ(0)="E"
SET DIQ="DVBDIQ("
+7 ;S DR=".01;.09;.3611;.3616;.3612;.306;.3615;391;1901;.301;.302;.361;.36205;.3621;.36235;.3624;.36215;.3622;.36295;.3025;.303"
+8 SET DR=".01;.09;.3611;.3616;.3612;.306;.3615;391;1901;.301;.302;.361;.36205;.36235;.36215;.36295;.3025"
+9 DO EN^DIQ1
+10 IF $DATA(DVBX(1))
SET X(1)=DVBX(1)
KILL DVBX(1)
+11 SET DVBAA=DVBDIQ(2,DVBQDFN,".36205","E")
+12 SET DVBHB=DVBDIQ(2,DVBQDFN,".36215","E")
+13 SET DVBAAHB=""
+14 IF DVBHB="YES"
SET DVBAAHB="H"
+15 IF DVBAA="YES"
SET DVBAAHB="A"
+16 ;
+17 SET DVBSCRN=5
DO SCRHD^DVBHUTIL
+18 SET DVBJS=53
+19 WRITE !,"Check Amt.: ",$SELECT($DATA(DVBCHECK):"$"_DVBCHECK,1:"")
+20 WRITE ?28,"Combined %: ",$SELECT($DATA(DVBDXPCT):+DVBDXPCT_"%",1:"")
+21 WRITE ?48,"Net Award Amt.: ",$SELECT($DATA(DVBBAS(1)):"$"_$PIECE(DVBBAS(1),U,20),1:"")
+22 IF $DATA(DVBP(1))
SET T1=$PIECE(DVBP(1),U,4)
+23 ;with DVB*4*49, VBA no longer sending entitlement code, so a type
+24 ;benefit is being calculated and displayed where entitlement code was
+25 SET DVBENT=$SELECT($GET(T1)="01":"Compensation",$GET(T1)="0L":"Pension",1:"")
+26 KILL T1,T2
WRITE !,"Benefit Type:",?15,$SELECT($DATA(DVBENT):DVBENT,1:"")
+27 WRITE ?40,"Income for VA Purposes: $"_$SELECT($PIECE($GET(DVBINC),U,15)>0:$PIECE(DVBINC,U,15)_".00",1:"0.00")
+28 WRITE !,"Aid & Attendance: "
IF $DATA(DVBAAHB)
SET Y=$SELECT(DVBAAHB="A":2,DVBAAHB="H":3,1:"")
DO AAA^DVBHQM2
WRITE Y
+29 ;W !,"Rated (HINQ) Disabilities:" I $D(DVBDXNO),DVBDXNO'=0 D S1^DVBHQZ6
+30 IF $DATA(DVBSCR)
KILL DVBSCR
DO LINE
QUIT
+31 ;
+32 WRITE !!,"--- ",DVBON,"Patient Data",DVBOFF," ---"
+33 WRITE !,DVBON,"(1)",DVBOFF," Elig. Stat.: ",$EXTRACT(DVBDIQ(2,DFN,.3611,"E"),1,20)
XECUTE DVBLIT1
+34 WRITE ?38,"Elig. Stat. ent. by: ",$EXTRACT(DVBDIQ(2,DFN,.3616,"E"),1,18)
+35 WRITE !,?5,"Stat. date: ",DVBDIQ(2,DFN,.3612,"E")
+36 WRITE ?37,"Monetary Ben. Verif.: ",DVBDIQ(2,DFN,.306,"E")
+37 WRITE !,?3,"Verif. Meth.: ",$EXTRACT(DVBDIQ(2,DFN,.3615,"E"),1,50)
+38 WRITE ?44,"Patient Elig.: "
+39 IF $DATA(^DPT(DFN,"E",0))
IF +$PIECE(^(0),U,3)
Begin DoDot:1
+40 NEW DVBE1,DVBELIG,DVBER2,DVBQ
+41 DO GETS^DIQ(2,DFN_",","361*","EI","DVBELIG","DVBER2")
+42 NEW DVBCT
+43 SET (DVBCT,DVBE1)=""
+44 SET DVBQ=0
+45 FOR
SET DVBE1=$ORDER(DVBELIG(2.0361,DVBE1))
if 'DVBE1!(DVBQ=1)
QUIT
Begin DoDot:2
+46 IF DVBELIG(2.0361,DVBE1,.01,"I")'=+^DPT(DFN,"E",0)
SET DVBOH=DVBELIG(2.0361,DVBE1,.01,"E")
SET DVBQ=1
End DoDot:2
End DoDot:1
+47 WRITE $SELECT($GET(DVBOH)]"":$EXTRACT(DVBOH,1,18),1:"")
+48 WRITE !!,DVBON,"(2)",DVBOFF," Pat. Type: ",$EXTRACT(DVBDIQ(2,DFN,391,"E"),1,20)
XECUTE DVBLIT1
+49 WRITE ?36,"Vet.(Y/N)?: ",DVBDIQ(2,DFN,1901,"E")
+50 WRITE !,?4,"Ser. Con.: ",DVBDIQ(2,DFN,.301,"E")
+51 ;W ?40,"Ser. Con. %: ",DVBDIQ(2,DFN,.302,"E")
+52 WRITE ?36,"Elig. Code: ",$EXTRACT(DVBDIQ(2,DFN,.361,"E"),1,30)
+53 WRITE !!,DVBON,"(3)",DVBOFF," A&A: ",DVBDIQ(2,DFN,.36205,"E")
XECUTE DVBLIT1
+54 ;W ?18,"Amt.: $",$E(DVBDIQ(2,DFN,.3621,"E"),1,11)
+55 WRITE ?41,"VA Pension: ",DVBDIQ(2,DFN,.36235,"E")
+56 ;W ?58,"Amt.: $",$E(DVBDIQ(2,DFN,.3624,"E"),1,11)
+57 WRITE !,"House Bound: ",DVBDIQ(2,DFN,.36215,"E")
+58 ;W ?18,"Amt.: $",$E(DVBDIQ(2,DFN,.3622,"E"),1,11)
+59 WRITE ?38,"VA Disability: ",DVBDIQ(2,DFN,.3025,"E")
+60 ;W ?58,"Amt.: $",$E(DVBDIQ(2,DFN,.303,"E"),1,11)
+61 WRITE !,"Tot.Ann. VA Check Amt.: $",DVBDIQ(2,DFN,.36295,"E")
+62 SET NEW=DVBDIQ(2,DFN,.01,"E")
SET NEW2=DVBDIQ(2,DFN,.09,"E")
KILL DVBDIQ
+63 SET DVBDIQ(2,DFN,.01,"E")=NEW
SET DVBDIQ(2,DFN,.09,"E")=NEW2
KILL NEW,NEW2
QUIT
LINE WRITE !,"------------------------------------------------------------------------------"