source: FOIAVistA/trunk/r/ZZREGIONAL-A1C-A5C-CRHD-RGED-RGUT-RGWB-RG/RGMTMONX.m@ 1671

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

initial load of FOIAVistA 6/30/08 version

File size: 7.6 KB
Line 
1RGMTMONX ;BIR/CML,PTD-MPI/PD Monitor HL7 Messaging/Filers and Setups (CONT) ;07/30/02
2 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**20,30,31**;30 Apr 99
3 ;
4 ;Reference to ^DIC(4,"D", supported by IA #3627
5 ;Reference to ^HLCS(870 supported by IA #3335
6 ;Reference to ^DGCN(391.91, supported by IA #2911
7 ;
8START ;
9 I DEV,'$D(RGHLMQ) W @IOF,"Logical Link Monitor:",!,"=====================",!
10 ;
11 K ^XTMP("RGMT","MONT")
12 I '$D(TXTCNT) S TXTCNT=0
13 I '$D(LOCSITE) S LOCSITE=$P($$SITE^VASITE(),"^")
14 ;
15 ;MULTID=# of multiple "D" xrefs in ^DIC(4 for Station #
16 ;NOINST=# of VAxxx Links with no INSTITUTION defined
17 ;BADINST=# of VAxxx Links that have an incorrect INSTITUTION defined
18 ;BADTF=# of patients with invalid Treating Facilities
19 ;NONVA=# of non-VAxxx Logical Links with INSTITUTION defined
20 ;CNT=# of VAxxx Logical Links processed
21 ;
22 S (NOINST,BADINST,BADTF,MULTID,NONVA,CNT,DODHOST)=0
23 ;
241 ;
25 I DEV,'$D(RGHLMQ) W !,"=> Checks 1-3: Checking Link Setups..."
26 K LINKARR
27 S LINK=""
28 F S LINK=$O(^HLCS(870,"B",LINK)) Q:LINK="" D
29 .I LINK'="MPIVA"&($E(LINK,1,2)'="VA") Q
30 .I $E(LINK,1,2)="VA"&($L(LINK," ")>1) Q
31 .Q:LINK["-"
32 .I $T(@LINK)']"" Q
33 .S CNT=CNT+1
34 .S VALSTA=$P($P($T(@LINK),";;",2),"^",2)
35 .;build array of links with valid station numbers to do check 5
36 .S LINKARR(VALSTA)=LINK
372 .;check for multiple "D" xrefs in ^DIC(4 for this station #)
38 .S (XCNT,QQ)=0
39 .F S QQ=$O(^DIC(4,"D",VALSTA,QQ)) Q:'QQ D
40 ..S XCNT=XCNT+1
41 ..I QQ["." D
42 ...S ^XTMP("RGMT","MONT","DECIMEL INST IEN",VALSTA,QQ)=""
43 .I XCNT>1 D
44 ..S LINKIEN=$O(^HLCS(870,"B",LINK,0))
45 ..S MULTID=MULTID+1
46 ..S (XCNT,QQ)=0
47 ..F S QQ=$O(^DIC(4,"D",VALSTA,QQ)) Q:'QQ D
48 ...S ^XTMP("RGMT","MONT","MULTI DXREF",VALSTA,QQ)=$$GET1^DIQ(4,QQ_",",.01)_"^"_$$GET1^DIQ(870,LINKIEN_",",.01)_"^"_$$GET1^DIQ(870,LINKIEN_",",.02,"I")
493 .;check for defined INSTITUTION and set (if necessary) AUTOSTART and RESTART for links in file 870
50 .S LINKIEN=$O(^HLCS(870,"B",LINK,0))
51 .S LINKINST=$$GET1^DIQ(870,LINKIEN_",",.02,"I")
52 .I 'LINKINST D Q
53 ..S NOINST=NOINST+1
54 ..S ^XTMP("RGMT","MONT","NO INST",LINK)=LINKIEN_"^"_$P($P($T(@LINK),";;",2),"^",1,2)
55 ..S TXT=" ** No INSTITUTION defined for "_LINK D TXT
564 .;check for incorrect INSTITUTION
57 .S LOCSTA=$P($$NS^XUAF4(LINKINST),"^",2)
58 .I LOCSTA'=VALSTA D
59 ..S BADINST=BADINST+1
60 ..S ^XTMP("RGMT","MONT","BAD INST",LINK)=LOCSTA
61 ..S TXT=" ** Bad INSTITUTION of Station #"_LOCSTA_" defined for "_LINK_" - should be Station #"_VALSTA D TXT
62 ;
635 ;
64 I DEV,'$D(RGHLMQ) W !,"=> Check 4 : Checking for patients with invalid Treating Facilities..."
65 S TFIEN=0
66 F S TFIEN=$O(^DGCN(391.91,"C",TFIEN)) Q:'TFIEN D
67 .S TF=$P($$NS^XUAF4(TFIEN),"^",2)
68 .I TF="" D Q
69 ..S TFIFN=0 F S TFIFN=$O(^DGCN(391.91,"C",TFIEN,TFIFN)) Q:'TFIFN D
70 ...S BADTF=BADTF+1
71 ...S DFN=$$GET1^DIQ(391.91,TFIFN_",",.01,"I")
72 ...I DEV,'$D(RGHLMQ) D
73 ....W !?3,"** TF with no station # for ",$P(^DIC(4,TFIEN,0),"^")," for DFN #",DFN," - (TF IEN #",TFIFN,")"
74 .I '$D(LINKARR(TF)) D
75 ..S IEN=0 F S IEN=$O(^DGCN(391.91,"C",TFIEN,IEN)) Q:'IEN D
76 ...I TF=200 S DODHOST=DODHOST+1 Q
77 ...S DFN=$$GET1^DIQ(391.91,IEN_",",.01,"I")
78 ...S BADTF=BADTF+1
79 ...S ^XTMP("RGMT","MONT","BAD TF",DFN)=$$GET1^DIQ(4,TFIEN_",",.01)_"^"_IEN
80 ...I DEV,'$D(RGHLMQ) W !?3,"** Bad TF of ",$P(^DIC(4,TFIEN,0),"^")," for DFN #",DFN," - (TF IEN #",IEN,")"
81 ;
826 ;
83 I DEV,'$D(RGHLMQ) W !,"=> Check 5 : Checking for non-VAxxx links with INSTITUTION defined..."
84 S LINK=""
85 F S LINK=$O(^HLCS(870,"B",LINK)) Q:LINK="" I $E(LINK,1,2)'="VA"!($E(LINK,1,4)="VAFC") D
86 .Q:LINK="MPIVA"
87 .S LINKIEN=$O(^HLCS(870,"B",LINK,0))
88 .S LINKINST=$$GET1^DIQ(870,LINKIEN_",",.02,"I")
89 .Q:'LINKINST
90 .Q:LINKINST'=+$$SITE^VASITE()
91 .S NONVA=NONVA+1
92 .S ^XTMP("RGMT","MONT","NONVA LINK WITH INSTITUTION",LINK)=""
93 .S TXT=" ** Non-VA Link with LOCAL INSTITUTION defined - "_LINK D TXT
94 ;
95DONE ;
96 S TXT="" D TXT
97 ;
98 S TXT="==============================" D TXT
99 S TXT="Check 1: "_MULTID_" VA MPI/PD Links with multiple ""D"" xref in ^DIC(4 for Station #." D TXT
100 S TXT="Check 2: "_NOINST_" VA MPI/PD Links without an INSTITUTION defined." D TXT
101 S TXT="Check 3: "_BADINST_" VA MPI/PD Links with incorrect INSTITUTION defined." D TXT
102 S TXT="Check 4: "_BADTF_" patients with invalid Treating Facilities. => FHIE Pts: "_DODHOST D TXT
103 S TXT="Check 5: "_NONVA_" non-VA MPI/PD Links with an INSTITUTION of local site defined." D TXT
104 ;
105 K BADINST,BADTF,CNT,DEV,DFN,IEN,LINK,LINKARR,LINKIEN,LINKINST,LOCSITE,LOCSTA,MULTID
106 K NOINST,NONVA,QQ,TF,TFIEN,TFIFN,TXT,TXTCNT,VALSTA,XCNT,DODHOST
107 Q
108 ;
109TXT ;
110 S TXTCNT=TXTCNT+1
111 I DEV,'$D(RGHLMQ) W !,TXT
112 I $D(RGHLMQ) S ^XTMP("RGMT","HLMQMONT",LOCSITE,TXTCNT)=TXT
113 Q
114 ;
115LINKS ;
116MPIVA ;;MPI^200M
117VAALX ;;ALEXANDRIA^502
118VAALT ;;ALTOONA^503
119VAAMA ;;AMARILLO HCS^504
120VAANC ;;ANCHORAGE^463
121VAANN ;;ANN ARBOR^506
122VAASH ;;ASHEVILLE^637
123VAATG ;;ATLANTA^508
124VAAUG ;;AUGUSTA^509
125VABAC ;;BATTLE CREEK^515
126VABAY ;;BAY PINES^516
127VABEC ;;BECKLEY^517
128VABED ;;BEDFORD^518
129VABIL ;;BILOXI^520
130VABIR ;;BIRMINGHAM^521
131VABHH ;;BLACK HILLS HCS^568
132VABOI ;;BOISE^531
133VABOS ;;BOSTON HCS^523
134VABRX ;;BRONX^526
135VABUT ;;BUTLER^529
136VACAH ;;CENTRAL ALABAMA HCS^619
137VALIT ;;CENTRAL ARKANSAS HCS^598
138VAFRE ;;CENTRAL CALIFORNIA HCS^570
139VAOMA ;;CENTRAL PLAINS HCS^636
140VACTX ;;CENTRAL TEXAS HCS^674
141VACHA ;;CHARLESTON^534
142VACHY ;;CHEYENNE^442
143VACHS ;;CHICAGO HCS^537
144VACLL ;;CHILLICOTHE^538
145VACIN ;;CINCINNATI^539
146VACLA ;;CLARKSBURG^540
147VACLE ;;CLEVELAND^541
148VACOA ;;COATESVILLE^542
149VACMS ;;COLUMBIA^544
150VACOS ;;COLUMBUS^757
151VACON ;;CONNECTICUT HCS^689
152VADAY ;;DAYTON^552
153VADEN ;;DENVER^554
154VADET ;;DETROIT^553
155VADUB ;;DUBLIN^557
156VADUR ;;DURHAM^558
157VAELP ;;EL PASO^756
158VAERI ;;ERIE^562
159VAFAR ;;FARGO^437
160VAFNC ;;FAYETTEVILLE^565
161VAFAV ;;FAYETTEVILLE^564
162VAJAC ;;G. V. (SONNY) MONTGOMERY^586
163VAGRJ ;;GRAND JUNCTION^575
164VAHAM ;;HAMPTON^590
165VAHIN ;;HINES^578
166VAHON ;;HONOLULU VAMROC^459
167VAHOU ;;HOUSTON^580
168VAHVH ;;HUDSON VALLEY HCS^620
169VAHUN ;;HUNTINGTON^581
170VADAN ;;ILLIANA HEALTH CARE SYSTEM^550
171VAIND ;;INDIANAPOLIS^583
172VAIRO ;;IRON MOUNTAIN^585
173VALAS ;;LAS VEGAS^593
174VALEB ;;LEBANON^595
175VALEX ;;LEXINGTON^596
176VALOM ;;LOMA LINDA^605
177VALON ;;LONG BEACH HCS^600
178VALOU ;;LOUISVILLE^603
179VAMAD ;;MADISON^607
180VAMAN ;;MANCHESTER^608
181VAMPI ;;MANILA^358
182VAMWV ;;MARTINSBURG^613
183VAMAR ;;MARYLAND HCS^512
184VAMEM ;;MEMPHIS^614
185VAMIA ;;MIAMI^546
186VAMIW ;;MILWAUKEE^695
187VAMIN ;;MINNEAPOLIS^618
188VAFHM ;;MONTANA HCS^436
189VAMOU ;;MOUNTAIN HOME^621
190VAMUS ;;MUSKOGEE^623
191VAGAI ;;N. FLORIDA/S. GEORGIA HCS^573
192VANJH ;;NEW JERSEY HCS^561
193VAALB ;;NEW MEXICO HCS^501
194VANOL ;;NEW ORLEANS^629
195VANYN ;;NEW YORK HARBOR HCS^630
196VANCH ;;NORTH CHICAGO^556
197VANTH ;;NORTH TEXAS HCS^549
198VANHM ;;NORTHAMPTON^631
199VAPRE ;;NORTHERN ARIZONA HCS^649
200VAMAC ;;NORTHERN CALIFORNIA HCS^612
201VANIN ;;NORTHERN INDIANA HCS^610
202VANOP ;;NORTHPORT^632
203VAOKL ;;OKLAHOMA CITY^635
204VAPAL ;;PALO ALTO HCS^640
205VAPHI ;;PHILADELPHIA^642
206VAPHO ;;PHOENIX^644
207VAPTH ;;PITTSBURGH HCS^646
208VAPOR ;;PORTLAND^648
209VAPRO ;;PROVIDENCE^650
210VAPUG ;;PUGET SOUND HCS^663
211VARIC ;;RICHMOND^652
212VAROS ;;ROSEBURG^653
213VASAG ;;SAGINAW^655
214VASAM ;;SALEM^658
215VASBY ;;SALISBURY^659
216VASLC ;;SALT LAKE CITY HCS^660
217VASDC ;;SAN DIEGO HCS^664
218VASFC ;;SAN FRANCISCO^662
219VASAJ ;;SAN JUAN^672
220VASHE ;;SHERIDAN^666
221VASHR ;;SHREVEPORT^667
222VAREN ;;SIERRA NEVADA HCS^654
223VASUX ;;SIOUX FALLS^438
224VASTX ;;SOUTH TEXAS HCS^671
225VATUC ;;SOUTHERN ARIZONA HCS^678
226VASPO ;;SPOKANE^668
227VASTC ;;ST. CLOUD^656
228VATAM ;;TAMPA^673
229VANAS ;;TENNESSEE VALLEY HCS^626
230VATOG ;;TOGUS^402
231VATOM ;;TOMAH^676
232VATUA ;;TUSCALOOSA^679
233VAWNY ;;UPSTATE NEW YORK HCS^528
234VASTL ;;VA HEARTLAND - EAST, VISN 15^657
235VAKAN ;;VA HEARTLAND - WEST, VISN 15^589
236VAWWW ;;WALLA WALLA^687
237VAWAS ;;WASHINGTON^688
238VAWLA ;;WEST LA VAMC^691
239VAWPB ;;WEST PALM BEACH^548
240VABIG ;;WEST TEXAS HCS^519
241VAWCO ;;WHITE CITY^692
242VAWRJ ;;WHITE RIVER JCT^405
243VAWBP ;;WILKES BARRE^693
244VAWIM ;;WILMINGTON^460
245 ;;***
Note: See TracBrowser for help on using the repository browser.