source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRPTX17.m@ 1169

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

initial load of FOIAVistA 6/30/08 version

File size: 8.4 KB
Line 
1DGRPTX17 ; ;04/10/06
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,1) S:%]"" DE(7)=% S %=$P(%Z,U,2) S:%]"" DE(9)=%
5 I $D(^(.321)) S %Z=^(.321) S %=$P(%Z,U,2) S:%]"" DE(3)=% S %=$P(%Z,U,3) S:%]"" DE(4)=%
6 I $D(^(.322)) S %Z=^(.322) S %=$P(%Z,U,13) S:%]"" DE(5)=%
7 I $D(^(.36)) S %Z=^(.36) S %=$P(%Z,U,2) S:%]"" DE(6)=%
8 I $D(^(.362)) S %Z=^(.362) S %=$P(%Z,U,12) S:%]"" DE(11)=% S %=$P(%Z,U,13) S:%]"" DE(12)=%
9 I $D(^(.53)) S %Z=^(.53) S %=$P(%Z,U,4) S:%]"" DE(1)=%
10 K %Z Q
11 ;
12W W !?DL+DL-2,DLB_": "
13 Q
14O D W W Y W:$X>45 !?9
15 I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
16 W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
17TR R X:DTIME E S (DTOUT,X)=U W $C(7)
18 Q
19A K DQ(DQ) S DQ=DQ+1
20B G @DQ
21RE G PR:$D(DE(DQ)) D W,TR
22N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
23RD G QS:X?."?" I X["^" D D G ^DIE17
24 I X="@" D D G Z^DIE2
25 I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
26T 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
27 K DDER G X
28P 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
29 G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
30 I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
31V D @("X"_DQ) K YS
32Z 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
33X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
34 S X="?BAD"
35QS S DZ=X D D,QQ^DIEQ G B
36D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
37Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
38PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
39R 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
40 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
41 X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
42RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
43I I DV'["I",DV'["#" G RD
44 D E^DIE0 G RD:$D(X),PR
45 Q
46SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
47 I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
48 D ^DIR I 'DDER S %=Y(0),X=Y
49 Q
50SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
51 I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
52 E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
53 Q
54NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
55KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
56BEGIN S DNM="DGRPTX17",DQ=1
571 S DW=".53;4",DV="P4'",DU="",DLB="PH DIVISION",DIFLD=.535
58 S DU="DIC(4,"
59 S X=$$DIV^DGRPLE()
60 S Y=X
61 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)
62 G RD
63X1 Q
642 S DQ=3 ;@53
653 S DW=".321;2",DV="RSX",DU="",DLB="AGENT ORANGE EXPOS. INDICATED?",DIFLD=.32102
66 S DE(DW)="C3^DGRPTX17"
67 S DU="Y:YES;N:NO;U:UNKNOWN;"
68 G RE
69C3 G C3S:$D(DE(3))[0 K DB
70 S X=DE(3),DIC=DIE
71 ;
72 S X=DE(3),DIC=DIE
73 ;
74 S X=DE(3),DIC=DIE
75 ;
76 S X=DE(3),DIC=DIE
77 D AUTOUPD^DGENA2(DA)
78 S X=DE(3),DIC=DIE
79 ;
80C3S S X="" G:DG(DQ)=X C3F1 K DB
81 S X=DG(DQ),DIC=DIE
82 X ^DD(2,.32102,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.321)):^(.321),1:"") S X=$P(Y(1),U,7) S DIU=X K Y S X=DIV S X="" X ^DD(2,.32102,1,1,1.4)
83 S X=DG(DQ),DIC=DIE
84 X ^DD(2,.32102,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.321)):^(.321),1:"") S X=$P(Y(1),U,9) S DIU=X K Y S X=DIV S X="" X ^DD(2,.32102,1,2,1.4)
85 S X=DG(DQ),DIC=DIE
86 X ^DD(2,.32102,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.321)):^(.321),1:"") S X=$P(Y(1),U,10) S DIU=X K Y S X=DIV S X="" X ^DD(2,.32102,1,3,1.4)
87 S X=DG(DQ),DIC=DIE
88 D AUTOUPD^DGENA2(DA)
89 S X=DG(DQ),DIC=DIE
90 X ^DD(2,.32102,1,5,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.321)):^(.321),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X="" S DIH=$G(^DPT(DIV(0),.321)),DIV=X S $P(^(.321),U,13)=DIV,DIH=2,DIG=.3213 D ^DICR
91C3F1 Q
92X3 S DFN=DA D SV^DGLOCK
93 Q
94 ;
954 D:$D(DG)>9 F^DIE17,DE S DQ=4,DW=".321;3",DV="RSX",DU="",DLB="RADIATION EXPOSURE INDICATED?",DIFLD=.32103
96 S DE(DW)="C4^DGRPTX17"
97 S DU="Y:YES;N:NO;U:UNKNOWN;"
98 G RE
99C4 G C4S:$D(DE(4))[0 K DB
100 S X=DE(4),DIC=DIE
101 ;
102 S X=DE(4),DIC=DIE
103 ;
104 S X=DE(4),DIC=DIE
105 D AUTOUPD^DGENA2(DA)
106C4S S X="" G:DG(DQ)=X C4F1 K DB
107 S X=DG(DQ),DIC=DIE
108 X ^DD(2,.32103,1,1,1.3) I X S X=DIV S Y(2)=";"_$S($D(^DD(2,.3212,0)):$P(^(0),U,3),1:""),Y(1)=$S($D(^DPT(D0,.321)):^(.321),1:"") S X=$P($P(Y(2),";"_$P(Y(1),U,12)_":",2),";",1) S DIU=X K Y S X=DIV S X="" X ^DD(2,.32103,1,1,1.4)
109 S X=DG(DQ),DIC=DIE
110 X ^DD(2,.32103,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.321)):^(.321),1:"") S X=$P(Y(1),U,11) S DIU=X K Y S X=DIV S X="" X ^DD(2,.32103,1,2,1.4)
111 S X=DG(DQ),DIC=DIE
112 D AUTOUPD^DGENA2(DA)
113C4F1 Q
114X4 S DFN=DA D SV^DGLOCK
115 Q
116 ;
1175 D:$D(DG)>9 F^DIE17,DE S DQ=5,DW=".322;13",DV="RSX",DU="",DLB="ENVIRONMENTAL CONTAMINANTS?",DIFLD=.322013
118 S DE(DW)="C5^DGRPTX17"
119 S DU="Y:YES;N:NO;U:UNKNOWN;"
120 G RE
121C5 G C5S:$D(DE(5))[0 K DB
122 S X=DE(5),DIC=DIE
123 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.322)):^(.322),1:"") S X=$P(Y(1),U,14),X=X S DIU=X K Y S X="" X ^DD(2,.322013,1,1,2.4)
124 S X=DE(5),DIC=DIE
125 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.322)):^(.322),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X="" X ^DD(2,.322013,1,2,2.4)
126 S X=DE(5),DIC=DIE
127 D AUTOUPD^DGENA2(DA)
128C5S S X="" G:DG(DQ)=X C5F1 K DB
129 S X=DG(DQ),DIC=DIE
130 X ^DD(2,.322013,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.322)):^(.322),1:"") S X=$P(Y(1),U,14),X=X S DIU=X K Y S X="" X ^DD(2,.322013,1,1,1.4)
131 S X=DG(DQ),DIC=DIE
132 X ^DD(2,.322013,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.322)):^(.322),1:"") S X=$P(Y(1),U,15),X=X S DIU=X K Y S X="" X ^DD(2,.322013,1,2,1.4)
133 S X=DG(DQ),DIC=DIE
134 D AUTOUPD^DGENA2(DA)
135C5F1 Q
136X5 S DFN=DA D SV^DGLOCK
137 Q
138 ;
1396 D:$D(DG)>9 F^DIE17,DE S DQ=6,DW=".36;2",DV="RSX",DU="",DLB="DISABILITY RET. FROM MILITARY?",DIFLD=.362
140 S DE(DW)="C6^DGRPTX17"
141 S DU="0:NO;1:YES, RECEIVING MILITARY RETIREMENT;2:YES, RECEIVING MILITARY RETIREMENT IN LIEU OF VA COMPENSATION;3:UNKNOWN;"
142 G RE
143C6 G C6S:$D(DE(6))[0 K DB
144 S X=DE(6),DIC=DIE
145 ;
146 S X=DE(6),DIC=DIE
147 D AUTOUPD^DGENA2(DA)
148C6S S X="" G:DG(DQ)=X C6F1 K DB
149 S X=DG(DQ),DIC=DIE
150 X "S DFN=DA D EN^DGMTR K DGREQF"
151 S X=DG(DQ),DIC=DIE
152 D AUTOUPD^DGENA2(DA)
153C6F1 Q
154X6 S DFN=DA D SV^DGLOCK
155 Q
156 ;
1577 D:$D(DG)>9 F^DIE17,DE S DQ=7,DW=".3;1",DV="RSXa",DU="",DLB="SERVICE CONNECTED?",DIFLD=.301
158 S DE(DW)="C7^DGRPTX17"
159 S DU="Y:YES;N:NO;"
160 G RE
161C7 G C7S:$D(DE(7))[0 K DB
162 S X=DE(7),DIC=DIE
163 ;
164 S X=DE(7),DIC=DIE
165 ;
166 S X=DE(7),DIC=DIE
167 D AUTOUPD^DGENA2(DA)
168 S X=DE(7),DIC=DIE
169 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".301;" D AVAFC^VAFCDD01(DA)
170 S X=DE(7),DIC=DIE
171 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
172 S X=DE(7),DIIX=2_U_DIFLD D AUDIT^DIET
173C7S S X="" G:DG(DQ)=X C7F1 K DB
174 D ^DGRPTX18
175C7F1 Q
176X7 S DFN=DA D EV^DGLOCK I $D(X),X="Y" D VET^DGLOCK
177 Q
178 ;
1798 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
180X8 S:X'="Y" Y="@50"
181 Q
1829 D:$D(DG)>9 F^DIE17,DE S DQ=9,DW=".3;2",DV="NJ3,0Xa",DU="",DLB="SERVICE CONNECTED PERCENTAGE",DIFLD=.302
183 S DE(DW)="C9^DGRPTX17"
184 G RE
185C9 G C9S:$D(DE(9))[0 K DB
186 S X=DE(9),DIC=DIE
187 ;
188 S X=DE(9),DIC=DIE
189 D AUTOUPD^DGENA2(DA)
190 S X=DE(9),DIC=DIE
191 ;
192 S X=DE(9),DIC=DIE
193 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".302;" D AVAFC^VAFCDD01(DA)
194 S X=DE(9),DIC=DIE
195 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
196 S X=DE(9),DIIX=2_U_DIFLD D AUDIT^DIET
197C9S S X="" G:DG(DQ)=X C9F1 K DB
198 D ^DGRPTX19
199C9F1 Q
200X9 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
201 Q
202 ;
20310 S DQ=11 ;@50
20411 D:$D(DG)>9 F^DIE17,DE S DQ=11,DW=".362;12",DV="SX",DU="",DLB="RECEIVING A&A BENEFITS?",DIFLD=.36205
205 S DE(DW)="C11^DGRPTX17"
206 S DU="Y:YES;N:NO;U:UNKNOWN;"
207 G RE
208C11 G C11S:$D(DE(11))[0 K DB
209 D ^DGRPTX20
210C11S S X="" G:DG(DQ)=X C11F1 K DB
211 D ^DGRPTX21
212C11F1 Q
213X11 S DFN=DA D MV^DGLOCK I $D(X) S DFN=DA D EV^DGLOCK
214 Q
215 ;
21612 D:$D(DG)>9 F^DIE17,DE S DQ=12,DW=".362;13",DV="SX",DU="",DLB="RECEIVING HOUSEBOUND BENEFITS?",DIFLD=.36215
217 S DE(DW)="C12^DGRPTX17"
218 S DU="Y:YES;N:NO;U:UNKNOWN;"
219 G RE
220C12 G C12S:$D(DE(12))[0 K DB
221 D ^DGRPTX22
222C12S S X="" G:DG(DQ)=X C12F1 K DB
223 D ^DGRPTX23
224C12F1 Q
225X12 S DFN=DA D MV^DGLOCK I $D(X) S DFN=DA D EV^DGLOCK
226 Q
227 ;
22813 D:$D(DG)>9 F^DIE17 G ^DGRPTX24
Note: See TracBrowser for help on using the repository browser.