source: FOIAVistA/trunk/r/DRUG_ACCOUNTABILITY-PSA/PSABRKU5.m@ 666

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

initial load of FOIAVistA 6/30/08 version

File size: 1.1 KB
Line 
1PSABRKU5 ;BIR/DB-Upload and Process Prime Vendor Invoice Data - CONT'D ;7/23/97
2 ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**26,67**; 10/24/97;Build 15
3 ;This routine checks for correct X12 formating.
4 ;
5ORDER ; check order of code sheets
6 S PSANEXT=$P(PSADATA,"^")
7 ;
8 I PSALAST="GE",PSANEXT="GS" Q
9 I PSALAST="GE",PSANEXT'="IEA" D ORDERROR("GE",PSANEXT,"IEA") Q
10 ;
11 I PSALAST="ISA",PSANEXT'="GS" D ORDERROR("ISA",PSANEXT,"GS") Q
12 ;
13 I PSALAST="SE",PSANEXT="ST" Q
14 I PSALAST="SE",PSANEXT'="GE" D ORDERROR("SE",PSANEXT,"GE") Q
15 ;
16 I PSALAST="GS",PSANEXT'="ST" D ORDERROR("GS",PSANEXT,"ST") Q
17 ;
18 I PSALAST="CTT",PSANEXT'="SE" D ORDERROR("CTT",PSANEXT,"SE") Q
19 ;
20 I PSALAST="ST",PSANEXT'="BIG" D ORDERROR("ST",PSANEXT,"BIG") Q
21 ;
22 ;adding next two lines for new format
23 I PSALAST="IT1",PSANEXT="PID" Q
24 I PSALAST="PO4",PSANEXT'="IT1",PSANEXT'="CTT"&(PSANEXT'="TDS") D ORDERROR("PO4",PSANEXT,"CTT") Q
25 ;End of PSA*3*67 Changes
26 Q
27 ;
28ORDERROR(PSALAST,PSANEW,PSAEXPEC) ;Segments out of order
29 ;ISA segment should be first
30 I PSALAST="" S PSASEG="ORDER1" D MSG^PSABRKU8 Q
31 ;Segments other than ISA
32 S PSASEG="ORDER2" D MSG^PSABRKU8
33 Q
Note: See TracBrowser for help on using the repository browser.