source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBJDF8.m@ 1495

Last change on this file since 1495 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.4 KB
Line 
1IBJDF8 ;ALB/RRG - AR PRODUCTIVITY REPORT ;29-AUG-00
2 ;;2.0;INTEGRATED BILLING;**123,159,192**;21-MAR-94
3 ;
4EN ; - Option entry point.
5 S (IBPNI,IBTDATE,IBFDATE,IBT,IBF,IBSPT,IBRPT,IBSEL,IBCLERK)=""
6 ;
7TDATE ; - Determine date range of transactions.
8 ;
9 S DIR(0)="DA^:DT:EX"
10 S DIR("A")="FROM Transaction Date: "
11 S DIR("T")=300,DIR("L")=""
12 S (DIR("?"),DIR("??"))="^S IBOFF=1 D HELP^IBJDF8H"
13 W ! D ^DIR K DIR G:Y=""!(X="^") ENQ
14 S IBFDATE=Y,IBF=Y(0)
15 ;
16 S DIR(0)="DA^"_IBFDATE_":DT:EX"
17 S DIR("A")=" TO Transaction Date: "
18 S DIR("T")=300,DIR("L")=""
19 S (DIR("?"),DIR("??"))="^S IBOFF=11 D HELP^IBJDF8H"
20 W ! D ^DIR K DIR G:Y=""!(X="^") ENQ
21 S IBTDATE=Y,IBT=Y(0)
22 ;
23CLERK ; - Get All/Specific Clerks
24 D ALSP^IBJD("Clerks^Clerk","^IBE(351.73,",.IBCLERK)
25 I IBCLERK["^" G ENQ
26 ;
27TYPE ; - Determine type of report -Detail or Summary.
28 ;
29 D DS^IBJD G ENQ:IBRPT["^",SUMM:IBRPT="S"
30 ;
31DETOPT ; - Detail print options.
32 ;
33 ; - Determine if Clerk name or Clerk identifier should print
34 W ! S IBPNI=""
35 S DIR(0)="SA^N:NAME;I:IDENTIFIER;",DIR("T")=DTIME
36 S DIR("A")="Do you wish to print with Clerk (N)ame or (I)dentifier? "
37 S DIR("?")="^S IBOFF=21 D HELP^IBJDF8H"
38 D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
39 S IBPNI=Y K DIROUT,DTOUT,DUOUT,DIRUT
40 ;
41 K IBOPT F X=1:1:14 S IBOPT(X)=$$CAT(X)
42 S IBPRT="Choose transaction type(s) to print: "
43 S IBSEL=$$MLTP^IBJD(IBPRT,.IBOPT,1) I 'IBSEL G ENQ
44 S IBSEL=","_IBSEL
45 ;
46 ; - Assign Tran types from 430.3 to user-selected transaction types
47 S IBTT="" D
48 . I IBSEL=",1,2,3,4,5,6,7,8,9,10,11,12,13," S IBTT="ALL" Q
49 . F I=2:1 S II=$P(IBSEL,",",I) Q:'II D
50 . . S IBTT=$S(IBTT'="":IBTT_$$CATT(II)_"|",1:"|"_$$CATT(II)_"|")
51 ;
52SUMM ; - Summary print options
53 ;
54 W ! S DIR(0)="Y",DIR("B")="YES",DIR("T")=DTIME
55 S DIR("A")="Do you want to print the summary by Clerk"
56 S DIR("?")="^S IBOFF=27 D HELP^IBJDF8H"
57 D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
58 S IBSPT=+Y K DIROUT,DTOUT,DUOUT,DIRUT
59 I IBSPT=1 D
60 . Q:IBPNI'=""
61 . S DIR(0)="SA^N:NAME;I:IDENTIFIER;",DIR("T")=DTIME
62 . S DIR("A")="Do you wish to print with Clerk (N)ame or (I)dentifier? "
63 . S DIR("?")="^S IBOFF=21 D HELP^IBJDF8H"
64 . D ^DIR K DIR G:$D(DIRUT)!$D(DTOUT)!$D(DUOUT)!$D(DIROUT) ENQ
65 . S IBPNI=Y K DIROUT,DTOUT,DUOUT,DIRUT
66 ;
67 ;
68DEV ; - Select a device.
69 W !!,"This report requires a ",$S(IBRPT="S":80,1:132)," column printer."
70 S %ZIS="QM" D ^%ZIS G:POP ENQ
71 I $D(IO("Q")) D G ENQ
72 .S ZTRTN="DQ^IBJDF8",ZTDESC="IB - AR PRODUCTIVITY REPORT"
73 .S ZTSAVE("IB*")="" D ^%ZTLOAD
74 .I $G(ZTSK) W !!,"This job has been queued. The task no. is ",ZTSK,"."
75 .E W !!,"Unable to queue this job."
76 .K ZTSK,IO("Q") D HOME^%ZIS
77 ;
78 U IO
79 ;
80DQ D ST^IBJDF81 ; Compile and print the report.
81 ;
82ENQ K DIROUT,DTOUT,DUOUT,DIRUT,I
83 K IBOFF,IBSNA,IBPLN,IBRPT,POP,X,ZTDESC,ZTRTN,ZTSAVE,Y,%ZIS,IBSPT,IBPNI
84 K IBSEL,IBTT,II,IBF,IBT,IBFDATE,IBTDATE,IBCLERK,IBPRT,IBOPT
85 Q
86 ;
87CAT(X) ; - Return transaction type
88 Q $S(X]"":$P($T(CAT1+X),";;",2),1:"")
89 ;
90CATT(X) ; - Return transaction type from 430.3 for user-selected transaction type
91 Q $S(X]"":$P($T(CAT1+X),";;",3),1:"")
92 ;
93CAT1 ; - Transaction types
94 ;;COMMENT;;45
95 ;;AUDIT;;0
96 ;;PAYMENT;;2|34
97 ;;REFUND;;41
98 ;;DEC.ADJ./CONTR;;35
99 ;;DEC.ADJ./NON-CONTR;;35
100 ;;WRITE-OFF;;23|8
101 ;;WAIVED;;10|11
102 ;;SUSPENDED;;40
103 ;;COMPROMISED;;9|29
104 ;;REPAYMENT PLAN;;25
105 ;;EXEMPTION;;14
106 ;;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
107 ;;ALL OF THE ABOVE;;0
108 ;
Note: See TracBrowser for help on using the repository browser.