IBCRBG2 ;ALB/ARH - RATES: BILL SOURCE EVENTS (INPT CONT) ; 01-OCT-03 ;;2.0;INTEGRATED BILLING;**245,175,332,364**;21-MAR-94;Build 7 ;;Per VHA Directive 2004-038, this routine should not be modified. ; INPTRSET(IBIFN,CS) ; reset Inpatient data due to bedsection Tort 03 and Other Type of Care RC v2.0 ; (based on INPTPTF since that deals with timeframe and end of bill) N IBRC S IBRC=1 I +$G(CS),$E($G(^IBE(363.1,+CS,0)),1,2)'="RC" S IBRC=0 ; D INPTBS(IBIFN,IBRC) D INPTOTH(IBIFN,IBRC) Q ; INPTBS(IBIFN,RC) ; with output from INPTPTF^IBCRBG, reset bedsections due to changes with Tort 03 and RC ; - Some Specialties are changed to PRRTP bedsection (beginning with Tort 03) ; - Some Specialties are changed to ICU bedsection for RC only (beginning with RC v2.0) ; - Nursing Home Care and Observation bedsections are not billable with RC DRG (per diem) so remove DRG ; (based on INPTPTF since that deals with timeframe and end of bill) ; N IBDT,IBLN,IBSPCLTY,IBNLN,IBNBS,IBNDRG,IBCGTY ; S IBDT=0 F S IBDT=$O(^TMP($J,"IBCRC-INDT",IBDT)) Q:'IBDT D . S IBLN=$G(^TMP($J,"IBCRC-INDT",IBDT)) Q:'IBLN . S IBSPCLTY=$P(IBLN,U,6) Q:'IBSPCLTY . ; . S IBNLN=IBLN . S IBNBS=$$BSUPD(IBSPCLTY,IBDT,+$G(RC)) I +IBNBS S $P(IBNLN,U,2)=+IBNBS . S IBNDRG=$$NODRG(IBSPCLTY) I +IBNDRG S $P(IBNLN,U,4)="" . I 'IBNBS,'IBNDRG Q . S ^TMP($J,"IBCRC-INDT",IBDT)=IBNLN Q ; INPTOTH(IBIFN,RC) ; with output from INPTPTF^IBCRBG, reset Other type of care and Tort 03 changes ; - If type of care is Other then bedsection is replaced and DRG deleted (began with RC v2.0) ; (based on INPTPTF since that deals with timeframe and end of bill) ; N IBOT,IBOTLN,IBBS,IBDT1,IBDT2,IBDT,IBLN,IBNLN Q:'$G(RC) I +$G(IBIFN) S IBOT=0 F S IBOT=$O(^DGCR(399,IBIFN,"OT",IBOT)) Q:'IBOT D . S IBOTLN=$G(^DGCR(399,IBIFN,"OT",IBOT,0)) Q:'IBOTLN . S IBDT1=+$P(IBOTLN,U,2) Q:'IBDT1 S IBDT2=+$P(IBOTLN,U,3) Q:'IBDT2 . S IBBS=+IBOTLN Q:'IBOTLN . ; . S IBDT=IBDT1-.1 F S IBDT=$O(^TMP($J,"IBCRC-INDT",IBDT)) Q:('IBDT)!(IBDT'