1 | DGRPTX5 ; ;12/13/08
|
---|
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(^(0)) S %Z=^(0) S %=$P(%Z,U,5) S:%]"" DE(9)=%
|
---|
5 | I $D(^(.11)) S %Z=^(.11) S %=$P(%Z,U,4) S:%]"" DE(2)=% S %=$P(%Z,U,5) S:%]"" DE(4)=% S %=$P(%Z,U,7) S:%]"" DE(5)=% S %=$P(%Z,U,12) S:%]"" DE(1)=% S %=$P(%Z,U,16) S:%]"" DE(8)=%
|
---|
6 | I $D(^(.13)) S %Z=^(.13) S %=$P(%Z,U,1) S:%]"" DE(6)=% S %=$P(%Z,U,2) S:%]"" DE(7)=%
|
---|
7 | I $D(^(.21)) S %Z=^(.21) S %=$P(%Z,U,1) S:%]"" DE(10)=%
|
---|
8 | K %Z Q
|
---|
9 | ;
|
---|
10 | W W !?DL+DL-2,DLB_": "
|
---|
11 | Q
|
---|
12 | O 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
|
---|
15 | TR R X:DTIME E S (DTOUT,X)=U W $C(7)
|
---|
16 | Q
|
---|
17 | A K DQ(DQ) S DQ=DQ+1
|
---|
18 | B G @DQ
|
---|
19 | RE G PR:$D(DE(DQ)) D W,TR
|
---|
20 | N I X="" G NKEY:$D(^DD("KEY","F",DP,DIFLD)),A:DV'["R",X:'DV,X:D'>0,A
|
---|
21 | RD 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
|
---|
24 | 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
|
---|
25 | K DDER G X
|
---|
26 | 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
|
---|
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
|
---|
29 | V D @("X"_DQ) K YS
|
---|
30 | 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
|
---|
31 | X W:'$D(ZTQUEUED) $C(7),"??" I $D(DB(DQ)) G Z^DIE17
|
---|
32 | S X="?BAD"
|
---|
33 | QS S DZ=X D D,QQ^DIEQ G B
|
---|
34 | D S D=DIFLD,DQ(DQ)=DLB_U_DV_U_DU_U_DW_U_$P($T(@("X"_DQ))," ",2,99) Q
|
---|
35 | Y I '$D(DE(DQ)) D O G RD:"@"'[X,A:DV'["R"&(X="@"),X:X="@" S X=Y G N
|
---|
36 | PR S DG=DV,Y=DE(DQ),X=DU I $D(DQ(DQ,2)) X DQ(DQ,2) G RP
|
---|
37 | 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
|
---|
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=%
|
---|
40 | RP D O I X="" S X=DE(DQ) G A:'DV,A:DC<2,N^DIE17
|
---|
41 | I I DV'["I",DV'["#" G RD
|
---|
42 | D E^DIE0 G RD:$D(X),PR
|
---|
43 | Q
|
---|
44 | SET 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
|
---|
48 | SAVEVALS 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
|
---|
52 | NKEY W:'$D(ZTQUEUED) "?? Required key field" S X="?BAD" G QS
|
---|
53 | KEYCHK() Q:$G(DE(DW,"KEY"))="" 1 Q @DE(DW,"KEY")
|
---|
54 | BEGIN S DNM="DGRPTX5",DQ=1
|
---|
55 | 1 D:$D(DG)>9 F^DIE17,DE S DQ=1,DW=".11;12",DV="FXOa",DU="",DLB="ZIP+4",DIFLD=.1112
|
---|
56 | S DQ(1,2)="S Y(0)=Y D ZIPOUT^VAFADDR"
|
---|
57 | S DE(DW)="C1^DGRPTX5",DE(DW,"INDEX")=1
|
---|
58 | G RE
|
---|
59 | C1 G C1S:$D(DE(1))[0 K DB
|
---|
60 | S X=DE(1),DIC=DIE
|
---|
61 | D KILL^DGREGDD1(DA,.116,.11,6,$E(X,1,5))
|
---|
62 | S X=DE(1),DIC=DIE
|
---|
63 | D EVENT^IVMPLOG(DA)
|
---|
64 | S X=DE(1),DIC=DIE
|
---|
65 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT() S DIH=$G(^DPT(DIV(0),.11)),DIV=X S $P(^(.11),U,13)=DIV,DIH=2,DIG=.118 D ^DICR
|
---|
66 | S X=DE(1),DIC=DIE
|
---|
67 | S IVMX=X,X="IVMPXFR" X ^%ZOSF("TEST") D:$T DPT^IVMPXFR S X=IVMX K IVMX
|
---|
68 | S X=DE(1),DIC=DIE
|
---|
69 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".1112;" D AVAFC^VAFCDD01(DA)
|
---|
70 | S X=DE(1),DIC=DIE
|
---|
71 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
72 | S X=DE(1),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
73 | C1S S X="" G:DG(DQ)=X C1F1 K DB
|
---|
74 | S X=DG(DQ),DIC=DIE
|
---|
75 | D SET^DGREGDD1(DA,.116,.11,6,$E(X,1,5))
|
---|
76 | S X=DG(DQ),DIC=DIE
|
---|
77 | D EVENT^IVMPLOG(DA)
|
---|
78 | S X=DG(DQ),DIC=DIE
|
---|
79 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT() S DIH=$G(^DPT(DIV(0),.11)),DIV=X S $P(^(.11),U,13)=DIV,DIH=2,DIG=.118 D ^DICR
|
---|
80 | S X=DG(DQ),DIC=DIE
|
---|
81 | S IVMX=X,X="IVMPXFR" X ^%ZOSF("TEST") D:$T DPT^IVMPXFR S X=IVMX K IVMX
|
---|
82 | S X=DG(DQ),DIC=DIE
|
---|
83 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".1112;" D AVAFC^VAFCDD01(DA)
|
---|
84 | S X=DG(DQ),DIC=DIE
|
---|
85 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
86 | I $D(DE(1))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
|
---|
87 | C1F1 N X,X1,X2 S DIXR=185 D C1X1(U) K X2 M X2=X D C1X1("O") K X1 M X1=X
|
---|
88 | D
|
---|
89 | . N DIEXARR M DIEXARR=X S DIEZCOND=1
|
---|
90 | . I X1(1)'=X2(1)
|
---|
91 | . S DIEZCOND=$G(X) K X M X=DIEXARR Q:'DIEZCOND
|
---|
92 | . K EASDO2
|
---|
93 | G C1F2
|
---|
94 | C1X1(DION) K X
|
---|
95 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,.1112,DION),$P($G(^DPT(DA,.11)),U,12))
|
---|
96 | S:('$G(EASDO2)&($D(EASZIPLK))) X=$$ZIP^DGREGDD1(DA,X(1))
|
---|
97 | S:$D(X)#2 X(2)=X
|
---|
98 | S X=$G(X(1))
|
---|
99 | Q
|
---|
100 | C1F2 S DIXR=231 D C1X2(U) K X2 M X2=X D C1X2("O") K X1 M X1=X
|
---|
101 | D
|
---|
102 | . D FC^DGFCPROT(.DA,2,.1112,"KILL",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q
|
---|
103 | K X M X=X2 D
|
---|
104 | . D FC^DGFCPROT(.DA,2,.1112,"SET",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q
|
---|
105 | G C1F3
|
---|
106 | C1X2(DION) K X
|
---|
107 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,.1112,DION),$P($G(^DPT(DA,.11)),U,12))
|
---|
108 | S X=$G(X(1))
|
---|
109 | Q
|
---|
110 | C1F3 Q
|
---|
111 | X1 K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>20!($L(X)<5) X I $D(X) D ZIPIN^VAFADDR
|
---|
112 | I $D(X),X'?.ANP K X
|
---|
113 | Q
|
---|
114 | ;
|
---|
115 | 2 D:$D(DG)>9 F^DIE17,DE S DQ=2,DW=".11;4",DV="Fa",DU="",DLB="CITY",DIFLD=.114
|
---|
116 | S DE(DW)="C2^DGRPTX5",DE(DW,"INDEX")=1
|
---|
117 | G RE
|
---|
118 | C2 G C2S:$D(DE(2))[0 K DB
|
---|
119 | S X=DE(2),DIC=DIE
|
---|
120 | S A1B2TAG="PAT" D ^A1B2XFR
|
---|
121 | S X=DE(2),DIC=DIE
|
---|
122 | D EVENT^IVMPLOG(DA)
|
---|
123 | S X=DE(2),DIC=DIE
|
---|
124 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT() S DIH=$G(^DPT(DIV(0),.11)),DIV=X S $P(^(.11),U,13)=DIV,DIH=2,DIG=.118 D ^DICR
|
---|
125 | S X=DE(2),DIC=DIE
|
---|
126 | S IVMX=X,X="IVMPXFR" X ^%ZOSF("TEST") D:$T DPT^IVMPXFR S X=IVMX K IVMX
|
---|
127 | S X=DE(2),DIC=DIE
|
---|
128 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".114;" D AVAFC^VAFCDD01(DA)
|
---|
129 | S X=DE(2),DIC=DIE
|
---|
130 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
131 | S X=DE(2),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
132 | C2S S X="" G:DG(DQ)=X C2F1 K DB
|
---|
133 | S X=DG(DQ),DIC=DIE
|
---|
134 | S A1B2TAG="PAT" D ^A1B2XFR
|
---|
135 | S X=DG(DQ),DIC=DIE
|
---|
136 | D EVENT^IVMPLOG(DA)
|
---|
137 | S X=DG(DQ),DIC=DIE
|
---|
138 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT() S DIH=$G(^DPT(DIV(0),.11)),DIV=X S $P(^(.11),U,13)=DIV,DIH=2,DIG=.118 D ^DICR
|
---|
139 | S X=DG(DQ),DIC=DIE
|
---|
140 | S IVMX=X,X="IVMPXFR" X ^%ZOSF("TEST") D:$T DPT^IVMPXFR S X=IVMX K IVMX
|
---|
141 | S X=DG(DQ),DIC=DIE
|
---|
142 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".114;" D AVAFC^VAFCDD01(DA)
|
---|
143 | S X=DG(DQ),DIC=DIE
|
---|
144 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
145 | I $D(DE(2))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
|
---|
146 | C2F1 N X,X1,X2 S DIXR=234 D C2X1(U) K X2 M X2=X D C2X1("O") K X1 M X1=X
|
---|
147 | D
|
---|
148 | . D FC^DGFCPROT(.DA,2,.114,"KILL",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q
|
---|
149 | K X M X=X2 D
|
---|
150 | . D FC^DGFCPROT(.DA,2,.114,"SET",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q
|
---|
151 | G C2F2
|
---|
152 | C2X1(DION) K X
|
---|
153 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,.114,DION),$P($G(^DPT(DA,.11)),U,4))
|
---|
154 | S X=$G(X(1))
|
---|
155 | Q
|
---|
156 | C2F2 Q
|
---|
157 | X2 K:$L(X)>15!($L(X)<2) X
|
---|
158 | I $D(X),X'?.ANP K X
|
---|
159 | Q
|
---|
160 | ;
|
---|
161 | 3 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
|
---|
162 | X3 S:'$$KEY^DGREGDD1(DUZ,DA) Y=.131
|
---|
163 | Q
|
---|
164 | 4 D:$D(DG)>9 F^DIE17,DE S DQ=4,DW=".11;5",DV="P5'a",DU="",DLB="STATE",DIFLD=.115
|
---|
165 | S DE(DW)="C4^DGRPTX5",DE(DW,"INDEX")=1
|
---|
166 | S DU="DIC(5,"
|
---|
167 | G RE
|
---|
168 | C4 G C4S:$D(DE(4))[0 K DB
|
---|
169 | S X=DE(4),DIC=DIE
|
---|
170 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:""),Y=$P(Y(1),U,7) X:$D(^DD(2,.117,2)) ^(2) S X=Y S DIU=X K Y S X=DIV S X="" X ^DD(2,.115,1,1,2.4)
|
---|
171 | S X=DE(4),DIC=DIE
|
---|
172 | S A1B2TAG="PAT" D ^A1B2XFR
|
---|
173 | S X=DE(4),DIC=DIE
|
---|
174 | D EVENT^IVMPLOG(DA)
|
---|
175 | S X=DE(4),DIC=DIE
|
---|
176 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT S DIH=$G(^DPT(DIV(0),.11)),DIV=X S $P(^(.11),U,13)=DIV,DIH=2,DIG=.118 D ^DICR
|
---|
177 | S X=DE(4),DIC=DIE
|
---|
178 | S IVMX=X,X="IVMPXFR" X ^%ZOSF("TEST") D:$T DPT^IVMPXFR S X=IVMX K IVMX
|
---|
179 | S X=DE(4),DIC=DIE
|
---|
180 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".115;" D AVAFC^VAFCDD01(DA)
|
---|
181 | S X=DE(4),DIC=DIE
|
---|
182 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
183 | S X=DE(4),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
184 | C4S S X="" G:DG(DQ)=X C4F1 K DB
|
---|
185 | S X=DG(DQ),DIC=DIE
|
---|
186 | ;
|
---|
187 | S X=DG(DQ),DIC=DIE
|
---|
188 | S A1B2TAG="PAT" D ^A1B2XFR
|
---|
189 | S X=DG(DQ),DIC=DIE
|
---|
190 | D EVENT^IVMPLOG(DA)
|
---|
191 | S X=DG(DQ),DIC=DIE
|
---|
192 | K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:"") S X=$P(Y(1),U,13),X=X S DIU=X K Y S X=DIV S X=$$NOW^XLFDT() S DIH=$G(^DPT(DIV(0),.11)),DIV=X S $P(^(.11),U,13)=DIV,DIH=2,DIG=.118 D ^DICR
|
---|
193 | S X=DG(DQ),DIC=DIE
|
---|
194 | S IVMX=X,X="IVMPXFR" X ^%ZOSF("TEST") D:$T DPT^IVMPXFR S X=IVMX K IVMX
|
---|
195 | S X=DG(DQ),DIC=DIE
|
---|
196 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".115;" D AVAFC^VAFCDD01(DA)
|
---|
197 | S X=DG(DQ),DIC=DIE
|
---|
198 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
199 | I $D(DE(4))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
|
---|
200 | C4F1 N X,X1,X2 S DIXR=235 D C4X1(U) K X2 M X2=X D C4X1("O") K X1 M X1=X
|
---|
201 | D
|
---|
202 | . D FC^DGFCPROT(.DA,2,.115,"KILL",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q
|
---|
203 | K X M X=X2 D
|
---|
204 | . D FC^DGFCPROT(.DA,2,.115,"SET",$H,$G(DUZ),.X,.X1,.X2,$G(XQY0)) Q
|
---|
205 | G C4F2
|
---|
206 | C4X1(DION) K X
|
---|
207 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,.115,DION),$P($G(^DPT(DA,.11)),U,5))
|
---|
208 | S X=$G(X(1))
|
---|
209 | Q
|
---|
210 | C4F2 Q
|
---|
211 | X4 Q
|
---|
212 | 5 D:$D(DG)>9 F^DIE17,DE S DQ=5,DW=".11;7",DV="NJ3,0XOa",DU="",DLB="COUNTY",DIFLD=.117
|
---|
213 | S DQ(5,2)="S Y(0)=Y Q:Y']"""" S Z0=$S($D(^DPT(D0,.11)):+$P(^(.11),""^"",5),1:"""") Q:'Z0 S Y=$P($S($D(^DIC(5,Z0,1,Y,0)):^(0),1:""""),""^"",3)"
|
---|
214 | S DE(DW)="C5^DGRPTX5"
|
---|
215 | G RE
|
---|
216 | C5 G C5S:$D(DE(5))[0 K DB
|
---|
217 | S X=DE(5),DIC=DIE
|
---|
218 | S A1B2TAG="PAT" D ^A1B2XFR
|
---|
219 | S X=DE(5),DIC=DIE
|
---|
220 | D EVENT^IVMPLOG(DA)
|
---|
221 | S X=DE(5),DIC=DIE
|
---|
222 | S IVMX=X,X="IVMPXFR" X ^%ZOSF("TEST") D:$T DPT^IVMPXFR S X=IVMX K IVMX
|
---|
223 | S X=DE(5),DIC=DIE
|
---|
224 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".117;" D AVAFC^VAFCDD01(DA)
|
---|
225 | S X=DE(5),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
226 | C5S S X="" G:DG(DQ)=X C5F1 K DB
|
---|
227 | D ^DGRPTX6
|
---|
228 | C5F1 Q
|
---|
229 | X5 S Z0=$S($D(^DPT(D0,.11)):+$P(^(.11),"^",5),1:0) K:'Z0 X Q:'Z0!'$D(^DIC(5,Z0,1,0)) S DIC="^DIC(5,Z0,1,",DIC(0)="QEM" D ^DIC S X=+Y K:Y'>0 X K Z0,DIC
|
---|
230 | Q
|
---|
231 | ;
|
---|
232 | 6 D:$D(DG)>9 F^DIE17,DE S DQ=6,DW=".13;1",DV="Fa",DU="",DLB="PHONE NUMBER [RESIDENCE]",DIFLD=.131
|
---|
233 | S DE(DW)="C6^DGRPTX5"
|
---|
234 | G RE
|
---|
235 | C6 G C6S:$D(DE(6))[0 K DB
|
---|
236 | D ^DGRPTX7
|
---|
237 | C6S S X="" G:DG(DQ)=X C6F1 K DB
|
---|
238 | D ^DGRPTX8
|
---|
239 | C6F1 Q
|
---|
240 | X6 K:$L(X)>20!($L(X)<4) X
|
---|
241 | I $D(X),X'?.ANP K X
|
---|
242 | Q
|
---|
243 | ;
|
---|
244 | 7 D:$D(DG)>9 F^DIE17,DE S DQ=7,DW=".13;2",DV="Fa",DU="",DLB="PHONE NUMBER [WORK]",DIFLD=.132
|
---|
245 | S DE(DW)="C7^DGRPTX5"
|
---|
246 | G RE
|
---|
247 | C7 G C7S:$D(DE(7))[0 K DB
|
---|
248 | D ^DGRPTX9
|
---|
249 | C7S S X="" G:DG(DQ)=X C7F1 K DB
|
---|
250 | D ^DGRPTX10
|
---|
251 | C7F1 Q
|
---|
252 | X7 K:$L(X)>20!($L(X)<4) X
|
---|
253 | I $D(X),X'?.ANP K X
|
---|
254 | Q
|
---|
255 | ;
|
---|
256 | 8 D:$D(DG)>9 F^DIE17,DE S DQ=8,DW=".11;16",DV="S",DU="",DLB="BAD ADDRESS INDICATOR",DIFLD=.121
|
---|
257 | S DE(DW)="C8^DGRPTX5"
|
---|
258 | S DU="1:UNDELIVERABLE;2:HOMELESS;3:OTHER;"
|
---|
259 | G RE
|
---|
260 | C8 G C8S:$D(DE(8))[0 K DB
|
---|
261 | D ^DGRPTX11
|
---|
262 | C8S S X="" G:DG(DQ)=X C8F1 K DB
|
---|
263 | D ^DGRPTX12
|
---|
264 | C8F1 Q
|
---|
265 | X8 Q
|
---|
266 | 9 D:$D(DG)>9 F^DIE17,DE S DQ=9,DW="0;5",DV="RP11'a",DU="",DLB="MARITAL STATUS",DIFLD=.05
|
---|
267 | S DE(DW)="C9^DGRPTX5"
|
---|
268 | S DU="DIC(11,"
|
---|
269 | G RE
|
---|
270 | C9 G C9S:$D(DE(9))[0 K DB
|
---|
271 | D ^DGRPTX13
|
---|
272 | C9S S X="" G:DG(DQ)=X C9F1 K DB
|
---|
273 | D ^DGRPTX14
|
---|
274 | C9F1 Q
|
---|
275 | X9 Q
|
---|
276 | 10 D:$D(DG)>9 F^DIE17,DE S DQ=10,DW=".21;1",DV="Fa",DU="",DLB="K-NAME OF PRIMARY NOK",DIFLD=.211
|
---|
277 | S DE(DW)="C10^DGRPTX5",DE(DW,"INDEX")=1
|
---|
278 | G RE
|
---|
279 | C10 G C10S:$D(DE(10))[0 K DB
|
---|
280 | D ^DGRPTX15
|
---|
281 | C10S S X="" G:DG(DQ)=X C10F1 K DB
|
---|
282 | D ^DGRPTX16
|
---|
283 | C10F1 N X,X1,X2 S DIXR=590 D C10X1(U) K X2 M X2=X D C10X1("O") K X1 M X1=X
|
---|
284 | I $G(X(1))]"" D
|
---|
285 | . I '$G(XUNOTRIG) N XUNOTRIG S XUNOTRIG=1 D DELCOMP^XLFNAME2(2,.DA,.211,1.02) Q
|
---|
286 | K X M X=X2 I $G(X(1))]"" D
|
---|
287 | . I '$G(XUNOTRIG) N XUNOTRIG S XUNOTRIG=1,DG20NAME=X D NARY^XLFNAME7(.DG20NAME),UPDCOMP^XLFNAME2(2,.DA,.211,.DG20NAME,1.02,+$P($G(^DPT(DA,"NAME")),U,2),"CL35") K DG20NAME Q
|
---|
288 | G C10F2
|
---|
289 | C10X1(DION) K X
|
---|
290 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,.211,DION),$P($G(^DPT(DA,.21)),U,1))
|
---|
291 | S X=$G(X(1))
|
---|
292 | Q
|
---|
293 | C10F2 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
294 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
295 | Q
|
---|
296 | X10 K:$L(X)>35!($L(X)<3) X I $D(X) S DG20NAME=X,(X,DG20NAME)=$$FORMAT^XLFNAME7(.DG20NAME,3,35) K:'$L(X) X,DG20NAME
|
---|
297 | I $D(X),X'?.ANP K X
|
---|
298 | Q
|
---|
299 | ;
|
---|
300 | 11 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
|
---|
301 | X11 S:X="" Y="@30"
|
---|
302 | Q
|
---|
303 | 12 D:$D(DG)>9 F^DIE17 G ^DGRPTX17
|
---|