source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCRCUTL.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 4.8 KB
Line 
1RCRCUTL ;ALB/CMS - RC REFERRAL UTILITY PROGRAM ; 16-JUN-00
2V ;;4.5;Accounts Receivable;**63,159**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6BN ;User Select an AR Bill No.
7 ;Returns PRCABN if exists
8 N DIC,DA,X,Y,%Y
9BNA S DIC="^PRCA(430,",DIC(0)="AEQMZ"
10 S DIC("S")="I $P(^(0),U,8)=16,$P($G(^PRCA(430.2,+$P(^(0),U,2),0)),U,6)=""T"""
11 D ^DIC S PRCABN=+Y
12 I $G(PRCABN)<0 K PRCABN
13BNQ Q
14 ;
15BNVAR(PRCABN) ;Set PRCA( array with bill information
16 ;Returns PRCA(
17 N PRCABN0
18 I '$G(PRCABN) G BNVARQ
19 S PRCABN0=$G(^PRCA(430,PRCABN,0))
20 S PRCA("BNAME")=$P(PRCABN0,U,1)
21 S PRCA("CAT")=$P(PRCABN0,U,2)_"^"_$P($G(^PRCA(430.2,+$P(PRCABN0,U,2),0)),U,1,2)
22 S PRCA("STATUS")=$P(PRCABN0,U,8)_"^"_$P($G(^PRCA(430.3,+$P(PRCABN0,U,8),0)),U,1,2)
23BNVARQ Q
24 ;
25DEBT(PRCABN) ;Get Debtor Name and Address
26 ;Send Bill Number
27 ;Return PRCA( array nodes: DEBTNM, DEBTOR, DEBTCT, DEBTZIP, DEBTST,
28 ; DEBTAD1, DEBTAD2, DEBTADD
29 N PRCACT,PRCAKP,PRCAST,PRCAST1,PRCAST2,X,Y,%Y
30 K PRCA("DEBTNM"),PRCA("DEBTOR"),PRCA("DEBTCT"),PRCA("DEBTZIP")
31 K PRCA("DEBTST"),PRCA("DEBTAD1"),PRCA("DEBTAD2"),PRCA("DEBTADD")
32 I '$G(PRCABN) G DEBTQ
33 D DEBTOR^PRCAUTL
34 I $G(PRCA("DEBTNM"))="" G DEBTQ
35 S PRCA("DEBTCT")=$G(PRCACT,"UNK")
36 S PRCA("DEBTZIP")=$G(PRCAKP,"UNK")
37 S PRCA("DEBTST")=$G(PRCAST,"UNK")
38 S PRCA("DEBTAD1")=$G(PRCAST1)
39 S PRCA("DEBTAD2")=$G(PRCAST2)
40 S PRCA("DEBTADD")=$G(X)
41DEBTQ Q
42 ;
43PT(DFN) ;Get Patient information
44 ;Return values in arrays: VA(, VADM(, VAPD(
45 K VA,VADM,VAPD
46 I '$D(^DPT(+$G(DFN),0)) G PTQ
47 D DEM^VADPT,ADD^VADPT
48PTQ Q
49 ;
50RCDOM() ;Get supporting RC Domain
51 ;Returns Domain Name
52 N X
53 ;S X=$O(RCDIV(0))
54 ;I +X S X=$P($G(RCDIV(+X)),U,6)
55 ;I X]"" G RCDOMQ
56 S X=$O(^RCT(349.1,"B","RC",0))
57 S X=$P($G(^RCT(349.1,+X,3)),U,4)
58RCDOMQ Q X
59 ;
60RCCAT(ARRAY) ;Get array of valid AR/RC Bill Categories
61 ;Send back ARRAY(IEN)=x^AR Category Name
62 ; x = 1 = Reconciliation, Referral and Follow-up
63 ; x = 2 = Reconciliation Only
64 S ARRAY(6)="2^"_$P(^PRCA(430.2,6,0),U,1)
65 S ARRAY(7)="2^"_$P(^PRCA(430.2,7,0),U,1)
66 S ARRAY(9)="1^"_$P(^PRCA(430.2,9,0),U,1)
67 S ARRAY(10)="2^"_$P(^PRCA(430.2,10,0),U,1)
68RCCATQ Q
69 ;
70REFST(PRCABN) ;Referral Status
71 ;Return: If Referred date^code^amount
72 ; If not Referred 0
73 N X S X=0
74 I $P($G(^PRCA(430,PRCABN,0)),U,8)'=16 G REFSTQ
75 S X=$P($G(^PRCA(430,PRCABN,6)),U,4,6)
76 I 'X S X=0
77REFSTQ Q X
78 ;
79RETN(PRCABN) ;Returned from RC/DOJ
80 ;Return: If Return Date send Date
81 ; If not send 0
82 N X S X=+$P($G(^PRCA(430,PRCABN,6)),U,11)
83 Q X
84 ;
85ACTDT(PRCABN) ;Date account activated
86 ;Return: Date account activated
87 N X S X=0
88 I '$G(PRCABN) G ACTDTQ
89 S X=+$P($G(^PRCA(430,PRCABN,6)),"^",21) I X G ACTDTQ
90 S X=+$P($G(^PRCA(430,PRCABN,9)),"^",3) I X G ACTDTQ
91 S X=+$P($G(^PRCA(430,PRCABN,0)),"^",10)
92ACTDTQ Q X
93 ;
94AEOB ;File 433 Cross-Ref on Transaction Type
95 ; -used to alert pending EOB processing when Payment in Part
96 ; transaction is created
97 N PRCABN,RCAT
98 I (X'=2)!(+$G(DA)<1) G AEOBQ
99 S PRCABN=+$P($G(^PRCA(433,DA,0)),U,2) I 'PRCABN G AEOBQ
100 I +$P($G(^PRCA(430,PRCABN,0)),U,2)'=9 G AEOBQ
101 I $$REFST(PRCABN)=0 G AEOBQ
102 S ^PRCA(433,"AEOB",PRCABN,DA)=""
103AEOBQ Q
104 ;
105ECHK ;Check to see if pending EOB Code Processing exists
106 I $O(^PRCA(433,"AEOB",0)) W !!,*7,"*** You have Referred TP Bills pending EOB Code processing ***"
107ECHKQ Q
108 ;
109ADDR ;Regional Counsel Addresses and Death Notification addresses.
110 ;;OGCBOSRI@MAIL.VA.GOV^OGCRegion1DeathNotification@mail.va.gov
111 ;;OGCNYNRI@MAIL.VA.GOV^OGCRegion2DeathNotification@mail.va.gov
112 ;;OGCBALRI@MAIL.VA.GOV^OGCRegion3DeathNotification@mail.va.gov
113 ;;OGCPHIRI@MAIL.VA.GOV^OGCRegion4DeathNotification@mail.va.gov
114 ;;OGCATLRI@MAIL.VA.GOV^OGCRegion5DeathNotification@mail.va.gov
115 ;;OGCBAYRI@MAIL.VA.GOV^OGCRegion6DeathNotification@mail.va.gov
116 ;;OGCCLERI@MAIL.VA.GOV^OGCRegion7DeathNotification@mail.va.gov
117 ;;OGCNASRI@MAIL.VA.GOV^OGCRegion8DeathNotification@mail.va.gov
118 ;;OGCJACRI@MAIL.VA.GOV^OGCRegion9DeathNotification@mail.va.gov
119 ;;OGCCHIRI@MAIL.VA.GOV^OGCRegion10DeathNotification@mail.va.gov
120 ;;OGCDETRI@MAIL.VA.GOV^OGCRegion11DeathNotification@mail.va.gov
121 ;;OGCSTLRI@MAIL.VA.GOV^OGCRegion12DeathNotification@mail.va.gov
122 ;;OGCWACRI@MAIL.VA.GOV^OGCRegion13DeathNotification@mail.va.gov
123 ;;OGCHOURI@MAIL.VA.GOV^OGCRegion14DeathNotification@mail.va.gov
124 ;;OGCMINRI@MAIL.VA.GOV^OGCRegion15DeathNotification@mail.va.gov
125 ;;OGCDENRI@MAIL.VA.GOV^OGCRegion16DeathNotification@mail.va.gov
126 ;;OGCLOSRI@MAIL.VA.GOV^OGCRegion17DeathNotification@mail.va.gov
127 ;;OGCSFCRI@MAIL.VA.GOV^OGCRegion18DeathNotification@mail.va.gov
128 ;;OGCPHORI@MAIL.VA.GOV^OGCRegion19DeathNotification@mail.va.gov
129 ;;OGCPORRI@MAIL.VA.GOV^OGCRegion20DeathNotification@mail.va.gov
130 ;;OGCBUFRI@MAIL.VA.GOV^OGCRegion21DeathNotification@mail.va.gov
131 ;;OGCINDRI@MAIL.VA.GOV^OGCRegion22DeathNotification@mail.va.gov
132 ;;OGCWINRI@MAIL.VA.GOV^OGCRegion23DeathNotification@mail.va.gov
133 ;;END
134 ;RCRCUTL
Note: See TracBrowser for help on using the repository browser.