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

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1IBOHIST ;ALB/EMG - HISTORY 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,!!,"History of Charges ON HOLD Report",!
7 ;
8 N DIRUT,DUOUT,DTOUT,IBDATE,Y
9 W !!?6,"This report uses the date the IB Action was created to determine"
10 W !?6,"whether it should be included in the count and amount totals."
11 W !?6,"Please enter the starting date for this report. The date should"
12 W !?6,"be after 6/1/96 or when patch IB*2.0*70 was installed at your"
13 W !?6,"facility since this report only counts charges with an ON HOLD"
14 W !?6,"DATE defined. You can also type '^' to exit.",!
15 ;
16 S DIR(0)="DA^2960601:NOW:EX",DIR("A")="Start with DATE: "
17 S DIR("?")="Enter the starting date for this report. (No earlier than 6/1/96)"
18 D ^DIR K DIR G:$D(DIRUT) END S IBSDT=+Y
19 S DIR(0)="DA^"_+Y_":NOW:EX",DIR("A")=" Go to DATE: ",DIR("?")="Enter the ending date for this report." D ^DIR K DIR G:$D(DIRUT) END S IBEDT=+Y
20 ;
21DEV S %ZIS="QM",%ZIS("A")="Output Device: " D ^%ZIS G:POP END
22 I $D(IO("Q")) S ZTRTN="DQ^IBOHIST",ZTDESC="IB History of Charges on hold Report",ZTSAVE("IB*")="" D ^%ZTLOAD K IO("Q"),ZTSK G END
23 U IO
24 ;***
25 W !!
26 ;
27DQ ; -entry from tasked job
28 ;***
29 ;
30 ; -gross count of statuses, total charges
31 ; -^tmp($j,"ib",ibstatus,"gcnt")=count
32 ; ^tmp($j,"ib",ibstatus,"gtot")=sum of charges
33 ;
34 K ^TMP($J)
35 S IBEDT=IBEDT+.24
36 S IBDT=IBSDT+.000001 F S IBDT=$O(^IB("D",IBDT)) Q:IBDT=""!(IBDT>IBEDT) S IBN="" F S IBN=$O(^IB("D",IBDT,IBN)) Q:IBN="" D
37 .S IBND=^IB(IBN,0) Q:'IBND
38 .S IBSTAT=$S($D(^IBE(350.21,+$P(IBND,"^",5),0)):$P(^(0),"^"),1:"UNKNOWN")
39 .S IBOH=$P($G(^IB(IBN,1)),"^",6) Q:'IBOH
40 .S:'$D(^TMP($J,"IB",IBSTAT,"GCNT")) ^("GCNT")=0 S ^("GCNT")=^("GCNT")+1
41 .S:'$D(^TMP($J,"IB",IBSTAT,"GTOT")) ^("GTOT")=0 S ^("GTOT")=^("GTOT")+$P(IBND,"^",7)
42 .Q
43 ;
44 D PRINT W !
45 G END
46 ;
47 ;
48PRINT ; -output data
49 S IBQUIT=0,IBPAG=0,Y=DT D D^DIQ S IBHDT=Y D HDR
50 W !!?((IOM-34)/2),"TOTALS BY CURRENT STATUS OF CHARGE",!
51 ;
52 S IBSTAT=0 F S IBSTAT=$O(^TMP($J,"IB",IBSTAT)) Q:IBSTAT=""!(IBQUIT) D LINE
53 Q
54 ;
55LINE ;
56 I $Y>(IOSL-5) D PAUSE^IBOUTL Q:IBQUIT D HDR
57 W !!,"Current Status: ",IBSTAT
58 ;W !,"--------------------------"
59 W !?5,"NUMBER ENTRIES: ",$J($S($D(^TMP($J,"IB",IBSTAT,"GCNT")):^("GCNT"),1:0),9)
60 W !?5,"DOLLAR AMOUNT: $",$J($S($D(^TMP($J,"IB",IBSTAT,"GTOT")):^("GTOT"),1:0),9,2)
61 Q
62 ;
63HDR ;
64 W:$E(IOST,1,2)["C-"!(IBPAG>0) @IOF
65 W !?((IOM-26)/2),"History of Charges ON HOLD"
66 W !?((IOM-3)/2),"for"
67 D SITE^IBAUTL S IBSNM=$S($D(^DIC(4,IBFAC,0)):$P(^(0),"^"),1:"")
68 W !?((IOM-($L(IBSNM)+6))/2),IBSNM_" ("_IBSITE_")"
69 W !?((IOM-54)/2),"Charges created between ",$$DAT2^IBOUTL(IBSDT)," and ",$P($$DAT2^IBOUTL(IBEDT),"@")
70 W !!?(IOM-26/2),"Date Printed: ",IBHDT
71 S IBPAG=IBPAG+1 W !?(IOM-8/2),"Page: ",IBPAG
72 W !?(IOM-26/2),"--------------------------"
73 Q
74 ;
75 ;
76END K ^TMP($J)
77 ;***
78 I $D(ZTQUEUED) S ZTREQ="@" Q
79 K DFN,DIRUT,DUOUT,DTOUT,IBDT,IBHDT,IBDATE,IBOH,IBSDT,IBEDT,IBPAG,IBSNM,IBST,IBSTAT,IBFAC,IBSITE,IBN,IBND,IBQUIT,POP,ZTDESC,ZTQUEUED,ZTREQ,ZTRTN,ZTSAVE,X,Y
80 D ^%ZISC
81 Q
82 ;end ibohist
Note: See TracBrowser for help on using the repository browser.