BARDMDP ;IHS/OIT/FCJ - DEBT MANAGEMENT DISPLAY PARAMETERS
;;1.8;IHS ACCOUNTS RECEIVABLE;**22,23,24**;OCT 26, 2005;Build 69
;New routine 5-12-2011 for Debt Letter Management
;IHS/SD/POT JAN 2013 DISPLAY NEW PARAMS (SORT DEBT LETTERS ...)- BAR*1.8*.23
;IHS/SD/POT 12/02/2013 P.OTT BETA TESTING: ADDED SRT BY CYCLE- BAR*1.8*.23
;IHS/SD/POT HEAT152452 2/10/2014 - BAR*1.8*.24
ST ;
;REPORT HEADER VARS
D PAR^BARDMU
Q:$G(BARQ) ;P.OTT HEAT152452 2/10/2014- BAR*1.8*.24
D RRDT^BARDMU
;
SEL ;SELECT LOCATION
S DIC="^BAR(90052.06,"_BARPIEN_",",DIC(0)="AEQZ"
W ! D ^DIC
K BARQ,DIE,DIC,DA,DR
G:+Y<0 XIT
S BARLOC=+Y
D PAR^BARDMU
Q:$G(BARQ) ;P.OTT HEAT152452 2/10/2014- BAR*1.8*.24
;
ZIS ;
D ZIS^BARDMU
G:$G(BARQUIT) XIT
S XBRC="COMP^BARDMDP",XBRX="XIT^BARDMDP",XBNS="BAR"
I $G(BAROPT)="B" S XBRP="VIEWR^XBLM(""PRINT^BARDMDP"")",XBIOP=0
E S XBRP="PRINT^BARDMDP"
D ^XBDBQUE
D XIT
Q
XIT ;
;
K BARPG,BARL
I $D(IO("S")) S IOP="`"_IOS D ^%ZIS Q
D ^%ZISC
Q
PRINT ;
S:'$D(BARPSDX) BARPSDX=""
D HDR,COMP,HDR2
S I1=0
F I=1:1:4 W !!?2,"CYCLE ",I,?13,"LETTER: ",BARPCL(I),?60,"CYCLE PERIOD: ",BARPCD(I)
W ! F I=1:1:80 W "-"
INS ;DISPLAY INSURER TYP
W !,"INSURER TYPE: "
I $D(^BAR(90052.06,BARPIEN,BARLOC,19)) D
.S BARL=0
.F S BARL=$O(^BAR(90052.06,BARPIEN,BARLOC,19,BARL)) Q:BARL'?1N.N D
..S BARINSP=$P(^BAR(90052.06,BARPIEN,BARLOC,19,BARL,0),U)
..I $D(^BAR(90053.03,BARINSP)) W !?5,$P(^(BARINSP,0),U)
..I $Y>(IOSL-5) D:$G(BAROPT)'="B" RTRN^BARDMU Q:$G(BARDLQ) D HDR,HDR2
;
ACC ;DISPLAY ACCOUNTS
W !,"ACCOUNT: ",?50,"LETTERS"
I $D(^BARAC(BARLOC,"D")) D
.S BARACS=""
.F S BARACS=$O(^BARAC(BARLOC,"D",BARACS)) Q:BARACS="" D
..S BARAC=""
..F S BARAC=$O(^BARAC(BARLOC,"D",BARACS,BARAC)) Q:BARAC'?1N.N D
...W !?5,$$VAL^XBDIQ1(90050.02,BARAC,.01),?52,$$VAL^XBDIQ1(90050.02,BARAC,7)
...I $Y>(IOSL-5) D:$G(BAROPT)'="B" RTRN^BARDMU Q:$G(BARDLQ) D HDR,HDR2
Q:$G(BARDLQ)
D:$G(BAROPT)'="B" RTRN^BARDMU
Q
HDR ;
S BARPG=BARPG+1
I $E(IOST)="C",IOT["TRM",'$D(ZTQUEUED),$Y+20>IOSL W $$EN^BARVDF("IOF")
W !,"A/R PARENT LOCATION: ",BARPSAT(BARLOC,.01),!
F I=1:1:80 W "="
Q
HDR2 ;
W !,?2,"EFFECTIVE DATE: ",BARPSDX,?35,"NPI: ",BARPNPI
W !,?2,"PRINT DOB: ",$P("NO,YES",",",BARPDOB+1),?35,"MAX # OF LETTERS TO PRINT: ",$P(BARPAR1,U,8)
W !,?2,"TOP MARGIN: "_+$P(BARPAR1,U,9),?35,"LEFT MARGIN: "_+$P(BARPAR1,U,10)
W !,?2,"WRITE OFF AMOUNT: ",+BARPWO,?35,"PRINT BILL DATE: ",$P("NO,YES",",",BARPBDT+1) ;P.OTT- BAR*1.8*.23
IF BARPSRT]"" D ;P.OTT
. W !?2,"SORT DEBT LETTERS: "
. I BARPSRT="P" W "BY POLICY HOLDER'S NAME"
. I BARPSRT="I" W "BY INSURANCE NAME"
. I BARPSRT="C" W "BY CYCLE" ;12/02/2013- BAR*1.8*.23
W ! F I=1:1:80 W "-"
Q
COMP ;
;
Q
BARDMDP ;IHS/OIT/FCJ - DEBT MANAGEMENT DISPLAY PARAMETERS
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;**22,23,24**;OCT 26, 2005;Build 69
+2 ;New routine 5-12-2011 for Debt Letter Management
+3 ;IHS/SD/POT JAN 2013 DISPLAY NEW PARAMS (SORT DEBT LETTERS ...)- BAR*1.8*.23
+4 ;IHS/SD/POT 12/02/2013 P.OTT BETA TESTING: ADDED SRT BY CYCLE- BAR*1.8*.23
+5 ;IHS/SD/POT HEAT152452 2/10/2014 - BAR*1.8*.24
ST ;
+1 ;REPORT HEADER VARS
+2 DO PAR^BARDMU
+3 ;P.OTT HEAT152452 2/10/2014- BAR*1.8*.24
IF $GET(BARQ)
QUIT
+4 DO RRDT^BARDMU
+5 ;
SEL ;SELECT LOCATION
+1 SET DIC="^BAR(90052.06,"_BARPIEN_","
SET DIC(0)="AEQZ"
+2 WRITE !
DO ^DIC
+3 KILL BARQ,DIE,DIC,DA,DR
+4 IF +Y<0
GOTO XIT
+5 SET BARLOC=+Y
+6 DO PAR^BARDMU
+7 ;P.OTT HEAT152452 2/10/2014- BAR*1.8*.24
IF $GET(BARQ)
QUIT
+8 ;
ZIS ;
+1 DO ZIS^BARDMU
+2 IF $GET(BARQUIT)
GOTO XIT
+3 SET XBRC="COMP^BARDMDP"
SET XBRX="XIT^BARDMDP"
SET XBNS="BAR"
+4 IF $GET(BAROPT)="B"
SET XBRP="VIEWR^XBLM(""PRINT^BARDMDP"")"
SET XBIOP=0
+5 IF '$TEST
SET XBRP="PRINT^BARDMDP"
+6 DO ^XBDBQUE
+7 DO XIT
+8 QUIT
XIT ;
+1 ;
+2 KILL BARPG,BARL
+3 IF $DATA(IO("S"))
SET IOP="`"_IOS
DO ^%ZIS
QUIT
+4 DO ^%ZISC
+5 QUIT
PRINT ;
+1 IF '$DATA(BARPSDX)
SET BARPSDX=""
+2 DO HDR
DO COMP
DO HDR2
+3 SET I1=0
+4 FOR I=1:1:4
WRITE !!?2,"CYCLE ",I,?13,"LETTER: ",BARPCL(I),?60,"CYCLE PERIOD: ",BARPCD(I)
+5 WRITE !
FOR I=1:1:80
WRITE "-"
INS ;DISPLAY INSURER TYP
+1 WRITE !,"INSURER TYPE: "
+2 IF $DATA(^BAR(90052.06,BARPIEN,BARLOC,19))
Begin DoDot:1
+3 SET BARL=0
+4 FOR
SET BARL=$ORDER(^BAR(90052.06,BARPIEN,BARLOC,19,BARL))
IF BARL'?1N.N
QUIT
Begin DoDot:2
+5 SET BARINSP=$PIECE(^BAR(90052.06,BARPIEN,BARLOC,19,BARL,0),U)
+6 IF $DATA(^BAR(90053.03,BARINSP))
WRITE !?5,$PIECE(^(BARINSP,0),U)
+7 IF $Y>(IOSL-5)
IF $GET(BAROPT)'="B"
DO RTRN^BARDMU
IF $GET(BARDLQ)
QUIT
DO HDR
DO HDR2
End DoDot:2
End DoDot:1
+8 ;
ACC ;DISPLAY ACCOUNTS
+1 WRITE !,"ACCOUNT: ",?50,"LETTERS"
+2 IF $DATA(^BARAC(BARLOC,"D"))
Begin DoDot:1
+3 SET BARACS=""
+4 FOR
SET BARACS=$ORDER(^BARAC(BARLOC,"D",BARACS))
IF BARACS=""
QUIT
Begin DoDot:2
+5 SET BARAC=""
+6 FOR
SET BARAC=$ORDER(^BARAC(BARLOC,"D",BARACS,BARAC))
IF BARAC'?1N.N
QUIT
Begin DoDot:3
+7 WRITE !?5,$$VAL^XBDIQ1(90050.02,BARAC,.01),?52,$$VAL^XBDIQ1(90050.02,BARAC,7)
+8 IF $Y>(IOSL-5)
IF $GET(BAROPT)'="B"
DO RTRN^BARDMU
IF $GET(BARDLQ)
QUIT
DO HDR
DO HDR2
End DoDot:3
End DoDot:2
End DoDot:1
+9 IF $GET(BARDLQ)
QUIT
+10 IF $GET(BAROPT)'="B"
DO RTRN^BARDMU
+11 QUIT
HDR ;
+1 SET BARPG=BARPG+1
+2 IF $EXTRACT(IOST)="C"
IF IOT["TRM"
IF '$DATA(ZTQUEUED)
IF $Y+20>IOSL
WRITE $$EN^BARVDF("IOF")
+3 WRITE !,"A/R PARENT LOCATION: ",BARPSAT(BARLOC,.01),!
+4 FOR I=1:1:80
WRITE "="
+5 QUIT
HDR2 ;
+1 WRITE !,?2,"EFFECTIVE DATE: ",BARPSDX,?35,"NPI: ",BARPNPI
+2 WRITE !,?2,"PRINT DOB: ",$PIECE("NO,YES",",",BARPDOB+1),?35,"MAX # OF LETTERS TO PRINT: ",$PIECE(BARPAR1,U,8)
+3 WRITE !,?2,"TOP MARGIN: "_+$PIECE(BARPAR1,U,9),?35,"LEFT MARGIN: "_+$PIECE(BARPAR1,U,10)
+4 ;P.OTT- BAR*1.8*.23
WRITE !,?2,"WRITE OFF AMOUNT: ",+BARPWO,?35,"PRINT BILL DATE: ",$PIECE("NO,YES",",",BARPBDT+1)
+5 ;P.OTT
IF BARPSRT]""
Begin DoDot:1
+6 WRITE !?2,"SORT DEBT LETTERS: "
+7 IF BARPSRT="P"
WRITE "BY POLICY HOLDER'S NAME"
+8 IF BARPSRT="I"
WRITE "BY INSURANCE NAME"
+9 ;12/02/2013- BAR*1.8*.23
IF BARPSRT="C"
WRITE "BY CYCLE"
End DoDot:1
+10 WRITE !
FOR I=1:1:80
WRITE "-"
+11 QUIT
COMP ;
+1 ;
+2 QUIT