| 1 | IBOHCR ;ALB/ARH - RELEASE/UPDATE A PATIENTS CHARGES ON HOLD ; MAY 2 1997
 | 
|---|
| 2 |  ;;2.0;INTEGRATED BILLING;**82**;21-MAR-94
 | 
|---|
| 3 |  ;
 | 
|---|
| 4 | 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
 | 
|---|
| 5 |  ;
 | 
|---|
| 6 |  ;  Input:   DFN:    pointer to the patient in file #2
 | 
|---|
| 7 |  ;           IBACT:  1 if ON HOLD DATE should be updated with todays date
 | 
|---|
| 8 |  ;                   2 if charges should be immediately released
 | 
|---|
| 9 |  ;           IBTALK: true if error message can be printed to screen
 | 
|---|
| 10 |  ;
 | 
|---|
| 11 |  ;  Returns: 1 if On Hold charges were found and processed
 | 
|---|
| 12 |  ;
 | 
|---|
| 13 |  N X,Y,IBPFN,IBX,IBRTN S IBRTN=""
 | 
|---|
| 14 |  I '$G(DFN)!('$G(IBACT)) G EXIT
 | 
|---|
| 15 |  ;
 | 
|---|
| 16 |  ; find all charges on hold for patient then complete action
 | 
|---|
| 17 |  S IBPFN=0 F  S IBPFN=$O(^IB("AH",DFN,IBPFN)) Q:'IBPFN  D
 | 
|---|
| 18 |  . S IBX=$G(^IB(IBPFN,0)) I $P(IBX,U,5)'=8 Q
 | 
|---|
| 19 |  . I IBACT=1 D HLDDT(IBPFN)
 | 
|---|
| 20 |  . I IBACT=2 D RELEASE(IBPFN)
 | 
|---|
| 21 |  . S IBRTN=1
 | 
|---|
| 22 |  ;
 | 
|---|
| 23 | EXIT Q IBRTN
 | 
|---|
| 24 |  ;
 | 
|---|
| 25 | HLDDT(IBPFN) ; update a charge's on hold date to today
 | 
|---|
| 26 |  N IBX,IBY,IBERR
 | 
|---|
| 27 |  S IBX=$G(^IB(IBPFN,0)) I $P(IBX,U,5)'=8 Q
 | 
|---|
| 28 |  I $P($G(^IB(IBPFN,1)),U,6)>DT Q
 | 
|---|
| 29 |  ;
 | 
|---|
| 30 |  S IBY(350,IBPFN_",",16)=DT D FILE^DIE("K","IBY")
 | 
|---|
| 31 |  Q
 | 
|---|
| 32 |  ;
 | 
|---|
| 33 | RELEASE(IBPFN) ; release a charge on hold
 | 
|---|
| 34 |  N IBX,IBSEQNO,IBDUZ,IBNOS,DFN,Y
 | 
|---|
| 35 |  S IBX=$G(^IB(IBPFN,0)) I $P(IBX,U,5)'=8 Q
 | 
|---|
| 36 |  ;
 | 
|---|
| 37 |  S IBSEQNO=1,IBDUZ=DUZ,IBNOS=IBPFN,DFN=+$P(IBX,U,2) D ^IBR
 | 
|---|
| 38 |  I $G(Y)<1,+$G(IBTALK),'$D(ZTQUEUED) W !,?5,"Error encountered - a separate bulletin has been posted."
 | 
|---|
| 39 |  Q
 | 
|---|