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
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCECOB3 2591 printed Oct 16, 2024@18:10:21 Page 2
IBCECOB3 ;ALB/CXW - COB MANAGEMENT REPORT ;23-JUL-99
+1 ;;2.0;INTEGRATED BILLING;**137,155**;21-MAR-94
+2 QUIT
EN ; Report of bill awaiting resubmission/cancel
+1 DO FULL^VALM1
+2 WRITE !!,"You will need a 132 column printer for this report!",!
+3 ;
+4 NEW %ZIS,ZTSAVE,ZTRTN,ZTDESC
+5 SET %ZIS="QM"
DO ^%ZIS
if POP
QUIT
+6 IF $DATA(IO("Q"))
KILL IO("Q")
Begin DoDot:1
+7 SET ZTRTN="LIST^IBCECOB3"
+8 SET ZTSAVE("IBSRT")=""
SET ZTSAVE("^TMP(""IBBIL"",$J")=""
SET ZTSAVE("^TMP(""IBCOBST"",$J,")=""
+9 SET ZTDESC="IB -COB Management Report"
DO ^%ZTLOAD
KILL ZTSK
DO HOME^%ZIS
End DoDot:1
QUIT
+10 USE IO
LIST ; display
+1 NEW IBSTOP,IBPAGE,IBX,IBIFN,IBUER,IB,IBZ,IBI,IBFST
+2 ;Only initial form feed for print to screen
if $EXTRACT(IOST,1,2)["C-"
WRITE @IOF
+3 SET (IBSTOP,IBPAGE,IBFST)=0
+4 SET IBUER=$SELECT(IBSRT="A":1,1:0)
+5 IF '$DATA(^TMP("IBCOBST",$JOB))
Begin DoDot:1
+6 DO HDR1
WRITE !,"No entries found for this report"
End DoDot:1
GOTO LISTQ
+7 SET IBX=""
FOR
SET IBX=$ORDER(^TMP("IBCOBST",$JOB,IBX))
if IBX=""!(IBSTOP)
QUIT
Begin DoDot:1
+8 IF 'IBFST
DO HDR1
if 'IBUER
SET IBFST=1
if IBSTOP
QUIT
+9 SET IBIFN=0
FOR
SET IBIFN=$ORDER(^TMP("IBCOBST",$JOB,IBX,IBIFN))
if 'IBIFN!(IBSTOP)
QUIT
Begin DoDot:2
+10 SET IB=$GET(^TMP("IBCOBST",$JOB,IBX,IBIFN))
+11 SET IBZ=$PIECE($PIECE(IB,U,11),";",2,99)
+12 IF ($Y+5)>IOSL
DO HDR1
if IBSTOP
QUIT
+13 WRITE !,$$BN1^PRCAFN(IBIFN),?13,$$DAT1^IBOUTL($PIECE(IB,U)),?24,$JUSTIFY($PIECE(IB,U,2),8,2),?36,$JUSTIFY($PIECE(IB,U,3),8,2),?48,$JUSTIFY($PIECE(IB,U,4),8,2),?60,$PIECE($PIECE(IB,U,11),";"),?95,$$DAT1^IBOUTL($PIECE(IB,U,13))
+14 WRITE ?107,$EXTRACT($$EXTERNAL^DILFD(399,.21,,$TRANSLATE($PIECE(IB,U,7),"123","PST")),1,10),?119,$PIECE(IB,U,12)
+15 IF IBZ'=""
FOR IBI=1:1:$LENGTH(IBZ,";")
Begin DoDot:3
+16 IF ($Y+5)>IOSL
DO HDR1
if IBSTOP
QUIT
+17 WRITE !,?60,$PIECE(IBZ,";",IBI)
End DoDot:3
if IBSTOP
QUIT
+18 IF ($Y+5)>IOSL
DO HDR1
if IBSTOP
QUIT
+19 IF 'IBUER
WRITE !,?3,"Authorizing/requesting biller: "_$PIECE(IB,U,8)
+20 WRITE !,?3,"Insurers on file: "_$PIECE(IB,U,9),!
End DoDot:2
End DoDot:1
+21 if IBSTOP
GOTO LISTQ
+22 IF $EXTRACT(IOST,1,2)["C-"
KILL DIR
SET DIR(0)="E"
DO ^DIR
KILL DIR
LISTQ ;K ^TMP("IBCOBST",$J)
+1 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
QUIT
+2 WRITE !
DO ^%ZISC
+3 QUIT
HDR1 ;
+1 NEW DIR,Y
+2 IF IBPAGE
Begin DoDot:1
+3 IF $EXTRACT(IOST,1,2)["C-"
KILL DIR
SET DIR(0)="E"
DO ^DIR
KILL DIR
SET IBSTOP=('Y)
if IBSTOP
QUIT
+4 WRITE @IOF
End DoDot:1
if IBSTOP
QUIT
+5 SET IBPAGE=IBPAGE+1
+6 WRITE !,?48,"COB MANAGEMENT REPORT",?115,"PAGE: ",IBPAGE,!,?45,"RUN DATE: ",$$HTE^XLFDT($HOROLOG,"2"),!
+7 WRITE ?42,"SORT BY: "_$SELECT(IBSRT="A":"AUTHORIZING/REQUESTING BILLER","D":"DAYS SINCE TRANSMISSION OF LATEST BILL","B":"BALANCE REMAINING","I":"INSURANCE COMPANY",1:"DATE LAST MRA RECEIVED")
+8 IF IBUER
WRITE !!,"AUTHORIZING/REQUESTING BILLER: "_$GET(IBX)
+9 WRITE !,?114,"LAST COB PRODUCED"
+10 WRITE !,?13,"DATE OF",?24,"BILLED",?36,"AMOUNT",?48,"BALANCE",?60,"MRA",?95,"DATE",?119,"DAYS SINCE"
+11 WRITE !,"BILL #",?13,"SERVICE",?24,"AMOUNT",?36,"PAID",?48,"REMAINING",?60,"HISTORY",?95,"RECEIVED",?107,"SEQUENCE",?119,"TRANSMIT"
+12 WRITE !,$TRANSLATE($JUSTIFY("",132)," ","-"),!
+13 QUIT
+14 ;