source: FOIAVistA/tag/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXP119I.m@ 628

Last change on this file since 628 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 8.2 KB
Line 
1PXP119I ;SLC/PKR,JVS - Create cross-references. ;10/12/2004
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**119**;Aug 12, 1996
3 ;
4 Q
5 ;===============================================================
6AED ;Reindex Health Factor "AED" Index
7 Q:$D(^AUPNVHF("AED"))
8 D BMES^XPDUTL(" The installation will pause while the index is being populated.")
9 D BMES^XPDUTL(" If you have a large V Health Factor file this could take awhile.")
10 N CNT,IEN,DA,DIK
11 S CNT=0
12 S DIK="^AUPNVHF("
13 S DIK(1)="81203^AED"
14 S XPDIDTOT=$P($G(^AUPNVHF(0)),"^",4)
15 S IEN=0 F S IEN=$O(^AUPNVHF(IEN)) Q:IEN<1 S CNT=CNT+1 D
16 .I '$D(^AUPNVHF(IEN,12)) Q
17 .I +$P($G(^AUPNVHF(IEN,12)),"^",1)=0 Q
18 .I '$D(^AUPNVHF(IEN,812)) Q
19 .I +$P($G(^AUPNVHF(IEN,812)),"^",3)=0 Q
20 .S DA=IEN
21 .D EN1^DIK
22 .I $D(XPDNM),'(CNT#1000) D UPDATE^XPDID(CNT)
23 Q
24 ;
25 ;===============================================================
26CVCPT ;Create cross-reference for V CPT.
27 N MSG,RESULT,UITEM,XREF
28 D BMES^XPDUTL("Creating V CPT cross-reference.")
29 ;Set the XREF nodes
30 S XREF("FILE")=9000010.18
31 S XREF("ROOT FILE")=9000010.18
32 S XREF("SET")="D SVFILEC^PXPXRM(9000010.18,.X,.DA)"
33 S XREF("KILL")="D KVFILEC^PXPXRM(9000010.18,.X,.DA)"
34 S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.18)"
35 D SXREFVF(.XREF,"CPT code")
36 S UITEM="CPT CODE"
37 S XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IPP"","_UITEM_",PP,DFN,VISIT DATE,DAS) and"
38 S XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PPI"",DFN,PP,"_UITEM_",VISIT DATE,DAS)"
39 S XREF("DESCR",7)="respectively. PP is the principal procedure code. Possible values are Y (yes), N (no) or U (undefined)."
40 S XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
41 S XREF("VAL",4)=.07
42 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
43 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
44 Q
45 ;
46 ;===============================================================
47CVFILE ;Create all the V file cross-references.
48 D BMES^XPDUTL("Creating V file cross-references.")
49 D CVCPT
50 D CVHF
51 D CVIMM
52 D CVPATED
53 D CVPOV
54 D CVSK
55 D CVXAM
56 Q
57 ;
58 ;===============================================================
59CVHF ;Create cross-reference for V HEALTH FACTOR.
60 N MSG,RESULT,XREF
61 D BMES^XPDUTL("Creating V Health Factor cross-reference.")
62 ;Set the XREF nodes
63 S XREF("FILE")=9000010.23
64 S XREF("ROOT FILE")=9000010.23
65 S XREF("SET")="D SVFILE^PXPXRM(9000010.23,.X,.DA)"
66 S XREF("KILL")="D KVFILE^PXPXRM(9000010.23,.X,.DA)"
67 S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.23)"
68 D SXREFVF(.XREF,"health factor")
69 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
70 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
71 ;
72 N PXREF
73 K MSG,RESULT
74 D BMES^XPDUTL("Creating V Health Factor AED cross-reference.")
75 S PXREF("FILE")=9000010.23
76 S PXREF("ROOT FILE")=9000010.23
77 S PXREF("WHOLE KILL")="K ^AUPNVHF(""AED"")"
78 S PXREF("NAME")="AED"
79 S PXREF("TYPE")="R"
80 S PXREF("SHORT DESCR")="AED,EVENT DATE AND TIME,DATA SOURCE,DA"
81 S PXREF("DESCR",1)="This cross-reference creates an index of the Event"
82 S PXREF("DESCR",2)="Date and Time field and the Data Source field."
83 S PXREF("USE")="S"
84 S PXREF("EXECUTION")="R"
85 S PXREF("ACTIVITY")="IR"
86 S PXREF("VAL",1)=1201
87 S PXREF("VAL",1,"SUBSCRIPT")=1
88 S PXREF("VAL",2)=81203
89 S PXREF("VAL",2,"SUBSCRIPT")=3
90 S PXREF("VAL",3)=.02
91 S PXREF("VAL",3,"SUBSCRIPT")=2
92 D CREIXN^DDMOD(.PXREF,"k",.RESULT,"","MSG")
93 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
94 D AED
95 Q
96 ;
97 ;===============================================================
98CVIMM ;Create cross-reference for V IMMUNIZATION.
99 N MSG,RESULT,XREF
100 D BMES^XPDUTL("Creating V Immunization cross-reference.")
101 ;Set the XREF nodes
102 S XREF("FILE")=9000010.11
103 S XREF("ROOT FILE")=9000010.11
104 S XREF("SET")="D SVFILE^PXPXRM(9000010.11,.X,.DA)"
105 S XREF("KILL")="D KVFILE^PXPXRM(9000010.11,.X,.DA)"
106 S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.11)"
107 D SXREFVF(.XREF,"immunization")
108 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
109 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
110 Q
111 ;
112 ;===============================================================
113CVPATED ;Create cross-reference for V PATIENT ED.
114 N MSG,RESULT,XREF
115 D BMES^XPDUTL("Creating V Patient Ed cross-reference.")
116 ;Set the XREF nodes
117 S XREF("FILE")=9000010.16
118 S XREF("ROOT FILE")=9000010.16
119 S XREF("SET")="D SVFILE^PXPXRM(9000010.16,.X,.DA)"
120 S XREF("KILL")="D KVFILE^PXPXRM(9000010.16,.X,.DA)"
121 S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.16)"
122 D SXREFVF(.XREF,"education topic")
123 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
124 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
125 Q
126 ;
127 ;===============================================================
128CVPOV ;Create cross-reference for V POV.
129 N MSG,RESULT,UITEM,XREF
130 D BMES^XPDUTL("Creating V POV cross-reference.")
131 ;Set the XREF nodes
132 S XREF("FILE")=9000010.07
133 S XREF("ROOT FILE")=9000010.07
134 S XREF("SET")="D SVFILEC^PXPXRM(9000010.07,.X,.DA)"
135 S XREF("KILL")="D KVFILEC^PXPXRM(9000010.07,.X,.DA)"
136 S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.07)"
137 D SXREFVF(.XREF,"ICD9 code")
138 S UITEM="ICD9 CODE"
139 S XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IPP"","_UITEM_",PS,DFN,VISIT DATE,DAS) and"
140 S XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PPI"",DFN,PS,"_UITEM_",VISIT DATE,DAS)"
141 S XREF("DESCR",7)="respectively. PS is the primary/secondary code. Possible values are P (primary), S (secondary) or U (undefined)."
142 S XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
143 S XREF("VAL",4)=.12
144 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
145 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
146 Q
147 ;
148 ;===============================================================
149CVSK ;Create cross-reference for V SKIN TEST.
150 N MSG,RESULT,XREF
151 D BMES^XPDUTL("Creating V Skin Test cross-reference.")
152 ;Set the XREF nodes
153 S XREF("FILE")=9000010.12
154 S XREF("ROOT FILE")=9000010.12
155 S XREF("SET")="D SVFILE^PXPXRM(9000010.12,.X,.DA)"
156 S XREF("KILL")="D KVFILE^PXPXRM(9000010.12,.X,.DA)"
157 S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.12)"
158 D SXREFVF(.XREF,"skin test")
159 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
160 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
161 Q
162 ;
163 ;===============================================================
164CVXAM ;Create cross-reference for V EXAM.
165 N MSG,RESULT,XREF
166 D BMES^XPDUTL("Creating V Exam cross-reference.")
167 ;Set the XREF nodes
168 S XREF("FILE")=9000010.13
169 S XREF("ROOT FILE")=9000010.13
170 S XREF("SET")="D SVFILE^PXPXRM(9000010.13,.X,.DA)"
171 S XREF("KILL")="D KVFILE^PXPXRM(9000010.13,.X,.DA)"
172 S XREF("WHOLE KILL")="K ^PXRMINDX(9000010.13)"
173 D SXREFVF(.XREF,"exam")
174 D CREIXN^DDMOD(.XREF,"k",.RESULT,"","MSG")
175 I RESULT="" D DCERRMSG^PXRMP12I(.MSG,.XREF)
176 Q
177 ;
178 ;===============================================================
179DCERRMSG(MSG,XREF) ;Display creation error message.
180 W !,"Cross-reference could not be created!"
181 W !,"Error message:"
182 D AWRITE^PXRMUTIL("MSG")
183 W !!,"Cross-reference information:"
184 D AWRITE^PXRMUTIL("XREF")
185 Q
186 ;
187 ;===============================================================
188SXREFVF(XREF,ITEM) ;Set XREF array nodes common for all V files.
189 N UITEM
190 S UITEM=$$UP^XLFSTR(ITEM)
191 S XREF("TYPE")="MU"
192 S XREF("NAME")="ACR"
193 S XREF("SHORT DESCR")="Clinical Reminders index."
194 S XREF("DESCR",1)="This cross-reference builds two indexes, one for finding"
195 S XREF("DESCR",2)="all patients with a particular "_ITEM_" and one for finding all"
196 S XREF("DESCR",3)="the "_ITEM_"s a patient has."
197 S XREF("DESCR",4)="The indexes are stored in the Clinical Reminders index global as:"
198 S XREF("DESCR",5)=" ^PXRMINDX("_XREF("FILE")_",""IP"","_UITEM_",DFN,VISIT DATE,DAS) and"
199 S XREF("DESCR",6)=" ^PXRMINDX("_XREF("FILE")_",""PI"",DFN,"_UITEM_",VISIT DATE,DAS)"
200 S XREF("DESCR",7)="respectively."
201 S XREF("DESCR",8)="For all the details, see the Clinical Reminders Index Technical Guide/Programmer's Manual."
202 S XREF("USE")="ACTION"
203 S XREF("EXECUTION")="R"
204 S XREF("ACTIVITY")="IR"
205 S XREF("VAL",1)=.01
206 S XREF("VAL",1,"SUBSCRIPT")=1
207 S XREF("VAL",2)=.02
208 S XREF("VAL",2,"SUBSCRIPT")=2
209 S XREF("VAL",3)=.03
210 S XREF("VAL",3,"SUBSCRIPT")=3
211 Q
212 ;
213 ;===============================================================
214VHFAED ;Reindex Health Factor "AED" Index
215 S DIK="^AUPNVHF("
216 S DIK(1)="81203^AED"
217 D ENALL^DIK
218 Q
219 ;
220 ;===============================================================
221VHFTSK ;Task off Health Factor AED Cross ref build
222 S ZTRTN="VHFAED^PXP119I"
223 S ZTDESC="V Health Factors Index AED x-ref"
224 S ZTIO=""
225 S ZTDTH=$H
226 D ^%ZTLOAD
227 Q
228 ;
Note: See TracBrowser for help on using the repository browser.