source: FOIAVistA/trunk/r/FEE_BASIS-FB/FBMRASV1.m@ 1288

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

initial load of FOIAVistA 6/30/08 version

File size: 3.7 KB
Line 
1FBMRASV1 ;AISC/CMR-Server Routine for MRA Messages Cont'd;4/1/93 ;7/29/93 20:26
2 ;;3.5;FEE BASIS;;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4CHANGE ;Process Austin Change Record
5 ;if fbinc=fbinc1 then transaction was to update fms vendor file, nothing needs to be repointed, and since it is not a duplicate, vendor should not be deleted.
6 I FBSTN'=FBSN D
7 .N EC S (FBICN,FBOUT)=0,FBERR=1,EC="" D
8 ..F S FBICN=$O(^FBAAV("C",FBVID,FBICN)) Q:'FBICN!(FBOUT) D
9 ...Q:$P($G(^FBAAV(FBICN,"ADEL")),"^")="Y"
10 ...S EC="" I FBRT=4 Q:$P(^FBAAV(FBICN,0),U,7)'=3 Q:$P(^FBAAV(FBICN,0),U,10)'=FBCHAIN
11 ...I FBRT=1 Q:$P($G(^FBAAV(FBICN,0)),U,7)=3
12 ...I $E(FBVNAME,1,5)'=$E($P($G(^FBAAV(FBICN,"AMS")),U),1,5),'+$P($G(^FBAAV(FBICN,"ADEL")),U,4) S EC=4 Q
13 ...S FBCNT=FBCNT+1,FBOUT=1,FBERR=0 D FILEV^FBMRASVR
14 .I FBERR S:EC']"" EC=4.1 D ER^FBMRASV2(EC,FBJ,.FBER) S FBERR=0
15 Q:FBSTN'=FBSN
16 I FBSTN=FBSN D GET^FBMRASVR D:FBMRA']"" ER^FBMRASV2(5,FBJ,.FBER) Q:FBMRA']"" S FBICN1=FBICN,FBICN=$P(FBMRA,"^",6) I 'FBICN K FBICN1 Q
17 S FBCNT=FBCNT+1 D FILEV^FBMRASVR,DELMRA^FBMRASVR I FBICN']""!(FBICN=FBICN1) K FBICN1 Q
18REPOINT ;Re-point pointers to appropriate vendor entry.
19 I $D(^FBAAA("ACV",FBICN1)) S K=0 F S K=$O(^FBAAA("ACV",FBICN1,K)) Q:'K S FBJ=0 F S FBJ=$O(^FBAAA("ACV",FBICN1,K,FBJ)) Q:'FBJ S DIE="^FBAAA(K,1,",DA=FBJ,DA(1)=K,DR=".04////^S X=FBICN" D ^DIE K DIE
20 I $D(^FBAA(161.21,"C",FBICN1)) S FBJ=0 F S FBJ=$O(^FBAA(161.21,"C",FBICN1,FBJ)) Q:'FBJ S DIE="^FBAA(161.21,",DA=FBJ,DR=".04////^S X=FBICN" D ^DIE K DIE
21 I $D(^FBAAC("AB",FBICN1)) S FBK=0 F S FBK=$O(^FBAAC("AB",FBICN1,FBK)) Q:'FBK D
22 .L +^FBAAC(FBK)
23 .S FBOGN=0
24 .I '$D(^FBAAC(FBK,1,FBICN,0)) S DIC="^FBAAC(FBK,1,",DA(1)=FBK,(X,DINUM)=FBICN,DIC(0)="" D FILE^DICN
25 .F S FBOGN=$O(^FBAAC(FBK,1,FBICN1,1,FBOGN)) Q:'FBOGN K DD,DO S DIC="^FBAAC(FBK,1,FBICN,1,",DA(1)=FBICN,DA(2)=FBK,DIC(0)="",DIC("P")="162.02DA",X=$P(^FBAAC(FBK,1,FBICN1,1,FBOGN,0),"^") D FILE^DICN I +$P(Y,U,3) S FBNGN=+Y D
26 ..S %X="^FBAAC(FBK,1,FBICN1,1,FBOGN,",%Y="^FBAAC(FBK,1,FBICN,1,FBNGN," D %XY^%RCR
27 ..S DIK="^FBAAC(FBK,1,FBICN,1,",DA(2)=FBK,DA(1)=FBICN,DA=FBNGN D IX1^DIK K DIK
28 .S DIK="^FBAAC(FBK,1,",DA(1)=FBK,DA=FBICN1 D ^DIK K DIK L -^FBAAC(FBK)
29 I $D(^FBAA(162.1,"AN",FBICN1)) S FBJ=0 F S FBJ=$O(^FBAA(162.1,"AN",FBICN1,FBJ)) Q:'FBJ S DIE="^FBAA(162.1,",DA=FBJ,DR="3////^S X=FBICN" D
30 .D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FBAA(162.1,DA)
31 .K DIE,FBLOCK
32 I $D(^FBAA(162.2,"C",FBICN1)) S FBJ=0 D
33 .F S FBJ=$O(^FBAA(162.2,"C",FBICN1,FBJ)) Q:'FBJ S DIE="^FBAA(162.2,",DA=FBJ,DR="1////^S X=FBICN" D
34 ..D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FBAA(162.2,DA)
35 ..K FBLOCK S DIE="^FBAA(161.5," D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FBAA(161.5,DA)
36 ..K DIE,FBLOCK
37 I $D(^FBAACNH("AH",FBICN1)) S FBJ=0 F S FBJ=$O(^FBAACNH("AH",FBICN1,FBJ)) Q:'FBJ S DIE="^FBAACNH(",DA=FBJ,DR="8////^S X=FBICN" D
38 .D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FBAACNH(DA)
39 .K DIE,FBLOCK
40 I $D(^FB7078("C",FBICN1_";FBAAV(")) S FBJ=0 D
41 .F S FBJ=$O(^FB7078("C",FBICN1_";FBAAV(",FBJ)) Q:'FBJ S DIE="^FB7078(",DA=FBJ,FBTMP=FBICN_";FBAAV(",DR="1////^S X=FBTMP" D
42 ..D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FB7078(DA)
43 ..K DIE,FBLOCK,FBTMP
44 I $D(^FBAAI("C",FBICN1)) S FBJ=0 F S FBJ=$O(^FBAAI("C",FBICN1,FBJ)) Q:'FBJ S DIE="^FBAAI(",DA=FBJ,DR="2////^S X=FBICN" D
45 .D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FBAAI(DA)
46 .K DIE,FBLOCK
47 I $D(^FB583("C",FBICN1)) S FBJ=0,FBCHK=";FBAAV(" F S FBJ=$O(^FB583("C",FBICN1,FBJ)) Q:'FBJ S DIE="^FB583(",DA=FBJ,DR="1////^S X=FBICN" S:$P($G(^FB583(FBJ,0)),"^",23)=(FBICN1_FBCHK) DR=DR_";23////^S X=FBICN_FBCHK" D
48 .D LOCK^FBUCUTL(DIE,DA,1) I FBLOCK D ^DIE L -^FB583(DA)
49 .K DIE,FBLOCK
50 ;Delete second vendor from vendor file.
51 K DIC,DA
52 S DIK="^FBAAV(",DA=FBICN1 D ^DIK K DIK,FBICN1
53 Q
Note: See TracBrowser for help on using the repository browser.