1 | DGRPTX17 ; ;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(^(.21)) S %Z=^(.21) S %=$P(%Z,U,2) S:%]"" DE(1)=% S %=$P(%Z,U,3) S:%]"" DE(5)=% S %=$P(%Z,U,4) S:%]"" DE(7)=% S %=$P(%Z,U,5) S:%]"" DE(9)=% S %=$P(%Z,U,6) S:%]"" DE(10)=% S %=$P(%Z,U,7) S:%]"" DE(11)=% S %=$P(%Z,U,9) S:%]"" DE(13)=%
|
---|
5 | I S %=$P(%Z,U,10) S:%]"" DE(3)=% S %=$P(%Z,U,11) S:%]"" DE(14)=%
|
---|
6 | I $D(^(.22)) S %Z=^(.22) S %=$P(%Z,U,7) S:%]"" DE(12)=%
|
---|
7 | I $D(^(.33)) S %Z=^(.33) S %=$P(%Z,U,1) S:%]"" DE(22)=% S %=$P(%Z,U,10) S:%]"" DE(17)=%
|
---|
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="DGRPTX17",DQ=1
|
---|
55 | 1 D:$D(DG)>9 F^DIE17,DE S DQ=1,DW=".21;2",DV="FX",DU="",DLB="K-RELATIONSHIP TO PATIENT",DIFLD=.212
|
---|
56 | S DE(DW)="C1^DGRPTX17",DE(DW,"INDEX")=1
|
---|
57 | G RE
|
---|
58 | C1 G C1S:$D(DE(1))[0 K DB
|
---|
59 | S X=DE(1),DIC=DIE
|
---|
60 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
61 | C1S S X="" G:DG(DQ)=X C1F1 K DB
|
---|
62 | S X=DG(DQ),DIC=DIE
|
---|
63 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
64 | C1F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
65 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
66 | Q
|
---|
67 | X1 K:$L(X)>30!($L(X)<1) X I $D(X) S DFN=DA D K1^DGLOCK2
|
---|
68 | I $D(X),X'?.ANP K X
|
---|
69 | Q
|
---|
70 | ;
|
---|
71 | 2 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=2 G A
|
---|
72 | 3 D:$D(DG)>9 F^DIE17,DE S DQ=3,DW=".21;10",DV="RSX",DU="",DLB="K-ADDRESS SAME AS PATIENT'S?",DIFLD=.2125
|
---|
73 | S DE(DW)="C3^DGRPTX17",DE(DW,"INDEX")=1
|
---|
74 | S DU="Y:YES;N:NO;"
|
---|
75 | S Y="NO"
|
---|
76 | G Y
|
---|
77 | C3 G C3S:$D(DE(3))[0 K DB
|
---|
78 | C3S S X="" G:DG(DQ)=X C3F1 K DB
|
---|
79 | C3F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
80 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
81 | Q
|
---|
82 | X3 I $D(X),X="Y" S DFN=DA D K1^DGLOCK2
|
---|
83 | Q
|
---|
84 | ;
|
---|
85 | 4 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=4 D X4 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
|
---|
86 | X4 I X="Y" S DGADD=".21" D AD^DGRPE S Y=.21011
|
---|
87 | Q
|
---|
88 | 5 D:$D(DG)>9 F^DIE17,DE S DQ=5,DW=".21;3",DV="FX",DU="",DLB="K-STREET ADDRESS [LINE 1]",DIFLD=.213
|
---|
89 | S DE(DW)="C5^DGRPTX17",DE(DW,"INDEX")=1
|
---|
90 | G RE
|
---|
91 | C5 G C5S:$D(DE(5))[0 K DB
|
---|
92 | S X=DE(5),DIC=DIE
|
---|
93 | X "S DGXRF=.213 D ^DGDDC Q"
|
---|
94 | S X=DE(5),DIC=DIE
|
---|
95 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
96 | C5S S X="" G:DG(DQ)=X C5F1 K DB
|
---|
97 | S X=DG(DQ),DIC=DIE
|
---|
98 | ;
|
---|
99 | S X=DG(DQ),DIC=DIE
|
---|
100 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
101 | C5F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
102 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
103 | Q
|
---|
104 | X5 K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>30!($L(X)<3) X I $D(X) S DFN=DA D K1^DGLOCK2
|
---|
105 | I $D(X),X'?.ANP K X
|
---|
106 | Q
|
---|
107 | ;
|
---|
108 | 6 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
|
---|
109 | X6 S:X="" Y=.216
|
---|
110 | Q
|
---|
111 | 7 D:$D(DG)>9 F^DIE17,DE S DQ=7,DW=".21;4",DV="FX",DU="",DLB="K-STREET ADDRESS [LINE 2]",DIFLD=.214
|
---|
112 | S DE(DW)="C7^DGRPTX17",DE(DW,"INDEX")=1
|
---|
113 | G RE
|
---|
114 | C7 G C7S:$D(DE(7))[0 K DB
|
---|
115 | S X=DE(7),DIC=DIE
|
---|
116 | X "S DGXRF=.214 D ^DGDDC Q"
|
---|
117 | S X=DE(7),DIC=DIE
|
---|
118 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
119 | C7S S X="" G:DG(DQ)=X C7F1 K DB
|
---|
120 | S X=DG(DQ),DIC=DIE
|
---|
121 | ;
|
---|
122 | S X=DG(DQ),DIC=DIE
|
---|
123 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
124 | C7F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
125 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
126 | Q
|
---|
127 | X7 K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>30!($L(X)<3) X I $D(X) S DFN=DA D K1^DGLOCK2
|
---|
128 | I $D(X),X'?.ANP K X
|
---|
129 | Q
|
---|
130 | ;
|
---|
131 | 8 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
|
---|
132 | X8 S:X="" Y=.216
|
---|
133 | Q
|
---|
134 | 9 D:$D(DG)>9 F^DIE17,DE S DQ=9,DW=".21;5",DV="FX",DU="",DLB="K-STREET ADDRESS [LINE 3]",DIFLD=.215
|
---|
135 | S DE(DW)="C9^DGRPTX17",DE(DW,"INDEX")=1
|
---|
136 | G RE
|
---|
137 | C9 G C9S:$D(DE(9))[0 K DB
|
---|
138 | C9S S X="" G:DG(DQ)=X C9F1 K DB
|
---|
139 | C9F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
140 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
141 | Q
|
---|
142 | X9 K:$L(X)>30!($L(X)<3) X I $D(X) S DFN=DA D K1^DGLOCK2
|
---|
143 | I $D(X),X'?.ANP K X
|
---|
144 | Q
|
---|
145 | ;
|
---|
146 | 10 D:$D(DG)>9 F^DIE17,DE S DQ=10,DW=".21;6",DV="FX",DU="",DLB="K-CITY",DIFLD=.216
|
---|
147 | S DE(DW)="C10^DGRPTX17",DE(DW,"INDEX")=1
|
---|
148 | G RE
|
---|
149 | C10 G C10S:$D(DE(10))[0 K DB
|
---|
150 | S X=DE(10),DIC=DIE
|
---|
151 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
152 | C10S S X="" G:DG(DQ)=X C10F1 K DB
|
---|
153 | S X=DG(DQ),DIC=DIE
|
---|
154 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
155 | C10F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
156 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
157 | Q
|
---|
158 | X10 K:$L(X)>30!($L(X)<3) X I $D(X) S DFN=DA D K1^DGLOCK2
|
---|
159 | I $D(X),X'?.ANP K X
|
---|
160 | Q
|
---|
161 | ;
|
---|
162 | 11 D:$D(DG)>9 F^DIE17,DE S DQ=11,DW=".21;7",DV="P5'X",DU="",DLB="K-STATE",DIFLD=.217
|
---|
163 | S DE(DW)="C11^DGRPTX17",DE(DW,"INDEX")=1
|
---|
164 | S DU="DIC(5,"
|
---|
165 | G RE
|
---|
166 | C11 G C11S:$D(DE(11))[0 K DB
|
---|
167 | S X=DE(11),DIC=DIE
|
---|
168 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
169 | C11S S X="" G:DG(DQ)=X C11F1 K DB
|
---|
170 | S X=DG(DQ),DIC=DIE
|
---|
171 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
172 | C11F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
173 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
174 | Q
|
---|
175 | X11 I $D(X) S DFN=DA D K1^DGLOCK2
|
---|
176 | Q
|
---|
177 | ;
|
---|
178 | 12 D:$D(DG)>9 F^DIE17,DE S DQ=12,DW=".22;7",DV="FOX",DU="",DLB="K-ZIP+4",DIFLD=.2207
|
---|
179 | S DQ(12,2)="S Y(0)=Y D ZIPOUT^VAFADDR"
|
---|
180 | S DE(DW)="C12^DGRPTX17",DE(DW,"INDEX")=1
|
---|
181 | G RE
|
---|
182 | C12 G C12S:$D(DE(12))[0 K DB
|
---|
183 | S X=DE(12),DIC=DIE
|
---|
184 | D KILL^DGREGDD1(DA,.218,.21,8,$E(X,1,5))
|
---|
185 | C12S S X="" G:DG(DQ)=X C12F1 K DB
|
---|
186 | S X=DG(DQ),DIC=DIE
|
---|
187 | D SET^DGREGDD1(DA,.218,.21,8,$E(X,1,5))
|
---|
188 | C12F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
189 | F DIXR=602 S DIEZRXR(2,DIXR)=""
|
---|
190 | Q
|
---|
191 | X12 K:X[""""!($A(X)=45) X I $D(X) S DFN=DA D K1^DGLOCK2 I $D(X) K:$L(X)>15!($L(X)<5) X I $D(X) D ZIPIN^VAFADDR
|
---|
192 | I $D(X),X'?.ANP K X
|
---|
193 | Q
|
---|
194 | ;
|
---|
195 | 13 D:$D(DG)>9 F^DIE17,DE S DQ=13,DW=".21;9",DV="FXa",DU="",DLB="K-PHONE NUMBER",DIFLD=.219
|
---|
196 | S DE(DW)="C13^DGRPTX17"
|
---|
197 | G RE
|
---|
198 | C13 G C13S:$D(DE(13))[0 K DB
|
---|
199 | S X=DE(13),DIC=DIE
|
---|
200 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".219;" D AVAFC^VAFCDD01(DA)
|
---|
201 | S X=DE(13),DIC=DIE
|
---|
202 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
203 | S X=DE(13),DIIX=2_U_DIFLD D AUDIT^DIET
|
---|
204 | C13S S X="" G:DG(DQ)=X C13F1 K DB
|
---|
205 | S X=DG(DQ),DIC=DIE
|
---|
206 | I ($T(AVAFC^VAFCDD01)'="") S VAFCF=".219;" D AVAFC^VAFCDD01(DA)
|
---|
207 | S X=DG(DQ),DIC=DIE
|
---|
208 | D:($T(ADGRU^DGRUDD01)'="") ADGRU^DGRUDD01(DA)
|
---|
209 | I $D(DE(13))'[0!(^DD(DP,DIFLD,"AUDIT")'="e") S X=DG(DQ),DIIX=3_U_DIFLD D AUDIT^DIET
|
---|
210 | C13F1 Q
|
---|
211 | X13 K:$L(X)>20!($L(X)<4) X I $D(X) S DFN=DA D K1^DGLOCK2
|
---|
212 | I $D(X),X'?.ANP K X
|
---|
213 | Q
|
---|
214 | ;
|
---|
215 | 14 D:$D(DG)>9 F^DIE17,DE S DQ=14,DW=".21;11",DV="F",DU="",DLB="K-WORK PHONE NUMBER",DIFLD=.21011
|
---|
216 | G RE
|
---|
217 | X14 K:$L(X)>20!($L(X)<4) X
|
---|
218 | I $D(X),X'?.ANP K X
|
---|
219 | Q
|
---|
220 | ;
|
---|
221 | 15 S DQ=16 ;@30
|
---|
222 | 16 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=16 D X16 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
|
---|
223 | X16 I $S('$D(^DPT(DFN,.21)):1,$P(^(.21),U,1)="":1,1:0) S Y=.331
|
---|
224 | Q
|
---|
225 | 17 S DW=".33;10",DV="RSX",DU="",DLB="E-EMER. CONTACT SAME AS NOK?",DIFLD=.3305
|
---|
226 | S DE(DW)="C17^DGRPTX17",DE(DW,"INDEX")=1
|
---|
227 | S DU="Y:YES;N:NO;"
|
---|
228 | S Y="NO"
|
---|
229 | G Y
|
---|
230 | C17 G C17S:$D(DE(17))[0 K DB
|
---|
231 | C17S S X="" G:DG(DQ)=X C17F1 K DB
|
---|
232 | C17F1 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
233 | F DIXR=604 S DIEZRXR(2,DIXR)=""
|
---|
234 | Q
|
---|
235 | X17 I $D(X),X="Y" D K1^DGLOCK2
|
---|
236 | Q
|
---|
237 | ;
|
---|
238 | 18 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=18 D X18 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
|
---|
239 | X18 I X'="Y" S Y=.331
|
---|
240 | Q
|
---|
241 | 19 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=19 D X19 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
|
---|
242 | X19 S X=$S($D(^DPT(DA,.21)):^(.21),1:"") S:X'="" ^(.33)=$P(X_"^^^^^^^^^^^",U,1,9)_U_$P(^(.33),U,10)_U_$P(X,U,11)
|
---|
243 | Q
|
---|
244 | 20 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=20 D X20 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
|
---|
245 | X20 S:$D(^DPT(DFN,.22)) $P(^(.22),U,1)=$P(^(.22),U,7)
|
---|
246 | Q
|
---|
247 | 21 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=21 D X21 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
|
---|
248 | X21 S Y=.33011
|
---|
249 | Q
|
---|
250 | 22 D:$D(DG)>9 F^DIE17,DE S DQ=22,DW=".33;1",DV="F",DU="",DLB="E-NAME",DIFLD=.331
|
---|
251 | S DE(DW)="C22^DGRPTX17",DE(DW,"INDEX")=1
|
---|
252 | G RE
|
---|
253 | C22 G C22S:$D(DE(22))[0 K DB
|
---|
254 | D ^DGRPTX18
|
---|
255 | C22S S X="" G:DG(DQ)=X C22F1 K DB
|
---|
256 | D ^DGRPTX19
|
---|
257 | C22F1 N X,X1,X2 S DIXR=595 D C22X1(U) K X2 M X2=X D C22X1("O") K X1 M X1=X
|
---|
258 | I $G(X(1))]"" D
|
---|
259 | . I '$G(XUNOTRIG) N XUNOTRIG S XUNOTRIG=1 D DELCOMP^XLFNAME2(2,.DA,.331,1.07) Q
|
---|
260 | K X M X=X2 I $G(X(1))]"" D
|
---|
261 | . I '$G(XUNOTRIG) N XUNOTRIG S XUNOTRIG=1,DG20NAME=X D NARY^XLFNAME7(.DG20NAME),UPDCOMP^XLFNAME2(2,.DA,.331,.DG20NAME,1.07,+$P($G(^DPT(DA,"NAME")),U,7),"CL35") K DG20NAME Q
|
---|
262 | G C22F2
|
---|
263 | C22X1(DION) K X
|
---|
264 | S X(1)=$G(@DIEZTMP@("V",2,DIIENS,.331,DION),$P($G(^DPT(DA,.33)),U,1))
|
---|
265 | S X=$G(X(1))
|
---|
266 | Q
|
---|
267 | C22F2 S DIEZRXR(2,DIIENS)=$$OREF^DILF($NA(@$$CREF^DILF(DIE)))
|
---|
268 | F DIXR=604 S DIEZRXR(2,DIXR)=""
|
---|
269 | Q
|
---|
270 | X22 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
|
---|
271 | I $D(X),X'?.ANP K X
|
---|
272 | Q
|
---|
273 | ;
|
---|
274 | 23 D:$D(DG)>9 F^DIE17,DE S Y=U,DQ=23 D X23 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
|
---|
275 | X23 S:X="" Y="@40"
|
---|
276 | Q
|
---|
277 | 24 D:$D(DG)>9 F^DIE17 G ^DGRPTX20
|
---|