IBEFURF ;ALB/ARH - UTILITY: FIND RELATED FIRST PARTY BILLS ; 3/7/00 ;;2.0;INTEGRATED BILLING;**130,347**;21-MAR-94;Build 24 ;;Per VHA Directive 2004-038, this routine should not be modified. ; ; the following procedures search for First Party charges for specific events, matchs are returned in TMP ; only a single record of a charge event is returned, defining the charges current status, although there may ; have been cancellations or updates to the original charge ; o Inpatient Events may have multiple charge events (Copay and Per Diem) ; o Opt and Rx Events have only a single charge event (Copay) ; ; ^TMP("IBRBF",$J, XRF, charge ifn) = ; BILL FROM ^ BILL TO ^ CANCELLED? (1/0)^ AR BILL NUMBER ^ TOTAL CHARGE ^ ACTION TYPE (SHORT) ^ # DAYS ON HOLD ; FPINPT(DFN,ADMDT,XRF) ; given a patient and admission date, find any Inpatient Charges ; find the record of the Event (based on Event Date) then find all charges with that Event as the Parent Event N IBFPIFN,IBEVDT,IBEVIFN,IB0 S ADMDT=+$G(ADMDT)\1 I +$G(DFN),+$G(ADMDT) S IBEVDT=-(ADMDT+.01) F S IBEVDT=$O(^IB("AFDT",DFN,IBEVDT)) Q:'IBEVDT!(-IBEVDT