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

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

revised back to 6/30/08 version

File size: 2.2 KB
Line 
1IBCERP3 ;ALB/TMP - EDI BATCHES WAITING MORE THAN 1 DAY REPORT ;30-SEP-96
2 ;;2.0;INTEGRATED BILLING;**137,296**;21-MAR-94
3 Q
4 ;
5PENDING ;Report of batches not sent after the day the bills in it were extracted
6 W !
7 S %ZIS="QM" D ^%ZIS Q:POP
8 I $D(IO("Q")) K IO("Q") S ZTRTN="EN^IBCERP3",ZTDESC="REPORT OF BILL BATCHES WAITING AUSTIN RECEIPT AFTER 1 DAY" D ^%ZTLOAD K ZTSK D HOME^%ZIS Q
9 U IO
10EN ; Queued job entrypoint
11 N IBPAGE,IBHDRDT,IBLINE,IBSTOP,IBBA,IBBAT,IBCT,IBTYP,IBTYPN,IBV,DIR,Y,IB0,IB1
12 ;
13 K ^TMP($J,"IBSORT")
14 S (IBPAGE,IBBA)=0
15 ;
16 ; esg - 5/12/05 - IB*2*296 - Additional check to make sure there are
17 ; bills in the batch in file 364 before including it. Similar to
18 ; existing functionality in routine ^IBCEBUL.
19 ;
20 F S IBBA=$O(^IBA(364.1,"ASTAT","P",IBBA)) Q:'IBBA S IB0=$G(^IBA(364.1,IBBA,0)),IB1=$G(^(1)) I DT-($P(IB1,U,6)\1)'<1,$P(IB0,U,7)'="",$O(^IBA(364,"C",IBBA,0)) S ^TMP($J,"IBSORT",$P(IB0,U,7),$P(IB0,U),IBBA)=$P(IB1,U,6)_U_$P(IB0,U,4)
21 ;
22 W:$E(IOST,1,2)["C-" @IOF ;Only initial form feed for print to screen
23 I '$D(^TMP($J,"IBSORT")) D HDR1("") W !,?3,"No data found for this report"
24 S (IBSTOP,IBCT)=0
25 ;
26 S IBTYP=""
27 F S IBTYP=$O(^TMP($J,"IBSORT",IBTYP)) Q:IBTYP="" D G:IBSTOP STOP
28 . S IBTYPN=$$EXPAND^IBTRE(364.1,.07,IBTYP)
29 . D HDR1(IBTYPN)
30 . S IBBAT=""
31 . F S IBBAT=$O(^TMP($J,"IBSORT",IBTYP,IBBAT)) Q:'IBBAT!(IBSTOP) S IBBA=0 F S IBBA=$O(^TMP($J,"IBSORT",IBTYP,IBBAT,IBBA)) Q:'IBBA S IBV=$G(^(IBBA)) D Q:IBSTOP
32 .. D:IBLINE>(IOSL-5) HDR1(IBTYPN) Q:IBSTOP
33 .. W !,?6,IBBAT,?20,$$FMTE^XLFDT($P(IBV,U),1),?46,$P(IBV,U,2)
34 .. S IBCT=IBCT+1,IBLINE=IBLINE+1
35 ;
36 W !!,"TOTAL # OF BATCHES: ",IBCT
37 ;
38 I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR
39STOP I '$D(ZTQUEUED) D ^%ZISC
40 I $D(ZTQUEUED) S ZTREQ="@"
41 K ^TMP($J,"IBSORT")
42 Q
43 ;
44HDR1(IB) ; Report header
45 ; IB = the text for the type of batch
46 N Z,DIR,Y
47 I 'IBPAGE S IBHDRDT=$$HTE^XLFDT($H,2)
48 I IBPAGE D Q:IBSTOP
49 . I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR S IBSTOP=('Y) Q:IBSTOP
50 . W @IOF
51 S IBPAGE=IBPAGE+1
52 W !,?14,"REPORT OF BATCHES STILL WAITING AUSTIN RECEIPT AFTER 1 DAY",?70,"PAGE: ",IBPAGE,!,?((68-$L(IB))\2),"BATCH TYPE: "_IB
53 W !,?26,"RUN DATE: ",IBHDRDT,!
54 W !,?6,"BATCH #",?20,"WAITING SINCE",?46,"MAIL MESSAGE #",!
55 S Z="",$P(Z,"-",76)="" W ?2,Z,!
56 S IBLINE=6
57 Q
58 ;
Note: See TracBrowser for help on using the repository browser.