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

IBOCPD.m

Go to the documentation of this file.
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