1 | C0CLA7DD ;WV/JMC - CCD/CCR Post Install DD X-Ref Setup Routine; ;6 Jul 2009
|
---|
2 | ;;1.0;C0C;;May 19, 2009;
|
---|
3 | ;
|
---|
4 | ; Tasked by C0C post-install routine C0CENV to create C0C cross-references on V LAB file.
|
---|
5 | ;
|
---|
6 | Q
|
---|
7 | ;
|
---|
8 | ;
|
---|
9 | EN ; Add new style cross-references to V LAB file if it exists.
|
---|
10 | ; OLD entry point - see new KIDS check points in C0CENV.
|
---|
11 | ;
|
---|
12 | ;
|
---|
13 | ; Quit if AUPNVLAB global does not exist.
|
---|
14 | I $$VFILE^DILFD(9000010.09)'=1 Q
|
---|
15 | ;
|
---|
16 | N MSG
|
---|
17 | ;
|
---|
18 | S MSG="Starting installation of ALR1 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
19 | D BMES(MSG)
|
---|
20 | D ALR1
|
---|
21 | S MSG="Installation of ALR1 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
22 | D BMES(MSG)
|
---|
23 | ;
|
---|
24 | S MSG="Starting installation of ALR2 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
25 | D BMES(MSG)
|
---|
26 | D ALR2
|
---|
27 | S MSG="Installation of ALR2 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
28 | D BMES(MSG)
|
---|
29 | ;
|
---|
30 | S MSG="Starting installation of ALR3 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
31 | D BMES(MSG)
|
---|
32 | D ALR3
|
---|
33 | S MSG="Installation of ALR3 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
34 | D BMES(MSG)
|
---|
35 | ;
|
---|
36 | S MSG="Starting installation of ALR4 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
37 | D BMES(MSG)
|
---|
38 | D ALR4
|
---|
39 | S MSG="Installation of ALR4 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
40 | D BMES(MSG)
|
---|
41 | ;
|
---|
42 | S MSG="Starting installation of ALR5 cross-reference at "_$$HTE^XLFDT($H,"1Z")
|
---|
43 | D BMES(MSG)
|
---|
44 | D ALR5
|
---|
45 | S MSG="Installation of ALR5 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
|
---|
46 | D BMES(MSG)
|
---|
47 | ;
|
---|
48 | Q
|
---|
49 | ;
|
---|
50 | ;
|
---|
51 | ALR1 ; Installation of ALR1 cross-reference
|
---|
52 | ;
|
---|
53 | N C0CFLAG,C0CXR,C0CRES,C0COUT
|
---|
54 | ;
|
---|
55 | S C0CFLAG=""
|
---|
56 | ;
|
---|
57 | S C0CXR("FILE")=9000010.09
|
---|
58 | S C0CXR("NAME")="ALR1"
|
---|
59 | S C0CXR("TYPE")="R"
|
---|
60 | S C0CXR("USE")="S"
|
---|
61 | S C0CXR("EXECUTION")="R"
|
---|
62 | S C0CXR("ACTIVITY")="IR"
|
---|
63 | S C0CXR("SHORT DESCR")="X-ref to link entry with parent in LAB DATA file (#63)"
|
---|
64 | S C0CXR("VAL",1)=.02
|
---|
65 | S C0CXR("VAL",1,"SUBSCRIPT")=1
|
---|
66 | S C0CXR("VAL",1,"COLLATION")="F"
|
---|
67 | S C0CXR("VAL",2)=.06
|
---|
68 | S C0CXR("VAL",2,"SUBSCRIPT")=2
|
---|
69 | S C0CXR("VAL",2,"LENGTH")=30
|
---|
70 | S C0CXR("VAL",2,"COLLATION")="F"
|
---|
71 | S C0CXR("VAL",3)=.01
|
---|
72 | S C0CXR("VAL",3,"SUBSCRIPT")=3
|
---|
73 | S C0CXR("VAL",3,"COLLATION")="F"
|
---|
74 | S C0CXR("VAL",4)=1201
|
---|
75 | S C0CXR("VAL",4,"SUBSCRIPT")=4
|
---|
76 | S C0CXR("VAL",4,"COLLATION")="F"
|
---|
77 | D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
|
---|
78 | ;
|
---|
79 | Q
|
---|
80 | ;
|
---|
81 | ;
|
---|
82 | ALR2 ; Installation of ALR2 cross-reference
|
---|
83 | ;
|
---|
84 | N C0CFLAG,C0CXR,C0CRES,C0COUT
|
---|
85 | ;
|
---|
86 | S C0CFLAG=""
|
---|
87 | ;
|
---|
88 | S C0CXR("FILE")=9000010.09
|
---|
89 | S C0CXR("NAME")="ALR2"
|
---|
90 | S C0CXR("TYPE")="MU"
|
---|
91 | S C0CXR("USE")="S"
|
---|
92 | S C0CXR("EXECUTION")="R"
|
---|
93 | S C0CXR("ACTIVITY")="IR"
|
---|
94 | S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result."
|
---|
95 | S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes"
|
---|
96 | S C0CXR("DESCR",2)="that has been assigned to a lab result. Allows queries to"
|
---|
97 | S C0CXR("DESCR",3)="retrieve the LOINC code associated with a specific test"
|
---|
98 | S C0CXR("DESCR",4)="result."
|
---|
99 | S C0CXR("SET")="S ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)="""""
|
---|
100 | S C0CXR("KILL")="K ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)"
|
---|
101 | S C0CXR("WHOLE KILL")="K ^AUPNVLAB(""ALR2"")"
|
---|
102 | S C0CXR("VAL",1)=.02
|
---|
103 | S C0CXR("VAL",1,"SUBSCRIPT")=1
|
---|
104 | S C0CXR("VAL",1,"COLLATION")="F"
|
---|
105 | S C0CXR("VAL",2)=1201
|
---|
106 | S C0CXR("VAL",2,"SUBSCRIPT")=2
|
---|
107 | S C0CXR("VAL",2,"COLLATION")="F"
|
---|
108 | S C0CXR("VAL",3)=.06
|
---|
109 | S C0CXR("VAL",3,"SUBSCRIPT")=3
|
---|
110 | S C0CXR("VAL",3,"COLLATION")="F"
|
---|
111 | S C0CXR("VAL",4)=.01
|
---|
112 | S C0CXR("VAL",4,"SUBSCRIPT")=4
|
---|
113 | S C0CXR("VAL",4,"COLLATION")="F"
|
---|
114 | S C0CXR("VAL",5)=1113
|
---|
115 | S C0CXR("VAL",5,"SUBSCRIPT")=5
|
---|
116 | S C0CXR("VAL",5,"COLLATION")="F"
|
---|
117 | D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
|
---|
118 | ;
|
---|
119 | Q
|
---|
120 | ;
|
---|
121 | ;
|
---|
122 | ALR3 ; Installation of ALR3 cross-reference
|
---|
123 | ;
|
---|
124 | N C0CFLAG,C0CXR,C0CRES,C0COUT
|
---|
125 | ;
|
---|
126 | S C0CFLAG=""
|
---|
127 | ;
|
---|
128 | S C0CXR("FILE")=9000010.09
|
---|
129 | S C0CXR("NAME")="ALR3"
|
---|
130 | S C0CXR("TYPE")="R"
|
---|
131 | S C0CXR("USE")="S"
|
---|
132 | S C0CXR("EXECUTION")="F"
|
---|
133 | S C0CXR("ACTIVITY")="IR"
|
---|
134 | S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result - any patient"
|
---|
135 | S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes that has been assigned to a lab result. Allows queries"
|
---|
136 | S C0CXR("DESCR",2)="to retrieve the LOINC code associated with a specific test result. It allows any patient"
|
---|
137 | S C0CXR("DESCR",3)="lab results to be identified by LOINC"
|
---|
138 | S C0CXR("VAL",1)=1113
|
---|
139 | S C0CXR("VAL",1,"SUBSCRIPT")=1
|
---|
140 | S C0CXR("VAL",1,"COLLATION")="F"
|
---|
141 | ;
|
---|
142 | D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
|
---|
143 | ;
|
---|
144 | Q
|
---|
145 | ;
|
---|
146 | ;
|
---|
147 | ALR4 ; Installation of ALR4 cross-reference
|
---|
148 | ;
|
---|
149 | N C0CFLAG,C0CXR,C0CRES,C0COUT
|
---|
150 | ;
|
---|
151 | S C0CFLAG=""
|
---|
152 | ;
|
---|
153 | S C0CXR("FILE")=9000010.09
|
---|
154 | S C0CXR("NAME")="ALR4"
|
---|
155 | S C0CXR("TYPE")="R"
|
---|
156 | S C0CXR("USE")="S"
|
---|
157 | S C0CXR("EXECUTION")="R"
|
---|
158 | S C0CXR("ACTIVITY")="IR"
|
---|
159 | S C0CXR("SHORT DESCR")="X-ref by patient and collection date/time"
|
---|
160 | S C0CXR("DESCR",1)="This cross-reference is used to identify all lab results for a"
|
---|
161 | S C0CXR("DESCR",2)="patient by collection date/time. This includes results that are only in"
|
---|
162 | S C0CXR("DESCR",3)="this file and therefore do not have a corresponding entry in LAB DATA"
|
---|
163 | S C0CXR("DESCR",4)="file (#63)."
|
---|
164 | S C0CXR("VAL",1)=.02
|
---|
165 | S C0CXR("VAL",1,"SUBSCRIPT")=1
|
---|
166 | S C0CXR("VAL",1,"COLLATION")="F"
|
---|
167 | S C0CXR("VAL",2)=1201
|
---|
168 | S C0CXR("VAL",2,"SUBSCRIPT")=2
|
---|
169 | S C0CXR("VAL",2,"COLLATION")="F"
|
---|
170 | ;
|
---|
171 | D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
|
---|
172 | ;
|
---|
173 | Q
|
---|
174 | ;
|
---|
175 | ;
|
---|
176 | ALR5 ; Installation of ALR5 cross-reference
|
---|
177 | ;
|
---|
178 | N C0CFLAG,C0CXR,C0CRES,C0COUT
|
---|
179 | ;
|
---|
180 | S C0CFLAG=""
|
---|
181 | ;
|
---|
182 | S C0CXR("FILE")=9000010.09
|
---|
183 | S C0CXR("NAME")="ALR5"
|
---|
184 | S C0CXR("TYPE")="R"
|
---|
185 | S C0CXR("USE")="S"
|
---|
186 | S C0CXR("EXECUTION")="R"
|
---|
187 | S C0CXR("ACTIVITY")="IR"
|
---|
188 | S C0CXR("SHORT DESCR")="X-ref by patient and results availble date/time"
|
---|
189 | S C0CXR("DESCR",1)="This cross-reference is used to identify all lab results for a"
|
---|
190 | S C0CXR("DESCR",2)="patient by results available date/time. This includes results that are only in"
|
---|
191 | S C0CXR("DESCR",3)="this file and therefore do not have a corresponding entry in LAB DATA"
|
---|
192 | S C0CXR("DESCR",4)="file (#63)."
|
---|
193 | S C0CXR("VAL",1)=.02
|
---|
194 | S C0CXR("VAL",1,"SUBSCRIPT")=1
|
---|
195 | S C0CXR("VAL",1,"COLLATION")="F"
|
---|
196 | S C0CXR("VAL",2)=1212
|
---|
197 | S C0CXR("VAL",2,"SUBSCRIPT")=2
|
---|
198 | S C0CXR("VAL",2,"COLLATION")="F"
|
---|
199 | ;
|
---|
200 | D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
|
---|
201 | ;
|
---|
202 | Q
|
---|
203 | ;
|
---|
204 | ;
|
---|
205 | REINDEX ; Set data into indexes for current entries.
|
---|
206 | ;
|
---|
207 | ;
|
---|
208 | N %,C0CNT,DA,DIK,MSG
|
---|
209 | ;
|
---|
210 | S (C0CNT,DA)=0
|
---|
211 | S DIK="^AUPNVLAB("
|
---|
212 | S DIK(1)=".02^ALR1^ALR2^ALR4^ALR5"
|
---|
213 | ;
|
---|
214 | ; Create checkpoint
|
---|
215 | S %=$$NEWCP^XPDUTL("RPMS7","","")
|
---|
216 | ;
|
---|
217 | ; Retrieve checkpoint value if previously saved
|
---|
218 | S %=$$PARCP^XPDUTL("RPMS7","")
|
---|
219 | I %'="" S DA=%
|
---|
220 | ;
|
---|
221 | S MSG="Starting indexing of ALR1, ALR2, ALR4, ALR5 indexes"
|
---|
222 | D BMES(MSG)
|
---|
223 | ;
|
---|
224 | I DA'="END" D
|
---|
225 | . F S DA=$O(^AUPNVLAB(DA)) Q:DA<1 D
|
---|
226 | . . D EN1^DIK
|
---|
227 | . . S C0CNT=C0CNT+1
|
---|
228 | . . I (C0CNT#100)=0 S %=$$UPCP^XPDUTL("RPMS7",DA)
|
---|
229 | S %=$$UPCP^XPDUTL("RPMS7","END")
|
---|
230 | ;
|
---|
231 | S MSG="Finished indexing of ALR1, ALR2, ALR4, ALR5 indexes"
|
---|
232 | D BMES(MSG)
|
---|
233 | ;
|
---|
234 | K DA,DIK
|
---|
235 | ;
|
---|
236 | S (C0CNT,DA)=0
|
---|
237 | S DIK="^AUPNVLAB("
|
---|
238 | S DIK(1)="1113^ALR3"
|
---|
239 | ;
|
---|
240 | ; Create checkpoint
|
---|
241 | S %=$$NEWCP^XPDUTL("RPMS8","","")
|
---|
242 | ;
|
---|
243 | ; Retrieve checkpoint value if previously saved
|
---|
244 | S %=$$PARCP^XPDUTL("RPMS8","")
|
---|
245 | I %'="" S DA=%
|
---|
246 | ;
|
---|
247 | S MSG="Starting indexing of ALR3 index"
|
---|
248 | D BMES(MSG)
|
---|
249 | ;
|
---|
250 | I DA'="END" D
|
---|
251 | . F S DA=$O(^AUPNVLAB(DA)) Q:DA<1 D
|
---|
252 | . . D EN1^DIK
|
---|
253 | . . S C0CNT=C0CNT+1
|
---|
254 | . . I (C0CNT#100)=0 S %=$$UPCP^XPDUTL("RPMS8",DA)
|
---|
255 | S %=$$UPCP^XPDUTL("RPMS8","END")
|
---|
256 | ;
|
---|
257 | S MSG="Finished indexing of ALR3 index"
|
---|
258 | D BMES(MSG)
|
---|
259 | ;
|
---|
260 | ;
|
---|
261 | Q
|
---|
262 | ;
|
---|
263 | ;
|
---|
264 | BMES(STR) ; Write BMES^XPDUTL statements
|
---|
265 | ;
|
---|
266 | D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
|
---|
267 | ;
|
---|
268 | Q
|
---|