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

IBCEMPRG.m

Go to the documentation of this file.
  1. IBCEMPRG ;ALB/JEH - Purge Status Messages ;25-apr-01
  1. ;;2.0;INTEGRATED BILLING;**137**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;This routine will run as part of the EDI nightly background job.
  1. ;It will purge status messages in a Final Reveiw Status from
  1. ;file 361. If the field, Days to Wait to Purge Msgs(#8.02),
  1. ;of the IB Site Parameters file (#350.9) has been populated,
  1. ;status messages with a final review date prior to the # days to wait
  1. ;to purge msgs will be deleted.
  1. ;
  1. EN ; -- main entry point for purging status messages in final review status
  1. N IBDAYS,IBDT,IBDELDT,DIK,DA,X
  1. S IBDAYS=$P($G(^IBE(350.9,1,8)),U,2)
  1. Q:'IBDAYS
  1. S X1=DT,X2=-IBDAYS D C^%DTC S IBDELDT=X
  1. S DIK="^IBM(361,"
  1. S IBDT=0 F S IBDT=$O(^IBM(361,"AFR",IBDT)) Q:'IBDT!(IBDT>IBDELDT) S DA=0 F S DA=$O(^IBM(361,"AFR",IBDT,DA)) Q:'DA D ^DIK
  1. Q
  1. ;