source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCOVRQ1.m@ 1742

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1PRCOVRQ1 ;WISC/DJM/DL/BGJ-IFCAP VRQ CHANGE ROUTINE ; 1/28/98 0900
2V ;;5.1;IFCAP;**30**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4UPDATE(VEN1,SITE) ;VEN1 = VENDOR INTERNAL ENTRY NUMBER
5 ;SITE = STATION NUMBER
6 N %,B,DATE,FY,GECSFMS,I,J,PS,MO,PAY,PAY1,PRCOVA,PRCOVN,PRCOVA3,PRCOVN3,SEQ,SSNT,ST,TIME,TRANS,VEND,X,Y,NAME
7 S (I,J)=0 F S I=$O(^PRC(411,I)) Q:I'>0 S J=J+1
8 I J=1 S I=$O(^PRC(411,0)) Q:I'=SITE
9 S PS=$O(^PRC(411,"AC","Y",0))
10 I PS="" W !,"There are "_J_" entries in your IFCAP SITE PARAMETER file.",!,"You need to set one as the PRIMARY STATION." Q
11 I J>1 S SITE=PS
12 S PRCOVN=$G(^PRC(440,VEN1,0)),PRCOVA=$G(^PRC(440.3,VEN1,0))
13 S PRCOVN3=$G(^PRC(440,VEN1,3)),PAY=$G(^PRC(440,VEN1,7))
14 S PRCOVA3=$G(^PRC(440.3,VEN1,3)) ;ORGINAL DATA BEFORE EDIT - USE TO SEE IF ENTRY WAS CHANGED
15 S PAY1=$G(^PRC(440.3,VEN1,7))
16 ;
17 G:PRCOVN3="" EXIT ;THERE IS NO DATA IN NODE 3 FOR THIS VENDOR--THIS USUALLY WILL NOT HAPPEN. CAN ONLY QUIT WITHOUT CREATING 'VRQ'
18 ;
19 G:PAY="" EXIT ;DON'T HAVE ANY PAYMENT ADDRESS INFORMATION--DON'T SEND 'VRQ'
20 ;
21 I $P(PRCOVN,U)'=$P(PRCOVA,U) G DOIT ;USER CHANGED VENDOR NAME
22 I $P(PRCOVN3,U,11)'=$P(PRCOVA3,U,11) G DOIT ;USER CHANGED 1099 VENDOR INDICATOR
23 I $P(PRCOVN3,U,13)'=$P(PRCOVA3,U,13) G DOIT ;USER CHANGED CENTERAL REMIT
24 I $P(PRCOVN3,U,14)'=$P(PRCOVA3,U,14) G DOIT ;USER CHANGED VENDOR TYPE
25 I $P(PAY,U,3)'=$P(PAY1,U,3) G DOIT ;USER CHANGED PAYMENT ADDRESS1
26 I $P(PAY,U,4)'=$P(PAY1,U,4) G DOIT ;USER CHANGED PAYMENT ADDRESS2
27 I $P(PAY,U,7)'=$P(PAY1,U,7) G DOIT ;USER CHANGED PAYMENT CITY
28 I $P(PAY,U,8)'=$P(PAY1,U,8) G DOIT ;USER CHANGED PAYMENT STATE
29 I $P(PAY,U,9)'=$P(PAY1,U,9) G DOIT ;USER CHANGED PAYMENT ZIP CODE
30 G EXIT ;USER DIDN'T CHANGE ANYTHING NEEDED TO CREAT A VENDOR REQUEST
31 ;
32DOIT S DIR("A")="DOES A VRQ NEED TO GO TO AUSTIN (YES/NO)",DIR("B")="NO",DIR(0)="Y" D ^DIR K DIR I $D(DIRUT)!(Y=0) Q
33 ;
34 K ^PRC(440.3,VEN1)
35 D NOW^%DTC S DATE=$P(%,"."),DATE=$E(DATE,2,7),TIME=$P(%,".",2)_"000000",TIME=$E(TIME,1,6)
36 S FY=$E($P(%,"."),2,3),MO=$E($P(%,U),4,5),FY=$E(100+$S(+MO>9:FY+1,1:FY),2,3)
37 K PRCFLN S X=SITE_"-"_FY_"-"_MO D COUNTER^PRCFACP S SEQ="000"_Y,SEQ=$E(SEQ,$L(SEQ)-3,99),TRANS=SITE_FY_MO_SEQ
38 S B="VRQ^"_DATE_"^"_TIME_"^"_SITE_"^"_VEN1_"^"_$P(PRCOVN3,U,4)_"^"_$S($P(PRCOVN3,U,5)]"":$P(PRCOVN3,U,5),1:"")
39 S NAME=$E($P(PRCOVN,U),1,30)
40 S B=B_"^"_NAME_"^"_$E($P(PAY,U,3),1,30)_"^"_$S($P(PAY,U,4)]"":$E($P(PAY,U,4),1,30),1:"")_"^"_$E($P(PAY,U,7),1,19)_"^"
41 S ST=$P(PAY,U,8) Q:ST="" S ST=$E($P($G(^DIC(5,ST,0)),U,2),1,2)
42 S B=B_ST_"^"_$TR($P(PAY,U,9),"-")_"^"
43 S SSNT=$S($P(PRCOVN3,U,9)]"":$P(PRCOVN3,U,9),1:"T")
44 S VEND=$S($P(PRCOVN3,U,11)]"":$P(PRCOVN3,U,11),1:"N") S:VEND="N" SSNT=""
45 S B=B_SSNT_"^"_VEND_"^"_$P(PRCOVN3,U,14)_"^N^C^~"
46 ;
47 W !,"Creating the FMS VENDOR REQUEST."
48 S $P(^PRC(440,VEN1,3),U,12)="P"
49 S DIR(0)="E"
50 S DIR("A")="Enter RETURN to continue"
51 D ^DIR
52 K DIR
53 W !
54 ;
55 D CONTROL^GECSUFMS("I",SITE,TRANS,"VR","","","","Vendor Request") ;REQUEST GENERIC CODE SHEET PACKAGE SET UP AN ENTRY IN FILE 2100.1
56 ;
57 D SETCS^GECSSTAA(GECSFMS("DA"),B) ;ENTER THE 'VRQ' SEGMENT INTO FILE 2100.1 RECORD CREATED IN PREVIOUS CALL
58 ;
59 D SETSTAT^GECSSTAA(GECSFMS("DA"),"Q") ;TELL GCS PACKAGE WHAT TO DO WITH THIS RECORD--'QUEUE' IT TO SEND THE NEXT TIME ANY FMS TRANSACTIONS ARE SENT TO AUSTIN
60 ;
61 Q
62EXIT ;USE THIS EXIT ONLY IF NO VRQ SHOULD BE CREATED
63 W !,"The system determined that no VRQ needed or could be created."
64 S DIR(0)="E"
65 S DIR("A")="Enter RETURN to continue"
66 D ^DIR
67 K DIR
68 Q
Note: See TracBrowser for help on using the repository browser.