IBCONSC ;ALB/MJB,SGD,AAS,RLW - NSC W/INSURANCE OUTPUT ;06 JUN 88 13:51 ;;2.0;INTEGRATED BILLING;**66,120**; 21-MAR-94 ; ; INP ; Entry point for Inpatient Admission report S IBINPT=1,IBSUB="AMV1" G EN1 ; INPDIS ; Entry point for Inpatient Discharge report S IBINPT=2,IBSUB="AMV3" G EN1 ; EN ; Entry point for Outpatient report S IBINPT=0,IBSUB="" EN1 ; ;*** ;S XRTL=$ZU(0),XRTN="IBCONSC-1" D T0^%ZOSV ;start rt clock I '$D(DT) D DT^DICRW K ^TMP($J) ; D ^IBCONS4 I +$G(IBQUIT) G Q ; DEV ; -- ask device W !!,*7,"*** Margin width of this output is 132 ***" W !,"*** This output should be queued ***" ; I +$G(IBINPT)=0,+$P($G(^IBE(350.9,1,6)),U,23) W !,"*** If queued, Outpatient Visits in Claims Tracking will be updated first ***" ; S %ZIS="QM" D ^%ZIS G:POP Q I $D(IO("Q")) K IO("Q") D G Q .S ZTRTN="BEGIN^IBCONSC",ZTSAVE("IB*")="",ZTSAVE("VAUTD")="",ZTSAVE("VAUTD(")="" .S ZTDESC="IB - Patients with Insurance and "_$S('IBINPT:"Outpatient ",IBINPT=1:"Admissions",1:"Discharges") .D ^%ZTLOAD K ZTSK D HOME^%ZIS ; U IO ;*** ;I $D(XRT0) S:'$D(XRTN) XRTN="IBCONSC" D T1^%ZOSV ;stop rt clock ; ; BEGIN ; Background job main entry point. Set up the report header. ;*** ;S XRTL=$ZU(0),XRTN="IBCONSC-2" D T0^%ZOSV ;start rt clock ; I $D(ZTQUEUED),+$G(IBINPT)=0,+$P($G(^IBE(350.9,1,6)),U,23) D UPCT ; update CT if parameter on, opt, queued ; S B="",IBL="",$P(IBL,"=",IOM)="",Y=IBBEG X ^DD("DD") S IBHD="*Veterans with Reimbursable Insurance and "_$S('IBINPT:"OUTPATIENT Appointments",1:"INPATIENT "_$S(IBINPT=2:"Discharges",1:"Admissions"))_" for the " S IBHD=IBHD_$S(IBBEG'=IBEND:"period covering ",1:"")_Y I IBBEG