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

IBOVOP.m

Go to the documentation of this file.
IBOVOP	;ALB/RLW - Report of Visits for NSC Outpatients ; 12-JUN-92
	;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
INIT	; 
	;***
	;S XRTL=$ZU(0),XRTN="IBOVOP-1" D T0^%ZOSV ;start rt clock
	;
	D DT^DICRW,HOME^%ZIS S IBQUIT=0
	N IBJ,IBAMT,IBAIEN,IBPAGE,IBLINE,IBACT,IBDATA,IBTITLE,IBDATE,IBADFN,IBEL,IBIEN,IBCL,IBCKIN,IBSDATA,IBSTART,IBPRNT,IBAPPT,IBSTAT,IBFLD1,IBFLD2,IBFLD3,IBFLD4,IBFLD5,IBFLD6,IBSEQ
	S DIR(0)="DA^2901001:NOW:EX",DIR("A")="Start with DATE: " D ^DIR K DIR G:$D(DIRUT) END S IBBDT=+Y
	S DIR(0)="DA^"_+Y_":NOW:EX",DIR("A")="Go to DATE: " D ^DIR K DIR G:$D(DIRUT) END S IBEDT=+Y
	S %ZIS="QM" D ^%ZIS G:POP END
	I $D(IO("Q")) D  G END
	.S ZTRTN="QUE^IBOVOP",ZTDESC="CATEGORY C OUTPATIENT/REGISTRATION EVENTS",ZTSAVE("IB*")=""
	.D ^%ZTLOAD W !!,$S($D(ZTSK):"This job has been queued.  The task number is "_ZTSK_".",1:"Unable to queue this job.")
	.K ZTSK,IO("Q") D HOME^%ZIS
	U IO
	;
	;***
	;I $D(XRT0) S:'$D(XRTN) XRTN="IBOVOP" D T1^%ZOSV ;stop rt clock
	;
	D QUE
END	K IBBDT,IBEDT,IBQUIT
	;
	;***
	;I $D(XRT0) S:'$D(XRTN) XRTN="IBOVOP" D T1^%ZOSV ;stop rt clock
	;
	Q
	;
QUE	;entry point if queued
	;***
	;S XRTL=$ZU(0),XRTN="IBOVOP-2" D T0^%ZOSV ;start rt clock
	;
	S IBPAGE=0
	S IBDATE=IBBDT D MAIN^IBOVOP1 Q:IBQUIT
	F  S X1=IBDATE,X2=1 D C^%DTC Q:X>IBEDT  S IBDATE=X K ^TMP("IBOVOP",$J) D MAIN^IBOVOP1 Q:IBQUIT
	;
	;***
	;I $D(XRT0) S:'$D(XRTN) XRTN="IBOVOP" D T1^%ZOSV ;stop rt clock
	;
	I $D(ZTQUEUED) S ZTREQ="@" Q
	D ^%ZISC
	Q
	;
CPMVST	; Find scheduled appointments for Category C veterans
	D BDT^IBOUTL I (IBBDT="")!(IBEDT="") G END2
	S DFN=0 F  S DFN=$O(^DPT("ACS",6,DFN)) Q:'DFN  S IBFLAG=0,IBDATE=IBBDT F  S IBDATE=$O(^DPT(DFN,"S",IBDATE)) Q:'IBDATE!(IBDATE>(IBEDT+.9999))  D PRINT
END2	K IBBDT,IBEDT,IBDATE,DFN,IBFLAG
	Q
PRINT	; write visit output
	I 'IBFLAG W !!,$P(^DPT(DFN,0),"^") S IBFLAG=1
	W !,$$DAT2^IBOUTL(IBDATE)
	W ?21,"STATUS: ",$P(^DPT(DFN,"S",IBDATE,0),"^",2)
	Q