source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/PRCAGST.m@ 1154

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

revised back to 6/30/08 version

File size: 2.8 KB
RevLine 
[623]1PRCAGST ;WASH-ISC@ALTOONA,PA/CMS-Print Patient Statement ;12/12/96 9:39 AM
2V ;;4.5;Accounts Receivable;**34,181,190**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;ENTRY WITH DEBTOR PRINT STATEMENT
5EN(DEB,TBAL,PDAT,PBAL,LDT) ;
6 NEW ADD,DA,LN,NAM,PAGE,SSN,X,X1,X2,Y
7 I '$D(SITE) D SITE^PRCAGU
8 S SSN=$$SSN^RCFN01(DEB),SSN=$S(SSN=-1:"XXXXXXXXX",1:SSN)
9 S ADD=$$SADD^RCFN01(8) I ADD="" S ADD=$$SADD^RCFN01(1)
10 S X=0 F Y=1:1:3 I $P(ADD,U,Y)]"" S X=X+1 S ADD(X)=$P(ADD,U,Y)
11 S X=X+1,ADD(X)=$P(ADD,U,4)_", "_$P(ADD,U,5)_" "_$P(ADD,U,6)
12 S X=X+1,ADD(X)=$P(ADD,U,7)
13 W @IOF
14 W !!,"Department of Veterans Affairs",?50,"Acct No.: ",SSN
15 W !,$G(ADD(1))
16 S Y=$$FPS^RCAMFN01($S($G(LDT)>0:$E(LDT,1,5),1:$E(DT,1,5))_$TR($J($$PST^RCAMFN01(DEB),2)," ",0),$S(+$E($G(LDT),6,7)>$$STD^RCCPCFN:2,1:1)) D DD^%DT
17 W !,$G(ADD(2)),?50 I TBAL>0 W "Due: UPON RECEIPT"
18 W !,$G(ADD(3)),?50,$S(TBAL>0:"Amount Due: $"_$J(TBAL,0,2),1:"NO AMOUNT DUE")
19 W !,$G(ADD(4)),?50,$S(TBAL'>0:"*THIS IS NOT A BILL*",1:"Amount Paid: _____________")
20 W !,$G(ADD(5)),?50,"Today's Date: " S Y=DT D DD^%DT W Y
21 I TBAL'>0 D MES G LB
22 W !!,?2,"Please Make your Check or Money Order payable to the ""Department of Veterans"
23 W !,?2,"Affairs"" and send payment to the above address. If you have any questions"
24 W !,?2,"regarding this statement, please call the number listed above.",!!!
25LB K ADD S NAM=$$NAM^RCFN01(DEB)
26 W !,?7,NAM
27 S ADD=$$DADD^RCAMADD(DEB,1) ; Get debtor address, confidential if applicable
28 S X=0 F Y=1:1:3 I $P(ADD,U,Y)]"" S X=X+1 S ADD(X)=$P(ADD,U,Y)
29 S X=X+1,ADD(X)=$P(ADD,U,4)_", "_$P(ADD,U,5)_" "_$P(ADD,U,6)
30 F X=0:0 S X=$O(ADD(X)) Q:'X W !,?7,$E(ADD(X),1,40) I X=1 W ?50 X $G(SITE("SCAN"))
31 W !
32 I $G(SITE("COM1"))'="" W !,?2,SITE("COM1")
33 I $$GMT(DEB) W !,?2,"REDUCTION OF INPATIENT COPAYMENT DUE TO GEOGRAPHIC MEANS TEST STATUS"
34 W !! I TBAL>0 W !,?10,"Please Detach and Return Top Portion with Payment"
35 S Y="",$P(Y,"=",80)="" W !,Y
36 W !,"IMPORTANT: Please read the Notice of Rights accompanying this statement!",!
37 D ^PRCAGST1
38 Q
39MES ;text for no amount due
40 W !!,?2,"This statement is being sent to you to provide you with information"
41 W !,?2,"concerning transactions affecting your account. If a prepayment offset"
42 W !,?2,"a bill or you have made one or more payments or charges were removed,"
43 W !,?2,"from your account, you are being sent this statement to confirm these actions.",!!
44 Q
45 ;
46 ; Detect GMT-related status for the statement (fetch all patient's bills)
47 ; Input: Temporary global ^TMP("PRCAGT",$J,PRDEB)
48 ; Output: 1 - 'Yes', 0 - 'No'
49GMT(PRDEB) N PRDAT,PRBN,PRGMT
50 S PRGMT=0 ; Default
51 I $G(PRDEB)'="" S PRDAT=0 F S PRDAT=$O(^TMP("PRCAGT",$J,PRDEB,PRDAT)) Q:'PRDAT D Q:PRGMT
52 . S PRBN=0 F S PRBN=$O(^TMP("PRCAGT",$J,PRDEB,PRDAT,PRBN)) Q:'PRBN D Q:PRGMT
53 .. I $$ISGMTBIL^IBAGMT($P($G(^PRCA(430,PRBN,0)),U,1)) S PRGMT=1
54 Q PRGMT
Note: See TracBrowser for help on using the repository browser.