BARDMPS ;IHS/OIT/SDR - DEBT MANAGEMENT EDIT PARAMETERS
;;1.8;IHS ACCOUNTS RECEIVABLE;**22,23**;OCT 26, 2005;Build 38
;New routine 5-12-2011 for Debt Letter Management
;JAN 2013 P.OTTIS ADDED LETTER PARAMETERS
W !!
D ^XBFMK
S DA=DUZ(2)
S DIE="^BAR(90052.06,DUZ(2),"
S DIE("NO^")="OUTOK"
S DR="1701" D ^DIE
Q:$D(Y)
S DR="1808Enter the Maximum number of letters to batch print" D ^DIE
Q:$D(Y)
S DR="1702DEBT LETTER WRITE OFF AMOUNT" D ^DIE
Q:$D(Y)
S DR="1703PRINT FACILITY NPI OR PROVIDER NPI ON LETTER" D ^DIE
Q:$D(Y)
S DR="1704PRINT DATE OF BIRTH ON LETTER" D ^DIE
Q:$D(Y)
S DR="1901PRINT BILL DATE ON LETTER" D ^DIE ;P.OTT
Q:$D(Y)
S DR="1902SORT LETTERS BY" D ^DIE ;P.OTT
Q:$D(Y)
S DR="1809//;1810//" D ^DIE ;bar*1.*22 SDR
Q:$D(Y) ;bar*1.*22 SDR
;
L1 ;
D ^XBFMK
S DIC="^BAR(90052.03,"
S DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
S DIC("A")="DEBT LETTER 1: "
S:$P($G(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,5) DIC("B")=$$GET1^DIQ(90052.03,$P(^BAR(90052.06,DUZ(2),DUZ(2),17),U,5),".01","E")
S DIC(0)="AEQM"
D ^DIC
I $D(DUOUT)!(Y<0) G L1
S BARL=+Y
D ^XBFMK
S DIE="^BAR(90052.06,"_DUZ(2)_","
S DA=DUZ(2)
S DR="1705////"_BARL_";1706"
D ^DIE
Q:$D(Y)
;
L2 ;
D ^XBFMK
S DIC="^BAR(90052.03,"
S DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
S DIC("A")="DEBT LETTER 2: "
S:$P($G(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,7) DIC("B")=$$GET1^DIQ(90052.03,$P(^BAR(90052.06,DUZ(2),DUZ(2),17),U,7),".01","E")
S DIC(0)="AEQM"
D ^DIC
I $D(DUOUT)!(Y<0) G L2
S BARL=+Y
D ^XBFMK
S DIE="^BAR(90052.06,"_DUZ(2)_","
S DA=DUZ(2)
S DR="1707////"_BARL_";1708"
D ^DIE
Q:$D(Y)
L3 ;
D ^XBFMK
S DIC="^BAR(90052.03,"
S DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
S DIC("A")="DEBT LETTER 3: "
S:$P($G(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,9) DIC("B")=$$GET1^DIQ(90052.03,$P(^BAR(90052.06,DUZ(2),DUZ(2),17),U,9),".01","E")
S DIC(0)="AEQM"
D ^DIC
I $D(DUOUT)!(Y<0) G L3
S BARL=+Y
D ^XBFMK
S DIE="^BAR(90052.06,"_DUZ(2)_","
S DA=DUZ(2)
S DR="1709////"_BARL_";1710"
D ^DIE
Q:$D(Y)
L4 ;
D ^XBFMK
S DIC="^BAR(90052.03,"
S DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
S DIC("A")="DEBT LETTER 4: "
S:$P($G(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,11) DIC("B")=$$GET1^DIQ(90052.03,$P(^BAR(90052.06,DUZ(2),DUZ(2),17),U,11),".01","E")
S DIC(0)="AEQM"
D ^DIC
I $D(DUOUT)!(Y<0) G L4
S BARL=+Y
D ^XBFMK
S DIE="^BAR(90052.06,"_DUZ(2)_","
S DA=DUZ(2)
S DR="1711////"_BARL_";1712"
D ^DIE
Q
BARDMPS ;IHS/OIT/SDR - DEBT MANAGEMENT EDIT PARAMETERS
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;**22,23**;OCT 26, 2005;Build 38
+2 ;New routine 5-12-2011 for Debt Letter Management
+3 ;JAN 2013 P.OTTIS ADDED LETTER PARAMETERS
+4 WRITE !!
+5 DO ^XBFMK
+6 SET DA=DUZ(2)
+7 SET DIE="^BAR(90052.06,DUZ(2),"
+8 SET DIE("NO^")="OUTOK"
+9 SET DR="1701"
DO ^DIE
+10 IF $DATA(Y)
QUIT
+11 SET DR="1808Enter the Maximum number of letters to batch print"
DO ^DIE
+12 IF $DATA(Y)
QUIT
+13 SET DR="1702DEBT LETTER WRITE OFF AMOUNT"
DO ^DIE
+14 IF $DATA(Y)
QUIT
+15 SET DR="1703PRINT FACILITY NPI OR PROVIDER NPI ON LETTER"
DO ^DIE
+16 IF $DATA(Y)
QUIT
+17 SET DR="1704PRINT DATE OF BIRTH ON LETTER"
DO ^DIE
+18 IF $DATA(Y)
QUIT
+19 ;P.OTT
SET DR="1901PRINT BILL DATE ON LETTER"
DO ^DIE
+20 IF $DATA(Y)
QUIT
+21 ;P.OTT
SET DR="1902SORT LETTERS BY"
DO ^DIE
+22 IF $DATA(Y)
QUIT
+23 ;bar*1.*22 SDR
SET DR="1809//;1810//"
DO ^DIE
+24 ;bar*1.*22 SDR
IF $DATA(Y)
QUIT
+25 ;
L1 ;
+1 DO ^XBFMK
+2 SET DIC="^BAR(90052.03,"
+3 SET DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
+4 SET DIC("A")="DEBT LETTER 1: "
+5 IF $PIECE($GET(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,5)
SET DIC("B")=$$GET1^DIQ(90052.03,$PIECE(^BAR(90052.06,DUZ(2),DUZ(2),17),U,5),".01","E")
+6 SET DIC(0)="AEQM"
+7 DO ^DIC
+8 IF $DATA(DUOUT)!(Y<0)
GOTO L1
+9 SET BARL=+Y
+10 DO ^XBFMK
+11 SET DIE="^BAR(90052.06,"_DUZ(2)_","
+12 SET DA=DUZ(2)
+13 SET DR="1705////"_BARL_";1706"
+14 DO ^DIE
+15 IF $DATA(Y)
QUIT
+16 ;
L2 ;
+1 DO ^XBFMK
+2 SET DIC="^BAR(90052.03,"
+3 SET DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
+4 SET DIC("A")="DEBT LETTER 2: "
+5 IF $PIECE($GET(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,7)
SET DIC("B")=$$GET1^DIQ(90052.03,$PIECE(^BAR(90052.06,DUZ(2),DUZ(2),17),U,7),".01","E")
+6 SET DIC(0)="AEQM"
+7 DO ^DIC
+8 IF $DATA(DUOUT)!(Y<0)
GOTO L2
+9 SET BARL=+Y
+10 DO ^XBFMK
+11 SET DIE="^BAR(90052.06,"_DUZ(2)_","
+12 SET DA=DUZ(2)
+13 SET DR="1707////"_BARL_";1708"
+14 DO ^DIE
+15 IF $DATA(Y)
QUIT
L3 ;
+1 DO ^XBFMK
+2 SET DIC="^BAR(90052.03,"
+3 SET DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
+4 SET DIC("A")="DEBT LETTER 3: "
+5 IF $PIECE($GET(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,9)
SET DIC("B")=$$GET1^DIQ(90052.03,$PIECE(^BAR(90052.06,DUZ(2),DUZ(2),17),U,9),".01","E")
+6 SET DIC(0)="AEQM"
+7 DO ^DIC
+8 IF $DATA(DUOUT)!(Y<0)
GOTO L3
+9 SET BARL=+Y
+10 DO ^XBFMK
+11 SET DIE="^BAR(90052.06,"_DUZ(2)_","
+12 SET DA=DUZ(2)
+13 SET DR="1709////"_BARL_";1710"
+14 DO ^DIE
+15 IF $DATA(Y)
QUIT
L4 ;
+1 DO ^XBFMK
+2 SET DIC="^BAR(90052.03,"
+3 SET DIC("S")="I $P(^(0),U)[""DEBT MANAGEMENT"""
+4 SET DIC("A")="DEBT LETTER 4: "
+5 IF $PIECE($GET(^BAR(90052.06,DUZ(2),DUZ(2),17)),U,11)
SET DIC("B")=$$GET1^DIQ(90052.03,$PIECE(^BAR(90052.06,DUZ(2),DUZ(2),17),U,11),".01","E")
+6 SET DIC(0)="AEQM"
+7 DO ^DIC
+8 IF $DATA(DUOUT)!(Y<0)
GOTO L4
+9 SET BARL=+Y
+10 DO ^XBFMK
+11 SET DIE="^BAR(90052.06,"_DUZ(2)_","
+12 SET DA=DUZ(2)
+13 SET DR="1711////"_BARL_";1712"
+14 DO ^DIE
+15 QUIT