IBORAT ;ALB/RJS - BILLING RATES LISTING - 3/02/92
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
;
;MAIN ROUTINE FOR IB BILLING RATES LISTING
;CALLS IBORAT1A,IBORAT1B,IBORAT1C,IBORAT2A,IBORAT2B,IBORAT2C
;
START ;
;***
;S XRTL=$ZU(0),XRTN="IBORAT-1" D T0^%ZOSV ;start rt clock
D PROMPT I Y=-1 Q
D OPEN G END:POP
I $D(IO("Q")) D QUEUED,HOME^%ZIS G END
U IO
;***
;I $D(XRT0) S:'$D(XRTN) XRTN="IBORAT" D T1^%ZOSV ;stop rt clock
REPORT ;
;***
;S XRTL=$ZU(0),XRTN="IBORAT-2" D T0^%ZOSV ;start rt clock
S IBOUTPUT=0,IBZ=0
D ^IBORAT1A,^IBORAT1B,^IBORAT2A,^IBORAT2B,^IBORAT1C
I 'IBZ G NEXT
I IBDONE G END
F IBAAA=$Y:1:(IOSL-3) W !
I ($E(IOST,1,2)="C-")
I S DIR(0)="E" D ^DIR K DIR I Y=0!(Y="")!($D(DIRUT)) G END
NEXT ;
D ^IBORAT2C
I 'IBZ W !,"No data for this date range"
END ;
;KILL ^TMP GLOBAL
K ^TMP($J)
;***
;I $D(XRT0) S:'$D(XRTN) XRTN="IBORAT" D T1^%ZOSV ;stop rt clock
I $D(ZTQUEUED) S ZTREQ="@" Q
;IBORAT***** KILLING VARIABLES IN IBORAT******
K %DT,%IS,IBENDATE,POP,IBSTDATE,Y,IBAAA,IBZ
;IBORAT1**** KILLING SHARED VARIABLES FROM OTHER ROUTINES *****
K DIRUT,IBDONE,IBEDATE,IBENDATE,IBOUTPUT,IBPAGE,IBSDATE,IBSTDATE,IBTITLE,IBTODAY,IBPAYORS
D ^%ZISC
Q
PROMPT ;
W !
S %DT="AEPX",IBOUTPUT=0
S %DT("A")="Enter Beginning Date:" D ^%DT
S IBSTDATE=Y
I Y=-1 Q
S %DT("A")="Enter Ending Date:" D ^%DT
S IBENDATE=Y
I Y=-1 Q
I IBENDATE<IBSTDATE W !,"Ending Date Less than Beginning Date Please Re-enter" G PROMPT
Q
QUEUED ;
S ZTRTN="REPORT^IBORAT",ZTDESC="IB BILLING RATES & MEDICARE DEDUCTIBLE REPORT",ZTSAVE("IBSTDATE")="",ZTSAVE("IBENDATE")="" D ^%ZTLOAD W !!,$S($D(ZTSK):"Request Queued",1:"Request Cancelled")
K ZTSK
Q
OPEN ;
S %ZIS="QM" D ^%ZIS
Q
IBORAT ;ALB/RJS - BILLING RATES LISTING - 3/02/92
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 ;
+3 ;MAIN ROUTINE FOR IB BILLING RATES LISTING
+4 ;CALLS IBORAT1A,IBORAT1B,IBORAT1C,IBORAT2A,IBORAT2B,IBORAT2C
+5 ;
START ;
+1 ;***
+2 ;S XRTL=$ZU(0),XRTN="IBORAT-1" D T0^%ZOSV ;start rt clock
+3 DO PROMPT
IF Y=-1
QUIT
+4 DO OPEN
IF POP
GOTO END
+5 IF $DATA(IO("Q"))
DO QUEUED
DO HOME^%ZIS
GOTO END
+6 USE IO
+7 ;***
+8 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBORAT" D T1^%ZOSV ;stop rt clock
REPORT ;
+1 ;***
+2 ;S XRTL=$ZU(0),XRTN="IBORAT-2" D T0^%ZOSV ;start rt clock
+3 SET IBOUTPUT=0
SET IBZ=0
+4 DO ^IBORAT1A
DO ^IBORAT1B
DO ^IBORAT2A
DO ^IBORAT2B
DO ^IBORAT1C
+5 IF 'IBZ
GOTO NEXT
+6 IF IBDONE
GOTO END
+7 FOR IBAAA=$Y:1:(IOSL-3)
WRITE !
+8 IF ($EXTRACT(IOST,1,2)="C-")
+9 IF $TEST
SET DIR(0)="E"
DO ^DIR
KILL DIR
IF Y=0!(Y="")!($DATA(DIRUT))
GOTO END
NEXT ;
+1 DO ^IBORAT2C
+2 IF 'IBZ
WRITE !,"No data for this date range"
END ;
+1 ;KILL ^TMP GLOBAL
+2 KILL ^TMP($JOB)
+3 ;***
+4 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBORAT" D T1^%ZOSV ;stop rt clock
+5 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT
+6 ;IBORAT***** KILLING VARIABLES IN IBORAT******
+7 KILL %DT,%IS,IBENDATE,POP,IBSTDATE,Y,IBAAA,IBZ
+8 ;IBORAT1**** KILLING SHARED VARIABLES FROM OTHER ROUTINES *****
+9 KILL DIRUT,IBDONE,IBEDATE,IBENDATE,IBOUTPUT,IBPAGE,IBSDATE,IBSTDATE,IBTITLE,IBTODAY,IBPAYORS
+10 DO ^%ZISC
+11 QUIT
PROMPT ;
+1 WRITE !
+2 SET %DT="AEPX"
SET IBOUTPUT=0
+3 SET %DT("A")="Enter Beginning Date:"
DO ^%DT
+4 SET IBSTDATE=Y
+5 IF Y=-1
QUIT
+6 SET %DT("A")="Enter Ending Date:"
DO ^%DT
+7 SET IBENDATE=Y
+8 IF Y=-1
QUIT
+9 IF IBENDATE<IBSTDATE
WRITE !,"Ending Date Less than Beginning Date Please Re-enter"
GOTO PROMPT
+10 QUIT
QUEUED ;
+1 SET ZTRTN="REPORT^IBORAT"
SET ZTDESC="IB BILLING RATES & MEDICARE DEDUCTIBLE REPORT"
SET ZTSAVE("IBSTDATE")=""
SET ZTSAVE("IBENDATE")=""
DO ^%ZTLOAD
WRITE !!,$SELECT($DATA(ZTSK):"Request Queued",1:"Request Cancelled")
+2 KILL ZTSK
+3 QUIT
OPEN ;
+1 SET %ZIS="QM"
DO ^%ZIS
+2 QUIT