source: ccr/trunk/p/C0CLA7DD.m@ 1724

Last change on this file since 1724 was 1586, checked in by Sam Habiel, 12 years ago

Changed license to AGPL. Some clean-up for XINDEX

  • Property svn:mergeinfo set to (toggle deleted branches)
    /ccr/branches/ohum/o-old/p/C0CLA7DD.m1290
    /ccr/branches/ohum/p/C0CLA7DD.m1291-1543
    /ccr/branches/ohum/p/p/C0CLA7DD.m1287-1289
File size: 7.7 KB
Line 
1C0CLA7DD ;WV/JMC - CCD/CCR Post Install DD X-Ref Setup Routine ; Aug 31, 2009 ; 10/30/12 10:16am
2 ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50
3 ; (C) 2009 John McCormack
4 ;
5 ; This program is free software: you can redistribute it and/or modify
6 ; it under the terms of the GNU Affero General Public License as
7 ; published by the Free Software Foundation, either version 3 of the
8 ; License, or (at your option) any later version.
9 ;
10 ; This program is distributed in the hope that it will be useful,
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; GNU Affero General Public License for more details.
14 ;
15 ; You should have received a copy of the GNU Affero General Public License
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
17 ;
18 ; Tasked by C0C post-install routine C0CENV to create C0C cross-references on V LAB file.
19 ;
20 Q
21 ;
22 ;
23EN ; Add new style cross-references to V LAB file if it exists.
24 ; OLD entry point - see new KIDS check points in C0CENV.
25 ;
26 ;
27 ; Quit if AUPNVLAB global does not exist.
28 I $$VFILE^DILFD(9000010.09)'=1 Q
29 ;
30 N MSG
31 ;
32 S MSG="Starting installation of ALR1 cross-reference at "_$$HTE^XLFDT($H,"1Z")
33 D BMES(MSG)
34 D ALR1
35 S MSG="Installation of ALR1 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
36 D BMES(MSG)
37 ;
38 S MSG="Starting installation of ALR2 cross-reference at "_$$HTE^XLFDT($H,"1Z")
39 D BMES(MSG)
40 D ALR2
41 S MSG="Installation of ALR2 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
42 D BMES(MSG)
43 ;
44 S MSG="Starting installation of ALR3 cross-reference at "_$$HTE^XLFDT($H,"1Z")
45 D BMES(MSG)
46 D ALR3
47 S MSG="Installation of ALR3 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
48 D BMES(MSG)
49 ;
50 S MSG="Starting installation of ALR4 cross-reference at "_$$HTE^XLFDT($H,"1Z")
51 D BMES(MSG)
52 D ALR4
53 S MSG="Installation of ALR4 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
54 D BMES(MSG)
55 ;
56 S MSG="Starting installation of ALR5 cross-reference at "_$$HTE^XLFDT($H,"1Z")
57 D BMES(MSG)
58 D ALR5
59 S MSG="Installation of ALR5 cross-reference completed at "_$$HTE^XLFDT($H,"1Z")
60 D BMES(MSG)
61 ;
62 Q
63 ;
64 ;
65ALR1 ; Installation of ALR1 cross-reference
66 ;
67 N C0CFLAG,C0CXR,C0CRES,C0COUT
68 ;
69 S C0CFLAG=""
70 ;
71 S C0CXR("FILE")=9000010.09
72 S C0CXR("NAME")="ALR1"
73 S C0CXR("TYPE")="R"
74 S C0CXR("USE")="S"
75 S C0CXR("EXECUTION")="R"
76 S C0CXR("ACTIVITY")="IR"
77 S C0CXR("SHORT DESCR")="X-ref to link entry with parent in LAB DATA file (#63)"
78 S C0CXR("VAL",1)=.02
79 S C0CXR("VAL",1,"SUBSCRIPT")=1
80 S C0CXR("VAL",1,"COLLATION")="F"
81 S C0CXR("VAL",2)=.06
82 S C0CXR("VAL",2,"SUBSCRIPT")=2
83 S C0CXR("VAL",2,"LENGTH")=30
84 S C0CXR("VAL",2,"COLLATION")="F"
85 S C0CXR("VAL",3)=.01
86 S C0CXR("VAL",3,"SUBSCRIPT")=3
87 S C0CXR("VAL",3,"COLLATION")="F"
88 S C0CXR("VAL",4)=1201
89 S C0CXR("VAL",4,"SUBSCRIPT")=4
90 S C0CXR("VAL",4,"COLLATION")="F"
91 D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
92 ;
93 Q
94 ;
95 ;
96ALR2 ; Installation of ALR2 cross-reference
97 ;
98 N C0CFLAG,C0CXR,C0CRES,C0COUT
99 ;
100 S C0CFLAG=""
101 ;
102 S C0CXR("FILE")=9000010.09
103 S C0CXR("NAME")="ALR2"
104 S C0CXR("TYPE")="MU"
105 S C0CXR("USE")="S"
106 S C0CXR("EXECUTION")="R"
107 S C0CXR("ACTIVITY")="IR"
108 S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result."
109 S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes"
110 S C0CXR("DESCR",2)="that has been assigned to a lab result. Allows queries to"
111 S C0CXR("DESCR",3)="retrieve the LOINC code associated with a specific test"
112 S C0CXR("DESCR",4)="result."
113 S C0CXR("SET")="S ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)="""""
114 S C0CXR("KILL")="K ^AUPNVLAB(""ALR2"",X(1),X(2),X(3),X(4),X(5),DA)"
115 S C0CXR("WHOLE KILL")="K ^AUPNVLAB(""ALR2"")"
116 S C0CXR("VAL",1)=.02
117 S C0CXR("VAL",1,"SUBSCRIPT")=1
118 S C0CXR("VAL",1,"COLLATION")="F"
119 S C0CXR("VAL",2)=1201
120 S C0CXR("VAL",2,"SUBSCRIPT")=2
121 S C0CXR("VAL",2,"COLLATION")="F"
122 S C0CXR("VAL",3)=.06
123 S C0CXR("VAL",3,"SUBSCRIPT")=3
124 S C0CXR("VAL",3,"COLLATION")="F"
125 S C0CXR("VAL",4)=.01
126 S C0CXR("VAL",4,"SUBSCRIPT")=4
127 S C0CXR("VAL",4,"COLLATION")="F"
128 S C0CXR("VAL",5)=1113
129 S C0CXR("VAL",5,"SUBSCRIPT")=5
130 S C0CXR("VAL",5,"COLLATION")="F"
131 D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
132 ;
133 Q
134 ;
135 ;
136ALR3 ; Installation of ALR3 cross-reference
137 ;
138 N C0CFLAG,C0CXR,C0CRES,C0COUT
139 ;
140 S C0CFLAG=""
141 ;
142 S C0CXR("FILE")=9000010.09
143 S C0CXR("NAME")="ALR3"
144 S C0CXR("TYPE")="R"
145 S C0CXR("USE")="S"
146 S C0CXR("EXECUTION")="F"
147 S C0CXR("ACTIVITY")="IR"
148 S C0CXR("SHORT DESCR")="X-ref for LOINC code related to test result - any patient"
149 S C0CXR("DESCR",1)="This cross-reference is used to identify the LOINC codes that has been assigned to a lab result. Allows queries"
150 S C0CXR("DESCR",2)="to retrieve the LOINC code associated with a specific test result. It allows any patient"
151 S C0CXR("DESCR",3)="lab results to be identified by LOINC"
152 S C0CXR("VAL",1)=1113
153 S C0CXR("VAL",1,"SUBSCRIPT")=1
154 S C0CXR("VAL",1,"COLLATION")="F"
155 ;
156 D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
157 ;
158 Q
159 ;
160 ;
161ALR4 ; Installation of ALR4 cross-reference
162 ;
163 N C0CFLAG,C0CXR,C0CRES,C0COUT
164 ;
165 S C0CFLAG=""
166 ;
167 S C0CXR("FILE")=9000010.09
168 S C0CXR("NAME")="ALR4"
169 S C0CXR("TYPE")="R"
170 S C0CXR("USE")="S"
171 S C0CXR("EXECUTION")="R"
172 S C0CXR("ACTIVITY")="IR"
173 S C0CXR("SHORT DESCR")="X-ref by patient and collection date/time"
174 S C0CXR("DESCR",1)="This cross-reference is used to identify all lab results for a"
175 S C0CXR("DESCR",2)="patient by collection date/time. This includes results that are only in"
176 S C0CXR("DESCR",3)="this file and therefore do not have a corresponding entry in LAB DATA"
177 S C0CXR("DESCR",4)="file (#63)."
178 S C0CXR("VAL",1)=.02
179 S C0CXR("VAL",1,"SUBSCRIPT")=1
180 S C0CXR("VAL",1,"COLLATION")="F"
181 S C0CXR("VAL",2)=1201
182 S C0CXR("VAL",2,"SUBSCRIPT")=2
183 S C0CXR("VAL",2,"COLLATION")="F"
184 ;
185 D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
186 ;
187 Q
188 ;
189 ;
190ALR5 ; Installation of ALR5 cross-reference
191 ;
192 N C0CFLAG,C0CXR,C0CRES,C0COUT
193 ;
194 S C0CFLAG=""
195 ;
196 S C0CXR("FILE")=9000010.09
197 S C0CXR("NAME")="ALR5"
198 S C0CXR("TYPE")="R"
199 S C0CXR("USE")="S"
200 S C0CXR("EXECUTION")="R"
201 S C0CXR("ACTIVITY")="IR"
202 S C0CXR("SHORT DESCR")="X-ref by patient and results availble date/time"
203 S C0CXR("DESCR",1)="This cross-reference is used to identify all lab results for a"
204 S C0CXR("DESCR",2)="patient by results available date/time. This includes results that are only in"
205 S C0CXR("DESCR",3)="this file and therefore do not have a corresponding entry in LAB DATA"
206 S C0CXR("DESCR",4)="file (#63)."
207 S C0CXR("VAL",1)=.02
208 S C0CXR("VAL",1,"SUBSCRIPT")=1
209 S C0CXR("VAL",1,"COLLATION")="F"
210 S C0CXR("VAL",2)=1212
211 S C0CXR("VAL",2,"SUBSCRIPT")=2
212 S C0CXR("VAL",2,"COLLATION")="F"
213 ;
214 D CREIXN^DDMOD(.C0CXR,C0CFLAG,.C0CRES,"C0COUT")
215 ;
216 Q
217 ;
218 ;
219REINDEX ; Set data into indexes for current entries.
220 ;
221 ;
222 N C0CHLOG,DA,DIK,MSG
223 ;
224 S C0CHLOG("START")=$H
225 S MSG="Starting indexing of ALR1, ALR2, ALR4, ALR5 indexes - "_$$HTE^XLFDT(C0CHLOG("START"),"1Z")
226 D BMES(MSG),SENDXQA(MSG)
227 ;
228 S DIK="^AUPNVLAB("
229 S DIK(1)=".02^ALR1^ALR2^ALR4^ALR5"
230 D ENALL^DIK
231 ;
232 S C0CHLOG("END")=$H
233 S MSG="Finished indexing of ALR1, ALR2, ALR4, ALR5 indexes - "_$$HTE^XLFDT(C0CHLOG("END"),"1Z")
234 D BMES(MSG),SENDXQA(MSG)
235 ;
236 S MSG="Elapsed Time: "_$$HDIFF^XLFDT(C0CHLOG("END"),C0CHLOG("START"),3)
237 D BMES(MSG)
238 ;
239 S C0CHLOG("START")=$H
240 S MSG="Starting indexing of ALR3 index - "_$$HTE^XLFDT(C0CHLOG("START"),"1Z")
241 D BMES(MSG),SENDXQA(MSG)
242 ;
243 K DA,DIK
244 S DIK="^AUPNVLAB("
245 S DIK(1)="1113^ALR3"
246 D ENALL^DIK
247 ;
248 S C0CHLOG("END")=$H
249 S MSG="Finished indexing of ALR3 index - "_$$HTE^XLFDT(C0CHLOG("END"),"1Z")
250 D BMES(MSG),SENDXQA(MSG)
251 ;
252 S MSG="Elapsed Time: "_$$HDIFF^XLFDT(C0CHLOG("END"),C0CHLOG("START"),3)
253 D BMES(MSG)
254 ;
255 Q
256 ;
257 ;
258BMES(STR) ; Write BMES^XPDUTL statements
259 ;
260 D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
261 ;
262 Q
263 ;
264 ;
265SENDXQA(MSG) ; Send alert for reindex status
266 ;
267 N XQA,XQAMSG
268 ;
269 S XQA(DUZ)=""
270 S XQAMSG=MSG
271 D SETUP^XQALERT
272 ;
273 Q
Note: See TracBrowser for help on using the repository browser.