IBOCPD ;ALB/ARH - CLERK PRODUCTIVITY REPORTS ;10/8/91
;;2.0;INTEGRATED BILLING;**44,63,118,155**;21-MAR-94
;
EN ;***
;I $D(XRT0) S:'$D(XRTN) XRTN="IBOCPD" D T1^%ZOSV ;stop rt clock
;S XRTL=$ZU(0),XRTN="IBOCPD-1" D T0^%ZOSV ;start rt clock
S DIR(0)="SO^F:FULL CLERK PRODUCTIVITY REPORT;S:SUMMARY OF CLERK PRODUCTIVITY REPORT;"
D ^DIR K DIR G:$D(DIRUT) EXIT I Y="F" D FULL G EXIT
I Y="S" D ^IBOCPDS
EXIT K X,Y,DTOUT,DUOUT,DIRUT,DIROUT,DIOEND
;***
;I $D(XRT0) S:'$D(XRTN) XRTN="IBOCPD" D T1^%ZOSV ;stop rt clock
Q
;
FULL D ORDER G:IBQUIT ENDF
D HOME^%ZIS S IBHDR="CLERK PRODUCTIVITY REPORT"
W @IOF,?27,IBHDR,!!,"Report requires 132 columns."
S IBFLD="Date "_$S(Y="E":"Entered",Y="A":"Authorized",1:"First Printed")
D RANGE I IBQUIT G ENDF
;
PRINTF ; - Print report.
;***
;I $D(XRT0) S:'$D(XRTN) XRTN="IBOCPD" D T1^%ZOSV ;stop rt clock
;S XRTL=$ZU(0),XRTN="IBOCPD-2" D T0^%ZOSV ;start rt clock
S DIOEND="D PAUSE^IBOCPDS"
S FR=IBBEG_",?,?,",TO=IBEND_",?,?,",L=0,DIC="^DGCR(399,"
;
S IBF1=$S(IBORDER="E":"ENTERED/EDITED BY",IBORDER="A":"AUTHORIZER",1:"FIRST PRINTED BY")
S IBF2=$S(IBORDER="E":"DATE ENTERED",IBORDER="A":"AUTHORIZATION DATE",1:"DATE FIRST PRINTED")
S IBNOW=$P($$FMTE^XLFDT($$NOW^XLFDT),":",1,2)
S IBNOW=$P(IBNOW,"@")_" "_$P(IBNOW,"@",2)
S IBNOW=$P(IBNOW,", ")_","_$P(IBNOW,", ",2)
S IBNOW=$TR(IBNOW,"abceglnoprtuvy","ABCEGLNOPRTUVY")
;
S BY="'@"_IBF2_";""Date "_$S(IBORDER="E":"Enter",IBORDER="A":"Authoriz",1:"First Print")_"ed"",+@"_IBF1_";"""_$S(IBORDER="E":"Clerk Enter",IBORDER="A":"Authoriz",1:"First Print")_"ed By"";S1,@RATE TYPE;""Rate Type"",@"_IBF2
;
S FLDS="[IB CLK PROD]" D EN1^DIP
;
ENDF K DIC,L,BY,FR,TO,FLDS,IBHDR,IBBEG,IBEND,IBBEGE,IBENDE,IBFLD,IBORDER
K IBQUIT,IBF1,IBF2,IBNOW,X,Y,DIRUT,DIROUT
Q
;
ORDER ; - Selection of order in which to print report.
S DIR("A")="REPORT BY WHICH CLERK FUNCTION",DIR(0)="SO^E:WHO ENTERED BILL;A:WHO AUTHORIZED BILL;P:WHO FIRST PRINTED BILL;"
S DIR("?")="Choose the clerk's function that will determine who gets 'credit' for a bill on this report"
S DIR("B")="A"
D ^DIR K DIR I $D(DIRUT)!(X="") S IBQUIT=1 Q
S IBORDER=Y,IBQUIT=0
Q
;
RANGE ; - Get date range.
S DIR(0)="D^:NOW:EX",DIR("A")="START WITH "_IBFLD
D ^DIR K DIR I $D(DIRUT) S IBQUIT=1 Q
S IBBEG=Y X ^DD("DD") S IBBEGE=Y
S DIR(0)="D^"_IBBEG_":NOW:EX",DIR("A")="GO TO "_IBFLD,DIR("B")="TODAY"
D ^DIR K DIR I $D(DIRUT) S IBQUIT=1 Q
S IBEND=Y X ^DD("DD") S IBENDE=Y,IBQUIT=0
Q
;
NOTE N IBH1,IBH2
S IBH1=$S(IBORDER="E":"ENTERED",IBORDER="A":"AUTHORIZED",1:"PRINTED"),IBH2=$S(IBORDER'="P":IBH1,1:"FIRST PRINTED")
W !!,"NOTE: ** TOTAL ",IBH1," COLUMN INCLUDES TOTALS OF ALL BILLS THAT WERE ",IBH2," IN THE SELECTED DATE RANGE REGARDLESS OF THE",!,?13,"BILLS' CURRENT STATUS"
W !,?9,IBH1," CANCELLED COLUMN INCLUDES TOTALS OF ONLY THOSE BILLS THAT WERE ",IBH2," IN THE SELECTED DATE RANGE AND HAVE",!,?13,"A CURRENT STATUS OF CANCELLED"
W !?9,"MRA REQUESTS COLUMN INCLUDES TOTALS OF ALL BILLS THAT HAD AN MRA REQUEST PERFORMED IN THE SELECTED DATE RANGE"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBOCPD 3092 printed Oct 16, 2024@18:26:01 Page 2
IBOCPD ;ALB/ARH - CLERK PRODUCTIVITY REPORTS ;10/8/91
+1 ;;2.0;INTEGRATED BILLING;**44,63,118,155**;21-MAR-94
+2 ;
EN ;***
+1 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBOCPD" D T1^%ZOSV ;stop rt clock
+2 ;S XRTL=$ZU(0),XRTN="IBOCPD-1" D T0^%ZOSV ;start rt clock
+3 SET DIR(0)="SO^F:FULL CLERK PRODUCTIVITY REPORT;S:SUMMARY OF CLERK PRODUCTIVITY REPORT;"
+4 DO ^DIR
KILL DIR
if $DATA(DIRUT)
GOTO EXIT
IF Y="F"
DO FULL
GOTO EXIT
+5 IF Y="S"
DO ^IBOCPDS
EXIT KILL X,Y,DTOUT,DUOUT,DIRUT,DIROUT,DIOEND
+1 ;***
+2 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBOCPD" D T1^%ZOSV ;stop rt clock
+3 QUIT
+4 ;
FULL DO ORDER
if IBQUIT
GOTO ENDF
+1 DO HOME^%ZIS
SET IBHDR="CLERK PRODUCTIVITY REPORT"
+2 WRITE @IOF,?27,IBHDR,!!,"Report requires 132 columns."
+3 SET IBFLD="Date "_$SELECT(Y="E":"Entered",Y="A":"Authorized",1:"First Printed")
+4 DO RANGE
IF IBQUIT
GOTO ENDF
+5 ;
PRINTF ; - Print report.
+1 ;***
+2 ;I $D(XRT0) S:'$D(XRTN) XRTN="IBOCPD" D T1^%ZOSV ;stop rt clock
+3 ;S XRTL=$ZU(0),XRTN="IBOCPD-2" D T0^%ZOSV ;start rt clock
+4 SET DIOEND="D PAUSE^IBOCPDS"
+5 SET FR=IBBEG_",?,?,"
SET TO=IBEND_",?,?,"
SET L=0
SET DIC="^DGCR(399,"
+6 ;
+7 SET IBF1=$SELECT(IBORDER="E":"ENTERED/EDITED BY",IBORDER="A":"AUTHORIZER",1:"FIRST PRINTED BY")
+8 SET IBF2=$SELECT(IBORDER="E":"DATE ENTERED",IBORDER="A":"AUTHORIZATION DATE",1:"DATE FIRST PRINTED")
+9 SET IBNOW=$PIECE($$FMTE^XLFDT($$NOW^XLFDT),":",1,2)
+10 SET IBNOW=$PIECE(IBNOW,"@")_" "_$PIECE(IBNOW,"@",2)
+11 SET IBNOW=$PIECE(IBNOW,", ")_","_$PIECE(IBNOW,", ",2)
+12 SET IBNOW=$TRANSLATE(IBNOW,"abceglnoprtuvy","ABCEGLNOPRTUVY")
+13 ;
+14 SET BY="'@"_IBF2_";""Date "_$SELECT(IBORDER="E":"Enter",IBORDER="A":"Authoriz",1:"First Print")_"ed"",+@"_IBF1_";"""_$SELECT(IBORDER="E":"Clerk Enter",IBORDER="A":"Authoriz",1:"First Print")_"ed By"";S1,@RATE TYPE;""Rate Type"",@"_IBF2
+15 ;
+16 SET FLDS="[IB CLK PROD]"
DO EN1^DIP
+17 ;
ENDF KILL DIC,L,BY,FR,TO,FLDS,IBHDR,IBBEG,IBEND,IBBEGE,IBENDE,IBFLD,IBORDER
+1 KILL IBQUIT,IBF1,IBF2,IBNOW,X,Y,DIRUT,DIROUT
+2 QUIT
+3 ;
ORDER ; - Selection of order in which to print report.
+1 SET DIR("A")="REPORT BY WHICH CLERK FUNCTION"
SET DIR(0)="SO^E:WHO ENTERED BILL;A:WHO AUTHORIZED BILL;P:WHO FIRST PRINTED BILL;"
+2 SET DIR("?")="Choose the clerk's function that will determine who gets 'credit' for a bill on this report"
+3 SET DIR("B")="A"
+4 DO ^DIR
KILL DIR
IF $DATA(DIRUT)!(X="")
SET IBQUIT=1
QUIT
+5 SET IBORDER=Y
SET IBQUIT=0
+6 QUIT
+7 ;
RANGE ; - Get date range.
+1 SET DIR(0)="D^:NOW:EX"
SET DIR("A")="START WITH "_IBFLD
+2 DO ^DIR
KILL DIR
IF $DATA(DIRUT)
SET IBQUIT=1
QUIT
+3 SET IBBEG=Y
XECUTE ^DD("DD")
SET IBBEGE=Y
+4 SET DIR(0)="D^"_IBBEG_":NOW:EX"
SET DIR("A")="GO TO "_IBFLD
SET DIR("B")="TODAY"
+5 DO ^DIR
KILL DIR
IF $DATA(DIRUT)
SET IBQUIT=1
QUIT
+6 SET IBEND=Y
XECUTE ^DD("DD")
SET IBENDE=Y
SET IBQUIT=0
+7 QUIT
+8 ;
NOTE NEW IBH1,IBH2
+1 SET IBH1=$SELECT(IBORDER="E":"ENTERED",IBORDER="A":"AUTHORIZED",1:"PRINTED")
SET IBH2=$SELECT(IBORDER'="P":IBH1,1:"FIRST PRINTED")
+2 WRITE !!,"NOTE: ** TOTAL ",IBH1," COLUMN INCLUDES TOTALS OF ALL BILLS THAT WERE ",IBH2," IN THE SELECTED DATE RANGE REGARDLESS OF THE",!,?13,"BILLS' CURRENT STATUS"
+3 WRITE !,?9,IBH1," CANCELLED COLUMN INCLUDES TOTALS OF ONLY THOSE BILLS THAT WERE ",IBH2," IN THE SELECTED DATE RANGE AND HAVE",!,?13,"A CURRENT STATUS OF CANCELLED"
+4 WRITE !?9,"MRA REQUESTS COLUMN INCLUDES TOTALS OF ALL BILLS THAT HAD AN MRA REQUEST PERFORMED IN THE SELECTED DATE RANGE"
+5 QUIT