source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBOHTOT.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1IBOHTOT ;ALB/EMG - COUNT/AMT OF CHARGES ON HOLD REPORT ; FEB 25 1997
2 ;;2.0; INTEGRATED BILLING ;**70**; 21-MAR-94
3 ;
4EN ;
5 ;***
6 D HOME^%ZIS W @IOF,!!,"Count and Dollar Amount of Charges ON HOLD Report",!!
7 ;
8DEV S %ZIS="QM",%ZIS("A")="Output Device: " D ^%ZIS G:POP END
9 I $D(IO("Q")) S ZTRTN="DQ^IBOHTOT",ZTDESC="IB Count/Amt Report",ZTSAVE("IB*")="" D ^%ZTLOAD K IO("Q"),ZTSK G END
10 U IO
11 ;***
12 W !!
13 ;
14DQ ; -entry from tasked job
15 ;***
16 K ^TMP($J)
17 S DFN=0 F S DFN=$O(^IB("AH",DFN)) Q:'DFN S IBN=0 F S IBN=$O(^IB("AH",DFN,IBN)) Q:'IBN I $D(^IB(IBN,0)) D DATA
18 ;
19 D PRINT W !
20 D TPRINT W !
21 G END
22 ;
23DATA ; -gross count of action types, total charges
24 ; -^tmp($j,"ib",ibaction type,"gcnt")=count
25 ; -^tmp($j,"ib",ibaction type,"gtot")=sum of charges
26 ; -^tmp($j,"ibtot","fcnt")=final count of entries
27 ; -^tmp($j,"ibtot","ftot")=final sum of charges
28 ;
29 S IBND=^IB(IBN,0)
30 S IBATYP=$S($D(^IBE(350.1,+$P(IBND,"^",3),0)):$P(^(0),"^"),1:"UNKNOWN")
31 S:'$D(^TMP($J,"IB",IBATYP,"GCNT")) ^("GCNT")=0 S ^("GCNT")=^("GCNT")+1
32 S:'$D(^TMP($J,"IB",IBATYP,"GTOT")) ^("GTOT")=0 S ^("GTOT")=^("GTOT")+$P(IBND,"^",7)
33 S:'$D(^TMP($J,"IBTOT","FCNT")) ^("FCNT")=0 S ^("FCNT")=^("FCNT")+1
34 S:'$D(^TMP($J,"IBTOT","FTOT")) ^("FTOT")=0 S ^("FTOT")=^("FTOT")+$P(IBND,"^",7)
35 Q
36 ;
37 ;
38PRINT ; -output data
39 S IBQUIT=0,IBPAG=0,Y=DT D D^DIQ S IBHDT=Y D HDR
40 W !!?((IOM-25)/2),"TOTALS BY ACTION TYPE"
41 ;
42 S IBATYP="" F IBT=0:0 S IBATYP=$O(^TMP($J,"IB",IBATYP)) Q:IBATYP=""!(IBQUIT) D LINE
43 Q
44 ;
45TPRINT ; -grand total of data
46 I $Y>(IOSL-5) D PAUSE^IBOUTL Q:IBQUIT D HDR
47 W !!,?(IOM-26/2),"**************************"
48 W !,?((IOM/2)-20),"TOTAL NUMBER OF ENTRIES: ",$J($S($D(^TMP($J,"IBTOT","FCNT")):^("FCNT"),1:0),13)
49 W !,?((IOM/2)-20)," TOTAL DOLLAR AMOUNT: $",$J($S($D(^TMP($J,"IBTOT","FTOT")):^("FTOT"),1:0),12,2)
50 Q
51 ;
52LINE ;
53 I $Y>(IOSL-5) D PAUSE^IBOUTL Q:IBQUIT D HDR
54 W !!?((IOM/2)-$L($P(IBATYP," ",2,99))),$P(IBATYP," ",2,99)
55 W !?((IOM/2)-12),"NUMBER ENTRIES: ",$J($S($D(^TMP($J,"IB",IBATYP,"GCNT")):^("GCNT"),1:0),9)
56 W !?((IOM/2)-12),"DOLLAR AMOUNT: $",$J($S($D(^TMP($J,"IB",IBATYP,"GTOT")):^("GTOT"),1:0),9,2)
57 Q
58 ;
59HDR ;
60 W:$E(IOST,1,2)["C-"!(IBPAG>0) !,@IOF
61 W ?((IOM-42)/2),"Count and Dollar Amount of Charges ON HOLD"
62 W !?((IOM-3)/2),"for"
63 D SITE^IBAUTL S IBSNM=$S($D(^DIC(4,IBFAC,0)):$P(^(0),"^"),1:"")
64 W !?((IOM-($L(IBSNM)+6))/2),IBSNM_" ("_IBSITE_")"
65 W !!?(IOM-26/2),"Date Printed: ",IBHDT
66 S IBPAG=IBPAG+1 W !?(IOM-8/2),"Page: ",IBPAG
67 W !?(IOM-26/2),"--------------------------"
68 Q
69 ;
70END K ^TMP($J)
71 ;***
72 I $D(ZTQUEUED) S ZTREQ="@" Q
73 K DFN,IBT,IBATYP,IBHDT,IBPAG,IBSNM,IBFAC,IBSITE,IBN,IBND,IBQUIT,POP,X,Y
74 D ^%ZISC
75 Q
Note: See TracBrowser for help on using the repository browser.