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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1IBCERP1 ;ALB/CXW - BILL AWAITING RESUBMISSION REPORT ;20-APR-99
2 ;;2.0;INTEGRATED BILLING;**137**;21-MAR-94
3 Q
4INC ; Report of bill awaiting resubmission/cancel
5 N DIR,Y,IBSORT,DIRUT,DIROUT,DTOUT,DUOUT
6 S DIR(0)="SBM^B:BILL NUMBER;L:LAST SENT DATE;A:BILLED AMOUNT;N:BATCH NUMBER"
7 S DIR("A")="SORT REPORT BY",DIR("B")="BILL NUMBER"
8 S DIR("?")="Select the order you want the report sorted in" D ^DIR K DIR
9 Q:$D(DTOUT)!($D(DUOUT))
10 S IBSORT=Y
11 ;
12 N %ZIS,ZTSAVE,ZTRTN,ZTDESC
13 S %ZIS="QM" D ^%ZIS Q:POP
14 I $D(IO("Q")) K IO("Q") S ZTRTN="EN^IBCERP1",ZTSAVE("IBSORT")="",ZTDESC="IB - Bills Awaiting Resubmission Report" D ^%ZTLOAD K ZTSK D HOME^%ZIS Q
15 U IO
16EN ; Queued job entrypoint
17 N IBSTOP,IBPAGE,IBLINE,IB,IB0,IB1,IBB,IBB0,IBB1,IBBIL,IBHDRDT,DIR,Y
18 W:$E(IOST,1,2)["C-" @IOF ;Only initial form feed for print to screen
19 K ^TMP($J,"IBSORT")
20 S IB=0 F S IB=$O(^IBA(364.1,"AINC",1,IB)) Q:'IB D
21 . S IBLDT=+$P($G(^IBA(364.1,IB,1)),"^",3)
22 . S IBB=0 F S IBB=$O(^IBA(364,"C",IB,IBB)) Q:'IBB S IBB0=$G(^IBA(364,IBB,0)) D
23 .. ;Q:$$LAST364^IBCEF4(+IBB0)'=IBB
24 .. S ^TMP($J,"IBSORT",$S(IBSORT="B":$$BN1^PRCAFN(+IBB0),IBSORT="L":IBLDT,IBSORT="A":-$P($G(^DGCR(399,+IBB0,"U1")),U),1:IB),IBB)=IB
25LIST ;display
26 S (IBSTOP,IBPAGE)=0 D HDR1
27 I '$D(^TMP($J,"IBSORT")) D G INCQ
28 . W !,?7,"No entries found for this report"
29 S IBB1="" F S IBB1=$O(^TMP($J,"IBSORT",IBB1)) Q:IBB1=""!(IBSTOP) S IBB=0 F S IBB=$O(^TMP($J,"IBSORT",IBB1,IBB)) Q:'IBB D Q:IBSTOP
30 . S IB0=$G(^IBA(364.1,+$G(^TMP($J,"IBSORT",IBB1,IBB)),0)),IB1=$G(^(1))
31 . S IB=$G(^IBA(364,IBB,0)),IBBIL=$$BN1^PRCAFN(+IB)
32 . S:IBBIL=-1 IBBIL=""
33 . I ($Y+5)>IOSL D HDR1 Q:IBSTOP
34 . W !,?0,IBBIL,?13,$P(IB0,U),?25,$$FMTE^XLFDT($P(IB1,U,3),2),?41,$E($$EXPAND^IBTRE(364,.03,$P(IB,U,3)),1,24),?67,"$"_$J(+$G(^DGCR(399,+IB,"U1")),0,2)
35 W !
36 G:IBSTOP INCQ
37 I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR
38INCQ K ^TMP($J,"IBSORT")
39 I $D(ZTQUEUED) S ZTREQ="@"
40 I '$D(ZTQUEUED) W ! D ^%ZISC
41 Q
42HDR1 ;
43 N DIR,Y
44 I 'IBPAGE S IBHDRDT=$$HTE^XLFDT($H,"2")
45 I IBPAGE D Q:IBSTOP
46 . I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR S IBSTOP=('Y) Q:IBSTOP
47 . W @IOF
48 S IBPAGE=IBPAGE+1
49 W !,?23,"BILLS AWAITING RESUBMISSION REPORT",?65,"PAGE: ",IBPAGE,!,?27,"RUN DATE: ",IBHDRDT,!
50 W !,?2,"SORT BY: ",$S(IBSORT="B":"BILL NUMBER",IBSORT="L":"LAST SENT DATE",IBSORT="A":"BILLED AMOUNT",1:"BATCH NUMBER"),!
51 W !,?13,"LAST SENT",?25,"LAST SENT",?67,"BILLED"
52 W !,"BILL NUMBER",?13,"IN BATCH #",?25,"DATE/TIME",?41,"BILL TRANSMISSION STATUS",?67,"AMOUNT"
53 W !,$TR($J("",80)," ","-"),!
54 Q
55 ;
Note: See TracBrowser for help on using the repository browser.