IBJDF8 ;ALB/RRG - AR PRODUCTIVITY REPORT ;29-AUG-00
;;2.0;INTEGRATED BILLING;**123,159,192**;21-MAR-94
;
EN ; - Option entry point.
S (IBPNI,IBTDATE,IBFDATE,IBT,IBF,IBSPT,IBRPT,IBSEL,IBCLERK)=""
;
TDATE ; - Determine date range of transactions.
;
S DIR(0)="DA^:DT:EX"
S DIR("A")="FROM Transaction Date: "
S DIR("T")=300,DIR("L")=""
S (DIR("?"),DIR("??"))="^S IBOFF=1 D HELP^IBJDF8H"
W ! D ^DIR K DIR G:Y=""!(X="^") ENQ
S IBFDATE=Y,IBF=Y(0)
;
S DIR(0)="DA^"_IBFDATE_":DT:EX"
S DIR("A")=" TO Transaction Date: "
S DIR("T")=300,DIR("L")=""
S (DIR("?"),DIR("??"))="^S IBOFF=11 D HELP^IBJDF8H"
W ! D ^DIR K DIR G:Y=""!(X="^") ENQ
S IBTDATE=Y,IBT=Y(0)
;
CLERK ; - Get All/Specific Clerks
D ALSP^IBJD("Clerks^Clerk","^IBE(351.73,",.IBCLERK)
I IBCLERK["^" G ENQ
;
TYPE ; - Determine type of report -Detail or Summary.
;
D DS^IBJD G ENQ:IBRPT["^",SUMM:IBRPT="S"
;
DETOPT ; - Detail print options.
;
; - Determine if Clerk name or Clerk identifier should print
W ! S IBPNI=""
S DIR(0)="SA^N:NAME;I:IDENTIFIER;",DIR("T")=DTIME
S DIR("A")="Do you wish to print with Clerk (N)ame or (I)dentifier? "
S DIR("?")="^S IBOFF=21 D HELP^IBJDF8H"
D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
S IBPNI=Y K DIROUT,DTOUT,DUOUT,DIRUT
;
K IBOPT F X=1:1:14 S IBOPT(X)=$$CAT(X)
S IBPRT="Choose transaction type(s) to print: "
S IBSEL=$$MLTP^IBJD(IBPRT,.IBOPT,1) I 'IBSEL G ENQ
S IBSEL=","_IBSEL
;
; - Assign Tran types from 430.3 to user-selected transaction types
S IBTT="" D
. I IBSEL=",1,2,3,4,5,6,7,8,9,10,11,12,13," S IBTT="ALL" Q
. F I=2:1 S II=$P(IBSEL,",",I) Q:'II D
. . S IBTT=$S(IBTT'="":IBTT_$$CATT(II)_"|",1:"|"_$$CATT(II)_"|")
;
SUMM ; - Summary print options
;
W ! S DIR(0)="Y",DIR("B")="YES",DIR("T")=DTIME
S DIR("A")="Do you want to print the summary by Clerk"
S DIR("?")="^S IBOFF=27 D HELP^IBJDF8H"
D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
S IBSPT=+Y K DIROUT,DTOUT,DUOUT,DIRUT
I IBSPT=1 D
. Q:IBPNI'=""
. S DIR(0)="SA^N:NAME;I:IDENTIFIER;",DIR("T")=DTIME
. S DIR("A")="Do you wish to print with Clerk (N)ame or (I)dentifier? "
. S DIR("?")="^S IBOFF=21 D HELP^IBJDF8H"
. D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
. S IBPNI=Y K DIROUT,DTOUT,DUOUT,DIRUT
;
;
DEV ; - Select a device.
W !!,"This report requires a ",$S(IBRPT="S":80,1:132)," column printer."
S %ZIS="QM" D ^%ZIS G:POP ENQ
I $D(IO("Q")) D G ENQ
.S ZTRTN="DQ^IBJDF8",ZTDESC="IB - AR PRODUCTIVITY REPORT"
.S ZTSAVE("IB*")="" D ^%ZTLOAD
.I $G(ZTSK) W !!,"This job has been queued. The task no. is ",ZTSK,"."
.E W !!,"Unable to queue this job."
.K ZTSK,IO("Q") D HOME^%ZIS
;
U IO
;
DQ D ST^IBJDF81 ; Compile and print the report.
;
ENQ K DIROUT,DTOUT,DUOUT,DIRUT,I
K IBOFF,IBSNA,IBPLN,IBRPT,POP,X,ZTDESC,ZTRTN,ZTSAVE,Y,%ZIS,IBSPT,IBPNI
K IBSEL,IBTT,II,IBF,IBT,IBFDATE,IBTDATE,IBCLERK,IBPRT,IBOPT
Q
;
CAT(X) ; - Return transaction type
Q $S(X]"":$P($T(CAT1+X),";;",2),1:"")
;
CATT(X) ; - Return transaction type from 430.3 for user-selected transaction type
Q $S(X]"":$P($T(CAT1+X),";;",3),1:"")
;
CAT1 ; - Transaction types
;;COMMENT;;45
;;AUDIT;;0
;;PAYMENT;;2|34
;;REFUND;;41
;;DEC.ADJ./CONTR;;35
;;DEC.ADJ./NON-CONTR;;35
;;WRITE-OFF;;23|8
;;WAIVED;;10|11
;;SUSPENDED;;40
;;COMPROMISED;;9|29
;;REPAYMENT PLAN;;25
;;EXEMPTION;;14
;;OTHER;;1|3|4|5|6|7|12|13|15|16|17|18|19|20|21|22|24|26|27|28|30|31|32|33|36|37|38|39|42|43|44|46|47|48|49
;;ALL OF THE ABOVE;;0
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBJDF8 3588 printed Dec 13, 2024@02:23:06 Page 2
IBJDF8 ;ALB/RRG - AR PRODUCTIVITY REPORT ;29-AUG-00
+1 ;;2.0;INTEGRATED BILLING;**123,159,192**;21-MAR-94
+2 ;
EN ; - Option entry point.
+1 SET (IBPNI,IBTDATE,IBFDATE,IBT,IBF,IBSPT,IBRPT,IBSEL,IBCLERK)=""
+2 ;
TDATE ; - Determine date range of transactions.
+1 ;
+2 SET DIR(0)="DA^:DT:EX"
+3 SET DIR("A")="FROM Transaction Date: "
+4 SET DIR("T")=300
SET DIR("L")=""
+5 SET (DIR("?"),DIR("??"))="^S IBOFF=1 D HELP^IBJDF8H"
+6 WRITE !
DO ^DIR
KILL DIR
if Y=""!(X="^")
GOTO ENQ
+7 SET IBFDATE=Y
SET IBF=Y(0)
+8 ;
+9 SET DIR(0)="DA^"_IBFDATE_":DT:EX"
+10 SET DIR("A")=" TO Transaction Date: "
+11 SET DIR("T")=300
SET DIR("L")=""
+12 SET (DIR("?"),DIR("??"))="^S IBOFF=11 D HELP^IBJDF8H"
+13 WRITE !
DO ^DIR
KILL DIR
if Y=""!(X="^")
GOTO ENQ
+14 SET IBTDATE=Y
SET IBT=Y(0)
+15 ;
CLERK ; - Get All/Specific Clerks
+1 DO ALSP^IBJD("Clerks^Clerk","^IBE(351.73,",.IBCLERK)
+2 IF IBCLERK["^"
GOTO ENQ
+3 ;
TYPE ; - Determine type of report -Detail or Summary.
+1 ;
+2 DO DS^IBJD
if IBRPT["^"
GOTO ENQ
if IBRPT="S"
GOTO SUMM
+3 ;
DETOPT ; - Detail print options.
+1 ;
+2 ; - Determine if Clerk name or Clerk identifier should print
+3 WRITE !
SET IBPNI=""
+4 SET DIR(0)="SA^N:NAME;I:IDENTIFIER;"
SET DIR("T")=DTIME
+5 SET DIR("A")="Do you wish to print with Clerk (N)ame or (I)dentifier? "
+6 SET DIR("?")="^S IBOFF=21 D HELP^IBJDF8H"
+7 DO ^DIR
KILL DIR
if $DATA(DIRUT)!$DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
GOTO ENQ
+8 SET IBPNI=Y
KILL DIROUT,DTOUT,DUOUT,DIRUT
+9 ;
+10 KILL IBOPT
FOR X=1:1:14
SET IBOPT(X)=$$CAT(X)
+11 SET IBPRT="Choose transaction type(s) to print: "
+12 SET IBSEL=$$MLTP^IBJD(IBPRT,.IBOPT,1)
IF 'IBSEL
GOTO ENQ
+13 SET IBSEL=","_IBSEL
+14 ;
+15 ; - Assign Tran types from 430.3 to user-selected transaction types
+16 SET IBTT=""
Begin DoDot:1
+17 IF IBSEL=",1,2,3,4,5,6,7,8,9,10,11,12,13,"
SET IBTT="ALL"
QUIT
+18 FOR I=2:1
SET II=$PIECE(IBSEL,",",I)
if 'II
QUIT
Begin DoDot:2
+19 SET IBTT=$SELECT(IBTT'="":IBTT_$$CATT(II)_"|",1:"|"_$$CATT(II)_"|")
End DoDot:2
End DoDot:1
+20 ;
SUMM ; - Summary print options
+1 ;
+2 WRITE !
SET DIR(0)="Y"
SET DIR("B")="YES"
SET DIR("T")=DTIME
+3 SET DIR("A")="Do you want to print the summary by Clerk"
+4 SET DIR("?")="^S IBOFF=27 D HELP^IBJDF8H"
+5 DO ^DIR
KILL DIR
if $DATA(DIRUT)!$DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
GOTO ENQ
+6 SET IBSPT=+Y
KILL DIROUT,DTOUT,DUOUT,DIRUT
+7 IF IBSPT=1
Begin DoDot:1
+8 if IBPNI'=""
QUIT
+9 SET DIR(0)="SA^N:NAME;I:IDENTIFIER;"
SET DIR("T")=DTIME
+10 SET DIR("A")="Do you wish to print with Clerk (N)ame or (I)dentifier? "
+11 SET DIR("?")="^S IBOFF=21 D HELP^IBJDF8H"
+12 DO ^DIR
KILL DIR
if $DATA(DIRUT)!$DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
GOTO ENQ
+13 SET IBPNI=Y
KILL DIROUT,DTOUT,DUOUT,DIRUT
End DoDot:1
+14 ;
+15 ;
DEV ; - Select a device.
+1 WRITE !!,"This report requires a ",$SELECT(IBRPT="S":80,1:132)," column printer."
+2 SET %ZIS="QM"
DO ^%ZIS
if POP
GOTO ENQ
+3 IF $DATA(IO("Q"))
Begin DoDot:1
+4 SET ZTRTN="DQ^IBJDF8"
SET ZTDESC="IB - AR PRODUCTIVITY REPORT"
+5 SET ZTSAVE("IB*")=""
DO ^%ZTLOAD
+6 IF $GET(ZTSK)
WRITE !!,"This job has been queued. The task no. is ",ZTSK,"."
+7 IF '$TEST
WRITE !!,"Unable to queue this job."
+8 KILL ZTSK,IO("Q")
DO HOME^%ZIS
End DoDot:1
GOTO ENQ
+9 ;
+10 USE IO
+11 ;
DQ ; Compile and print the report.
DO ST^IBJDF81
+1 ;
ENQ KILL DIROUT,DTOUT,DUOUT,DIRUT,I
+1 KILL IBOFF,IBSNA,IBPLN,IBRPT,POP,X,ZTDESC,ZTRTN,ZTSAVE,Y,%ZIS,IBSPT,IBPNI
+2 KILL IBSEL,IBTT,II,IBF,IBT,IBFDATE,IBTDATE,IBCLERK,IBPRT,IBOPT
+3 QUIT
+4 ;
CAT(X) ; - Return transaction type
+1 QUIT $SELECT(X]"":$PIECE($TEXT(CAT1+X),";;",2),1:"")
+2 ;
CATT(X) ; - Return transaction type from 430.3 for user-selected transaction type
+1 QUIT $SELECT(X]"":$PIECE($TEXT(CAT1+X),";;",3),1:"")
+2 ;
CAT1 ; - Transaction types
+1 ;;COMMENT;;45
+2 ;;AUDIT;;0
+3 ;;PAYMENT;;2|34
+4 ;;REFUND;;41
+5 ;;DEC.ADJ./CONTR;;35
+6 ;;DEC.ADJ./NON-CONTR;;35
+7 ;;WRITE-OFF;;23|8
+8 ;;WAIVED;;10|11
+9 ;;SUSPENDED;;40
+10 ;;COMPROMISED;;9|29
+11 ;;REPAYMENT PLAN;;25
+12 ;;EXEMPTION;;14
+13 ;;OTHER;;1|3|4|5|6|7|12|13|15|16|17|18|19|20|21|22|24|26|27|28|30|31|32|33|36|37|38|39|42|43|44|46|47|48|49
+14 ;;ALL OF THE ABOVE;;0
+15 ;