1 | DVBHCE7 ; ;12/27/07
|
---|
2 | D DE G BEGIN
|
---|
3 | DE 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,1) S:%]"" DE(13)=% S %=$P(%Z,U,6) S:%]"" DE(6)=%
|
---|
5 | I $D(^(.36)) S %Z=^(.36) S %=$P(%Z,U,1) S:%]"" DE(16)=%
|
---|
6 | I $D(^(.361)) S %Z=^(.361) S %=$P(%Z,U,1) S:%]"" DE(1)=% S %=$P(%Z,U,2) S:%]"" DE(3)=% S %=$P(%Z,U,5) S:%]"" DE(4)=%
|
---|
7 | I $D(^("TYPE")) S %Z=^("TYPE") S %=$P(%Z,U,1) S:%]"" DE(11)=%
|
---|
8 | I $D(^("VET")) S %Z=^("VET") S %=$P(%Z,U,1) S:%]"" DE(12)=%
|
---|
9 | K %Z Q
|
---|
10 | ;
|
---|
11 | W W !?DL+DL-2,DLB_": "
|
---|
12 | Q
|
---|
13 | O D W W Y W:$X>45 !?9
|
---|
14 | I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
|
---|
15 | W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
|
---|
16 | TR R X:DTIME E S (DTOUT,X)=U W $C(7)
|
---|
17 | Q
|
---|
18 | A K DQ(DQ) S DQ=DQ+1
|
---|
19 | B G @DQ
|
---|
20 | RE G PR:$D(DE(DQ)) D W,TR
|
---|
21 | N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
|
---|
22 | RD G QS:X?."?" I X["^" D D G ^DIE17
|
---|
23 | I X="@" D D G Z^DIE2
|
---|
24 | I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
|
---|
25 | T 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
|
---|
26 | K DDER G X
|
---|
27 | P 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
|
---|
28 | G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
|
---|
29 | I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
|
---|
30 | V D @("X"_DQ) K YS
|
---|
31 | Z 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
|
---|
32 | X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
|
---|
33 | S X="?BAD"
|
---|
34 | QS S DZ=X D D,QQ^DIEQ G B
|
---|
35 | D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
|
---|
36 | Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
|
---|
37 | PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
|
---|
38 | R 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
|
---|
39 | 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
|
---|
40 | X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
|
---|
41 | RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
|
---|
42 | I I DV'["I",DV'["#" G RD
|
---|
43 | D E^DIE0 G RD:$D(X),PR
|
---|
44 | Q
|
---|
45 | SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
|
---|
46 | I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
|
---|
47 | D ^DIR I 'DDER S %=Y(0),X=Y
|
---|
48 | Q
|
---|
49 | SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
|
---|
50 | I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
|
---|
51 | E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
|
---|
52 | Q
|
---|
53 | NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
|
---|
54 | KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
|
---|
55 | BEGIN S DNM="DVBHCE7",DQ=1
|
---|
56 | 1 D:$D(DG)>9 F^DIE17,DE S DQ=1,DW=".361;1",DV="SX",DU="",DLB="ELIGIBILITY STATUS",DIFLD=.3611
|
---|
57 | S DE(DW)="C1^DVBHCE7"
|
---|
58 | S DU="P:PENDING VERIFICATION;R:PENDING RE-VERIFICATION;V:VERIFIED;"
|
---|
59 | G RE
|
---|
60 | C1 G C1S:$D(DE(1))[0 K DB
|
---|
61 | S X=DE(1),DIC=DIE
|
---|
62 | ;
|
---|
63 | S X=DE(1),DIC=DIE
|
---|
64 | ;
|
---|
65 | S X=DE(1),DIC=DIE
|
---|
66 | D EVENT^IVMPLOG(DA)
|
---|
67 | C1S S X="" G:DG(DQ)=X C1F1 K DB
|
---|
68 | S X=DG(DQ),DIC=DIE
|
---|
69 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.361)):^(.361),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y X ^DD(2,.3611,1,1,1.1) X ^DD(2,.3611,1,1,1.4)
|
---|
70 | S X=DG(DQ),DIC=DIE
|
---|
71 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.361)):^(.361),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X=DIV S X=DT X ^DD(2,.3611,1,2,1.4)
|
---|
72 | S X=DG(DQ),DIC=DIE
|
---|
73 | D EVENT^IVMPLOG(DA)
|
---|
74 | C1F1 Q
|
---|
75 | X1 D EK^DGLOCK Q:'$D(X)
|
---|
76 | Q
|
---|
77 | ;
|
---|
78 | 2 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=2 G A
|
---|
79 | 3 D:$D(DG)>9 F^DIE17,DE S DQ=3,DW=".361;2",DV="DX",DU="",DLB="ELIGIBILITY STATUS DATE",DIFLD=.3612
|
---|
80 | S DE(DW)="C3^DVBHCE7"
|
---|
81 | S X="TODAY"
|
---|
82 | S Y=X
|
---|
83 | G Y
|
---|
84 | C3 G C3S:$D(DE(3))[0 K DB
|
---|
85 | S X=DE(3),DIC=DIE
|
---|
86 | ;
|
---|
87 | S X=DE(3),DIC=DIE
|
---|
88 | D EVENT^IVMPLOG(DA)
|
---|
89 | C3S S X="" G:DG(DQ)=X C3F1 K DB
|
---|
90 | S X=DG(DQ),DIC=DIE
|
---|
91 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.361)):^(.361),1:"") S X=$P(Y(1),U,6),X=X S DIU=X K Y S X=DIV S X=$S(($D(DUZ)#2):DUZ,1:"") X ^DD(2,.3612,1,1,1.4)
|
---|
92 | S X=DG(DQ),DIC=DIE
|
---|
93 | D EVENT^IVMPLOG(DA)
|
---|
94 | C3F1 Q
|
---|
95 | X3 S %DT="E",%DT(0)=-DT D ^%DT K %DT S X=Y K:Y<1 X I $D(X) D EK^DGLOCK
|
---|
96 | Q
|
---|
97 | ;
|
---|
98 | 4 D:$D(DG)>9 F^DIE17,DE S DQ=4,DW=".361;5",DV="FX",DU="",DLB="ELIGIBILITY VERIF. METHOD",DIFLD=.3615
|
---|
99 | S DE(DW)="C4^DVBHCE7"
|
---|
100 | S X="HINQ"
|
---|
101 | S Y=X
|
---|
102 | G Y
|
---|
103 | C4 G C4S:$D(DE(4))[0 K DB
|
---|
104 | S X=DE(4),DIC=DIE
|
---|
105 | D EVENT^IVMPLOG(DA)
|
---|
106 | C4S S X="" G:DG(DQ)=X C4F1 K DB
|
---|
107 | S X=DG(DQ),DIC=DIE
|
---|
108 | D EVENT^IVMPLOG(DA)
|
---|
109 | C4F1 Q
|
---|
110 | X4 K:$L(X)>50!($L(X)<2) X I $D(X) D EK^DGLOCK
|
---|
111 | I $D(X),X'?.ANP K X
|
---|
112 | Q
|
---|
113 | ;
|
---|
114 | 5 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=5 G A
|
---|
115 | 6 D:$D(DG)>9 F^DIE17,DE S DQ=6,DW=".3;6",DV="DX",DU="",DLB="MONETARY BEN. VERIFY DATE",DIFLD=.306
|
---|
116 | S X="TODAY"
|
---|
117 | S Y=X
|
---|
118 | G Y
|
---|
119 | X6 S %DT="E",%DT(0)=-DT D ^%DT K %DT S X=Y K:Y<1 X I $D(X) D EK^DGLOCK
|
---|
120 | Q
|
---|
121 | ;
|
---|
122 | 7 S D=0 K DE(1) ;361
|
---|
123 | S DIFLD=361,DGO="^DVBHCE8",DC="3^2.0361IP^E^",DV="2.0361M*P8'X",DW="0;1",DOW="ELIGIBILITY",DLB="Select "_DOW S:D DC=DC_D
|
---|
124 | S DU="DIC(8,"
|
---|
125 | G RE:D I $D(DSC(2.0361))#2,$P(DSC(2.0361),"I $D(^UTILITY(",1)="" X DSC(2.0361) S D=$O(^(0)) S:D="" D=-1 G M7
|
---|
126 | S D=$S($D(^DPT(DA,"E",0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
|
---|
127 | M7 I D>0 S DC=DC_D I $D(^DPT(DA,"E",+D,0)) S DE(7)=$P(^(0),U,1)
|
---|
128 | G RE
|
---|
129 | R7 D DE
|
---|
130 | S D=$S($D(^DPT(DA,"E",0)):$P(^(0),U,3,4),1:1) G 7+1
|
---|
131 | ;
|
---|
132 | 8 S DQ=9 ;@205
|
---|
133 | 9 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
|
---|
134 | X9 I Z2'[2 S Y="@206"
|
---|
135 | Q
|
---|
136 | 10 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=10 D X10 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
|
---|
137 | X10 S DVBSCR=1 D ^DVBHS5 S DVBJ2=1
|
---|
138 | Q
|
---|
139 | 11 S DW="TYPE;1",DV="RP391'a",DU="",DLB="TYPE",DIFLD=391
|
---|
140 | S DE(DW)="C11^DVBHCE7",DE(DW,"INDEX")=1
|
---|
141 | S DU="DG(391,"
|
---|
142 | G RE
|
---|
143 | C11 G C11S:$D(DE(11))[0 K DB
|
---|
144 | S X=DE(11),DIC=DIE
|
---|
145 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF="391;" D AVAFC^VAFCDD01(DA)
|
---|
146 | S X=DE(11),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
147 | C11S S X="" G:DG(DQ)=X C11F1 K DB
|
---|
148 | S X=DG(DQ),DIC=DIE
|
---|
149 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF="391;" D AVAFC^VAFCDD01(DA)
|
---|
150 | I $D(DE(11))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
|
---|
151 | C11F1 N X,X1,X2 S DIXR=664 D C11X1(U) K X2 M X2=X D C11X1("O") K X1 M X1=X
|
---|
152 | I $G(X(1))]"" D
|
---|
153 | . K ^DPT("APTYPE",X,DA)
|
---|
154 | K X M X=X2 I $G(X(1))]"" D
|
---|
155 | . S ^DPT("APTYPE",X,DA)=""
|
---|
156 | G C11F2
|
---|
157 | C11X1(DION) K X
|
---|
158 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,391,DION),$P($G(^DPT(DA,"TYPE")),U,1))
|
---|
159 | S X=$G(X(1))
|
---|
160 | Q
|
---|
161 | C11F2 Q
|
---|
162 | X11 Q
|
---|
163 | 12 D:$D(DG)>9 F^DIE17,DE S DQ=12,DW="VET;1",DV="RSXa",DU="",DLB="VETERAN (Y/N)?",DIFLD=1901
|
---|
164 | S DE(DW)="C12^DVBHCE7"
|
---|
165 | S DU="Y:YES;N:NO;"
|
---|
166 | G RE
|
---|
167 | C12 G C12S:$D(DE(12))[0 K DB
|
---|
168 | S X=DE(12),DIC=DIE
|
---|
169 | S DFN=DA D EN^DGMTCOR K DGMTCOR
|
---|
170 | S X=DE(12),DIC=DIE
|
---|
171 | S DFN=DA D EN^DGRP7CC
|
---|
172 | S X=DE(12),DIC=DIE
|
---|
173 | ;
|
---|
174 | S X=DE(12),DIC=DIE
|
---|
175 | D AUTOUPD^DGENA2(DA)
|
---|
176 | S X=DE(12),DIC=DIE
|
---|
177 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF="1901;" D AVAFC^VAFCDD01(DA)
|
---|
178 | S X=DE(12),DIC=DIE
|
---|
179 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
180 | S X=DE(12),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
181 | C12S S X="" G:DG(DQ)=X C12F1 K DB
|
---|
182 | D ^DVBHCE9
|
---|
183 | C12F1 Q
|
---|
184 | X12 I $D(X) S:'$D(DPTX) DFN=DA D:'$D(^XUSEC("DG ELIGIBILITY",DUZ)) VAGE^DGLOCK:X="Y" I $D(X) D:$D(DFN) EV^DGLOCK
|
---|
185 | Q
|
---|
186 | ;
|
---|
187 | 13 D:$D(DG)>9 F^DIE17,DE S DQ=13,DW=".3;1",DV="RSXa",DU="",DLB="SERVICE CONNECTED?",DIFLD=.301
|
---|
188 | S DE(DW)="C13^DVBHCE7"
|
---|
189 | S DU="Y:YES;N:NO;"
|
---|
190 | G RE
|
---|
191 | C13 G C13S:$D(DE(13))[0 K DB
|
---|
192 | S X=DE(13),DIC=DIE
|
---|
193 | ;
|
---|
194 | S X=DE(13),DIC=DIE
|
---|
195 | ;
|
---|
196 | S X=DE(13),DIC=DIE
|
---|
197 | D AUTOUPD^DGENA2(DA)
|
---|
198 | S X=DE(13),DIC=DIE
|
---|
199 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".301;" D AVAFC^VAFCDD01(DA)
|
---|
200 | S X=DE(13),DIC=DIE
|
---|
201 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
202 | S X=DE(13),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
203 | C13S S X="" G:DG(DQ)=X C13F1 K DB
|
---|
204 | D ^DVBHCE10
|
---|
205 | C13F1 Q
|
---|
206 | X13 S DFN=DA D EV^DGLOCK I $D(X),X="Y" D VET^DGLOCK
|
---|
207 | Q
|
---|
208 | ;
|
---|
209 | 14 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
|
---|
210 | X14 I X="N" S Y="@2063"
|
---|
211 | Q
|
---|
212 | 15 S DQ=16 ;@2063
|
---|
213 | 16 D:$D(DG)>9 F^DIE17,DE S DQ=16,DW=".36;1",DV="*P8'Xa",DU="",DLB="PRIMARY ELIGIBILITY CODE",DIFLD=.361
|
---|
214 | S DE(DW)="C16^DVBHCE7"
|
---|
215 | S DU="DIC(8,"
|
---|
216 | G RE
|
---|
217 | C16 G C16S:$D(DE(16))[0 K DB
|
---|
218 | D ^DVBHCE11
|
---|
219 | C16S S X="" G:DG(DQ)=X C16F1 K DB
|
---|
220 | D ^DVBHCE12
|
---|
221 | C16F1 Q
|
---|
222 | X16 S DFN=DA D EV^DGLOCK I $D(X) D ECD^DGLOCK1
|
---|
223 | Q
|
---|
224 | ;
|
---|
225 | 17 S DQ=18 ;@206
|
---|
226 | 18 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=18 D X18 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
|
---|
227 | X18 I Z2'[3 S Y="@104"
|
---|
228 | Q
|
---|
229 | 19 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
|
---|
230 | X19 S DVBSCR=1 D ^DVBHS5 S DVBJ2=1
|
---|
231 | Q
|
---|
232 | 20 D:$D(DG)>9 F^DIE17 G ^DVBHCE13
|
---|