source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/PRCAWO.m@ 1739

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1PRCAWO ;ALB-ISC/CMS - WAIVED IN FULL,TERMINATE AR ;8/27/97 11:01 AM
2V ;;4.5;Accounts Receivable;**42,67,63,168**;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;
7BEGIN ;Get Bill
8 N RCCAT
9 K PRCATERM,PRCABN,PRCAEN,PRCACAT,PRCA("CKSITE") D BILL^PRCAUTL Q:('$D(PRCABN))
10 I PRCA("STATUS")'=$O(^PRCA(430.3,"AC",102,"")),PRCA("STATUS")'=$O(^PRCA(430.3,"AC",112,"")) W !,*7,"THIS IS NOT AN ACTIVE BILL !",! S Y=-1 G BEGIN
11 S PRCACAT=+$P(^PRCA(430,PRCABN,0),U,2) D RCCAT^RCRCUTL(.RCCAT)
12 I +$G(RCCAT(PRCACAT))=1,$$REFST^RCRCUTL(PRCABN) W !!,"YOU CANNOT USE THIS OPTION TO ADJUST REFERRED "_$P($G(RCCAT(PRCACAT)),U,2)_" BILLS !",! S Y=-1 G BEGIN
13 I PRCACAT=$O(^PRCA(430.2,"AC",33,"")) W !,"YOU CANNOT ADJUST A PREPAYMENT BILL !",! S Y=-1 G BEGIN
14 I ",8,9,10,19,"[(","_$G(PRCATYPE)_","),'$G(^PRCA(430,PRCABN,7)) W !,"THIS BILL HAS NO PRINCIPAL BALANCE !",! S Y=-Y G BEGIN
15RR D SETTR^PRCAUTL,PATTR^PRCAUTL
16 S DIC="^PRCA(433," K PRCAMT,PRCAD("DELETE")
17 Q
18 ;
19 ;
20SETDCJ ;Set 430 and 433 rc/doj code fields
21 N RCCODE
22 S RCCODE=$P($G(^PRCA(430,PRCABN,6)),U,5)
23 I RCCODE="" Q
24 I RCCODE="DC" S RCCODE="RC"
25 S $P(^PRCA(430,PRCABN,6),U,5)=RCCODE
26 S $P(^PRCA(433,PRCAEN,0),U,7)=RCCODE
27 Q
28 ;
29CKDCDOJ ;check if the account has been referred to RC/DOJ.
30 Q:'$D(PRCABN) K PRCANODC
31 I $P($G(^PRCA(430,PRCABN,6)),U,4)="" W !,*7,"This account is not referred to RC/DOJ !",! S PRCANODC=1
32 Q
33 ;
34DIE ;Update 433 fields
35 S DIC="^PRCA(433,",DIE=DIC,DA=PRCAEN D LOCKF^PRCAWO1 Q:'$D(DA)
36 D ^DIE K DIE
37 Q
38UPCALM ;
39 Q
40END ;
41 L -^PRCA(433,+$G(PRCAEN)) K %,X,Y,DIE,DR,DA,DIC,DLAYGO,DATE,RCCAT,TRANS
42 K PRCA,PRCAMT,PRCABN,PRCADOJ,PRCAEN,PRCAPREV,PRCATERM,PRCA,PRCACAT,PRCATL
43 K PRCATY,PRCAS,PRCATYPE,PRCANODC,PRCAPB,PRCAMT1,PAYDT,PRCAMT1,PRCAPB,PRCATL1,DATE,RCCAT,TRANS
44 Q
Note: See TracBrowser for help on using the repository browser.