source: FOIAVistA/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCFMDRV1.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: 1.1 KB
Line 
1RCFMDRV1 ;WASH-ISC@ALTOONA,PA/RGY-Add FMS document ;8/18/94 11:36 AM
2V ;;4.5;Accounts Receivable;;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4OPEN(DOC,TYPE,ID,ENT,ERROR,BILL,EVN,BAT) ;Add event to FMS document file
5 NEW DIC,D0,DIE,DA,X,DLAYGO,DR,DEBT,DIS,DINUM,RCOK
6 S ERROR="",ENT=-1
7 I $G(DOC)="" S ERROR="FMS Document number undefined" Q
8 I $G(ID)]"",$D(^RC(347,"D",ID)) S ERROR="Duplicate Identifier requested" Q
9 I '$D(^RC(347.1,+$G(TYPE),0)) S ERROR="Unknown type of document" Q
10 I $G(BILL)]"",'$D(^PRCA(430,BILL,0)) S ERROR="Bill number does not exist" Q
11 I $G(EVN)]"",'$D(^PRCA(433,EVN,0)) S ERROR="Event number does not exist" Q
12 ;S:DOC["-" DOC=$P(DOC,"-")_$P(DOC,"-",2) ;CLH - to allowfull fms number to be entered
13 F ENT=+$P(^RC(347,0),"^",3)+1:1 L +^RC(347,ENT):0 I $T S RCOK=0 D L -^RC(347,ENT) Q:RCOK
14 .I $D(^RC(347,ENT)) Q
15 .S DINUM=ENT,DIC="^RC(347,",DIC(0)="L",DLAYGO=347,X=ENT
16 .K DD,DO D FILE^DICN K DIC,DLAYGO,DO
17 .I Y<0 S ERROR="Unable to add bill to bill file!" Q
18 .S DIE="^RC(347,",DR="[RCFM OPEN DOCUMENT]",(ENT,DA)=+Y D ^DIE
19 .S RCOK=1
20 .Q
21Q Q
Note: See TracBrowser for help on using the repository browser.