source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCDPEU.m@ 1147

Last change on this file since 1147 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1RCDPEU ;ALB/TMK - ELECTRONIC ERA UTILITIES ;05-NOV-02
2 ;;4.5;Accounts Receivable;**173**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6EFTMTCH ; Match an electronic EFT's deposit to a paper EOB's receipt record
7 ; Select the receipt record. Match the totals.
8 N DIR,X,Y,RCDEP,DUOUT,DTOUT
9 S DIR(0)="PAO^RCY(344.31,:AEMQ",DIR("S")="I $P($G(^(0),U,8)=0" ; must be unmatched
10 S DIR("A")="Select EFT RECORD (Unmatched to an ERA): " D ^DIR K DIR
11 I $D(DTOUT)!$D(DUOUT) G MATCHQ2
12 S RCDEP=+Y
13MATCHQ2 Q
14 ;
15MATCH ; Manual start of ERA/EFT automatic matching
16 D EN^RCDPEM(1,1)
17 Q
18 ;
19ADJ(RC3444,RCADJ) ; Function-determines if ERA record contains adjustments
20 ; RC3444 = ien of ERA entry in file 344.4
21 ; Return value = 1 for ERA level adjustments found, 2 if claim level
22 ; adjustments found, 3 if both found
23 ; Also returns RCADJ(ERA ien,seq#)=bill # for claim level adjustments
24 ;
25 N Z,DA
26 S RCADJ=0
27 ;
28 I $O(^RCY(344.4,RC3444,2,0)) S RCADJ=1 ;ERA level adjustment
29 ;
30 I 'RCADJ D ; Claim level adjustment
31 . S DA(1)=RC3444
32 . S Z=0 F S Z=$O(^RCY(344.4,RC3444,1,Z)) Q:'Z I $P($G(^(Z,0)),U,14) S RCADJ=RCADJ+2,DA=Z,RCADJ(RC3444,Z)=$$GETBILL^RCDPESR0(.DA)
33 ;
34 Q RCADJ
35 ;
36DEPREC(RC3443) ; Returns the ien of the receipt for the EFT deposit RC3443
37 ; RC3443 = ien of entry in file 344.3
38 N Z
39 S Z=+$P($G(^RCY(344.3,+RC3443,0)),U,3)
40 S Z=+$O(^RCY(344,"AD",Z,0))
41 Q Z
42 ;
43EDILB(RCRCPT) ; Given receipt ien RCRCPT, return 1 if the receipt is for
44 ; an EDI Lockbox deposit (EFT), 2 if for EDI Lockbox detail (EOB/ERA)
45 ; or 0 if not EDI Lockbox related (paper check)
46 N X,Z
47 S Z=0
48 S X=$$EDILBEV($P($G(^RCY(344,RCRCPT,0)),U,4))
49 I X D
50 . I $P($G(^RCY(344,RCRCPT,0)),U,6),$$EDILBDEP(+$P(^(0),U,6)) S Z=1 Q ; EFT deposit associated with receipt
51 . I '$P($G(^RCY(344,RCRCPT,0)),U,6) S Z=2 Q ; EFT detail
52 Q Z
53 ;
54EDILBDEP(RCDEP) ; Given deposit ien RCDEP (file 344.1), return 1 if there is
55 ; an EFT referrencing it in file 344.3
56 N X,Y
57 S X=$O(^RCY(344.3,"ARDEP",RCDEP,0))
58 Q (X>0)
59 ;
60EDILBEV(PAYTYP) ; Given ien of file 341.1 PAYTYP, return 1 if the pay type's
61 ; event number is EDI LOCKBOX
62 Q ($P($G(^RC(341.1,+$G(PAYTYP),0)),U,2)=14)
63 ;
64LBEVENT() ; Returns the IEN of EDI Lockbox event 14 in file 341.1
65 Q +$O(^RC(341.1,"AC",14,0))
66 ;
67HACERA(RCERA) ; Functions to determine if ERA entry in file 344.4 is an
68 ; ERA received from HAC (CHAMPVA)
69 ; RCERA = ien of entry file 344.4
70 ; Returns 1 if it is, 0 if not
71 N X
72 S X=0 ; Add code here to make the determination
73 Q X
74 ;
75HACEFT(RCEFT) ; Functions to determine if EFT entry in file 344.3 is an
76 ; EFT received from HAC (CHAMPVA)
77 ; RCEFT = ien of entry file 344.3
78 ; Returns 1 if it is, 0 if not
79 Q ($E($P($G(^RCY(344.3,+RCEFT,0)),U,6),1,3)="HAC")
80 ;
Note: See TracBrowser for help on using the repository browser.