source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCHFPDT.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.7 KB
Line 
1PRCHFPDT ;WISC/RWS-FPDS SCREENS FOR FY89 ;12/20/96 2:02 PM
2V ;;5.1;IFCAP;**79**;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5 ;
6 ;This routine supports the collection of FPDS data for Purchase Card
7 ;and Delivery Orders users during a purchase order creation. It's
8 ;called from the input template [PRCHAMT89 NEW].
9 ;
10PREF ;Screen for Pref Prog. Codes
11 ;List possible 'PREF. PROGRAM' choices.
12 ;
13 W !!,"Possible Preference Program Codes: "
14 S I=0 F Y=149:0 S Y=$O(^PRCD(420.6,Y)) Q:Y="B" D I PRCHDISP'="N" D PREF2 I $T W:I "," W $P(^PRCD(420.6,Y,0),U,1) S I=I+1
15 . S PRCHDISP=$P(^PRCD(420.6,Y,0),U,5)
16 . Q
17 ;
18 ;Y = field # 1.2 'PREF. PROGRAM' -- the Y is set to jump back to template [PRCHAMT89 NEW] to proper field 1.2 rather than first field #1.2
19 ;
20 S Y="@12"
21 W ! K Z,Z1
22 Q
23 ;
24PREF2 ;Z2=COMPETITIVE STATUS/BUSINESS, Z1=PREFERENCE PROGRAM CODE, PRCHN("MB")=METHOD OF BUSINESS
25 S Z1=$P(^PRCD(420.6,Y,0),U,1),Z0=0
26 I $P(^PRCD(420.6,Y,0),U,3)'=PRCHDT G PREFQ
27 ;
28 ;Add new codes for the FPDS report to Austin: #170-#174, PRC*5.1*79.
29 I "^151^154^155^169^170^171^172^173^174^"'[Y G PREFQ
30 S Z2=$P($G(^PRCD(420.6,+$P(^PRC(442,DA(1),9,DA,0),U,4),0)),U,1)
31 ;if source code=5 & method of business=4 & comp stat/bus=Z4 then pref program code must be set to O i.e. none of the above.
32 I Z2["Y1","X1","K"'[Z1 G PREFQ ;new for PRC*5.1*79
33 I Z2["X",Z1="I" G PREFQ
34 ;if vendor size=1 show all pref programs, otherwise show only 'O'
35 I +PRCHN("MB")=1 S Z0=1 G PREFQ ;new for PRC*5.1*79
36 I "234"[+PRCHN("MB"),"O"[$E(Z1) S Z0=1 G PREFQ
37 ;
38PREFQ I Z0
39 K Z0,Z1
40 Q
41 ;
42BREAK ;Setting BREAKOUT CODE (# 442.16)
43 ;When Source Code=5, then Breakout/Socio.Gr. must be set to OO (161).
44 I PRCHSC=5 D Q
45 . S ^PRC(442,PRCHPO,9,DA,1,0)="^442.16PA^161^1"
46 . S ^PRC(442,PRCHPO,9,DA,1,161,0)=161
47 . S ^PRC(442,PRCHPO,9,DA,1,"B",161,161)=""
48 . Q
49 I $O(PRCHB(0)) S ^PRC(442,PRCHPO,9,DA,1,0)=PRCHB(0) F I=0:0 S I=$O(PRCHB(I)) Q:'I S ^PRC(442,PRCHPO,9,DA,1,I,0)=I,^PRC(442,PRCHPO,9,DA,1,"B",I,I)=""
50 S I=$P(^PRC(442,PRCHPO,9,DA,0),"^",2),PRCHN("TC")=$P($G(^PRCD(420.6,+I,0)),"^",1)
51 Q
52 ;
53COMP ;template [PRCHAMT89 NEW] calls COMP
54 ;List possible 'COMP. STATUS/BUSINESS' choices.
55 ;
56 W !!,"Possible Competitive Status/Business codes: "
57 S I=0 F Y=120:0 S Y=$O(^PRCD(420.6,Y)) Q:Y>132 D COMP2 I $T W:I "," W $P(^PRCD(420.6,Y,0),U,1) S I=I+1
58 ;
59 W ! K Z,Z1
60 Q
61COMP2 ;
62 S Z1=$P(^PRCD(420.6,Y,0),U,1),Z0=0 G COMPQ:$P(^(0),U,3)'=PRCHDT!(Y<121)!(Y>132)
63 ;if source code=5 business type=4 then add $$ amt in code index Z4 category.
64 I PRCHN("MB")[$E(Z1,2) S Z0=1
65 ;
66COMPQ I Z0
67 K Z0,Z1
68 Q
69CHK ; CHECK FOR VARIOUS COMBINATIONS OF 'SOCIOECONOMIC GROUP (FY89)' CODES IN VENDOR FILE.
70 K PRCHTO
71 I $P($G(^PRC(440,DA,1.1,0)),"^",3)="" G ERR ;See NOIS:V13-0802-N1396
72 F I=0:0 S I=$O(^PRC(440,DA,1.1,I)) Q:'I S PRCHTO(I)=""
73 I $D(PRCHTO(161)) K PRCHTO(161) I $O(PRCHTO(0)) W $C(7),!!,"You CANNOT have a Socioeconomic Group of OO--NONE OF THE OTHER CATEGORIES",!,"in combination with any other Socioeconomic Group",!,"RE-ENTER ALL!!!",! G ERR
74 I $D(PRCHTO(157)),$D(PRCHTO(153))!$D(PRCHTO(163))!$D(PRCHTO(164)) W $C(7),!!,"You CANNOT have the Socioeconomic Group of P--JAVITS-WAGNER-O'DAY",!,"in combination with any LARGE group",!,"RE-ENTER ALL!!!",! G ERR
75 I '$D(PRCHTO(162)),$D(PRCHTO(167)) W $C(7),!!,"Category RV--SERVICE-DISABLED VETERAN must also include S--VETERAN-OWNED SM BUSINESS",!,"RE-ENTER ALL!!!" G ERR
76 ;
77EX K PRCHTO,I
78 Q
79 ;
80ERR K ^PRC(440,DA,1.1) S Y=10
81 G EX
82 ;
83D1 ; DISPLAY BREAKOUT CODES BROUGHT FROM VENDOR FILE IN ROUTINE PREF (CALLED FROM INPUT TEMPLATE [PRCHAMT89 NEW])
84 S I=0 F J=1:1 S I=$O(^PRC(442,PRCHPO,9,DA,1,I)) Q:'I S X=$G(^PRCD(420.6,+I,0)) W:J=1 !!,"Following Socioeconomic Group Codes brought over from Vendor File:",! W ?5,$P(X,"^",1)_" "_$P(X,"^",2),!
85 Q
Note: See TracBrowser for help on using the repository browser.