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

IBAFIL.m

Go to the documentation of this file.
  1. IBAFIL ;ALB/AAS - INTEGRATED BILLING, PASS OFF TO BE FILED ; 25-FEB-91
  1. ;;Version 2.0 ; INTEGRATED BILLING ;**40**; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. % I '$G(DFN) S Y="-1^IB002" Q ; Invalid patient pointer
  1. I '$G(IBSEQNO) S Y="-1^IB017" Q ; Sequence number is missing
  1. I '$G(IBDUZ) S Y="-1^IB007" Q ; Invalid user ID
  1. I '$D(^IBE(350.9,1,0)) D ^IBR Q ; no site parameters - file in foreground
  1. ;
  1. I '$P(^IBE(350.9,1,0),"^",3) N Y D ^IBR Q ; file in foreground
  1. ;Patch 40 looks for a space to set "APOST" x-ref if finds then lock.
  1. F IBNOW=IBNOW:.000001 I '$D(^IB("APOST",IBNOW)) L +^IB("APOST",IBNOW):0 Q:$T
  1. S ^IB("APOST",IBNOW,DFN,IBSEQNO,IBDUZ)=IBNOS
  1. L -^IB("APOST",IBNOW)
  1. ;
  1. ; - if filer not started, start it.
  1. I $P(^IBE(350.9,1,0),"^",4)="",'$P(^(0),"^",10) D ZTSK^IBEF Q
  1. ;
  1. ;check to see if not running, wait 2 seconds, test again
  1. ;before restarting (time to deque)
  1. D EN^IBECK I IBFLAG[3 H 2 D EN^IBECK I IBFLAG[3 D S1^IBEFUTL
  1. K IBFLAG
  1. Q
  1. ;
  1. REPASS ; -called from IB INCOMPLETE print template
  1. D NOW^%DTC S IBNOW=%
  1. S DFN=$P(^IB(D0,0),"^",2),IBATYP=$P(^(0),"^",3),IBSEQNO=$P(^IBE(350.1,IBATYP,0),"^",5),IBDUZ=DUZ,IBNOS=D0
  1. D IBAFIL
  1. K IBN,IBNOW,DFN,IBDUZ,IBSEQNO,IBATYP
  1. Q