Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBY348PR

IBY348PR.m

Go to the documentation of this file.
  1. IBY348PR ;ALB/ESG - Pre-Installation for IB patch 348 ;16-Aug-2006
  1. ;;2.0;INTEGRATED BILLING;**348**;21-MAR-94;Build 5
  1. ;
  1. D FILE353 ; changes to file 353
  1. D MOVE ; archive existing 1500 data elements
  1. D DELTRIG ; delete some DD triggers (will be re-added)
  1. D DELOF ; delete all data elements included in build
  1. ;
  1. Q
  1. ;
  1. FILE353 ; Make the needed changes to the BILL FORM TYPE file (#353)
  1. ; -Create an entry for #12 to archive the old hcfa-1500 and edit
  1. ; -Repoint any local forms that used to point to #2 to #12 instead
  1. ; -Edit some data in the new #2 for cms-1500
  1. ;
  1. NEW DIK,DA,DIE,DR,FORM,FORMCNT
  1. ;
  1. D BMES^XPDUTL("Updating information in the BILL FORM TYPE file (#353)")
  1. ;
  1. ; If #12 is already there, then just quit
  1. I $D(^IBE(353,12)),$P($G(^IBE(353,12,0)),U,1)="LEGACY HCFA-1500" D BMES^XPDUTL(" Entry# 12 is already defined") G F353X
  1. ;
  1. K ^IBE(353,12)
  1. M ^IBE(353,12)=^IBE(353,2) ; create entry# 12
  1. S DIK="^IBE(353,",DA=12 D IX1^DIK ; reindex #12
  1. S DIE=353,DA=12 ; edit #12
  1. S DR=".01///LEGACY HCFA-1500;2.04///@;2.06///*LEGACY NATIONAL HCFA-1500;2.05///@;2.08///@;2.09///@;.02///@;.03///@;1.01///@"
  1. D ^DIE
  1. D BMES^XPDUTL(" Entry# 12 has been created and edited")
  1. ;
  1. ; repoint any local forms to the new 12 instead of the old 2
  1. ; count total number of forms too
  1. S FORM=0,FORMCNT=0
  1. F S FORM=$O(^IBE(353,FORM)) Q:'FORM D
  1. . N B S B=$G(^IBE(353,FORM,2))
  1. . S FORMCNT=FORMCNT+1
  1. . I $P(B,U,4) Q ; quit if national form type
  1. . I $P(B,U,5)=2 S DIE=353,DA=FORM,DR="2.05////12" D ^DIE ; parent form
  1. . I $P(B,U,8)=2 S DIE=353,DA=FORM,DR="2.08////12" D ^DIE ; print form name
  1. . Q
  1. D BMES^XPDUTL(" Local forms/overrides for the old 1500 have been removed and repointed")
  1. ;
  1. S $P(^IBE(353,0),U,4)=FORMCNT ; re-set 0 node
  1. ;
  1. ; edit the data for entry# 2 so it becomes the new cms-1500
  1. S DIE=353,DA=2
  1. S DR=".01///CMS-1500;2.04////1;2.06///NATIONAL CMS-1500;2.05///@;2.08////2;2.09///@" ; note screen 9 is being deleted also
  1. D ^DIE
  1. D BMES^XPDUTL(" Entry# 2 has become the new 1500")
  1. ;
  1. F353X ;
  1. Q
  1. ;
  1. MOVE ; move existing output formatter entries for form type 2 to form type 12
  1. NEW IEN,DIE,DA,DR
  1. D BMES^XPDUTL("Archiving output formatter entries for the old 1500 form")
  1. I $O(^IBA(364.6,"B",2,0))=1400 D BMES^XPDUTL(" Already archived") G MOVEX
  1. ;
  1. I '$D(^IBE(353,12)) D BMES^XPDUTL(" Error - entry# 12 not defined...call EVS") G MOVEX
  1. ;
  1. S IEN=0
  1. F S IEN=$O(^IBA(364.6,"B",2,IEN)) Q:'IEN D
  1. . I IEN'<1400 Q ; do not move the new data elements
  1. . S DIE=364.6,DA=IEN,DR=".01////12"
  1. . D ^DIE
  1. . Q
  1. D BMES^XPDUTL(" Completed")
  1. MOVEX ;
  1. Q
  1. ;
  1. DELTRIG ; remove some triggers from ^DD(FILE,FIELD,1)
  1. ; these will be re-added when the build is installed
  1. D BMES^XPDUTL("Removing DD triggers....")
  1. D DELIX^DDMOD(36,.01,2)
  1. D DELIX^DDMOD(399,.01,7)
  1. D DELIX^DDMOD(399,.19,1)
  1. D BMES^XPDUTL(" Completed")
  1. DELTRIGX ;
  1. Q
  1. ;
  1. DELOF ; Delete included output formatter entries
  1. NEW FILE,DIK,LN,TAG,DATA,PCE,DA,Y
  1. F FILE=5,6,7 S DIK="^IBA(364."_FILE_"," F LN=2:1 S TAG="ENT"_FILE_"+"_LN,DATA=$P($T(@TAG),";;",2) Q:DATA="" D
  1. . F PCE=2:1 S DA=$P(DATA,U,PCE) Q:'DA I $D(^IBA("364."_FILE,DA,0)) D ^DIK
  1. . Q
  1. ;
  1. ;
  1. INCLUDE(FILE,Y) ; function to determine if output formatter entry should be
  1. ; included in the build
  1. ; FILE=5,6,7 indicating file 364.x
  1. ; Y=ien to file
  1. ;
  1. NEW OK,LN,TAG,DATA
  1. S OK=0
  1. F LN=2:1 S TAG="ENT"_FILE_"+"_LN,DATA=$P($T(@TAG),";;",2) Q:DATA="" I $F(DATA,U_Y_U) S OK=1 Q
  1. INCLUDEX ;
  1. Q OK
  1. ;
  1. ;
  1. ; 364.5 entries modified:
  1. ; 159 Fix to N-AUTO ACCIDENT STATE
  1. ; 188 New data element for box 24I - rend prov ID qual
  1. ; 189 New data element for box 24J - rend prov ID and NPI
  1. ; 229 n-hcfa emergency ind column 24C (Moved from 24I to 24C)
  1. ; 302 (SUB-7) New data element to re-enable SUB-7
  1. ENT5 ; output formatter entries in file 364.5 to be included
  1. ;
  1. ;;^159^188^189^229^302^
  1. ;;
  1. ;
  1. ; 364.6 IENS: 783 (SUB-7) turn field on
  1. ; 975 (PRF-22) Box 24K data - no longer being used
  1. ; 1002 (UB1-19) field name
  1. ; 1006 (PRF-30) Svc line comment - length and qualifier
  1. ; 1400-1520 (range for new form)
  1. ENT6 ; output formatter entries in file 364.6 to be included
  1. ;
  1. ;;^783^975^1002^1006^
  1. ;;^1400^1401^1402^1403^1404^1405^1406^1407^1408^1409^1410^1411^1412^1413^1414^1415^1416^1417^1418^1419^1420^
  1. ;;^1421^1422^1423^1424^1425^1426^1427^1428^1429^1430^1431^1432^1433^1434^1435^1436^1437^1438^1439^1440^1441^1442^1443^
  1. ;;^1444^1445^1446^1447^1448^1449^1450^1451^1452^1453^1454^1455^1456^1457^1458^1459^1460^1461^1462^1463^1464^1465^1466^
  1. ;;^1467^1468^1469^1470^1471^1472^1473^1474^1475^1476^1477^1478^1479^1480^1481^1482^1483^1484^1485^1486^1487^1488^1489^
  1. ;;^1490^1491^1492^1493^1494^1495^1496^1497^1498^1499^1500^1501^1502^1503^1506^1507^1508^1509^1510^1511^1512^1513^1514^
  1. ;;^1515^1516^1517^1518^1519^1520^
  1. ;;
  1. ;
  1. ;
  1. ; 364.7 IENS: 53 (OPR-6) remove reference to field 214
  1. ; 95 (CL1-31) Accident State (fix bug)
  1. ; 889 (PRF-19) removed data element pointing to #229
  1. ; 892 (SUB-7) turn field on
  1. ; 916 (OPR-7) remove reference to field 214
  1. ; 919 (OPR-8) remove reference to field 214
  1. ; 949 (SUB-10) help text
  1. ; 953 (PRF-22) Box 24K data - no longer being used
  1. ; 1007 (PRF-30) Svc line comment - length and qualifier
  1. ; 1023 (OP7-2) help text
  1. ; 1100-1220 (range for new form)
  1. ENT7 ; output formatter entries in file 364.7 to be included
  1. ;
  1. ;;^53^95^889^892^916^919^949^953^1007^1023^
  1. ;;^1100^1101^1102^1103^1104^1105^1106^1107^1108^1109^1110^1111^1112^1113^1114^1115^1116^1117^1118^1119^
  1. ;;^1120^1121^1122^1123^1124^1125^1126^1127^1128^1129^1130^1131^1132^1133^1134^1135^1136^1137^1138^1139^1140^1141^1142^
  1. ;;^1143^1144^1145^1146^1147^1148^1149^1150^1151^1152^1153^1154^1155^1156^1157^1158^1159^1160^1161^1162^1163^1164^1165^
  1. ;;^1166^1167^1168^1169^1170^1171^1172^1173^1174^1175^1176^1177^1178^1179^1180^1181^1182^1183^1184^1185^1186^1187^1188^
  1. ;;^1189^1190^1191^1192^1193^1194^1195^1196^1197^1198^1199^1200^1201^1202^1203^1206^1207^1208^1209^1210^1211^1212^1213^
  1. ;;^1214^1215^1216^1217^1218^1219^1220^
  1. ;;
  1. ;
  1. ;