IBY320PO ;ALB/ESG - Post Install for IB patch 320 ;28-JUL-2005
;;2.0;INTEGRATED BILLING;**320**;21-MAR-94
;
EN ;
N XPDIDTOT S XPDIDTOT=9
D TWOQ ; 1. get rid of 2Q status messages on CSA
D RCB ; 2. change one EDI menu mnemonic
D ATD ; 3. create regular style x-ref for file 361.4
D MCRWNR ; 4. create 2 new entries in file 355.92 for Medicare
D TRIGGERS ; 5. Trigger defaults in 36 and 355.93
D IBEFTFLG ; 6. Set flag in 355.9 for what kind of ID it is
D AUNIQ ; 7. create new style x-ref IBA(355.92,"AUNIQ")
D F35597 ; 8. Update file 355.97
D RIT ; 9. Recompile input templates
;
EX ;
Q
;
TWOQ ; Remove 2Q rejection messages from the current CSA screen
NEW DATA,TXT,DO,DA,DIC,X,Y,IBRS,IEN
D BMES^XPDUTL(" STEP 1 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Removing 2Q rejection messages from the CSA screen ....")
F IBRS=0,1 S IEN=0 F S IEN=$O(^IBM(361,"ACSA","R",IBRS,IEN)) Q:'IEN D
. I $G(^IBM(361,IEN,1,1,0))'["2Q CLAIM REJECTED BY CLEARINGHOUSE" Q
. S DIE=361,DA=IEN
. ; Change the status message
. ; .03 - informational; .09 - review complete; .14 - auto filed
. ; .1 - final review action (filed - no action)
. S DR=".03////I;.09////2;.14////1;.1////F"
. D ^DIE
. Q
;
TWOQX ;
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(1)
Q
;
RCB ; Change the menu mnemonic on the EDI menu for RCB
NEW MENUIEN,ITEMIEN,STOP,IBX,DIE,DA,DR
D BMES^XPDUTL(" STEP 2 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Updating EDI menu mnemonics ....")
;
S MENUIEN=$O(^DIC(19,"B","IBCE 837 EDI MENU",0)) I 'MENUIEN G RCBX
S ITEMIEN=0,STOP=0
F S ITEMIEN=$O(^DIC(19,MENUIEN,10,ITEMIEN)) Q:'ITEMIEN D Q:STOP
. S IBX=$P($G(^DIC(19,MENUIEN,10,ITEMIEN,0)),U,1) Q:'IBX
. I $P($G(^DIC(19,IBX,0)),U,1)'="IBCE PREV TRANSMITTED CLAIMS" Q
. S DIE="^DIC(19,"_MENUIEN_",10,"
. S DA=ITEMIEN,DA(1)=MENUIEN
. S DR="2////RCB;3////40"
. D ^DIE
. S STOP=1
. Q
RCBX ;
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(2)
Q
;
ATD ; create ATD x-ref on file 361.4
NEW IBIFN,DA,DIK
D BMES^XPDUTL(" STEP 3 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Creating 'ATD' x-ref for File 361.4 ....")
KILL ^IBM(361.4,"ATD")
S IBIFN=0
F S IBIFN=$O(^IBM(361.4,IBIFN)) Q:'IBIFN D
. S DA(1)=IBIFN
. S DIK="^IBM(361.4,"_DA(1)_",1,"
. S DIK(1)=".01^ATD"
. D ENALL^DIK
. Q
ATDX ;
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(3)
Q
;
MCRWNR ; Medicare (WNR) clean up file 355.92 entries and add 2 new entries
NEW DA,DIK,INSCO,MCRWNR,DO,DIC,X,Y,DFN,OK,IBIFN,BPID,DIE,DR
D BMES^XPDUTL(" STEP 4 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Updating Billing Provider IDs for MEDICARE (WNR) ....")
;
; First, find the MEDICARE (WNR) ins co ien
S INSCO=0
F S INSCO=$O(^DIC(36,"B","MEDICARE (WNR)",INSCO)) Q:'INSCO D
. I $$MCRWNR^IBEFUNC(INSCO) S MCRWNR(INSCO)="" Q
. D MES^XPDUTL("ERROR: Insurance company on file named 'MEDICARE (WNR)' incorrectly set-up.")
. Q
;
I '$D(MCRWNR) D MES^XPDUTL("ERROR: Insurance company 'MEDICARE (WNR)' not found.") G MCRX
;
I $O(MCRWNR(""))'=$O(MCRWNR(""),-1) D MES^XPDUTL("ERROR: Multiple insurance companies named 'MEDICARE (WNR)' found.")
;
; Next, get rid of any entries in this file for Medicare (clean-up)
S INSCO=0,DIK="^IBA(355.92,"
F S INSCO=$O(MCRWNR(INSCO)) Q:'INSCO D
. S DA=0
. F S DA=$O(^IBA(355.92,"B",INSCO,DA)) Q:'DA D ^DIK
. Q
;
; Next, add 2 entries for each Medicare (wnr) (should only be one)
S INSCO=0
F S INSCO=$O(MCRWNR(INSCO)) Q:'INSCO D
. K DO
. S DIC="^IBA(355.92,",DIC(0)="",X=INSCO
. S DIC("DR")=".04///1;.06///MEDICARE PART A;.07///670899;.08///E"
. D FILE^DICN
. K DO
. S DIC="^IBA(355.92,",DIC(0)="",X=INSCO
. S DIC("DR")=".04///2;.06///MEDICARE PART B;.07///VA0"_$P($$SITE^VASITE,U,3)_";.08///E"
. D FILE^DICN
. Q
;
; Correct billing provider secondary IDs for Medicare (current ins only)
S DFN=0
; "AOP" x-ref lists bills by patient with claim status 1 or 2
F S DFN=$O(^DGCR(399,"AOP",DFN)) Q:'DFN D
. S INSCO=0,OK=0
. F S INSCO=$O(MCRWNR(INSCO)) Q:'INSCO I $D(^DGCR(399,"AE",DFN,INSCO)) S OK=1 Q
. ; OK=1: claims exist for this patient in which MCRWNR is curr ins
. I 'OK Q
. S IBIFN=0
. F S IBIFN=$O(^DGCR(399,"AOP",DFN,IBIFN)) Q:'IBIFN D
.. I $$COBN^IBCEF(IBIFN)'=1 Q ; current payer seq must be primary
.. I '$$WNRBILL^IBEFUNC(IBIFN) Q ; and payer must be Medicare
.. S BPID=670899
.. I $$FT^IBCEF(IBIFN)=2 S BPID="VA0"_$P($$SITE^VASITE,U,3)
.. ; BPID = what the billing provider ID should be
.. I $P($G(^DGCR(399,IBIFN,"M1")),U,2)=BPID Q ; it is OK
.. S DIE=399,DA=IBIFN,DR="122///"_BPID D ^DIE ; change it
.. Q
. Q
;
MCRX ;
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(4)
Q
;
TRIGGERS ;
D BMES^XPDUTL(" STEP 5 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Firing Triggers for default values file 36 and 355.93 and indexing new xrefs")
;
S DIK="^DIC(36,"
S DIK(1)=".01^2^3^4^5^6"
D ENALL^DIK
;
S DIK="^IBA(355.93,"
S DIK(1)=".09^1"
D ENALL^DIK
;
S DIK="^IBA(355.93,"
S DIK(1)=".02^8"
D ENALL^DIK
;
S DIK="^IBE(355.97,"
S DIK(1)=".03^1"
D ENALL^DIK
;
;
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(5)
Q
;
IBEFTFLG ;
;
D BMES^XPDUTL(" STEP 6 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Setting ID Type flag for 355.92")
N DA,N0,Q,DIC,DR,DA
S DA=0 F S DA=$O(^IBA(355.92,DA)) Q:'+DA D
. S N0=$G(^IBA(355.92,DA,0))
. Q:N0=""
. Q:$P(N0,U,8)]"" ; already been done
. S Q=$P(N0,U,6)
. Q:Q="" ; no qualifier
. S DR=".08////"_$S(Q=29:"E",1:"LF")
. S DIE="^IBA(355.92,"
. D ^DIE
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(6)
Q
;
AUNIQ ;xxxx/WCJ-CREATE NEW-STYLE XREF ;1:27 PM 30 Dec 2005
;;1.0
;
N ZZWJXR,ZZWJRES,ZZWJOUT
D BMES^XPDUTL(" STEP 7 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Create cross reference for file 355.92 ....")
S ZZWJXR("FILE")=355.92
S ZZWJXR("NAME")="AUNIQ"
S ZZWJXR("TYPE")="MU"
S ZZWJXR("USE")="S"
S ZZWJXR("EXECUTION")="R"
S ZZWJXR("ACTIVITY")="IR"
S ZZWJXR("SHORT DESCR")="Xref by ins co,care unit,form type,division,prov id type"
S ZZWJXR("DESCR",1)="This cross reference allows edits to the additonal provider id's to be "
S ZZWJXR("DESCR",2)="replicated to linked insurance companies."
S ZZWJXR("SET")="S ^IBA(355.92,""AUNIQ"",X(1),$E(X(2),1,30),X(3),X(4),X(5),DA)="""""
S ZZWJXR("KILL")="K ^IBA(355.92,""AUNIQ"",X(1),$E(X(2),1,30),X(3),X(4),X(5),DA)"
S ZZWJXR("WHOLE KILL")="K ^IBA(355.92,""AUNIQ"")"
S ZZWJXR("SET CONDITION")="S X=0 I X(1)]"""",X(2)]"""",X(3)]"""",X(4)]"""",X(5)]"""",$P($G(^IBA(355.92,DA,0)),U,8)=""A"" S X=1"
S ZZWJXR("KILL CONDITION")="S X=0 I X(1)]"""",X(2)]"""",X(3)]"""",X(4)]"""",X(5)]"""" S X=1"
S ZZWJXR("VAL",1)=.01
S ZZWJXR("VAL",1,"COLLATION")="F"
S ZZWJXR("VAL",2)=.1
S ZZWJXR("VAL",2,"LENGTH")=30
S ZZWJXR("VAL",2,"COLLATION")="F"
S ZZWJXR("VAL",3)=.04
S ZZWJXR("VAL",3,"COLLATION")="F"
S ZZWJXR("VAL",4)=.11
S ZZWJXR("VAL",4,"COLLATION")="F"
S ZZWJXR("VAL",5)=.06
S ZZWJXR("VAL",5,"COLLATION")="F"
D CREIXN^DDMOD(.ZZWJXR,"SW",.ZZWJRES,"ZZWJOUT")
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(7)
Q
;
F35597 ;
;
D BMES^XPDUTL(" STEP 8 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Updating 355.97 ....")
;
N IEN,CNV,NEW,OLD,DR,DIC,DIE,DA,X,DAT0,DAT1
;
S CNV("BLUE CROSS ID")="BLUE CROSS^B"
S CNV("BLUE SHIELD ID")="BLUE SHIELD^B"
S CNV("TRICARE ID")="CHAMPUS^P"
S CNV("COMMERCIAL ID")="COMMERCIAL^B"
S CNV("CLIA #")="^P"
S CNV("MEDICARE PART A")="^B"
S CNV("MEDICARE PART B")="^B"
S CNV("FACILITY FED TAX ID #")="EMPLOYER'S IDENTIFICATION #"
S CNV("NETWORK ID")="PROVIDER PLAN NETWORK^B"
S CNV("PROVIDER FED TAX ID #")="FEDERAL TAXPAYER'S #^^TJ"
S CNV("UPIN")="^P"
S CNV("STATE LICENSE")="^B"
S CNV("HMO NUMBER")="HMO"
S CNV("STATE INDUSTRIAL ACCIDENT PRV")="ACCIDENT PROVIDER NUMBER^B"
S CNV("BILLING FACILITY PRIMARY ID")="ELECTRONIC PLAN TYPE^I"
S CNV("LOCATION NUMBER")="^B"
;
S IEN=0 F S IEN=$O(^IBE(355.97,IEN)) Q:'+IEN D
. S OLD=$P($G(^IBE(355.97,IEN,0)),U)
. Q:OLD=""
. S DATA=$G(CNV(OLD))
. N FLAG
. S FLAG=$S(".1.2.3.6.8.11.12.16.18.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34."[("."_IEN_"."):1,1:0)
. S DA=IEN
. S DIE=355.97
. S DR=""
. S:$P(DATA,U)]"" DR=DR_".01///"_$P(DATA,U)_";"
. S:$P(DATA,U,2)]"" DR=DR_".07///"_$P(DATA,U,2)_";"
. S:$P(DATA,U,3)]"" DR=DR_".03///"_$P(DATA,U,3)_";"
. S DR=DR_".04////@;.08////"_FLAG
. D ^DIE
. Q
;
S NEW(30,0)="MEDICAID^0^1D^^^^B^1"
S NEW(30,1)="^^^^^^1"
S NEW(31,0)="USIN^0^U3^^^1^P^1"
S NEW(31,1)="^^^^^^0"
S NEW(32,0)="EIN^0^EI^^^1^B^1"
S NEW(33,0)="CLINIC NUMBER^0^FH^^^1^B^1"
S NEW(34,0)="PROVIDER SITE NUMBER^0^G5^^^1^B^1"
;
S NEW="" F S NEW=$O(NEW(NEW)) Q:NEW="" D
. K DO
. S DAT0=$G(NEW(NEW,0))
. S DAT1=$G(NEW(NEW,1))
. S DIC="^IBE(355.97,"
. S DIC(0)=""
. S X=$P(DAT0,U)
. Q:X=""
. Q:$D(^IBE(355.97,"B",X)) ; already there (for running multiple times)
. S DIC("DR")=".02////0;.03////"_$P(DAT0,U,3)_$S($P(DAT0,U,6)]"":";.06////"_$P(DAT0,U,6),1:"")_";.07////"_$P(DAT0,U,7)_$S($P(DAT1,U,7)]"":";1.07////"_$P(DAT1,U,7),1:"")_";.08////"_$P(DAT0,U,8)
. D FILE^DICN
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(8)
Q
;
RIT ; Recompile input templates for billing screens
NEW X,Y,DMAX
D BMES^XPDUTL(" STEP 9 of "_XPDIDTOT)
D MES^XPDUTL("-------------")
D MES^XPDUTL("Recompiling Input Templates for Billing Screens 6 & 7....")
S X="IBXSC6",Y=$$FIND1^DIC(.402,,"X","IB SCREEN6","B"),DMAX=8000
I Y D EN^DIEZ
S X="IBXSC7",Y=$$FIND1^DIC(.402,,"X","IB SCREEN7","B"),DMAX=8000
I Y D EN^DIEZ
RITX ;
D MES^XPDUTL(" Done.")
D UPDATE^XPDID(9)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBY320PO 9892 printed Dec 13, 2024@02:33:40 Page 2
IBY320PO ;ALB/ESG - Post Install for IB patch 320 ;28-JUL-2005
+1 ;;2.0;INTEGRATED BILLING;**320**;21-MAR-94
+2 ;
EN ;
+1 NEW XPDIDTOT
SET XPDIDTOT=9
+2 ; 1. get rid of 2Q status messages on CSA
DO TWOQ
+3 ; 2. change one EDI menu mnemonic
DO RCB
+4 ; 3. create regular style x-ref for file 361.4
DO ATD
+5 ; 4. create 2 new entries in file 355.92 for Medicare
DO MCRWNR
+6 ; 5. Trigger defaults in 36 and 355.93
DO TRIGGERS
+7 ; 6. Set flag in 355.9 for what kind of ID it is
DO IBEFTFLG
+8 ; 7. create new style x-ref IBA(355.92,"AUNIQ")
DO AUNIQ
+9 ; 8. Update file 355.97
DO F35597
+10 ; 9. Recompile input templates
DO RIT
+11 ;
EX ;
+1 QUIT
+2 ;
TWOQ ; Remove 2Q rejection messages from the current CSA screen
+1 NEW DATA,TXT,DO,DA,DIC,X,Y,IBRS,IEN
+2 DO BMES^XPDUTL(" STEP 1 of "_XPDIDTOT)
+3 DO MES^XPDUTL("-------------")
+4 DO MES^XPDUTL("Removing 2Q rejection messages from the CSA screen ....")
+5 FOR IBRS=0,1
SET IEN=0
FOR
SET IEN=$ORDER(^IBM(361,"ACSA","R",IBRS,IEN))
if 'IEN
QUIT
Begin DoDot:1
+6 IF $GET(^IBM(361,IEN,1,1,0))'["2Q CLAIM REJECTED BY CLEARINGHOUSE"
QUIT
+7 SET DIE=361
SET DA=IEN
+8 ; Change the status message
+9 ; .03 - informational; .09 - review complete; .14 - auto filed
+10 ; .1 - final review action (filed - no action)
+11 SET DR=".03////I;.09////2;.14////1;.1////F"
+12 DO ^DIE
+13 QUIT
End DoDot:1
+14 ;
TWOQX ;
+1 DO MES^XPDUTL(" Done.")
+2 DO UPDATE^XPDID(1)
+3 QUIT
+4 ;
RCB ; Change the menu mnemonic on the EDI menu for RCB
+1 NEW MENUIEN,ITEMIEN,STOP,IBX,DIE,DA,DR
+2 DO BMES^XPDUTL(" STEP 2 of "_XPDIDTOT)
+3 DO MES^XPDUTL("-------------")
+4 DO MES^XPDUTL("Updating EDI menu mnemonics ....")
+5 ;
+6 SET MENUIEN=$ORDER(^DIC(19,"B","IBCE 837 EDI MENU",0))
IF 'MENUIEN
GOTO RCBX
+7 SET ITEMIEN=0
SET STOP=0
+8 FOR
SET ITEMIEN=$ORDER(^DIC(19,MENUIEN,10,ITEMIEN))
if 'ITEMIEN
QUIT
Begin DoDot:1
+9 SET IBX=$PIECE($GET(^DIC(19,MENUIEN,10,ITEMIEN,0)),U,1)
if 'IBX
QUIT
+10 IF $PIECE($GET(^DIC(19,IBX,0)),U,1)'="IBCE PREV TRANSMITTED CLAIMS"
QUIT
+11 SET DIE="^DIC(19,"_MENUIEN_",10,"
+12 SET DA=ITEMIEN
SET DA(1)=MENUIEN
+13 SET DR="2////RCB;3////40"
+14 DO ^DIE
+15 SET STOP=1
+16 QUIT
End DoDot:1
if STOP
QUIT
RCBX ;
+1 DO MES^XPDUTL(" Done.")
+2 DO UPDATE^XPDID(2)
+3 QUIT
+4 ;
ATD ; create ATD x-ref on file 361.4
+1 NEW IBIFN,DA,DIK
+2 DO BMES^XPDUTL(" STEP 3 of "_XPDIDTOT)
+3 DO MES^XPDUTL("-------------")
+4 DO MES^XPDUTL("Creating 'ATD' x-ref for File 361.4 ....")
+5 KILL ^IBM(361.4,"ATD")
+6 SET IBIFN=0
+7 FOR
SET IBIFN=$ORDER(^IBM(361.4,IBIFN))
if 'IBIFN
QUIT
Begin DoDot:1
+8 SET DA(1)=IBIFN
+9 SET DIK="^IBM(361.4,"_DA(1)_",1,"
+10 SET DIK(1)=".01^ATD"
+11 DO ENALL^DIK
+12 QUIT
End DoDot:1
ATDX ;
+1 DO MES^XPDUTL(" Done.")
+2 DO UPDATE^XPDID(3)
+3 QUIT
+4 ;
MCRWNR ; Medicare (WNR) clean up file 355.92 entries and add 2 new entries
+1 NEW DA,DIK,INSCO,MCRWNR,DO,DIC,X,Y,DFN,OK,IBIFN,BPID,DIE,DR
+2 DO BMES^XPDUTL(" STEP 4 of "_XPDIDTOT)
+3 DO MES^XPDUTL("-------------")
+4 DO MES^XPDUTL("Updating Billing Provider IDs for MEDICARE (WNR) ....")
+5 ;
+6 ; First, find the MEDICARE (WNR) ins co ien
+7 SET INSCO=0
+8 FOR
SET INSCO=$ORDER(^DIC(36,"B","MEDICARE (WNR)",INSCO))
if 'INSCO
QUIT
Begin DoDot:1
+9 IF $$MCRWNR^IBEFUNC(INSCO)
SET MCRWNR(INSCO)=""
QUIT
+10 DO MES^XPDUTL("ERROR: Insurance company on file named 'MEDICARE (WNR)' incorrectly set-up.")
+11 QUIT
End DoDot:1
+12 ;
+13 IF '$DATA(MCRWNR)
DO MES^XPDUTL("ERROR: Insurance company 'MEDICARE (WNR)' not found.")
GOTO MCRX
+14 ;
+15 IF $ORDER(MCRWNR(""))'=$ORDER(MCRWNR(""),-1)
DO MES^XPDUTL("ERROR: Multiple insurance companies named 'MEDICARE (WNR)' found.")
+16 ;
+17 ; Next, get rid of any entries in this file for Medicare (clean-up)
+18 SET INSCO=0
SET DIK="^IBA(355.92,"
+19 FOR
SET INSCO=$ORDER(MCRWNR(INSCO))
if 'INSCO
QUIT
Begin DoDot:1
+20 SET DA=0
+21 FOR
SET DA=$ORDER(^IBA(355.92,"B",INSCO,DA))
if 'DA
QUIT
DO ^DIK
+22 QUIT
End DoDot:1
+23 ;
+24 ; Next, add 2 entries for each Medicare (wnr) (should only be one)
+25 SET INSCO=0
+26 FOR
SET INSCO=$ORDER(MCRWNR(INSCO))
if 'INSCO
QUIT
Begin DoDot:1
+27 KILL DO
+28 SET DIC="^IBA(355.92,"
SET DIC(0)=""
SET X=INSCO
+29 SET DIC("DR")=".04///1;.06///MEDICARE PART A;.07///670899;.08///E"
+30 DO FILE^DICN
+31 KILL DO
+32 SET DIC="^IBA(355.92,"
SET DIC(0)=""
SET X=INSCO
+33 SET DIC("DR")=".04///2;.06///MEDICARE PART B;.07///VA0"_$PIECE($$SITE^VASITE,U,3)_";.08///E"
+34 DO FILE^DICN
+35 QUIT
End DoDot:1
+36 ;
+37 ; Correct billing provider secondary IDs for Medicare (current ins only)
+38 SET DFN=0
+39 ; "AOP" x-ref lists bills by patient with claim status 1 or 2
+40 FOR
SET DFN=$ORDER(^DGCR(399,"AOP",DFN))
if 'DFN
QUIT
Begin DoDot:1
+41 SET INSCO=0
SET OK=0
+42 FOR
SET INSCO=$ORDER(MCRWNR(INSCO))
if 'INSCO
QUIT
IF $DATA(^DGCR(399,"AE",DFN,INSCO))
SET OK=1
QUIT
+43 ; OK=1: claims exist for this patient in which MCRWNR is curr ins
+44 IF 'OK
QUIT
+45 SET IBIFN=0
+46 FOR
SET IBIFN=$ORDER(^DGCR(399,"AOP",DFN,IBIFN))
if 'IBIFN
QUIT
Begin DoDot:2
+47 ; current payer seq must be primary
IF $$COBN^IBCEF(IBIFN)'=1
QUIT
+48 ; and payer must be Medicare
IF '$$WNRBILL^IBEFUNC(IBIFN)
QUIT
+49 SET BPID=670899
+50 IF $$FT^IBCEF(IBIFN)=2
SET BPID="VA0"_$PIECE($$SITE^VASITE,U,3)
+51 ; BPID = what the billing provider ID should be
+52 ; it is OK
IF $PIECE($GET(^DGCR(399,IBIFN,"M1")),U,2)=BPID
QUIT
+53 ; change it
SET DIE=399
SET DA=IBIFN
SET DR="122///"_BPID
DO ^DIE
+54 QUIT
End DoDot:2
+55 QUIT
End DoDot:1
+56 ;
MCRX ;
+1 DO MES^XPDUTL(" Done.")
+2 DO UPDATE^XPDID(4)
+3 QUIT
+4 ;
TRIGGERS ;
+1 DO BMES^XPDUTL(" STEP 5 of "_XPDIDTOT)
+2 DO MES^XPDUTL("-------------")
+3 DO MES^XPDUTL("Firing Triggers for default values file 36 and 355.93 and indexing new xrefs")
+4 ;
+5 SET DIK="^DIC(36,"
+6 SET DIK(1)=".01^2^3^4^5^6"
+7 DO ENALL^DIK
+8 ;
+9 SET DIK="^IBA(355.93,"
+10 SET DIK(1)=".09^1"
+11 DO ENALL^DIK
+12 ;
+13 SET DIK="^IBA(355.93,"
+14 SET DIK(1)=".02^8"
+15 DO ENALL^DIK
+16 ;
+17 SET DIK="^IBE(355.97,"
+18 SET DIK(1)=".03^1"
+19 DO ENALL^DIK
+20 ;
+21 ;
+22 DO MES^XPDUTL(" Done.")
+23 DO UPDATE^XPDID(5)
+24 QUIT
+25 ;
IBEFTFLG ;
+1 ;
+2 DO BMES^XPDUTL(" STEP 6 of "_XPDIDTOT)
+3 DO MES^XPDUTL("-------------")
+4 DO MES^XPDUTL("Setting ID Type flag for 355.92")
+5 NEW DA,N0,Q,DIC,DR,DA
+6 SET DA=0
FOR
SET DA=$ORDER(^IBA(355.92,DA))
if '+DA
QUIT
Begin DoDot:1
+7 SET N0=$GET(^IBA(355.92,DA,0))
+8 if N0=""
QUIT
+9 ; already been done
if $PIECE(N0,U,8)]""
QUIT
+10 SET Q=$PIECE(N0,U,6)
+11 ; no qualifier
if Q=""
QUIT
+12 SET DR=".08////"_$SELECT(Q=29:"E",1:"LF")
+13 SET DIE="^IBA(355.92,"
+14 DO ^DIE
End DoDot:1
+15 DO MES^XPDUTL(" Done.")
+16 DO UPDATE^XPDID(6)
+17 QUIT
+18 ;
AUNIQ ;xxxx/WCJ-CREATE NEW-STYLE XREF ;1:27 PM 30 Dec 2005
+1 ;;1.0
+2 ;
+3 NEW ZZWJXR,ZZWJRES,ZZWJOUT
+4 DO BMES^XPDUTL(" STEP 7 of "_XPDIDTOT)
+5 DO MES^XPDUTL("-------------")
+6 DO MES^XPDUTL("Create cross reference for file 355.92 ....")
+7 SET ZZWJXR("FILE")=355.92
+8 SET ZZWJXR("NAME")="AUNIQ"
+9 SET ZZWJXR("TYPE")="MU"
+10 SET ZZWJXR("USE")="S"
+11 SET ZZWJXR("EXECUTION")="R"
+12 SET ZZWJXR("ACTIVITY")="IR"
+13 SET ZZWJXR("SHORT DESCR")="Xref by ins co,care unit,form type,division,prov id type"
+14 SET ZZWJXR("DESCR",1)="This cross reference allows edits to the additonal provider id's to be "
+15 SET ZZWJXR("DESCR",2)="replicated to linked insurance companies."
+16 SET ZZWJXR("SET")="S ^IBA(355.92,""AUNIQ"",X(1),$E(X(2),1,30),X(3),X(4),X(5),DA)="""""
+17 SET ZZWJXR("KILL")="K ^IBA(355.92,""AUNIQ"",X(1),$E(X(2),1,30),X(3),X(4),X(5),DA)"
+18 SET ZZWJXR("WHOLE KILL")="K ^IBA(355.92,""AUNIQ"")"
+19 SET ZZWJXR("SET CONDITION")="S X=0 I X(1)]"""",X(2)]"""",X(3)]"""",X(4)]"""",X(5)]"""",$P($G(^IBA(355.92,DA,0)),U,8)=""A"" S X=1"
+20 SET ZZWJXR("KILL CONDITION")="S X=0 I X(1)]"""",X(2)]"""",X(3)]"""",X(4)]"""",X(5)]"""" S X=1"
+21 SET ZZWJXR("VAL",1)=.01
+22 SET ZZWJXR("VAL",1,"COLLATION")="F"
+23 SET ZZWJXR("VAL",2)=.1
+24 SET ZZWJXR("VAL",2,"LENGTH")=30
+25 SET ZZWJXR("VAL",2,"COLLATION")="F"
+26 SET ZZWJXR("VAL",3)=.04
+27 SET ZZWJXR("VAL",3,"COLLATION")="F"
+28 SET ZZWJXR("VAL",4)=.11
+29 SET ZZWJXR("VAL",4,"COLLATION")="F"
+30 SET ZZWJXR("VAL",5)=.06
+31 SET ZZWJXR("VAL",5,"COLLATION")="F"
+32 DO CREIXN^DDMOD(.ZZWJXR,"SW",.ZZWJRES,"ZZWJOUT")
+33 DO MES^XPDUTL(" Done.")
+34 DO UPDATE^XPDID(7)
+35 QUIT
+36 ;
F35597 ;
+1 ;
+2 DO BMES^XPDUTL(" STEP 8 of "_XPDIDTOT)
+3 DO MES^XPDUTL("-------------")
+4 DO MES^XPDUTL("Updating 355.97 ....")
+5 ;
+6 NEW IEN,CNV,NEW,OLD,DR,DIC,DIE,DA,X,DAT0,DAT1
+7 ;
+8 SET CNV("BLUE CROSS ID")="BLUE CROSS^B"
+9 SET CNV("BLUE SHIELD ID")="BLUE SHIELD^B"
+10 SET CNV("TRICARE ID")="CHAMPUS^P"
+11 SET CNV("COMMERCIAL ID")="COMMERCIAL^B"
+12 SET CNV("CLIA #")="^P"
+13 SET CNV("MEDICARE PART A")="^B"
+14 SET CNV("MEDICARE PART B")="^B"
+15 SET CNV("FACILITY FED TAX ID #")="EMPLOYER'S IDENTIFICATION #"
+16 SET CNV("NETWORK ID")="PROVIDER PLAN NETWORK^B"
+17 SET CNV("PROVIDER FED TAX ID #")="FEDERAL TAXPAYER'S #^^TJ"
+18 SET CNV("UPIN")="^P"
+19 SET CNV("STATE LICENSE")="^B"
+20 SET CNV("HMO NUMBER")="HMO"
+21 SET CNV("STATE INDUSTRIAL ACCIDENT PRV")="ACCIDENT PROVIDER NUMBER^B"
+22 SET CNV("BILLING FACILITY PRIMARY ID")="ELECTRONIC PLAN TYPE^I"
+23 SET CNV("LOCATION NUMBER")="^B"
+24 ;
+25 SET IEN=0
FOR
SET IEN=$ORDER(^IBE(355.97,IEN))
if '+IEN
QUIT
Begin DoDot:1
+26 SET OLD=$PIECE($GET(^IBE(355.97,IEN,0)),U)
+27 if OLD=""
QUIT
+28 SET DATA=$GET(CNV(OLD))
+29 NEW FLAG
+30 SET FLAG=$SELECT(".1.2.3.6.8.11.12.16.18.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34."[("."_IEN_"."):1,1:0)
+31 SET DA=IEN
+32 SET DIE=355.97
+33 SET DR=""
+34 if $PIECE(DATA,U)]""
SET DR=DR_".01///"_$PIECE(DATA,U)_";"
+35 if $PIECE(DATA,U,2)]""
SET DR=DR_".07///"_$PIECE(DATA,U,2)_";"
+36 if $PIECE(DATA,U,3)]""
SET DR=DR_".03///"_$PIECE(DATA,U,3)_";"
+37 SET DR=DR_".04////@;.08////"_FLAG
+38 DO ^DIE
+39 QUIT
End DoDot:1
+40 ;
+41 SET NEW(30,0)="MEDICAID^0^1D^^^^B^1"
+42 SET NEW(30,1)="^^^^^^1"
+43 SET NEW(31,0)="USIN^0^U3^^^1^P^1"
+44 SET NEW(31,1)="^^^^^^0"
+45 SET NEW(32,0)="EIN^0^EI^^^1^B^1"
+46 SET NEW(33,0)="CLINIC NUMBER^0^FH^^^1^B^1"
+47 SET NEW(34,0)="PROVIDER SITE NUMBER^0^G5^^^1^B^1"
+48 ;
+49 SET NEW=""
FOR
SET NEW=$ORDER(NEW(NEW))
if NEW=""
QUIT
Begin DoDot:1
+50 KILL DO
+51 SET DAT0=$GET(NEW(NEW,0))
+52 SET DAT1=$GET(NEW(NEW,1))
+53 SET DIC="^IBE(355.97,"
+54 SET DIC(0)=""
+55 SET X=$PIECE(DAT0,U)
+56 if X=""
QUIT
+57 ; already there (for running multiple times)
if $DATA(^IBE(355.97,"B",X))
QUIT
+58 SET DIC("DR")=".02////0;.03////"_$PIECE(DAT0,U,3)_$SELECT($PIECE(DAT0,U,6)]"":";.06////"_$PIECE(DAT0,U,6),1:"")_";.07////"_$PIECE(DAT0,U,7)_$SELECT($PIECE(DAT1,U,7)]"":";1.07////"_$PIECE(DAT1,U,7),1:"")_";.08////"_$PIECE(DAT0,U,8)
+59 DO FILE^DICN
End DoDot:1
+60 DO MES^XPDUTL(" Done.")
+61 DO UPDATE^XPDID(8)
+62 QUIT
+63 ;
RIT ; Recompile input templates for billing screens
+1 NEW X,Y,DMAX
+2 DO BMES^XPDUTL(" STEP 9 of "_XPDIDTOT)
+3 DO MES^XPDUTL("-------------")
+4 DO MES^XPDUTL("Recompiling Input Templates for Billing Screens 6 & 7....")
+5 SET X="IBXSC6"
SET Y=$$FIND1^DIC(.402,,"X","IB SCREEN6","B")
SET DMAX=8000
+6 IF Y
DO EN^DIEZ
+7 SET X="IBXSC7"
SET Y=$$FIND1^DIC(.402,,"X","IB SCREEN7","B")
SET DMAX=8000
+8 IF Y
DO EN^DIEZ
RITX ;
+1 DO MES^XPDUTL(" Done.")
+2 DO UPDATE^XPDID(9)
+3 QUIT
+4 ;