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

IBY196PO.m

Go to the documentation of this file.
  1. IBY196PO ;ALB/TMK - IB*2*196 POST-INSTALL ;06-AUG-2002
  1. ;;2.0;INTEGRATED BILLING;**196**;21-MAR-94
  1. ;
  1. POST ;Set up check points for post-install
  1. S %=$$NEWCP^XPDUTL("BATCH","BATCH^IBY196PO")
  1. Q
  1. ;
  1. BATCH N %,Z,IBCT,IBDA,IBSAVE,IBBILL,IB,IB0,IBACC,DA,DIE,X,Y,DR,Z
  1. D BMES^XPDUTL("Updating batches with Austin Confirmation status")
  1. ; Logic: Read through all the batches in file 364.1
  1. ; If the batch is not in RECEIVED IN AUSTIN status (A0), check if any
  1. ; of the bills in that batch have an A0, A1 or A2 status. This
  1. ; will indicate the batch was received in Austin and the status
  1. ; of the batch is wrong. If this is the case, update the batch
  1. ; status to A0 and update the status of any of the bills in the
  1. ; batch that still have a 'P' status to A0.
  1. S (IBCT,IBDA)=0
  1. F S IBDA=$O(^IBA(364.1,IBDA)) Q:'IBDA I $P($G(^IBA(364.1,IBDA,0)),U,2)="P" D
  1. . ; Find bills in the batch
  1. . K IBSAVE S IBACC=0
  1. . S IBBILL=0 F S IBBILL=$O(^IBA(364,"C",IBDA,IBBILL)) Q:'IBBILL S IB0=$G(^IBA(364,IBBILL,0)) I IB0'="" D
  1. .. S IB=$P(IB0,U,3) ; Bill status
  1. .. I IB["A" S IBACC=1 Q ; Accepted by Austin, non-payer or payer
  1. .. I IB="P" S IBSAVE(IBBILL)="" ; Still pending confirmation
  1. . I IBACC D
  1. .. S IBCT=IBCT+1
  1. .. S DR=".02////A0",DIE="^IBA(364.1,",DA=IBDA D ^DIE
  1. .. S Z=0 F S Z=$O(IBSAVE(Z)) Q:'Z I $P($G(^IBA(364,Z,0)),U,3)="P" S DR=".03////A0",DIE="^IBA(364,",DA=Z D ^DIE
  1. D BMES^XPDUTL("Post install complete - "_IBCT_" batches updated")
  1. Q
  1. ;