BAR50MCH ; IHS/SD/SDR - ERA User-defined matching logic ;
;;1.8;IHS ACCOUNTS RECEIVABLE;**20,21**;OCT 26,2005
; new routine
EN ;
W !!,"This option allows you to create the matching logic for matching bills from"
W !,"the 835 to the RPMS A/R Bills. The system will ask you to match based upon"
W !,"certain questions. Let's begin."
W !
D ^XBFMK
S DIC=$$DIC^XBDIQ1(90056.24)
S DIC("A")="Select A/R Account: "
S DIC(0)="AEMQL"
D ^DIC
Q:$D(DTOUT)!$D(DUOUT)
Q:Y<0
S BARIEN=+Y
I +$P(Y,U,3)=0 D Q:Y=0 ;entry already exists; write info to screen
.D DISPLAY
.D ^XBFMK
.K DIR
.S DIR(0)="Y"
.S DIR("A")="Do you wish to edit this entry?"
.S DIR("B")="N"
.D ^DIR
W !
D ^XBFMK
S DIE=$$DIC^XBDIQ1(90056.24)
S DA=BARIEN
S DR=".02//"
D ^DIE
Q:X=""
I $$GET1^DIQ(90056.24,BARIEN,".02","I")=1 D Q:X=""
. D ^XBFMK
.S DIE=$$DIC^XBDIQ1(90056.24)
.S DA=BARIEN
.S DR=".03Ignore/Strip dashes from A/R Bill Number?//;.04Include facility code (up to 4 chars) in matching?//"
.D ^DIE
.D ^XBFMK
.S DIE=$$DIC^XBDIQ1(90056.24)
.S DA=BARIEN
.S DR=".05Include HRN in matching?//"
.I $$GET1^DIQ(90056.24,BARIEN,".04","I")=0 S DR=".05Include HRN in matching?////0"
.D ^DIE
.W !
D ^XBFMK
S DIE=$$DIC^XBDIQ1(90056.24)
S DA=BARIEN
S DR=".06Match on DATE OF SERVICE of A/R Bill?//;W !;.07Match on A/R ACCOUNT (INSURER) of A/R Bill?//;W !;.08Match on AMOUNT BILLED of A/R Bill?//"
D ^DIE
Q:X=""
I $$GET1^DIQ(90056.24,BARIEN,".07","I")=1 D Q:X=""
.D ^XBFMK
.S DIE=$$DIC^XBDIQ1(90056.24)
.S DA=BARIEN
.S DR=".09If the sum of all transactions is less than or equal to the Current Bill Amount, continue to post?//"
.D ^DIE
Q:X=""
W !
D ^XBFMK
S DIE=$$DIC^XBDIQ1(90056.24)
S DA=BARIEN
S DR=".11CANCELLED BILLS -Process, Ask or Ignore//"
D ^DIE
Q
DISPLAY ;EP
W !!?1,"Entry already exists for "_$$GET1^DIQ(90056.24,BARIEN,".01")
W !?3,"Match on Bill Number: ",?55,$$GET1^DIQ(90056.24,BARIEN,".02")
I $$GET1^DIQ(90056.24,BARIEN,".02","I")=1 D
.W !?3,"Ignore/Strip Dashes from A/R Bill Number: ",?55,$$GET1^DIQ(90056.24,BARIEN,".03")
.W !?3,"Include facility code (up to 4 chars) in matching: ",?55,$$GET1^DIQ(90056.24,BARIEN,".04")
.W !?3,"Include HRN in matching: ",?55,$$GET1^DIQ(90056.24,BARIEN,".05")
W !?3,"Match DATE OF SERVICE of the A/R Bill: ",?55,$$GET1^DIQ(90056.24,BARIEN,".06")
W !?3,"Match on A/R Account (Insurer) of the A/R Bill: ",?55,$$GET1^DIQ(90056.24,BARIEN,".07")
W !?3,"Match on AMOUNT BILLED of the A/R Bill: ",?55,$$GET1^DIQ(90056.24,BARIEN,".08")
W !?3,"Continue to post if sum of transactions is",!?10,"less than or equal to CURRENT BILL AMOUNT: ",?55,$$GET1^DIQ(90056.24,BARIEN,".09")
W !?3,"CANCELLED BILLS: ",?55,$$GET1^DIQ(90056.24,BARIEN,".11")
;
W !!
Q
BAR50MCH ; IHS/SD/SDR - ERA User-defined matching logic ;
+1 ;;1.8;IHS ACCOUNTS RECEIVABLE;**20,21**;OCT 26,2005
+2 ; new routine
EN ;
+1 WRITE !!,"This option allows you to create the matching logic for matching bills from"
+2 WRITE !,"the 835 to the RPMS A/R Bills. The system will ask you to match based upon"
+3 WRITE !,"certain questions. Let's begin."
+4 WRITE !
+5 DO ^XBFMK
+6 SET DIC=$$DIC^XBDIQ1(90056.24)
+7 SET DIC("A")="Select A/R Account: "
+8 SET DIC(0)="AEMQL"
+9 DO ^DIC
+10 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+11 IF Y<0
QUIT
+12 SET BARIEN=+Y
+13 ;entry already exists; write info to screen
IF +$PIECE(Y,U,3)=0
Begin DoDot:1
+14 DO DISPLAY
+15 DO ^XBFMK
+16 KILL DIR
+17 SET DIR(0)="Y"
+18 SET DIR("A")="Do you wish to edit this entry?"
+19 SET DIR("B")="N"
+20 DO ^DIR
End DoDot:1
IF Y=0
QUIT
+21 WRITE !
+22 DO ^XBFMK
+23 SET DIE=$$DIC^XBDIQ1(90056.24)
+24 SET DA=BARIEN
+25 SET DR=".02//"
+26 DO ^DIE
+27 IF X=""
QUIT
+28 IF $$GET1^DIQ(90056.24,BARIEN,".02","I")=1
Begin DoDot:1
+29 DO ^XBFMK
+30 SET DIE=$$DIC^XBDIQ1(90056.24)
+31 SET DA=BARIEN
+32 SET DR=".03Ignore/Strip dashes from A/R Bill Number?//;.04Include facility code (up to 4 chars) in matching?//"
+33 DO ^DIE
+34 DO ^XBFMK
+35 SET DIE=$$DIC^XBDIQ1(90056.24)
+36 SET DA=BARIEN
+37 SET DR=".05Include HRN in matching?//"
+38 IF $$GET1^DIQ(90056.24,BARIEN,".04","I")=0
SET DR=".05Include HRN in matching?////0"
+39 DO ^DIE
+40 WRITE !
End DoDot:1
IF X=""
QUIT
+41 DO ^XBFMK
+42 SET DIE=$$DIC^XBDIQ1(90056.24)
+43 SET DA=BARIEN
+44 SET DR=".06Match on DATE OF SERVICE of A/R Bill?//;W !;.07Match on A/R ACCOUNT (INSURER) of A/R Bill?//;W !;.08Match on AMOUNT BILLED of A/R Bill?//"
+45 DO ^DIE
+46 IF X=""
QUIT
+47 IF $$GET1^DIQ(90056.24,BARIEN,".07","I")=1
Begin DoDot:1
+48 DO ^XBFMK
+49 SET DIE=$$DIC^XBDIQ1(90056.24)
+50 SET DA=BARIEN
+51 SET DR=".09If the sum of all transactions is less than or equal to the Current Bill Amount, continue to post?//"
+52 DO ^DIE
End DoDot:1
IF X=""
QUIT
+53 IF X=""
QUIT
+54 WRITE !
+55 DO ^XBFMK
+56 SET DIE=$$DIC^XBDIQ1(90056.24)
+57 SET DA=BARIEN
+58 SET DR=".11CANCELLED BILLS -Process, Ask or Ignore//"
+59 DO ^DIE
+60 QUIT
DISPLAY ;EP
+1 WRITE !!?1,"Entry already exists for "_$$GET1^DIQ(90056.24,BARIEN,".01")
+2 WRITE !?3,"Match on Bill Number: ",?55,$$GET1^DIQ(90056.24,BARIEN,".02")
+3 IF $$GET1^DIQ(90056.24,BARIEN,".02","I")=1
Begin DoDot:1
+4 WRITE !?3,"Ignore/Strip Dashes from A/R Bill Number: ",?55,$$GET1^DIQ(90056.24,BARIEN,".03")
+5 WRITE !?3,"Include facility code (up to 4 chars) in matching: ",?55,$$GET1^DIQ(90056.24,BARIEN,".04")
+6 WRITE !?3,"Include HRN in matching: ",?55,$$GET1^DIQ(90056.24,BARIEN,".05")
End DoDot:1
+7 WRITE !?3,"Match DATE OF SERVICE of the A/R Bill: ",?55,$$GET1^DIQ(90056.24,BARIEN,".06")
+8 WRITE !?3,"Match on A/R Account (Insurer) of the A/R Bill: ",?55,$$GET1^DIQ(90056.24,BARIEN,".07")
+9 WRITE !?3,"Match on AMOUNT BILLED of the A/R Bill: ",?55,$$GET1^DIQ(90056.24,BARIEN,".08")
+10 WRITE !?3,"Continue to post if sum of transactions is",!?10,"less than or equal to CURRENT BILL AMOUNT: ",?55,$$GET1^DIQ(90056.24,BARIEN,".09")
+11 WRITE !?3,"CANCELLED BILLS: ",?55,$$GET1^DIQ(90056.24,BARIEN,".11")
+12 ;
+13 WRITE !!
+14 QUIT