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

IBOHCR.m

Go to the documentation of this file.
  1. IBOHCR ;ALB/ARH - RELEASE/UPDATE A PATIENTS CHARGES ON HOLD ; MAY 2 1997
  1. ;;2.0;INTEGRATED BILLING;**82**;21-MAR-94
  1. ;
  1. PTHLD(DFN,IBACT,IBTALK) ; search for all charges on hold due to insurance for a specific patient then update the On Hold Date or release charges
  1. ;
  1. ; Input: DFN: pointer to the patient in file #2
  1. ; IBACT: 1 if ON HOLD DATE should be updated with todays date
  1. ; 2 if charges should be immediately released
  1. ; IBTALK: true if error message can be printed to screen
  1. ;
  1. ; Returns: 1 if On Hold charges were found and processed
  1. ;
  1. N X,Y,IBPFN,IBX,IBRTN S IBRTN=""
  1. I '$G(DFN)!('$G(IBACT)) G EXIT
  1. ;
  1. ; find all charges on hold for patient then complete action
  1. S IBPFN=0 F S IBPFN=$O(^IB("AH",DFN,IBPFN)) Q:'IBPFN D
  1. . S IBX=$G(^IB(IBPFN,0)) I $P(IBX,U,5)'=8 Q
  1. . I IBACT=1 D HLDDT(IBPFN)
  1. . I IBACT=2 D RELEASE(IBPFN)
  1. . S IBRTN=1
  1. ;
  1. EXIT Q IBRTN
  1. ;
  1. HLDDT(IBPFN) ; update a charge's on hold date to today
  1. N IBX,IBY,IBERR
  1. S IBX=$G(^IB(IBPFN,0)) I $P(IBX,U,5)'=8 Q
  1. I $P($G(^IB(IBPFN,1)),U,6)>DT Q
  1. ;
  1. S IBY(350,IBPFN_",",16)=DT D FILE^DIE("K","IBY")
  1. Q
  1. ;
  1. RELEASE(IBPFN) ; release a charge on hold
  1. N IBX,IBSEQNO,IBDUZ,IBNOS,DFN,Y
  1. S IBX=$G(^IB(IBPFN,0)) I $P(IBX,U,5)'=8 Q
  1. ;
  1. S IBSEQNO=1,IBDUZ=DUZ,IBNOS=IBPFN,DFN=+$P(IBX,U,2) D ^IBR
  1. I $G(Y)<1,+$G(IBTALK),'$D(ZTQUEUED) W !,?5,"Error encountered - a separate bulletin has been posted."
  1. Q