source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBAACO4.m@ 1704

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

initial load of WorldVistAEHR

File size: 1.5 KB
Line 
1FBAACO4 ;AISC/CMR-ENTER PAYMENT CONTINUED ;5/11/1999
2 ;;3.5;FEE BASIS;**4**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 S FBJ=0,FBDA=DA
5CORRF I $D(^FBAA(161.25,"AF",FBDA)) F S FBJ=$O(^FBAA(161.25,"AF",FBDA,FBJ)) Q:'FBJ S:'$D(FBAR(FBJ)) FBA(FBJ)=""
6 S FBJ=0 I $D(^FBAA(161.25,FBDA,0)) S FBJ=$P(^(0),"^",6) I $G(FBJ)]"",(FBJ'=FBDA) S:'$D(FBAR(FBJ)) FBA(FBJ)=""
7 S FBDA=0,FBDA=$O(FBA(FBDA)) Q:'FBDA S FBAR(FBDA)="" K FBA(FBDA) D CORRF
8 Q
9CHK ;Checks for payments against all linked vendors.
10 S FBDA=DA,FBAAOUT=0
11 S FBJ=0 F S FBJ=$O(FBAR(FBJ)) Q:'FBJ I $D(^FBAAC(DFN,FBJ,"AD")) S FBAACK1=1,DA=FBJ N FBAADT,FBAACPT,FBMOD D EN1^FBAAVS Q:$G(FBAAOUT) S DIR(0)="E" D ^DIR K DIR Q:'Y
12 I '$G(FBAACK1) W !!,"Vendor has no prior payments for this patient",!
13 S DA=FBDA Q
14CHK1 ;Checks for valid invoice selected from all linked vendors.
15 K FBAACK1
16 I $D(^FBAAC("C",X)) S FBJ=0 F S FBJ=$O(FBAR(FBJ)) Q:'FBJ D K X(1) I $G(FBAACK1) S FBV=FBJ Q
17 .I '$G(FBCNP) I $D(^FBAAC("C",X,DFN,FBJ)) S FBAACK1=1
18 .I $G(FBCNP) S X(1)=$O(^FBAAC("C",X,0)) I $D(^FBAAC("C",X,X(1),FBJ)) S FBAACK1=1
19 I '$G(FBAACK1) W !,*7,"That number not valid for this vendor!"
20 Q
21CHK2 ;Checks for duplicate payments on all linked vendors.
22 N FBMODL
23 S FBMODL=$$MODL^FBAAUTL4("FBMODA","I")
24 I $D(^FBAAC("AE",DFN,FBV,FBAADT,FBAACP_$S($G(FBMODL)]"":"-"_FBMODL,1:""))) S FBJ=FBV Q
25 S FBJ=0 F S FBJ=$O(FBAR(FBJ)) Q:$S('FBJ:1,$D(^FBAAC("AE",DFN,FBJ,FBAADT,FBAACP_$S($G(FBMODL)]"":"-"_FBMODL,1:""))):1,1:0)
26 Q
Note: See TracBrowser for help on using the repository browser.