Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBCECOB3

IBCECOB3.m

Go to the documentation of this file.
IBCECOB3 ;ALB/CXW - COB MANAGEMENT REPORT ;23-JUL-99
 ;;2.0;INTEGRATED BILLING;**137,155**;21-MAR-94
 Q
EN ; Report of bill awaiting resubmission/cancel
 D FULL^VALM1
 W !!,"You will need a 132 column printer for this report!",!
 ;
 N %ZIS,ZTSAVE,ZTRTN,ZTDESC
 S %ZIS="QM" D ^%ZIS Q:POP
 I $D(IO("Q")) K IO("Q") D  Q
 . S ZTRTN="LIST^IBCECOB3"
 . S ZTSAVE("IBSRT")="",ZTSAVE("^TMP(""IBBIL"",$J")="",ZTSAVE("^TMP(""IBCOBST"",$J,")=""
 . S ZTDESC="IB -COB Management Report" D ^%ZTLOAD K ZTSK D HOME^%ZIS
 U IO
LIST ; display
 N IBSTOP,IBPAGE,IBX,IBIFN,IBUER,IB,IBZ,IBI,IBFST
 W:$E(IOST,1,2)["C-" @IOF ;Only initial form feed for print to screen
 S (IBSTOP,IBPAGE,IBFST)=0
 S IBUER=$S(IBSRT="A":1,1:0)
 I '$D(^TMP("IBCOBST",$J)) D  G LISTQ
 . D HDR1 W !,"No entries found for this report"
 S IBX="" F  S IBX=$O(^TMP("IBCOBST",$J,IBX)) Q:IBX=""!(IBSTOP)  D
 . I 'IBFST D HDR1 S:'IBUER IBFST=1 Q:IBSTOP
 . S IBIFN=0 F  S IBIFN=$O(^TMP("IBCOBST",$J,IBX,IBIFN)) Q:'IBIFN!(IBSTOP)  D
 .. S IB=$G(^TMP("IBCOBST",$J,IBX,IBIFN))
 .. S IBZ=$P($P(IB,U,11),";",2,99)
 .. I ($Y+5)>IOSL D HDR1 Q:IBSTOP
 .. W !,$$BN1^PRCAFN(IBIFN),?13,$$DAT1^IBOUTL($P(IB,U)),?24,$J($P(IB,U,2),8,2),?36,$J($P(IB,U,3),8,2),?48,$J($P(IB,U,4),8,2),?60,$P($P(IB,U,11),";"),?95,$$DAT1^IBOUTL($P(IB,U,13))
 .. W ?107,$E($$EXTERNAL^DILFD(399,.21,,$TR($P(IB,U,7),"123","PST")),1,10),?119,$P(IB,U,12)
 .. I IBZ'="" F IBI=1:1:$L(IBZ,";") D  Q:IBSTOP
 ... I ($Y+5)>IOSL D HDR1 Q:IBSTOP
 ... W !,?60,$P(IBZ,";",IBI)
 .. I ($Y+5)>IOSL D HDR1 Q:IBSTOP
 .. I 'IBUER W !,?3,"Authorizing/requesting biller: "_$P(IB,U,8)
 .. W !,?3,"Insurers on file: "_$P(IB,U,9),!
 G:IBSTOP LISTQ
 I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR
LISTQ ;K ^TMP("IBCOBST",$J)
 I $D(ZTQUEUED) S ZTREQ="@" Q
 W ! D ^%ZISC
 Q
HDR1 ;
 N DIR,Y
 I IBPAGE D  Q:IBSTOP
 . I $E(IOST,1,2)["C-" K DIR S DIR(0)="E" D ^DIR K DIR S IBSTOP=('Y) Q:IBSTOP
 . W @IOF
 S IBPAGE=IBPAGE+1
 W !,?48,"COB MANAGEMENT REPORT",?115,"PAGE: ",IBPAGE,!,?45,"RUN DATE: ",$$HTE^XLFDT($H,"2"),!
 W ?42,"SORT BY: "_$S(IBSRT="A":"AUTHORIZING/REQUESTING BILLER","D":"DAYS SINCE TRANSMISSION OF LATEST BILL","B":"BALANCE REMAINING","I":"INSURANCE COMPANY",1:"DATE LAST MRA RECEIVED")
 I IBUER W !!,"AUTHORIZING/REQUESTING BILLER: "_$G(IBX)
 W !,?114,"LAST COB PRODUCED"
 W !,?13,"DATE OF",?24,"BILLED",?36,"AMOUNT",?48,"BALANCE",?60,"MRA",?95,"DATE",?119,"DAYS SINCE"
 W !,"BILL #",?13,"SERVICE",?24,"AMOUNT",?36,"PAID",?48,"REMAINING",?60,"HISTORY",?95,"RECEIVED",?107,"SEQUENCE",?119,"TRANSMIT"
 W !,$TR($J("",132)," ","-"),!
 Q
 ;