source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCCPC1.m@ 1499

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1RCCPC1 ;WASH-ISC@ALTOONA,PA/LDB-Setups for CCPC;11/19/96 10:21 AM
2V ;;4.5;Accounts Receivable;**34,70**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5EN ;called by RCCPC0
6 ;
7XMBGRP ;Setup RCCPC STATEMENTS MAIL GROUP
8 N DES,X
9 S DES(1)="CCPC PATIENT STATEMENTS MESSAGES"
10 S X=$$MG^XMBGRP("RCCPC STATEMENTS",0,.5,1,"",.DES,1)
11 ;
12SDAY ;set patient statement day to site statement day
13 S DEB=0 F S DEB=$O(^RCD(340,"AB","DPT(",DEB)) Q:'DEB I $D(^RCD(340,+DEB,0)) D
14 .S STDT=$P($G(^RCD(340,+DEB,0)),"^",3) Q:'STDT
15 .S SSTDT=$P($G(^RC(342,1,0)),"^",11)
16 .Q:(SSTDT=STDT)
17 .K ^RCD(340,"AC",STDT,+DEB)
18 .S $P(^RCD(340,+DEB,0),"^",3)=SSTDT
19 .S ^RCD(340,"AC",SSTDT,DEB)=""
20 ;
21RESET ;Reset statement days for non-patients
22 S X(1)=$$STDY^RCCPCFN,X=0 F S X=$O(^RCD(340,"AC",X(1),X)) Q:'X D
23 .K ^RCD(340,"AC",X(1),X)
24 .S $P(^RCD(340,+X,0),"^",3)=+X(1)
25 .S ^RCD(340,"AC",+X(1),X)=""
26 ;
27DOMAIN ;sets up 349.1 entry pointer to DOMAIN
28 S DIC="^DIC(4.2,",X="Q-CCP.MED.VA.GOV",DIC(0)="M" D ^DIC Q:Y<0
29 S SEG=$O(^RCT(349.1,"B","PS",0)) Q:'SEG
30 S $P(^RCT(349.1,+SEG,3),"^",2,3)=+Y_"^"_$P(Y,"^",2)
31 ;
32DMC ;Find delinquent bill olders than 4/28/94 with no waiver rights
33 N COM,DA,DFN,DIE,DR,DAT,PRCABN,PRCAEN,RCD,TODAY,TYP,VAEL,XMSUB,XMTEXT,XMY
34 Q:$P(^RC(342,1,0),"^",13)
35 S RCD=0 F S RCD=$O(^RCD(340,"AB","DPT(",RCD)) Q:'RCD D
36 .Q:'$G(^RCD(340,+RCD,0))
37 .S DAT=$O(^RC(341,"AD",RCD,2,0))
38 .S DAT=9999999.999999-DAT
39 .I DAT>2940428 Q
40 .S DFN=+$G(^RCD(340,+RCD,0)) D ELIG^VADPT
41 .I 'VAEL(1) Q
42 .D DEM^VADPT I +$G(VADM(6))!VAERR Q
43 .I $$ACT^PRCAGT(+RCD,DAT) Q
44 .D NOW^%DTC S TODAY=$P(%,".")
45 .S COM="Waiver rights on statement."
46 .S PRCABN=$O(^PRCA(430,"AS",+RCD,16,0))
47 .Q:'PRCABN
48 .I "^18^22^23^"'[("^"_$P(^PRCA(430,+PRCABN,0),"^",2)_"^") S PRCABN=$O(^PRCA(430,"AS",+RCD,16,PRCABN))
49 .Q:'PRCABN
50 .D SETTR^PRCAUTL,PATTR^PRCAUTL
51 .S TYP=$O(^PRCA(430.3,"AC",17,0))
52 .S DR=".03////^S X="_PRCABN_";3////^S X=0;4////^S X=2;12////^S X=TYP;15////^S X=0;42////^S X=$G(DUZ)"
53 .S DR=DR_";11////^S X=TODAY;5.02////^S X=COM;5.03////^S X="_$$STD^RCCPCFN
54 .S DA=PRCAEN,DIE="^PRCA(433,"
55 .D ^DIE
56 .D MAIL
57 S:'$O(^RCT(349,0)) $P(^RC(342,1,0),"^",13)=$$STD^RCCPCFN
58 I $O(^RCT(349,0)) S X=$P(^RCT(349,$O(^RCT(349,0)),0),"^",9),X=$E(X,1,2)_"/"_$E(X,3,4)_"/"_$E(X,5,8) D ^%DT S $P(^RC(342,1,0),"^",13)=Y
59 Q
60 ;
61MAIL ;Send message
62 S XMSUB="Patient with no previous waiver rights notice"
63 S XMDUZ="AR PACKAGE"
64 S XMY("G.RCCPC STATEMENTS")=""
65 S XMSG(1)="This patient: "_$$NAM^RCFN01(+RCD)_" "_$$SSN^RCFN01(+RCD)
66 S XMSG(2)="will receive a statement next statement date with"
67 S XMSG(3)="WAIVER RIGHTS and a comment on bill "_$P($G(^PRCA(430,+PRCABN,0)),"^")
68 S XMTEXT="XMSG("
69 D ^XMD
70 Q
Note: See TracBrowser for help on using the repository browser.