source: WorldVistAEHR/trunk/r/HINQ-DVB--DVBA--DVBE--DVBC/DVBHCE27.m@ 613

Last change on this file since 613 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 11.0 KB
Line 
1DVBHCE27 ; ;12/13/08
2 D DE G BEGIN
3DE S DIE="^DPT(",DIC=DIE,DP=2,DL=1,DIEL=0,DU="" K DG,DE,DB Q:$O(^DPT(DA,""))=""
4 I $D(^(.3)) S %Z=^(.3) S %=$P(%Z,U,2) S:%]"" DE(1)=% S %=$P(%Z,U,14) S:%]"" DE(2)=%
5 I $D(^(.362)) S %Z=^(.362) S %=$P(%Z,U,8) S:%]"" DE(28)=% S %=$P(%Z,U,9) S:%]"" DE(34)=% S %=$P(%Z,U,15) S:%]"" DE(16)=% S %=$P(%Z,U,18) S:%]"" DE(22)=%
6 K %Z Q
7 ;
8W W !?DL+DL-2,DLB_": "
9 Q
10O D W W Y W:$X>45 !?9
11 I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
12 W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
13TR R X:DTIME E S (DTOUT,X)=U W $C(7)
14 Q
15A K DQ(DQ) S DQ=DQ+1
16B G @DQ
17RE G PR:$D(DE(DQ)) D W,TR
18N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
19RD G QS:X?."?" I X["^" D D G ^DIE17
20 I X="@" D D G Z^DIE2
21 I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
22T G M^DIE17:DV,^DIE3:DV["V",P:DV'["S" X:$D(^DD(DP,DIFLD,12.1)) ^(12.1) I X?.ANP D SET I 'DDER X:$D(DIC("S")) DIC("S") I W:'$D(DB(DQ)) " "_% G V
23 K DDER G X
24P I DV["P" S DIC=U_DU,DIC(0)=$E("EN",$D(DB(DQ))+1)_"M"_$E("L",DV'["'") S:DIC(0)["L" DLAYGO=+$P(DV,"P",2) G:DV["*" AST^DIED D NOSCR^DIED S X=+Y,DIC=DIE G X:X<0
25 G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
26 I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
27V D @("X"_DQ) K YS
28Z K DIC("S"),DLAYGO I $D(X),X'=U D:$G(DE(DW,"INDEX")) SAVEVALS G:'$$KEYCHK UNIQFERR^DIE17 S DG(DW)=X S:DV["d" ^DISV(DUZ,"DIE",DLB)=X G A
29X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
30 S X="?BAD"
31QS S DZ=X D D,QQ^DIEQ G B
32D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
33Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
34PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
35R I DG["P",@("$D(^"_X_"0))") S X=+$P(^(0),U,2) G RP:'$D(^(Y,0)) S Y=$P(^(0),U),X=$P(^DD(X,.01,0),U,3),DG=$P(^(0),U,2) G R
36 I DG["V",+Y,$P(Y,";",2)["(",$D(@(U_$P(Y,";",2)_"0)")) S X=+$P(^(0),U,2) G RP:'$D(^(+Y,0)) S Y=$P(^(0),U) I $D(^DD(+X,.01,0)) S DG=$P(^(0),U,2),X=$P(^(0),U,3) G R
37 X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
38RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
39I I DV'["I",DV'["#" G RD
40 D E^DIE0 G RD:$D(X),PR
41 Q
42SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
43 I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
44 D ^DIR I 'DDER S %=Y(0),X=Y
45 Q
46SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
47 I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
48 E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
49 Q
50NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
51KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
52BEGIN S DNM="DVBHCE27",DQ=1
531 D:$D(DG)>9 F^DIE17,DE S DQ=1,DW=".3;2",DV="NJ3,0Xa",DU="",DLB="SERVICE CONNECTED PERCENTAGE",DIFLD=.302
54 S DE(DW)="C1^DVBHCE27"
55 S X=+$G(DVBDXPCT)
56 S Y=X
57 S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
58 G RD
59C1 G C1S:$D(DE(1))[0 K DB
60 S X=DE(1),DIC=DIE
61 ;
62 S X=DE(1),DIC=DIE
63 D AUTOUPD^DGENA2(DA)
64 S X=DE(1),DIC=DIE
65 ;
66 S X=DE(1),DIC=DIE
67 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".302;" D AVAFC^VAFCDD01(DA)
68 S X=DE(1),DIC=DIE
69 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
70 S X=DE(1),DIIX=2_U_DIFLD D AUDIT^DIET
71C1S S X="" G:DG(DQ)=X C1F1 K DB
72 S X=DG(DQ),DIC=DIE
73 ;
74 S X=DG(DQ),DIC=DIE
75 D AUTOUPD^DGENA2(DA)
76 S X=DG(DQ),DIC=DIE
77 X "S DFN=DA D EN^DGMTR K DGREQF"
78 S X=DG(DQ),DIC=DIE
79 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".302;" D AVAFC^VAFCDD01(DA)
80 S X=DG(DQ),DIC=DIE
81 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
82 I $D(DE(1))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
83C1F1 Q
84X1 S DFN=DA D EV^DGLOCK Q:'$D(X) K:+X'=X!(X>100)!(X<0)!(X?.E1"."1N.N) X I $D(X),$D(^DPT(DA,.3)),$P(^(.3),U,1)'="Y" W !?4,*7,"Only applies to service-connected applicants." K X
85 Q
86 ;
872 D:$D(DG)>9 F^DIE17,DE S DQ=2,DW=".3;14",DV="DX",DU="",DLB="EFF. DATE COMBINED SC% EVAL.",DIFLD=.3014
88 S X=$G(DVBEFF)
89 S Y=X
90 S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
91 G RD
92X2 S %DT="P" D ^%DT S X=Y K:Y<1!(Y>DT) X
93 Q
94 ;
953 S DQ=4 ;@46
964 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=4 D X4 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
97X4 S JP=$O(DVBDX(JP)) I 'JP S Y="@50"
98 Q
995 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=5 D X5 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
100X5 S JPP=+$P(DVBDX(JP),U,2) I JPP'>0 S Y="@46"
101 Q
1026 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=6 D X6 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
103X6 I '$D(^DIC(31,JPP)) D CHKDIS^DVBHS3 S Y="@46"
104 Q
1057 S D=0 K DE(1) ;.3721
106 S DIFLD=.3721,DGO="^DVBHCE28",DC="6^2.04P^.372^",DV="2.04MP31'X",DW="0;1",DOW="RATED DISABILITIES (VA)",DLB="Select "_DOW S:D DC=DC_D
107 S DU="DIC(31,"
108 G RE:D I $D(DSC(2.04))#2,$P(DSC(2.04),"I $D(^UTILITY(",1)="" X DSC(2.04) S D=$O(^(0)) S:D="" D=-1 G M7
109 S D=$S($D(^DPT(DA,.372,0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
110M7 I D>0 S DC=DC_D I $D(^DPT(DA,.372,+D,0)) S DE(7)=$P(^(0),U,1)
111 S X="""`"_$P(DVBDX(JP),U,2)_""""
112 S Y=X
113 S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
114 G RD
115R7 D DE
116 G A
117 ;
1188 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=8 D X8 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
119X8 W "." S DVBJ2=1
120 Q
1219 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=9 D X9 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
122X9 S Y="@46"
123 Q
12410 S DQ=11 ;@61
12511 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=11 D X11 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
126X11 S Y="@4"
127 Q
12812 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=12 D X12 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
129X12 I Z2'[1 S Y="@62"
130 Q
13113 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=13 D X13 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
132X13 I '$D(DVBSSA) S Y="@62",JP=JP+1
133 Q
13414 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=14 D X14 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
135X14 I DVBSSA S DVBYN="Y",DVBXYN=DVBSSA
136 Q
13715 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=15 D X15 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
138X15 I 'DVBSSA S DVBYN="N",DVBXYN=""
139 Q
14016 S DW=".362;15",DV="SX",DU="",DLB="RECEIVING SOCIAL SECURITY?",DIFLD=.36225
141 S DE(DW)="C16^DVBHCE27"
142 S DU="Y:YES;N:NO;U:UNKNOWN;"
143 S X=DVBYN
144 S Y=X
145 S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
146 G RD
147C16 G C16S:$D(DE(16))[0 K DB
148 S X=DE(16),DIC=DIE
149 X ^DD(2,.36225,1,1,2.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.362)):^(.362),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X="" X ^DD(2,.36225,1,1,2.4)
150C16S S X="" G:DG(DQ)=X C16F1 K DB
151 S X=DG(DQ),DIC=DIE
152 X ^DD(2,.36225,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.362)):^(.362),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X="" X ^DD(2,.36225,1,1,1.4)
153C16F1 Q
154X16 S DFN=DA D MV^DGLOCK Q
155 Q
156 ;
15717 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=17 D X17 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
158X17 W "." S JP=JP+1,DVBJ2=1 K DVBYN,DVBXYN
159 Q
16018 S DQ=19 ;@62
16119 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=19 D X19 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
162X19 I Z2'[2 S Y="@63"
163 Q
16420 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=20 D X20 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
165X20 I '$D(DVBRETT) S Y="@63",JP=JP+1
166 Q
16721 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=21 D X21 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
168X21 I DVBRETT=""!("BMCROX"'[DVBRETT) S Y="@63",JP=JP+1
169 Q
17022 D:$D(DG)>9 F^DIE17,DE S DQ=22,DW=".362;18",DV="SX",DU="",DLB="TYPE OF OTHER RETIREMENT",DIFLD=.36285
171 S DU="B:BLACK LUNG;M:MILITARY;C:CIVIL;R:RAILROAD;O:OTHER;X:COMBINATIONS OF TYPES;"
172 S X=DVBRETT
173 S Y=X
174 S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
175 G RD
176X22 S DFN=DA D MV^DGLOCK Q
177 Q
178 ;
17923 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=23 D X23 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
180X23 W "." S JP=JP+1,DVBJ2=1
181 Q
18224 S DQ=25 ;@63
18325 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=25 D X25 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
184X25 I Z2'[3 S Y="@64"
185 Q
18626 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=26 D X26 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
187X26 I '$D(DVBRETO) S Y="@64",JP=JP+1
188 Q
18927 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=27 D X27 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
190X27 S X=DVBRETO I X=""!(X=0) S X="@"
191 Q
19228 S DW=".362;8",DV="NJ8,2X",DU="",DLB="AMOUNT OF OTHER RETIREMENT",DIFLD=.3628
193 S X=X
194 S Y=X
195 S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
196 G RD
197X28 D DOL^DGLOCK2 K:+X'=X&(X'?.N1"."2N)!(X>99999)!(X<1) X I $D(X) S DFN=DA D MV^DGLOCK
198 Q
199 ;
20029 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=29 D X29 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
201X29 W "." S JP=JP+1,DVBJ2=1
202 Q
20330 S DQ=31 ;@64
20431 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=31 D X31 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
205X31 I Z2'[4 S Y="@1006"
206 Q
20732 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=32 D X32 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
208X32 I '$D(DVBOINC) S Y="@1006",JP=JP+1
209 Q
21033 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=33 D X33 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
211X33 S X=DVBOINC I X=""!(X=0) S X="@"
212 Q
21334 S DW=".362;9",DV="NJ8,2X",DU="",DLB="AMOUNT OF OTHER INCOME",DIFLD=.3629
214 S X=X
215 S Y=X
216 S X=Y,DB(DQ)=1 G:X="" N^DIE17:DV,A I $D(DE(DQ)),DV["I"!(DV["#") D E^DIE0 G A:'$D(X)
217 G RD
218X34 D DOL^DGLOCK2 K:+X'=X&(X'?.N1"."2N)!(X>999999)!(X<1) X
219 Q
220 ;
22135 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=35 D X35 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
222X35 W "." S JP=JP+1,DVBJ2=1,Y="@1006"
223 Q
22436 S DQ=37 ;@4
22537 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=37 D X37 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
226X37 S Y=$S(DVBJS=11:"@1",DVBJS=28:"@2",DVBJS=35:"@3",DVBJS=44:"@104",1:"@10")
227 Q
22838 S DQ=39 ;@70
22939 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=39 D X39 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
230X39 W !!,*7,"HINQ contains SC disabilities, Patient is NSC no updating allowed. Check patient's SERVICE CONNECTION, ELIGIBILITY CODE, VET STATUS, or PATIENT TYPE. Screen 5 contains this."
231 Q
23240 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=40 D X40 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
233X40 R !!,?25,"<RET> to continue.",ZZ:DTIME K ZZ,JP3,JP4
234 Q
23541 S DQ=42 ;@50
23642 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=42 D X42 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
237X42 K DVBJX,JP,JPP S Y=$S(DVBJS=28:"@1",DVBJS=35:"@2",1:"@10")
238 Q
23943 S DQ=44 ;@10
24044 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=44 D X44 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
241X44 I $G(DVBRADL)]"" D DX^DVBHQEDT(DVBRADL)
242 Q
24345 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=45 D X45 D:$D(DIEFIRE)#2 FIREREC^DIE17 G A:$D(Y)[0,A:Y=U S X=Y,DIC(0)="F",DW=DQ G OUT^DIE17
244X45 K DVBRADL
245 Q
24646 G 0^DIE17
Note: See TracBrowser for help on using the repository browser.