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

IB20P191.m

Go to the documentation of this file.
  1. IB20P191 ;ALB/ARH - IB*2*191 POST INIT: EDI UPDATES ; 08/12/02
  1. ;;2.0;INTEGRATED BILLING;**191**;21-MAR-94
  1. ;
  1. ;
  1. Q
  1. PRE ;
  1. N IBA
  1. S IBA(1)="",IBA(2)=" IB*2*191 Pre-Install .....",IBA(3)="" D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D INSXRF ; delete trigger cross references in 399
  1. ;
  1. S IBA(1)="",IBA(2)=" IB*2*191 Pre-Install Complete",IBA(3)="" D MES^XPDUTL(.IBA) K IBA
  1. Q
  1. ;
  1. INSXRF ; PRE-INSTALL - delete trigger cross references
  1. N IBA
  1. ;
  1. D DELIX^DDMOD(399,24,2) S IBA(1)=" >> ^DD(399,24) cross-reference #2 deleted" D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D DELIX^DDMOD(399,24,3) S IBA(1)=" >> ^DD(399,24) cross-reference #3 deleted" D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D DELIX^DDMOD(399,101,1) S IBA(1)=" >> ^DD(399,101) cross-reference #1 deleted (re-installed)" D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D DELIX^DDMOD(399,102,2) S IBA(1)=" >> ^DD(399,102) cross-reference #2 deleted (re-installed)" D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D DELIX^DDMOD(399,103,2) S IBA(1)=" >> ^DD(399,103) cross-reference #2 deleted (re-installed)" D MES^XPDUTL(.IBA) K IBA
  1. Q
  1. POST ;
  1. N IBA
  1. S IBA(1)="",IBA(2)=" IB*2*191 Post-Install .....",IBA(3)="" D MES^XPDUTL(.IBA) K IBA
  1. ;
  1. D CLEAN ; Delete incomplete hanging nodes in the EDI Message file (364.2)
  1. D STATUS ; Update the resubmitted bills' status and new batch pointer
  1. D INSPRV ; Copy Ins Hospital Provider Number to Professional Provider Number
  1. ;
  1. S IBA(1)="",IBA(2)=" IB*2*191 Post-Install Complete",IBA(3)="" D MES^XPDUTL(.IBA) K IBA
  1. Q
  1. ;
  1. ;
  1. CLEAN ; Clean left over nodes from the EDI Message File (364.2) - any node where there is no .01 field defined
  1. N IBA,IBX,IBFN,IBCNT,DA,DIK,DIC,X,Y S IBCNT=0
  1. ;
  1. F IBX="ABA","ABI","AMAN","AMD","AMS","AMT","ARD","ASCD","B","C" K ^IBA(364.2,IBX)
  1. ;
  1. S IBFN=0 F S IBFN=$O(^IBA(364.2,IBFN)) Q:'IBFN D
  1. . I $P($G(^IBA(364.2,IBFN,0)),U,1)="" S DA=IBFN,DIK="^IBA(364.2," D ^DIK S IBCNT=IBCNT+1
  1. ;
  1. S DIK="^IBA(364.2," D IXALL^DIK
  1. ;
  1. S IBA(1)=" >> Cleaning the EDI Message File (364.2), deleting incomplete nodes. "_IBCNT D MES^XPDUTL(.IBA) K IBA
  1. Q
  1. ;
  1. ;
  1. STATUS ; Update the resubmitted bills' status and new batch pointer
  1. ; Assume the bills are in the file in IEN order that corresponds to
  1. ; the order in which they were transmitted. Starting at the last one
  1. ; transmitted (highest IEN), look at the entry just before it and
  1. ; assume the earlier one was resubmitted in the later one's batch.
  1. ; Update the status if it's one of the standard ones from the return
  1. ; message (P, A0, A1, or A2).
  1. ;
  1. N IBA,IBO,IBO0,IBN,IBN0,IBZ,Z,DR,DA,DIE,DIC,X,Y
  1. S IBZ=0 F S IBZ=$O(^IBA(364,"B",IBZ)) Q:'IBZ S Z=$O(^IBA(364,"B",IBZ,0)) I $O(^IBA(364,"B",IBZ,Z)) D
  1. . S IBN="" F S IBN=$O(^IBA(364,"B",IBZ,IBN),-1) Q:IBN="" D Q:'IBO
  1. .. S IBO=$O(^IBA(364,"B",IBZ,IBN),-1)
  1. .. Q:'IBO ; No earlier transmit
  1. .. S IBO0=$G(^IBA(364,IBO,0)),IBN0=$G(^IBA(364,IBN,0))
  1. .. Q:$P(IBO0,U,6) ; Already has a resubmitted batch #
  1. .. S DR=".06////"_$P(IBN0,U,2) ; Update new batch # into old record
  1. .. I "P A0 A1 A2"[$P(IBO0,U,3) S DR=DR_";.03////R" ;Update status of old
  1. .. S DIE="^IBA(364,",DA=IBO D ^DIE
  1. ;
  1. S IBA(1)=" >> Updating the resubmitted bills' status and new batch pointer" D MES^XPDUTL(.IBA) K IBA
  1. Q
  1. ;
  1. ;
  1. INSPRV ; Copy Hospital Provider Number (36,.11) into new field Professional Provider Number (36,.17)
  1. N IBA,IBFN,IB0,IBHP,IBPP,DA,DR,DIC,DIE,X,Y,IBCNT S IBCNT=0
  1. ;
  1. S IBFN=0 F S IBFN=$O(^DIC(36,IBFN)) Q:'IBFN D
  1. . S IB0=$G(^DIC(36,IBFN,0))
  1. . S IBHP=$P(IB0,U,11) Q:IBHP=""
  1. . S IBPP=$P(IB0,U,17) Q:IBPP'=""
  1. . ;
  1. . S DIE="^DIC(36,",DA=IBFN,DR=".17////"_IBHP D ^DIE K DA,DR,DIC,DIE S IBCNT=IBCNT+1
  1. ;
  1. S IBA(1)=" >> Copy Ins Hospital Provider Number to Professional Provider Number "_IBCNT D MES^XPDUTL(.IBA) K IBA
  1. Q