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

IBY288PO.m

Go to the documentation of this file.
  1. IBY288PO ;ALB/ESG - IB*2*288 POST-INSTALL ROUTINE ;21-OCT-2004
  1. ;;2.0;INTEGRATED BILLING;**288**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. EN ; Entry Point
  1. ;
  1. D AEXREF
  1. D FACBILID
  1. D TESTQ
  1. ;
  1. Q
  1. ;
  1. AEXREF ; Build the new and improved "AE" x-ref in file 399
  1. D BMES^XPDUTL("Removing the old ""AE"" index file data and definition")
  1. D DELIX^DDMOD(399,135,1)
  1. KILL ^DGCR(399,"AE")
  1. D MES^XPDUTL("Done")
  1. ;
  1. D BMES^XPDUTL("Creating the new ""AE"" index file data and definition")
  1. N IBXR,IBRES,IBOUT
  1. S IBXR("FILE")=399
  1. S IBXR("NAME")="AE"
  1. S IBXR("TYPE")="MU"
  1. S IBXR("USE")="S"
  1. S IBXR("EXECUTION")="R"
  1. S IBXR("ACTIVITY")="IR"
  1. S IBXR("SHORT DESCR")="Index by patient and insurance company"
  1. S IBXR("DESCR",1)="Cross reference of patients and bills to payer responsible for the bill."
  1. S IBXR("DESCR",2)="This will be used to prevent deletion of insurance policy entries from the"
  1. S IBXR("DESCR",3)="patient file if a bill has been created for this insurance company."
  1. S IBXR("DESCR",4)=" "
  1. S IBXR("DESCR",5)="Created with patch IB*2.0*288 replacing traditional cross-reference #1 in "
  1. S IBXR("DESCR",6)="field 135 of file 399. Medicare is now a valid insurance company for "
  1. S IBXR("DESCR",7)="this index file."
  1. S IBXR("SET")="N CURR S CURR=+$$COBN^IBCEF(DA) I $G(X(4)),$G(X(CURR)) S ^DGCR(399,""AE"",X(4),X(CURR),DA)="""""
  1. S IBXR("KILL")="N G I $G(X(4)) F G=1,2,3 I $G(X(G)) K ^DGCR(399,""AE"",X(4),X(G),DA)"
  1. S IBXR("WHOLE KILL")="K ^DGCR(399,""AE"")"
  1. S IBXR("VAL",1)=101
  1. S IBXR("VAL",1,"COLLATION")="F"
  1. S IBXR("VAL",2)=102
  1. S IBXR("VAL",2,"COLLATION")="F"
  1. S IBXR("VAL",3)=103
  1. S IBXR("VAL",3,"COLLATION")="F"
  1. S IBXR("VAL",4)=.02
  1. S IBXR("VAL",4,"COLLATION")="F"
  1. D CREIXN^DDMOD(.IBXR,"SW",.IBRES,"IBOUT")
  1. I +$G(IBRES) D MES^XPDUTL("Index successfully created!") G AEXXX
  1. ;
  1. ; Index file failure. Not created for some reason
  1. ;
  1. D MES^XPDUTL("A PROBLEM WAS ENCOUNTERED. INDEX FILE NOT CREATED!!!")
  1. D MES^XPDUTL("SENDING MAILMAN MESSAGE...")
  1. D MES^XPDUTL("PLACING THE 'PATIENT INSURANCE INFO VIEW/EDIT' OPTION OUT-OF-ORDER.")
  1. NEW XMDUZ,XMSUBJ,XMBODY,MSG,XMTO,DA,DIE,DR,IBX
  1. S XMDUZ=DUZ,XMSUBJ="IB*2*288 Error: AE index not built",XMBODY="MSG"
  1. S MSG(1)="The updated ""AE"" index for file 399 was not created at"
  1. S MSG(2)=" "
  1. S MSG(3)=" "_$$SITE^VASITE
  1. S MSG(4)=" "
  1. S MSG(5)="The Patient Insurance Info View/Edit option has been placed out of order."
  1. ;
  1. ; recipients of message
  1. S XMTO(DUZ)=""
  1. S XMTO("eric.gustafson@daou.com")=""
  1. S XMTO("michael.f.pida@us.pwc.com")=""
  1. S XMTO("Janet.Harris2@domain.ext")=""
  1. S XMTO("Cari.Hutchison@domain.ext")=""
  1. S XMTO("G.PATCHES")=""
  1. S IBX=0 F S IBX=$O(^XUSEC("IB INSURANCE SUPERVISOR",IBX)) Q:'IBX S XMTO(IBX)=""
  1. ;
  1. D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO)
  1. ;
  1. ; place the option out of order
  1. S DA=$O(^DIC(19,"B","IBCN PATIENT INSURANCE",""))
  1. I DA S DIE=19,DR="2////IB Patch 288 Installation Failure" D ^DIE
  1. AEXXX ;
  1. Q
  1. ;
  1. FACBILID ; move the hosp and prof provider ID#'s in file 36 for the
  1. ; Medicare (WNR) entry into file 355.92.
  1. ;
  1. D BMES^XPDUTL("Updating facility provider ids for MEDICARE (WNR)")
  1. N DO,DD,DLAYGO,DIC,X,Y,Z,Z0,Z00,Z11,Z17,IBINS,IBID,IBHCFA,IBUB
  1. S IBID=$$BF^IBCU()
  1. I IBID S IBINS=0 F S IBINS=$O(^DIC(36,"B","MEDICARE (WNR)",IBINS)) Q:'IBINS S Z11=$P($G(^DIC(36,IBINS,0)),U,11),Z17=$P($G(^DIC(36,IBINS,0)),U,17) D
  1. . S (IBHCFA,IBUB)=0
  1. . S Z0=0 F S Z0=$O(^IBA(355.92,"B",IBINS,Z0)) Q:'Z0 S Z00=$G(^IBA(355.92,Z0,0)) D Q:IBHCFA&IBUB
  1. .. I $P(Z00,U,6)=IBID S:$P(Z00,U,4)=2 IBHCFA=1 S:$P(Z00,U,4)=1 IBUB=1 Q
  1. . I Z11'="",'IBUB S X=IBINS,DIC("DR")=".04////1;.06////"_IBID_";.07////"_Z11,DIC="^IBA(355.92,",DLAYGO=355.92,DIC(0)="L" D FILE^DICN K DO,DD,DLAYGO,DIC
  1. . I Z17'="",'IBHCFA S X=IBINS,DIC("DR")=".04////2;.06////"_IBID_";.07////"_Z17,DIC="^IBA(355.92,",DLAYGO=355.92,DIC(0)="L" D FILE^DICN K DO,DD,DLAYGO,DIC
  1. ;
  1. FACBILX ;
  1. Q
  1. ;
  1. TESTQ ; Change the 837 test transmission queue to be "MCT"
  1. D BMES^XPDUTL("Setting the EDI 837 Test Transmit Queue to ""MCT""")
  1. S $P(^IBE(350.9,1,8),U,9)="MCT"
  1. TESTQX ;
  1. Q
  1. ;