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

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

revised back to 6/30/08 version

File size: 8.2 KB
Line 
1DGRPX73 ; ;12/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(^(.29)) S %Z=^(.29) S %=$P(%Z,U,1) S:%]"" DE(4)=% S %=$P(%Z,U,2) S:%]"" DE(3)=% S %=$P(%Z,U,12) S:%]"" DE(1)=%
5 I $D(^(.3)) S %Z=^(.3) S %=$P(%Z,U,11) S:%]"" DE(12)=%
6 I $D(^(.31)) S %Z=^(.31) S %=$P(%Z,U,3) S:%]"" DE(5)=% S %=$P(%Z,U,4) S:%]"" DE(6)=%
7 I $D(^(.362)) S %Z=^(.362) S %=$P(%Z,U,12) S:%]"" DE(9)=% S %=$P(%Z,U,13) S:%]"" DE(10)=% S %=$P(%Z,U,14) S:%]"" DE(11)=% S %=$P(%Z,U,20) S:%]"" DE(14)=%
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="DGRPX73",DQ=1
551 S DW=".29;12",DV="S",DU="",DLB="RATED INCOMPETENT?",DIFLD=.293
56 S DE(DW)="C1^DGRPX73"
57 S DU="0:NO;1:YES;"
58 G RE
59C1 G C1S:$D(DE(1))[0 K DB
60 S X=DE(1),DIC=DIE
61 D EVENT^IVMPLOG(DA)
62C1S S X="" G:DG(DQ)=X C1F1 K DB
63 S X=DG(DQ),DIC=DIE
64 D EVENT^IVMPLOG(DA)
65C1F1 Q
66X1 Q
672 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
68X2 S:'X Y=.313
69 Q
703 D:$D(DG)>9 F^DIE17,DE S DQ=3,DW=".29;2",DV="D",DU="",DLB="DATE RULED INCOMPETENT (CIVIL)",DIFLD=.292
71 G RE
72X3 S %DT="E" D ^%DT S X=Y K:Y<1 X
73 Q
74 ;
754 S DW=".29;1",DV="D",DU="",DLB="DATE RULED INCOMPETENT (VA)",DIFLD=.291
76 G RE
77X4 S %DT="E" D ^%DT S X=Y K:Y<1 X
78 Q
79 ;
805 S DW=".31;3",DV="FXOa",DU="",DLB="CLAIM NUMBER",DIFLD=.313
81 S DQ(5,2)="S Y(0)=Y S Y=$E(Y,1,10)"
82 S DE(DW)="C5^DGRPX73"
83 G RE
84C5 G C5S:$D(DE(5))[0 K DB
85 S X=DE(5),DIC=DIE
86 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".313;" D AVAFC^VAFCDD01(DA)
87 S X=DE(5),DIC=DIE
88 D EVENT^IVMPLOG(DA)
89 S X=DE(5),DIIX=2_U_DIFLD D AUDIT^DIET
90C5S S X="" G:DG(DQ)=X C5F1 K DB
91 S X=DG(DQ),DIC=DIE
92 I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".313;" D AVAFC^VAFCDD01(DA)
93 S X=DG(DQ),DIC=DIE
94 D EVENT^IVMPLOG(DA)
95 I $D(DE(5))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
96C5F1 Q
97X5 S DFN=DA D EV^DGLOCK I $D(X) S L=$S($D(^DPT(DA,0)):$P(^(0),U,9),1:X) W:X?1"SS".E " ",L S:X?1"SS".E X=L K:$L(X)>9 X Q:'$D(X) I X'=L K:$L(X)>8!($L(X)<7)!'(X?.N) X
98 I $D(X),X'?.ANP K X
99 Q
100 ;
1016 D:$D(DG)>9 F^DIE17,DE S DQ=6,DW=".31;4",DV="*P4'X",DU="",DLB="CLAIM FOLDER LOCATION",DIFLD=.314
102 S DE(DW)="C6^DGRPX73"
103 S DU="DIC(4,"
104 G RE
105C6 G C6S:$D(DE(6))[0 K DB
106 S X=DE(6),DIC=DIE
107 D KILL^DGREGDD(DA)
108C6S S X="" G:DG(DQ)=X C6F1 K DB
109 S X=DG(DQ),DIC=DIE
110 D SET^DGREGDD(DA,X)
111C6F1 Q
112X6 S DIC("S")="I $$CFLTF^DGREGDD(Y)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X
113 Q
114 ;
1157 S DQ=8 ;@702
1168 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
117X8 S:DGDR'["702" Y="@703"
118 Q
1199 D:$D(DG)>9 F^DIE17,DE S DQ=9,DW=".362;12",DV="SX",DU="",DLB="RECEIVING A&A BENEFITS?",DIFLD=.36205
120 S DE(DW)="C9^DGRPX73"
121 S DU="Y:YES;N:NO;U:UNKNOWN;"
122 G RE
123C9 G C9S:$D(DE(9))[0 K DB
124 S X=DE(9),DIC=DIE
125 X ^DD(2,.36205,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,1),X=X S DIU=X K Y S X="" X ^DD(2,.36205,1,1,2.4)
126 S X=DE(9),DIC=DIE
127 S DFN=DA D EN^DGMTCOR K DGMTCOR
128 S X=DE(9),DIC=DIE
129 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X='$$TOTCHK^DGLOCK2(DA) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.362)):^(.362),1:"") S X=$P(Y(1),U,20),X=X S DIU=X K Y S X="" X ^DD(2,.36205,1,3,2.4)
130 S X=DE(9),DIC=DIE
131 D AUTOUPD^DGENA2(DA)
132C9S S X="" G:DG(DQ)=X C9F1 K DB
133 S X=DG(DQ),DIC=DIE
134 X ^DD(2,.36205,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,1),X=X S DIU=X K Y S X="" X ^DD(2,.36205,1,1,1.4)
135 S X=DG(DQ),DIC=DIE
136 S DFN=DA D EN^DGMTCOR K DGMTCOR
137 S X=DG(DQ),DIC=DIE
138 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X='$$TOTCHK^DGLOCK2(DA) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.362)):^(.362),1:"") S X=$P(Y(1),U,20),X=X S DIU=X K Y S X="" X ^DD(2,.36205,1,3,1.4)
139 S X=DG(DQ),DIC=DIE
140 D AUTOUPD^DGENA2(DA)
141C9F1 Q
142X9 S DFN=DA D MV^DGLOCK I $D(X) S DFN=DA D EV^DGLOCK
143 Q
144 ;
14510 D:$D(DG)>9 F^DIE17,DE S DQ=10,DW=".362;13",DV="SX",DU="",DLB="RECEIVING HOUSEBOUND BENEFITS?",DIFLD=.36215
146 S DE(DW)="C10^DGRPX73"
147 S DU="Y:YES;N:NO;U:UNKNOWN;"
148 G RE
149C10 G C10S:$D(DE(10))[0 K DB
150 S X=DE(10),DIC=DIE
151 X ^DD(2,.36215,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,2),X=X S DIU=X K Y S X="" X ^DD(2,.36215,1,1,2.4)
152 S X=DE(10),DIC=DIE
153 S DFN=DA D EN^DGMTCOR K DGMTCOR
154 S X=DE(10),DIC=DIE
155 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X='$$TOTCHK^DGLOCK2(DA) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.362)):^(.362),1:"") S X=$P(Y(1),U,20),X=X S DIU=X K Y S X="" X ^DD(2,.36215,1,3,2.4)
156 S X=DE(10),DIC=DIE
157 D AUTOUPD^DGENA2(DA)
158C10S S X="" G:DG(DQ)=X C10F1 K DB
159 S X=DG(DQ),DIC=DIE
160 X ^DD(2,.36215,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,2),X=X S DIU=X K Y S X="" X ^DD(2,.36215,1,1,1.4)
161 S X=DG(DQ),DIC=DIE
162 S DFN=DA D EN^DGMTCOR K DGMTCOR
163 S X=DG(DQ),DIC=DIE
164 K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(0)=X S X='$$TOTCHK^DGLOCK2(DA) I X S X=DIV S Y(1)=$S($D(^DPT(D0,.362)):^(.362),1:"") S X=$P(Y(1),U,20),X=X S DIU=X K Y S X="" X ^DD(2,.36215,1,3,1.4)
165 S X=DG(DQ),DIC=DIE
166 D AUTOUPD^DGENA2(DA)
167C10F1 Q
168X10 S DFN=DA D MV^DGLOCK I $D(X) S DFN=DA D EV^DGLOCK
169 Q
170 ;
17111 D:$D(DG)>9 F^DIE17,DE S DQ=11,DW=".362;14",DV="SX",DU="",DLB="RECEIVING A VA PENSION?",DIFLD=.36235
172 S DE(DW)="C11^DGRPX73"
173 S DU="Y:YES;N:NO;U:UNKNOWN;"
174 G RE
175C11 G C11S:$D(DE(11))[0 K DB
176 D ^DGRPX74
177C11S S X="" G:DG(DQ)=X C11F1 K DB
178 D ^DGRPX75
179C11F1 Q
180X11 S DFN=DA D MV^DGLOCK
181 Q
182 ;
18312 D:$D(DG)>9 F^DIE17,DE S DQ=12,DW=".3;11",DV="SX",DU="",DLB="RECEIVING VA DISABILITY?",DIFLD=.3025
184 S DE(DW)="C12^DGRPX73"
185 S DU="Y:YES;N:NO;U:UNKNOWN;"
186 G RE
187C12 G C12S:$D(DE(12))[0 K DB
188 D ^DGRPX76
189C12S S X="" G:DG(DQ)=X C12F1 K DB
190 D ^DGRPX77
191C12F1 Q
192X12 S DFN=DA D MV^DGLOCK I $D(X),X="Y" D EC^DGLOCK1
193 Q
194 ;
19513 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
196X13 S:(X'="Y")&($P($G(^DPT(DA,.362)),U,12,14)'["Y") Y=.36265
197 Q
19814 D:$D(DG)>9 F^DIE17,DE S DQ=14,DW=".362;20",DV="NJ8,2X",DU="",DLB="TOTAL ANNUAL VA CHECK AMOUNT",DIFLD=.36295
199 S DE(DW)="C14^DGRPX73"
200 G RE
201C14 G C14S:$D(DE(14))[0 K DB
202 D ^DGRPX78
203C14S S X="" G:DG(DQ)=X C14F1 K DB
204 D ^DGRPX79
205C14F1 Q
206X14 D DOL^DGLOCK2 K:+X'=X&(X'?.N1"."2N)!(X>99999)!(X<0) X I $D(X) S DFN=DA D MV^DGLOCK I $D(X),('$$TOTCHK^DGLOCK2(DFN)) D TOTCKMSG^DGLOCK2 K X
207 Q
208 ;
20915 D:$D(DG)>9 F^DIE17 G ^DGRPX710
Note: See TracBrowser for help on using the repository browser.