source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRPX710.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.3 KB
Line 
1DGRPX710 ; ;06/27/07
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,9) S:%]"" DE(8)=%
5 I $D(^(.32)) S %Z=^(.32) S %=$P(%Z,U,3) S:%]"" DE(10)=%
6 I $D(^(.36)) S %Z=^(.36) S %=$P(%Z,U,1) S:%]"" DE(6)=%
7 I $D(^(.362)) S %Z=^(.362) S %=$P(%Z,U,6) S:%]"" DE(3)=% S %=$P(%Z,U,17) S:%]"" DE(1)=%
8 I $D(^("ODS")) S %Z=^("ODS") S %=$P(%Z,U,2) S:%]"" DE(12)=% S %=$P(%Z,U,3) S:%]"" DE(13)=%
9 K %Z Q
10 ;
11W W !?DL+DL-2,DLB_": "
12 Q
13O 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
16TR R X:DTIME E S (DTOUT,X)=U W $C(7)
17 Q
18A K DQ(DQ) S DQ=DQ+1
19B G @DQ
20RE G PR:$D(DE(DQ)) D W,TR
21N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
22RD 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
25T 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
27P 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
30V D @("X"_DQ) K YS
31Z 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
32X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
33 S X="?BAD"
34QS S DZ=X D D,QQ^DIEQ G B
35D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
36Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
37PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
38R 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=%
41RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
42I I DV'["I",DV'["#" G RD
43 D E^DIE0 G RD:$D(X),PR
44 Q
45SET 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
49SAVEVALS 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
53NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
54KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
55BEGIN S DNM="DGRPX710",DQ=1
561 D:$D(DG)>9 F^DIE17,DE S DQ=1,DW=".362;17",DV="SX",DU="",DLB="GI INSURANCE POLICY?",DIFLD=.36265
57 S DE(DW)="C1^DGRPX710"
58 S DU="Y:YES;N:NO;U:UNKNOWN;"
59 G RE
60C1 G C1S:$D(DE(1))[0 K DB
61 S X=DE(1),DIC=DIE
62 X ^DD(2,.36265,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,6),X=X S DIU=X K Y S X="" X ^DD(2,.36265,1,1,2.4)
63C1S S X="" G:DG(DQ)=X C1F1 K DB
64 S X=DG(DQ),DIC=DIE
65 X ^DD(2,.36265,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,6),X=X S DIU=X K Y S X="" X ^DD(2,.36265,1,1,1.4)
66C1F1 Q
67X1 S DFN=DA D MV^DGLOCK Q
68 Q
69 ;
702 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=2 D X2 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
71X2 S:X'="Y" Y="@703"
72 Q
733 D:$D(DG)>9 F^DIE17,DE S DQ=3,DW=".362;6",DV="NJ8,2X",DU="",DLB="AMOUNT OF GI INSURANCE",DIFLD=.3626
74 G RE
75X3 D DOL^DGLOCK2 K:+X'=X&(X'?.N1"."2N)!(X>999999)!(X<1) X I $D(X) S DFN=DA D MV^DGLOCK I $D(X),$D(^DPT(DA,.362)),$P(^(.362),U,17)'="Y" W !?4,*7,"Applicant doesn't have GI Insurance." K X
76 Q
77 ;
784 S DQ=5 ;@703
795 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
80X5 S:DGDR'["703" Y="@704"
81 Q
826 S DW=".36;1",DV="*P8'Xa",DU="",DLB="PRIMARY ELIGIBILITY CODE",DIFLD=.361
83 S DE(DW)="C6^DGRPX710"
84 S DU="DIC(8,"
85 G RE
86C6 G C6S:$D(DE(6))[0 K DB
87 S X=DE(6),DIC=DIE
88 ;
89 S X=DE(6),DIC=DIE
90 K DIV S DIV=X,D0=DA,DIV(0)=D0 X ^DD(2,.361,1,2,2.2) I DIV(1)>0 S DIK(0)=DA,DIK="^DPT(DIV(0),""E"",",DA(1)=DIV(0),DA=DIV(1) D ^DIK S DA=DIK(0) K DIK
91 S X=DE(6),DIC=DIE
92 X "I $S('$D(^DIC(8,+X,0)):0,$P(^(0),""^"",1)[""DOM"":0,'$D(^DPT(DA,.36)):1,'$D(^DIC(8,+^(.36),0)):1,$P(^(0),""^"",1)'[""DOM"":1,1:0) S DGXRF=.361 D ^DGDDC Q"
93 S X=DE(6),DIC=DIE
94 K ^DPT("AEL",DA,+X)
95 S X=DE(6),DIC=DIE
96 D AUTOUPD^DGENA2(DA)
97 S X=DE(6),DIIX=2_U_DIFLD D AUDIT^DIET
98C6S S X="" G:DG(DQ)=X C6F1 K DB
99 S X=DG(DQ),DIC=DIE
100 X "S DFN=DA D EN^DGMTR K DGREQF"
101 S X=DG(DQ),DIC=DIE
102 K DIV S DIV=X,D0=DA,DIV(0)=D0 X ^DD(2,.361,1,2,89.4) S Y(102)=$S($D(^DPT(D0,"E",D1,0)):^(0),1:"") S X=$S('$D(^DIC(8,+$P(Y(102),U,1),0)):"",1:$P(^(0),U,1)) S D0=I(0,0) S D1=I(1,0) S DIU=X K Y S X=DIV S X=DIV,X=X X ^DD(2,.361,1,2,1.4)
103 S X=DG(DQ),DIC=DIE
104 ;
105 S X=DG(DQ),DIC=DIE
106 S ^DPT("AEL",DA,+X)=""
107 S X=DG(DQ),DIC=DIE
108 D AUTOUPD^DGENA2(DA)
109 I $D(DE(6))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
110C6F1 Q
111X6 S DFN=DA D EV^DGLOCK I $D(X) D ECD^DGLOCK1
112 Q
113 ;
1147 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=7 D X7 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
115X7 D AAC1^DGLOCK2 S:DGAAC(1)']"" Y=361
116 Q
1178 D:$D(DG)>9 F^DIE17,DE S DQ=8,DW=".3;9",DV="*P35'X",DU="",DLB="AGENCY/ALLIED COUNTRY",DIFLD=.309
118 S DU="DIC(35,"
119 G RE
120X8 S DFN=DA D AAC^DGLOCK2
121 Q
122 ;
1239 S D=0 K DE(1) ;361
124 S DIFLD=361,DGO="^DGRPX711",DC="3^2.0361IP^E^",DV="2.0361M*P8'X",DW="0;1",DOW="ELIGIBILITY",DLB="Select "_DOW S:D DC=DC_D
125 S DU="DIC(8,"
126 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 M9
127 S D=$S($D(^DPT(DA,"E",0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
128M9 I D>0 S DC=DC_D I $D(^DPT(DA,"E",+D,0)) S DE(9)=$P(^(0),U,1)
129 G RE
130R9 D DE
131 S D=$S($D(^DPT(DA,"E",0)):$P(^(0),U,3,4),1:1) G 9+1
132 ;
13310 S DW=".32;3",DV="*P21'Xa",DU="",DLB="PERIOD OF SERVICE",DIFLD=.323
134 S DE(DW)="C10^DGRPX710"
135 S DU="DIC(21,"
136 G RE
137C10 G C10S:$D(DE(10))[0 K DB
138 S X=DE(10),DIC=DIE
139 K ^DPT("APOS",$E(X,1,30),DA)
140 S X=DE(10),DIC=DIE
141 ;
142 S X=DE(10),DIC=DIE
143 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".323;" D AVAFC^VAFCDD01(DA)
144 S X=DE(10),DIC=DIE
145 D EVENT^IVMPLOG(DA)
146 S X=DE(10),DIIX=2_U_DIFLD D AUDIT^DIET
147C10S S X="" G:DG(DQ)=X C10F1 K DB
148 S X=DG(DQ),DIC=DIE
149 S ^DPT("APOS",$E(X,1,30),DA)=""
150 S X=DG(DQ),DIC=DIE
151 X ^DD(2,.323,1,2,1.3) I X S X=DIV S Y(1)=$S($D(^DPT(D0,"ODS")):^("ODS"),1:"") S X=$P(Y(1),U,1),X=X S DIU=X K Y X ^DD(2,.323,1,2,1.1) X ^DD(2,.323,1,2,1.4)
152 S X=DG(DQ),DIC=DIE
153 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".323;" D AVAFC^VAFCDD01(DA)
154 S X=DG(DQ),DIC=DIE
155 D EVENT^IVMPLOG(DA)
156 I $D(DE(10))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
157C10F1 Q
158X10 S DFN=DA D POS^DGLOCK1
159 Q
160 ;
16111 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
162X11 D ^DGYZODS S:'DGODS Y="@704"
163 Q
16412 D:$D(DG)>9 F^DIE17,DE S DQ=12,DW="ODS;2",DV="S",DU="",DLB="RECALLED TO ACTIVE DUTY",DIFLD=11500.02
165 S DE(DW)="C12^DGRPX710"
166 S DU="0:NO;1:NATIONAL GUARD;2:RESERVES;"
167 G RE
168C12 G C12S:$D(DE(12))[0 K DB
169 S X=DE(12),DIC=DIE
170 S A1B2TAG="PAT" D ^A1B2XFR
171C12S S X="" G:DG(DQ)=X C12F1 K DB
172 S X=DG(DQ),DIC=DIE
173 S A1B2TAG="PAT" D ^A1B2XFR
174C12F1 Q
175X12 Q
17613 D:$D(DG)>9 F^DIE17,DE S DQ=13,DW="ODS;3",DV="*P25002.1'",DU="",DLB="RANK",DIFLD=11500.03
177 S DE(DW)="C13^DGRPX710"
178 S DU="DIC(25002.1,"
179 G RE
180C13 G C13S:$D(DE(13))[0 K DB
181 S X=DE(13),DIC=DIE
182 S A1B2TAG="PAT" D ^A1B2XFR
183C13S S X="" G:DG(DQ)=X C13F1 K DB
184 D ^DGRPX712
185C13F1 Q
186X13 S DIC("S")="I '$P(^(0),""^"",4),(""^e^c^""[(""^""_$P(^(0),""^"",2)_""^""))" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
187 Q
188 ;
18914 S DQ=15 ;@704
19015 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
191X15 S:DGDR'["704" Y="@99"
192 Q
19316 D:$D(DG)>9 F^DIE17,DE S DQ=16,D=0 K DE(1) ;.3731
194 S DIFLD=.3731,DGO="^DGRPX713",DC="2^2.05A^.373^",DV="2.05MFX",DW="0;1",DOW="SERVICE CONNECTED CONDITIONS",DLB="Select "_DOW S:D DC=DC_D
195 G RE:D I $D(DSC(2.05))#2,$P(DSC(2.05),"I $D(^UTILITY(",1)="" X DSC(2.05) S D=$O(^(0)) S:D="" D=-1 G M16
196 S D=$S($D(^DPT(DA,.373,0)):$P(^(0),U,3,4),$O(^(0))'="":$O(^(0)),1:-1)
197M16 I D>0 S DC=DC_D I $D(^DPT(DA,.373,+D,0)) S DE(16)=$P(^(0),U,1)
198 G RE
199R16 D DE
200 S D=$S($D(^DPT(DA,.373,0)):$P(^(0),U,3,4),1:1) G 16+1
201 ;
20217 S DQ=18 ;@99
20318 G 0^DIE17
Note: See TracBrowser for help on using the repository browser.