source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBY232PR.m@ 699

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

initial load of WorldVistAEHR

File size: 8.8 KB
Line 
1IBY232PR ;ALB/TMK - IB*2*232 PRE-INSTALL ;12-AUG-03
2 ;;2.0;INTEGRATED BILLING;**232**;21-MAR-94
3 ;
4 N DIC,DIK,DA,Y,X,IBY
5 D BMES^XPDUTL("Pre-Installation Updates")
6 ;
7COPY ; BUILD SWITCH BACK GLOBAL TO CHANGE BACK TO OLD FORMAT
8 ;
9 ; ^XTMP("P232",DIR,INC,NODE,...
10 ; DIR = ONLY 1 NOW
11 ; INC = INCREMENT OF INSTALL
12 ;
13 ; D PRECOPY^IBY232PO
14 ;
15 ; Delete local ov-rides
16 D BMES^XPDUTL("Removing local fields that reference changed EDI fields")
17 D DELLOC^IBY232PO
18 ; Chk for MCH domain
19 D BMES^XPDUTL("CHECKING FOR REQUIRED DOMAIN")
20 I $$PROD^IBCORC D Q:$G(XPDABORT)
21 . S X="Q-MCH.VA.GOV",DIC="^DIC(4.2,",DIC(0)="Z" D ^DIC ; DBIA 3779
22 . M IBY=Y
23 . I IBY>0 D
24 .. S X="`"_$P(IBY(0),U,3),DIC="^DIC(4.2,",DIC(0)="Z" D ^DIC
25 .. S $P(IBY(0),U,3)=$P(Y,U,2)
26 . I $S(IBY'>0:1,1:$P(IBY(0),U,2)'="S"!($P(IBY(0),U,3)'="FOC-AUSTIN.VA.GOV")) D
27 .. D BMES^XPDUTL("Q-MCH.VA.GOV DOMAIN MISSING/INVALID - ADD/CORRECT ENTRY AND RESTART INSTALL")
28 .. D BMES^XPDUTL("REFERENCE MAILMAN PATCH XM*DBA*162 FOR ENTRY SET UP DETAILS")
29 .. S XPDABORT=1
30 ;
31 ; REMOVE OLD ENTRIES WE CHANGED TO PREVENT REPLICATION
32 N IB01,TAG,Z1,LVL,DIK,DIE,DR,DA,X,Y
33 S IB01="N-ALL CUR/OTH PROVIDER INFO"
34 I $P($G(^IBA(364.5,312,0)),U)'=IB01 S DA=312,DIE="^IBA(364.5,",DR=".01////^S X=IB01" D ^DIE
35 I '$D(^IBA(364.6,"ASEQ",8,177,1,10)) D
36 . N Z,Z0,DA,DIE,DR,DIK,X,Y
37 . I $O(^IBA(364.6,"ASEQ",8,177,1,1.9,0)) S Z0=+$O(^(0)) D
38 .. I $O(^IBA(364.7,"B",Z0,0)) S DA=+$O(^(0)),DIK="^IBA(364.7," D ^DIK
39 .. S DA=Z0,DIK="^IBA(364.6," D ^DIK
40 . S Z="" F S Z=$O(^IBA(364.6,"ASEQ",8,177,1,Z),-1) Q:Z<2 S DA=+$O(^IBA(364.6,"ASEQ",8,177,1,Z,0)) I DA S DIE="^IBA(364.6,",DR=".08////"_(Z+1) D ^DIE D
41 .. S Z0=+$O(^IBA(364.7,"B",DA,0)) I Z0 S DIE="^IBA(364.7,",DA=+Z0,DR=".03////312" D ^DIE
42 ;
43 ;DELETE 364.X ENTRIES IN BLD
44 N LVL
45 F LVL=5:1:7 D
46 . F Z=2:1 S TAG="ENT"_LVL_"+"_Z Q:$P($T(@TAG),";;",2)="" D
47 . . S Z0=$P($T(@TAG),";;",2) D
48 . . . F Z1=2:1:$L(Z0,U)-1 D
49 . . . . S DA=$P(Z0,U,Z1)
50 . . . . S DIK="^IBA(364."_LVL_","
51 . . . . I DA,$D(^IBA("364."_LVL,DA,0)) D ^DIK
52 ;
53 N DIK,DA,DIE,DR,X,Y,FILE,Z,CT,IBINS
54 D BMES^XPDUTL("Prepare entries in file 364.5 for changes")
55 I $D(^IBA(364.5,269)) S DIK="^IBA(364.5,",DA=269 D ^DIK
56 D BMES^XPDUTL("Prepare entries in file 364.6 for changes")
57 I $D(^IBA(364.6,94,0)) S DIE="^IBA(364.6,",DA=94,DR=".1////DIAGNOSIS CODE 1" D ^DIE
58 ;
59 D BMES^XPDUTL("Delete entry IB315 from IB ERROR file")
60 S X="IB315",DIC(0)="",DIC="^IBE(350.8," D ^DIC
61 I Y>0 S DA=+Y,DIK="^IBE(350.8," D ^DIK
62 D BMES^XPDUTL("Delete old cross references and data for fields changed in file 36")
63 I '$$FLDNUM^DILFD(36,"DELETE 2006 4.04") D ; Only do this on initial install
64 . S Z=0 F S Z=$O(^DIC(36,Z)) Q:'Z S DR="4.01///@;4.02///@;4.03///@;4.04///@;4.05///@;4.06///@;4.07///@;4.08///@;4.1///@;4.11///@",DIE="^DIC(36,",DA=Z D ^DIE
65 . ;
66 . F DA=4.01,4.02,4.03 S DIK="^DD(36,",DA(1)=36 I $$VFIELD^DILFD(36,DA) D ^DIK
67 ;
68 D BMES^XPDUTL("Delete fields that were modified by this patch in file 399")
69 S DA=232,DIK="^DD(399,",DA(1)=399 I $$VFIELD^DILFD(399,232) D ^DIK
70 F DA=.02,.05,.06,.07,.09,.1,.11,.12,.13,.14,1.01,1.02,1.03 S DIK="^DD(399.0222,",DA(1)=399.0222 I $$VFIELD^DILFD(399.0222,DA) D ^DIK
71 D BMES^XPDUTL("Delete ids for deleted insurance companies")
72 S CT=0 F FILE=355.9,355.91 S Z=0 F S Z=$O(^IBA(FILE,Z)) Q:'Z S IBINS=+$P($G(^(Z,0)),U,$S(FILE[".91":1,1:2)) I IBINS,$G(^DIC(36,IBINS,0))="" S DIK="^IBA("_FILE_",",DA=Z D ^DIK S CT=CT+1
73 F FILE=355.95,355.96 S Z=0 F S Z=$O(^IBA(FILE,Z)) Q:'Z S IBINS=+$P($G(^(Z,0)),U,3) I IBINS,$G(^DIC(36,IBINS,0))="" S DIK="^IBA("_FILE_",",DA=Z D ^DIK S CT=CT+1
74 I CT D BMES^XPDUTL(CT_" IDs deleted for deleted insurance companies")
75 ;
76355 ;PUT PROPER MODIFIER INTO PC 3 OF ^IBE(355.97
77 ;
78 N X,INS
79 S X=0
80 F S X=$O(^IBE(355.97,X)) Q:+X=0 D
81 . Q:'$D(^IBE(355.97,X,0))
82 . S INS=$P(^IBE(355.97,X,0),"^",1)
83 . Q:INS=""
84 . I INS["CROSS" S $P(^IBE(355.97,X,0),"^",3)="1A"
85 . I INS["SHIELD" S $P(^IBE(355.97,X,0),"^",3)="1B"
86 . I INS["CHAMPUS" S $P(^IBE(355.97,X,0),"^",3)="1H",DA=X,DR=".01////TRICARE ID",DIE="^IBE(355.97," D ^DIE
87 . I INS["COMMER" S $P(^IBE(355.97,X,0),"^",3)="G2"
88 . I INS["CLIA" S $P(^IBE(355.97,X,0),"^",3)="X4"
89 . I INS["MEDICARE" S $P(^IBE(355.97,X,0),"^",3)="1C"
90 . I INS["TAX" S $P(^IBE(355.97,X,0),"^",3)="24"
91 . I INS["NETWORK" S $P(^IBE(355.97,X,0),"^",3)="N5"
92 . I INS["UPIN" S $P(^IBE(355.97,X,0),"^",3)="1G",$P(^(0),U,2)=0
93 . I INS["PPO" S $P(^IBE(355.97,X,0),"^",3)="B3"
94 . I INS["HMO" S $P(^IBE(355.97,X,0),"^",3)="BQ"
95 . I INS["SOCIAL" S $P(^IBE(355.97,X,0),"^",3)="SY"
96 . I INS["STATE" S $P(^IBE(355.97,X,0),"^",3)="0B"
97 ;
98 D END
99 Q
100 ;
101INCLUDE(FILE,Y) ;CODE TO DECIDE WHICH FILE ENTRIES CAN BE INCLUDED IN BUILD
102 ;FILE = FILE LIST WE SHOULD USE 5=364.5,6=364.6,7=364.7, Y = GLOBAL IEN
103 ;
104 N IBOUT,Z,Z0,LINE,TAG
105 I Y>9999 S IBOUT=0 G INCQ1
106 F LINE=2:1 S TAG="ENT"_FILE_"+"_LINE Q:$P($T(@TAG),";;",2)="" I $P($T(@TAG),";;",2)[(U_+Y_U) S IBOUT=1 Q
107INCQ1 Q +$G(IBOUT)
108 ;
109ENT5 ;ENTRIES IN 364.5 WE NEED
110 ;
111 ;;^101^218^234^268^269^271^272^298^299^300^301^303^304^305^306^307^308^309^310^311^312^313^314^315^316^317^318^
112 ;;
113 ;
114ENT6 ;ENTRIES IN 364.6 WE NEED
115 ;
116 ;;^1^3^5^8^19^22^26^28^30^31^33^35^36^41^42^44^51^52^53^92^112^113^114^
117 ;;^115^116^117^118^119^120^121^122^123^124^125^126^127^128^129^130^131^
118 ;;^132^133^134^135^136^137^138^156^168^169^175^177^178^179^180^181^182^
119 ;;^184^185^186^187^188^192^194^196^210^251^252^253^479^483^488^579^580^
120 ;;^581^610^792^793^794^859^860^861^862^863^864^865^866^867^868^869^
121 ;;^870^871^872^873^874^875^876^877^878^879^880^881^882^883^885^907^908^
122 ;;^909^910^911^912^913^914^915^916^917^918^919^920^921^935^936^937^938^
123 ;;^939^940^941^942^943^944^945^946^947^948^949^950^958^960^968^951^973^
124 ;;^974^975^976^977^978^979^980^981^982^983^984^985^986^989^990^991^992^
125 ;;^993^994^1004^1006^1007^1009^1010^1011^1012^1013^1014^1015^1016^1017^
126 ;;^1018^1019^
127 ;;^1020^1021^1022^1023^1024^1025^1026^1027^1028^1029^1030^1031^1032^
128 ;;^1033^1034^1035^1036^1037^1038^1039^1040^1041^1042^1043^1044^1045^
129 ;;^1046^1047^1048^1049^1050^1056^1057^1058^1059^1060^1061^1062^1063^
130 ;;^1065^1066^1067^1068^1069^1071^1072^1073^1074^1075^1076^1077^1078^
131 ;;^1080^1081^1082^1083^1084^1085^1086^1087^1088^1089^1090^1091^1092^
132 ;;^1094^1095^1096^1097^1098^1099^1100^1101^1102^1103^1104^1106^1107^
133 ;;^1108^1110^1111^1112^1113^1114^1115^1116^1117^1118^1119^1120^1121^
134 ;;^1122^1123^1124^1126^1127^1128^1129^1130^1131^1132^1133^1134^1135^
135 ;;^1136^1137^1138^1139^1140^1141^1142^1143^1144^1145^1146^
136 ;;^1147^1148^1150^1151^1152^1153^1154^1155^1156^1157^1158^1159^1160^
137 ;;^1161^1162^1163^1164^1165^1166^1167^1168^1169^1170^1171^1172^1173^
138 ;;^1174^1175^1176^1177^1178^1179^1180^1181^1182^1183^1184^1185^1186^
139 ;;^1187^1188^1189^1190^1191^1192^1194^1195^1196^1197^1198^1199^1200^
140 ;;^1201^1202^1203^1204^1205^1206^1207^1209^1210^1211^1212^1213^1214^
141 ;;^1215^1216^1217^1218^1219^1220^1221^1222^1223^1224^1225^1226^1227^
142 ;;^1228^1229^1230^1231^1232^1233^1234^1235^1236^1237^1238^1239^1240^
143 ;;^1241^1242^1243^1244^1245^1246^1247^1248^1249^1250^1251^1252^1253^
144 ;;^1254^1255^1256^1257^1258^1259^1260^1261^1262^1263^1277^1278^1279^
145 ;;^1280^1281^1282^1283^1284^1285^1286^1287^1288^1289^1290^1291^1292^
146 ;;^1293^1294^1295^1296^1297^1298^1299^1300^1301^1302^1303^1304^1305^
147 ;;^1306^1308^1309^1310^1311^1312^1313^1314^1315^1316^1317^1318^1319^
148 ;;^1320^
149 ;;
150 ;
151ENT7 ;ENTRIES IN 364.7 WE NEED
152 ;
153 ;;^1^5^6^7^12^13^14^17^18^25^27^28^53^79^80^88^89^110^112^134^135^141^
154 ;;^144^151^152^153^154^156^157^186^187^192^193^195^196^197^198^203^204^
155 ;;^205^206^207^208^209^211^212^213^214^215^220^224^228^229^230^232^237^
156 ;;^244^245^246^247^249^256^302^316^324^325^420^440^441^443^
157 ;;^532^642^644^646^648^650^652^654^655^656^657^658^659^660^661^662^
158 ;;^326^333^334^358^359^360^361^362^363^364^365^366^367^368^369^370^
159 ;;^371^372^373^374^375^376^377^378^379^380^381^382^383^384^385^386^
160 ;;^387^388^389^391^392^393^394^395^396^397^398^399^400^401^402^403^
161 ;;^404^405^406^407^408^409^410^411^412^413^414^416^417^418^419^420^
162 ;;^421^422^423^424^425^426^427^428^429^430^431^432^433^434^435^436^
163 ;;^437^438^439^441^443^444^445^446^447^448^449^450^451^452^453^454^
164 ;;^455^456^457^458^459^460^461^462^463^464^465^466^467^468^469^470^
165 ;;^471^487^531^535^537^538^540^541^542^543^544^545^546^547^548^549^
166 ;;^550^551^552^553^554^555^556^557^558^559^560^561^562^563^564^565^
167 ;;^566^567^568^570^571^572^573^574^575^576^577^578^579^580^581^582^
168 ;;^583^584^585^586^587^588^589^590^591^592^593^594^595^596^597^598^
169 ;;^599^600^601^602^603^604^605^614^640^641^644^645^646^647^648^649^650^
170 ;;^651^652^653^663^664^798^800^806^807^830^893^896^897^901^902^914^915^
171 ;;^916^917^918^919^920^921^922^923^934^945^948^949^950^969^986^987^988^
172 ;;^991^992^993^994^995^996^1005^1006^1008^1010^1012^1015^1016^1017^1018^
173 ;;^1019^1020^1021^1022^1023^1024^1025^1026^1027^1028^1029^1030^1031^
174 ;;^1032^1033^1011^1034^1035^1036^1037^1038^
175 ;;
176 ;
177ENT97 ;ENTRIES IN 355.97 WE NEED
178 ;
179 ;;^24^25^26^27^28^29^
180 ;;
181 ;
182END ;
183 D BMES^XPDUTL("Step complete")
184 ;
185 D BMES^XPDUTL("Pre-install complete")
186 Q
187 ;
Note: See TracBrowser for help on using the repository browser.