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

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

initial load of WorldVistAEHR

File size: 7.8 KB
Line 
1GRPX7 ; GENERATED FROM 'DG LOAD EDIT SCREEN 7' INPUT TEMPLATE(#420), FILE 2;11/21/01
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(^(.29)) S %Z=^(.29) S %=$P(%Z,U,1) S:%]"" DE(14)=% S %=$P(%Z,U,2) S:%]"" DE(13)=% S %=$P(%Z,U,12) S:%]"" DE(11)=%
5 I $D(^(.3)) S %Z=^(.3) S %=$P(%Z,U,1) S:%]"" DE(5)=% S %=$P(%Z,U,2) S:%]"" DE(7)=% S %=$P(%Z,U,4) S:%]"" DE(8)=% S %=$P(%Z,U,5) S:%]"" DE(9)=% S %=$P(%Z,U,12) S:%]"" DE(10)=%
6 I $D(^("TYPE")) S %Z=^("TYPE") S %=$P(%Z,U,1) S:%]"" DE(2)=%
7 I $D(^("VET")) S %Z=^("VET") S %=$P(%Z,U,1) S:%]"" DE(4)=%
8 K %Z Q
9 ;
10W W !?DL+DL-2,DLB_": "
11 Q
12O D W W Y W:$X>45 !?9
13 I $L(Y)>19,'DV,DV'["I",(DV["F"!(DV["K")) G RW^DIR2
14 W:Y]"" "// " I 'DV,DV["I",$D(DE(DQ))#2 S X="" W " (No Editing)" Q
15TR R X:DTIME E S (DTOUT,X)=U W $C(7)
16 Q
17A K DQ(DQ) S DQ=DQ+1
18B G @DQ
19RE G PR:$D(DE(DQ)) D W,TR
20N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
21RD G QS:X?."?" I X["^" D D G ^DIE17
22 I X="@" D D G Z^DIE2
23 I X=" ",DV["d",DV'["P",$D(^DISV(DUZ,"DIE",DLB)) S X=^(DLB) I DV'["D",DV'["S" W " "_X
24T 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
25 K DDER G X
26P 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
27 G V:DV'["N" D D I $L($P(X,"."))>24 K X G Z
28 I $P(DQ(DQ),U,5)'["$",X?.1"-".N.1".".N,$P(DQ(DQ),U,5,99)["+X'=X" S X=+X
29V D @("X"_DQ) K YS
30Z 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
31X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
32 S X="?BAD"
33QS S DZ=X D D,QQ^DIEQ G B
34D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
35Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
36PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
37R 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
38 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
39 X:DG["D" ^DD("DD") I DG["S" S %=$P($P(";"_X,";"_Y_":",2),";") S:%]"" Y=%
40RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
41I I DV'["I",DV'["#" G RD
42 D E^DIE0 G RD:$D(X),PR
43 Q
44SET N DIR S DIR(0)="SV"_$E("o",$D(DB(DQ)))_U_DU,DIR("V")=1
45 I $D(DB(DQ)),'$D(DIQUIET) N DIQUIET S DIQUIET=1
46 D ^DIR I 'DDER S %=Y(0),X=Y
47 Q
48SAVEVALS S @DIEZTMP@("V",DP,DIIENS,DIFLD,"O")=$G(DE(DQ)) S:$D(^("F"))[0 ^("F")=$G(DE(DQ))
49 I $D(DE(DW,"4/")) S @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")=""
50 E K @DIEZTMP@("V",DP,DIIENS,DIFLD,"4/")
51 Q
52NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
53KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
54BEGIN S DNM="GRPX7",DQ=1
55 N DIEZTMP,DIEZAR,DIEZRXR,DIIENS,DIXR K DIEFIRE,DIEBADK S DIEZTMP=$$GETTMP^DIKC1("DIEZ")
56 M DIEZAR=^DIE(420,"AR") S DICRREC="TRIG^DIE17"
57 S:$D(DTIME)[0 DTIME=300 S D0=DA,DIIENS=DA_",",DIEZ=420,U="^"
581 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=1 D X1 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
59X1 S:DGDR'["701" Y="@702"
60 Q
612 S DW="TYPE;1",DV="RP391'a",DU="",DLB="TYPE",DIFLD=391
62 S DE(DW)="C2^GRPX7"
63 S DU="DG(391,"
64 G RE
65C2 G C2S:$D(DE(2))[0 K DB
66 S X=DE(2),DIC=DIE
67 I ($T(AVAFC^VAFCDD01)'="") S VAFCF="391;" D AVAFC^VAFCDD01(DA)
68 S X=DE(2),DIIX=2_U_DIFLD D AUDIT^DIET
69C2S S X="" Q:DG(DQ)=X K DB
70 S X=DG(DQ),DIC=DIE
71 I ($T(AVAFC^VAFCDD01)'="") S VAFCF="391;" D AVAFC^VAFCDD01(DA)
72 I $D(DE(2))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
73 Q
74X2 Q
753 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=3 D X3 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
76X3 D SC7^DGRPV
77 Q
784 D:$D(DG)>9 F^DIE17,DE S DQ=4,DW="VET;1",DV="RSXa",DU="",DLB="VETERAN (Y/N)?",DIFLD=1901
79 S DE(DW)="C4^GRPX7"
80 S DU="Y:YES;N:NO;"
81 G RE
82C4 G C4S:$D(DE(4))[0 K DB
83 S X=DE(4),DIC=DIE
84 S DFN=DA D EN^DGMTCOR K DGMTCOR
85 S X=DE(4),DIC=DIE
86 ;
87 S X=DE(4),DIC=DIE
88 D AUTOUPD^DGENA2(DA)
89 S X=DE(4),DIC=DIE
90 I ($T(AVAFC^VAFCDD01)'="") S VAFCF="1901;" D AVAFC^VAFCDD01(DA)
91 S X=DE(4),DIC=DIE
92 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
93 S X=DE(4),DIIX=2_U_DIFLD D AUDIT^DIET
94C4S S X="" Q:DG(DQ)=X K DB
95 S X=DG(DQ),DIC=DIE
96 S DFN=DA D EN^DGMTCOR K DGMTCOR
97 S X=DG(DQ),DIC=DIE
98 X ^DD(2,1901,1,3,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.3)):^(.3),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y S X=DIV S X="N" X ^DD(2,1901,1,3,1.4)
99 S X=DG(DQ),DIC=DIE
100 D AUTOUPD^DGENA2(DA)
101 S X=DG(DQ),DIC=DIE
102 I ($T(AVAFC^VAFCDD01)'="") S VAFCF="1901;" D AVAFC^VAFCDD01(DA)
103 S X=DG(DQ),DIC=DIE
104 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
105 I $D(DE(4))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
106 Q
107X4 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
108 Q
109 ;
1105 D:$D(DG)>9 F^DIE17,DE S DQ=5,DW=".3;1",DV="RSXa",DU="",DLB="SERVICE CONNECTED?",DIFLD=.301
111 S DE(DW)="C5^GRPX7"
112 S DU="Y:YES;N:NO;"
113 G RE
114C5 G C5S:$D(DE(5))[0 K DB
115 S X=DE(5),DIC=DIE
116 ;
117 S X=DE(5),DIC=DIE
118 ;
119 S X=DE(5),DIC=DIE
120 D AUTOUPD^DGENA2(DA)
121 S X=DE(5),DIC=DIE
122 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".301;" D AVAFC^VAFCDD01(DA)
123 S X=DE(5),DIC=DIE
124 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
125 S X=DE(5),DIIX=2_U_DIFLD D AUDIT^DIET
126C5S S X="" Q:DG(DQ)=X K DB
127 S X=DG(DQ),DIC=DIE
128 X ^DD(2,.301,1,1,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.3)):^(.3),1:"") S X=$P(Y(1),U,2),X=X S DIU=X K Y S X="" X ^DD(2,.301,1,1,1.4)
129 S X=DG(DQ),DIC=DIE
130 X ^DD(2,.301,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.3)):^(.3),1:"") S X=$P(Y(1),U,12),X=X S DIU=X K Y S X="" X ^DD(2,.301,1,2,1.4)
131 S X=DG(DQ),DIC=DIE
132 D AUTOUPD^DGENA2(DA)
133 S X=DG(DQ),DIC=DIE
134 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".301;" D AVAFC^VAFCDD01(DA)
135 S X=DG(DQ),DIC=DIE
136 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
137 I $D(DE(5))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
138 Q
139X5 S DFN=DA D EV^DGLOCK I $D(X),X="Y" D VET^DGLOCK
140 Q
141 ;
1426 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
143X6 S:X'="Y" Y=.293
144 Q
1457 D:$D(DG)>9 F^DIE17,DE S DQ=7,DW=".3;2",DV="NJ3,0Xa",DU="",DLB="SERVICE CONNECTED PERCENTAGE",DIFLD=.302
146 S DE(DW)="C7^GRPX7"
147 G RE
148C7 G C7S:$D(DE(7))[0 K DB
149 S X=DE(7),DIC=DIE
150 ;
151 S X=DE(7),DIC=DIE
152 D AUTOUPD^DGENA2(DA)
153 S X=DE(7),DIC=DIE
154 ;
155 S X=DE(7),DIC=DIE
156 D:($T(AVAFC^VAFCDD01)'="") AVAFC^VAFCDD01(DA)
157 S X=DE(7),DIC=DIE
158 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
159 S X=DE(7),DIIX=2_U_DIFLD D AUDIT^DIET
160C7S S X="" Q:DG(DQ)=X K DB
161 S X=DG(DQ),DIC=DIE
162 ;
163 S X=DG(DQ),DIC=DIE
164 D AUTOUPD^DGENA2(DA)
165 S X=DG(DQ),DIC=DIE
166 X "S DFN=DA D EN^DGMTR K DGREQF"
167 S X=DG(DQ),DIC=DIE
168 D:($T(AVAFC^VAFCDD01)'="") AVAFC^VAFCDD01(DA)
169 S X=DG(DQ),DIC=DIE
170 D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
171 I $D(DE(7))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
172 Q
173X7 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
174 Q
175 ;
1768 D:$D(DG)>9 F^DIE17,DE S DQ=8,DW=".3;4",DV="S",DU="",DLB="P&T",DIFLD=.304
177 S DU="Y:YES;N:NO;"
178 G RE
179X8 Q
1809 S DW=".3;5",DV="S",DU="",DLB="UNEMPLOYABLE",DIFLD=.305
181 S DU="Y:YES;N:NO;"
182 G RE
183X9 Q
18410 S DW=".3;12",DV="DX",DU="",DLB="SC AWARD DATE",DIFLD=.3012
185 G RE
186X10 S %DT="E" D ^%DT S X=Y K:Y<1 X N DFN S DFN=DA D SC^DGLOCK1
187 Q
188 ;
18911 S DW=".29;12",DV="S",DU="",DLB="RATED INCOMPETENT?",DIFLD=.293
190 S DU="0:NO;1:YES;"
191 G RE
192X11 Q
19312 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
194X12 S:'X Y=.313
195 Q
19613 S DW=".29;2",DV="D",DU="",DLB="DATE RULED INCOMPETENT (CIVIL)",DIFLD=.292
197 G RE
198X13 S %DT="E" D ^%DT S X=Y K:Y<1 X
199 Q
200 ;
20114 S DW=".29;1",DV="D",DU="",DLB="DATE RULED INCOMPETENT (VA)",DIFLD=.291
202 G RE
203X14 S %DT="E" D ^%DT S X=Y K:Y<1 X
204 Q
205 ;
20615 D:$D(DG)>9 F^DIE17 G ^GRPX71
Note: See TracBrowser for help on using the repository browser.