[613] | 1 | RGMTMONX ;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 | ;
|
---|
| 8 | START ;
|
---|
| 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 | ;
|
---|
| 24 | 1 ;
|
---|
| 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
|
---|
| 37 | 2 .;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")
|
---|
| 49 | 3 .;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
|
---|
| 56 | 4 .;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 | ;
|
---|
| 63 | 5 ;
|
---|
| 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 | ;
|
---|
| 82 | 6 ;
|
---|
| 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 | ;
|
---|
| 95 | DONE ;
|
---|
| 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 | ;
|
---|
| 109 | TXT ;
|
---|
| 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 | ;
|
---|
| 115 | LINKS ;
|
---|
| 116 | MPIVA ;;MPI^200M
|
---|
| 117 | VAALX ;;ALEXANDRIA^502
|
---|
| 118 | VAALT ;;ALTOONA^503
|
---|
| 119 | VAAMA ;;AMARILLO HCS^504
|
---|
| 120 | VAANC ;;ANCHORAGE^463
|
---|
| 121 | VAANN ;;ANN ARBOR^506
|
---|
| 122 | VAASH ;;ASHEVILLE^637
|
---|
| 123 | VAATG ;;ATLANTA^508
|
---|
| 124 | VAAUG ;;AUGUSTA^509
|
---|
| 125 | VABAC ;;BATTLE CREEK^515
|
---|
| 126 | VABAY ;;BAY PINES^516
|
---|
| 127 | VABEC ;;BECKLEY^517
|
---|
| 128 | VABED ;;BEDFORD^518
|
---|
| 129 | VABIL ;;BILOXI^520
|
---|
| 130 | VABIR ;;BIRMINGHAM^521
|
---|
| 131 | VABHH ;;BLACK HILLS HCS^568
|
---|
| 132 | VABOI ;;BOISE^531
|
---|
| 133 | VABOS ;;BOSTON HCS^523
|
---|
| 134 | VABRX ;;BRONX^526
|
---|
| 135 | VABUT ;;BUTLER^529
|
---|
| 136 | VACAH ;;CENTRAL ALABAMA HCS^619
|
---|
| 137 | VALIT ;;CENTRAL ARKANSAS HCS^598
|
---|
| 138 | VAFRE ;;CENTRAL CALIFORNIA HCS^570
|
---|
| 139 | VAOMA ;;CENTRAL PLAINS HCS^636
|
---|
| 140 | VACTX ;;CENTRAL TEXAS HCS^674
|
---|
| 141 | VACHA ;;CHARLESTON^534
|
---|
| 142 | VACHY ;;CHEYENNE^442
|
---|
| 143 | VACHS ;;CHICAGO HCS^537
|
---|
| 144 | VACLL ;;CHILLICOTHE^538
|
---|
| 145 | VACIN ;;CINCINNATI^539
|
---|
| 146 | VACLA ;;CLARKSBURG^540
|
---|
| 147 | VACLE ;;CLEVELAND^541
|
---|
| 148 | VACOA ;;COATESVILLE^542
|
---|
| 149 | VACMS ;;COLUMBIA^544
|
---|
| 150 | VACOS ;;COLUMBUS^757
|
---|
| 151 | VACON ;;CONNECTICUT HCS^689
|
---|
| 152 | VADAY ;;DAYTON^552
|
---|
| 153 | VADEN ;;DENVER^554
|
---|
| 154 | VADET ;;DETROIT^553
|
---|
| 155 | VADUB ;;DUBLIN^557
|
---|
| 156 | VADUR ;;DURHAM^558
|
---|
| 157 | VAELP ;;EL PASO^756
|
---|
| 158 | VAERI ;;ERIE^562
|
---|
| 159 | VAFAR ;;FARGO^437
|
---|
| 160 | VAFNC ;;FAYETTEVILLE^565
|
---|
| 161 | VAFAV ;;FAYETTEVILLE^564
|
---|
| 162 | VAJAC ;;G. V. (SONNY) MONTGOMERY^586
|
---|
| 163 | VAGRJ ;;GRAND JUNCTION^575
|
---|
| 164 | VAHAM ;;HAMPTON^590
|
---|
| 165 | VAHIN ;;HINES^578
|
---|
| 166 | VAHON ;;HONOLULU VAMROC^459
|
---|
| 167 | VAHOU ;;HOUSTON^580
|
---|
| 168 | VAHVH ;;HUDSON VALLEY HCS^620
|
---|
| 169 | VAHUN ;;HUNTINGTON^581
|
---|
| 170 | VADAN ;;ILLIANA HEALTH CARE SYSTEM^550
|
---|
| 171 | VAIND ;;INDIANAPOLIS^583
|
---|
| 172 | VAIRO ;;IRON MOUNTAIN^585
|
---|
| 173 | VALAS ;;LAS VEGAS^593
|
---|
| 174 | VALEB ;;LEBANON^595
|
---|
| 175 | VALEX ;;LEXINGTON^596
|
---|
| 176 | VALOM ;;LOMA LINDA^605
|
---|
| 177 | VALON ;;LONG BEACH HCS^600
|
---|
| 178 | VALOU ;;LOUISVILLE^603
|
---|
| 179 | VAMAD ;;MADISON^607
|
---|
| 180 | VAMAN ;;MANCHESTER^608
|
---|
| 181 | VAMPI ;;MANILA^358
|
---|
| 182 | VAMWV ;;MARTINSBURG^613
|
---|
| 183 | VAMAR ;;MARYLAND HCS^512
|
---|
| 184 | VAMEM ;;MEMPHIS^614
|
---|
| 185 | VAMIA ;;MIAMI^546
|
---|
| 186 | VAMIW ;;MILWAUKEE^695
|
---|
| 187 | VAMIN ;;MINNEAPOLIS^618
|
---|
| 188 | VAFHM ;;MONTANA HCS^436
|
---|
| 189 | VAMOU ;;MOUNTAIN HOME^621
|
---|
| 190 | VAMUS ;;MUSKOGEE^623
|
---|
| 191 | VAGAI ;;N. FLORIDA/S. GEORGIA HCS^573
|
---|
| 192 | VANJH ;;NEW JERSEY HCS^561
|
---|
| 193 | VAALB ;;NEW MEXICO HCS^501
|
---|
| 194 | VANOL ;;NEW ORLEANS^629
|
---|
| 195 | VANYN ;;NEW YORK HARBOR HCS^630
|
---|
| 196 | VANCH ;;NORTH CHICAGO^556
|
---|
| 197 | VANTH ;;NORTH TEXAS HCS^549
|
---|
| 198 | VANHM ;;NORTHAMPTON^631
|
---|
| 199 | VAPRE ;;NORTHERN ARIZONA HCS^649
|
---|
| 200 | VAMAC ;;NORTHERN CALIFORNIA HCS^612
|
---|
| 201 | VANIN ;;NORTHERN INDIANA HCS^610
|
---|
| 202 | VANOP ;;NORTHPORT^632
|
---|
| 203 | VAOKL ;;OKLAHOMA CITY^635
|
---|
| 204 | VAPAL ;;PALO ALTO HCS^640
|
---|
| 205 | VAPHI ;;PHILADELPHIA^642
|
---|
| 206 | VAPHO ;;PHOENIX^644
|
---|
| 207 | VAPTH ;;PITTSBURGH HCS^646
|
---|
| 208 | VAPOR ;;PORTLAND^648
|
---|
| 209 | VAPRO ;;PROVIDENCE^650
|
---|
| 210 | VAPUG ;;PUGET SOUND HCS^663
|
---|
| 211 | VARIC ;;RICHMOND^652
|
---|
| 212 | VAROS ;;ROSEBURG^653
|
---|
| 213 | VASAG ;;SAGINAW^655
|
---|
| 214 | VASAM ;;SALEM^658
|
---|
| 215 | VASBY ;;SALISBURY^659
|
---|
| 216 | VASLC ;;SALT LAKE CITY HCS^660
|
---|
| 217 | VASDC ;;SAN DIEGO HCS^664
|
---|
| 218 | VASFC ;;SAN FRANCISCO^662
|
---|
| 219 | VASAJ ;;SAN JUAN^672
|
---|
| 220 | VASHE ;;SHERIDAN^666
|
---|
| 221 | VASHR ;;SHREVEPORT^667
|
---|
| 222 | VAREN ;;SIERRA NEVADA HCS^654
|
---|
| 223 | VASUX ;;SIOUX FALLS^438
|
---|
| 224 | VASTX ;;SOUTH TEXAS HCS^671
|
---|
| 225 | VATUC ;;SOUTHERN ARIZONA HCS^678
|
---|
| 226 | VASPO ;;SPOKANE^668
|
---|
| 227 | VASTC ;;ST. CLOUD^656
|
---|
| 228 | VATAM ;;TAMPA^673
|
---|
| 229 | VANAS ;;TENNESSEE VALLEY HCS^626
|
---|
| 230 | VATOG ;;TOGUS^402
|
---|
| 231 | VATOM ;;TOMAH^676
|
---|
| 232 | VATUA ;;TUSCALOOSA^679
|
---|
| 233 | VAWNY ;;UPSTATE NEW YORK HCS^528
|
---|
| 234 | VASTL ;;VA HEARTLAND - EAST, VISN 15^657
|
---|
| 235 | VAKAN ;;VA HEARTLAND - WEST, VISN 15^589
|
---|
| 236 | VAWWW ;;WALLA WALLA^687
|
---|
| 237 | VAWAS ;;WASHINGTON^688
|
---|
| 238 | VAWLA ;;WEST LA VAMC^691
|
---|
| 239 | VAWPB ;;WEST PALM BEACH^548
|
---|
| 240 | VABIG ;;WEST TEXAS HCS^519
|
---|
| 241 | VAWCO ;;WHITE CITY^692
|
---|
| 242 | VAWRJ ;;WHITE RIVER JCT^405
|
---|
| 243 | VAWBP ;;WILKES BARRE^693
|
---|
| 244 | VAWIM ;;WILMINGTON^460
|
---|
| 245 | ;;***
|
---|