source: WorldVistAEHR/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCHAMXG.m@ 1154

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

initial load of WorldVistAEHR

File size: 3.4 KB
RevLine 
[613]1PRCHAMXG ;WISC/DJM-'CHANGES' ROUTINE #7 FOR 443.6 ;1/5/95 8:28 AM
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 ;****NOTE-See PRCHAMXA for information on variable PRCHNORE and
6 ;incidence or undefined DIK variable errors.
7 ;
8EN1 ;SAVES 'FEDERAL SUPPLY CLASSIFICATION' IN 'ITEM' MULTIPLE
9 N FF,PRCHDA1,RECORD,Y
10 S PRCHDA1=DA(1),RECORD=DA,FF="8;443.61:40"
11 D SAVE(FF,PRCHDA1,RECORD)
12 Q
13 ;
14EN2 ;SAVES 'DRUG TYPE CODE' IN 'ITEM' MULTIPLE
15 N FF,PRCHDA1,RECORD,Y
16 S PRCHDA1=DA(1),RECORD=DA,FF="40;443.61:40"
17 D SAVE(FF,PRCHDA1,RECORD)
18 Q
19 ;
20EN3 ;SAVES 'FOOD GROUP' IN 'ITEM' MULTIPLE
21 N FF,PRCHDA1,RECORD,Y
22 S PRCHDA1=DA(1),RECORD=DA,FF="41;443.61:40"
23 D SAVE(FF,PRCHDA1,RECORD)
24 Q
25 ;
26EN4 ;SAVES 'DIETETIC CONVERSION FACTOR' IN 'ITEM' MULTIPLE
27 N FF,PRCHDA1,RECORD,Y
28 S PRCHDA1=DA(1),RECORD=DA,FF="42;443.61:40"
29 D SAVE(FF,PRCHDA1,RECORD)
30 Q
31 ;
32EN5 ;SAVES 'CONTRACT #' IN 'ITEM' MULTIPLE
33 N FF,PRCHDA1,RECORD,Y
34 S PRCHDA1=DA(1),RECORD=DA,FF="4;443.61:40"
35 D SAVE(FF,PRCHDA1,RECORD)
36 Q
37 ;
38EN6 ;SAVES 'BACKORDER(EDI)' IN 'ITEM' MULTIPLE
39 N FF,PRCHDA1,RECORD,Y
40 S PRCHDA1=DA(1),RECORD=DA,FF="36.3;443.61:40"
41 D SAVE(FF,PRCHDA1,RECORD)
42 Q
43 ;
44EN7 ;SAVES 'SUBSTITUTE(EDI)' IN 'ITEM' MULTIPLE
45 N FF,PRCHDA1,RECORD,Y
46 S PRCHDA1=DA(1),RECORD=DA,FF="36.6;443.61:40"
47 D SAVE(FF,PRCHDA1,RECORD)
48 Q
49 ;
50EN8 ;SAVES 'CHANGES' INFORMATION FOR 'PROMPT PAYMENT TERMS' MULTIPLE, 'PROMPT PAYMENT PERCENT'
51 N FF,PRCHDA1,RECORD,Y
52 S PRCHDA1=DA(1),RECORD=DA,FF=".01;443.66:9.2"
53 D SAVE(FF,PRCHDA1,RECORD)
54 Q
55 ;
56EN9 ;SAVES 'DISCOUNT ITEM' IN 'DISCOUNT' MULTIPLE
57 N FF,PRCHDA1,RECORD,Y
58 S PRCHDA1=DA(1),RECORD=DA,FF=".01;443.63:14"
59 D SAVE(FF,PRCHDA1,RECORD)
60 Q
61 ;
62EN10 ;SAVES 'PERCENT/DOLLAR AMOUNT' IN 'DISCOUNT' MULTIPLE
63 N FF,PRCHDA1,RECORD,Y
64 S PRCHDA1=DA(1),RECORD=DA,FF="1;443.63:14"
65 D SAVE(FF,PRCHDA1,RECORD)
66 Q
67 ;
68EN11 ;SAVES 'ADMINISTRATIVE CERTIFICATIONS'
69 N FF,PRCHDA1,RECORD,Y
70 S PRCHDA1=DA(1),RECORD=DA,FF=".01;443.624:24"
71 D SAVE(FF,PRCHDA1,RECORD)
72 Q
73 ;
74EN12 ;SAVES 'DESCRIPTION' MULTIPLE WITHIN 'ITEM' MULTIPLE
75 N FF,PRCHDA1,RECORD,Y
76 S PRCHDA1=DA(1),RECORD=DA,FF="1;443.61;40"
77 D SAVE(FF,PRCHDA1,RECORD)
78 Q
79 ;
80SAVE(FF,PRCHDA1,RECORD) ;THIS WILL DO THE ACTUAL SAVING OF THE INFORMATION.
81 ;'PRCHAM' IS DEFINED FROM AMENDMENT ROUTINES.
82 ;IT IS THE 'AMENDMENT' FIELD'S RECORD NUMBER FOR THE AMENDMENT THAT
83 ;IS BEING ENTERED.
84 ;'PRCHAMDA' IS THE INTERNAL # OF THE AMENDMENT TYPE BEING USED, FROM
85 ;FILE 442.2 OR FILE 441.6.
86 N PRCHDA,OLD,F2NUMBER,ALREADY,DS,DIFLD,DIP,D,D0,D1,D2,DIG,DIH,DISYS,DIU,DIV,J,L,DH,DU,DV,DW,DOV,DIOV
87 S F2NUMBER=0,ALREADY=$O(^PRC(443.6,"C",PRCHDA1,PRCHAM,FF,RECORD,F2NUMBER,0))
88 Q:ALREADY>0 ;CHECK IF THIS FIELD HAS ALREADY BEEN ENTERED. ONLY THE FIRST ENTRY IS NEEDED.
89 S PRCHDA="",OLD=0
90 N DA,X
91 D NEXT(PRCHDA1,PRCHAM,.PRCHDA)
92 N DIE,DC,DD,DE,DG,DI,DIEL,DK,DL,DM,DO,DP,DQ,DR
93 S DA(2)=PRCHDA1,DA(1)=PRCHAM,DA=PRCHDA,DIE="^PRC(443.6,"_DA(2)_",6,"_DA(1)_",3,"
94 S DR="1////^S X=PRCHAMDA;2////^S X=FF;3///^S X=OLD;4///^S X=RECORD;7////^S X=F2NUMBER" D ^DIE
95 Q
96 ;
97NEXT(DA,DA1,DA2) ;COME HERE TO CREATE THE NEXT ENTRY IN THE 'CHANGES' MULTIPLE.
98 ;DA2 IS RETURNED WITH THE 'CHANGES' INTERNAL RECORD NUMBER.
99 N AA,BB,DIC,DD,DINUM,DO,X,Y
100 S AA=$G(^PRC(443.6,DA,6,DA1,3,0)) I AA="" S AA=1,^PRC(443.6,DA,6,DA1,3,0)="^"_$P(^DD(443.67,14,0),"^",2) G ENTER
101 S AA=$P(AA,U,3)
102FIND S AA=AA+1,BB=$G(^PRC(443.6,DA,6,DA1,3,AA,0)) I BB'="" G FIND
103ENTER K DD,DO S DA(2)=DA,DA(1)=DA1,DIC="^PRC(443.6,"_DA(2)_",6,"_DA(1)_",3,",DIC(0)="L",(DINUM,X)=AA D FILE^DICN G:+Y'>0 FIND
104 S DA2=+Y Q
Note: See TracBrowser for help on using the repository browser.