source: WorldVistAEHR/trunk/r/DRUG_ACCOUNTABILITY-PSA/PSABRKU5.m@ 660

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

revised back to 6/30/08 version

File size: 1.3 KB
Line 
1PSABRKU5 ;BIR/JMB-Upload and Process Prime Vendor Invoice Data - CONT'D ;7/23/97
2 ;;3.0; DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**26**; 10/24/97
3 ;This routine checks for correct X12 formating.
4 ;
5ORDER ; check order of code sheets
6 ; isa <--------------+
7 ; gs <----------+ |
8 ; st <------+ | |
9 ; | big | | |
10 ; | it1 <--+ | | |
11 ; | ... | | | |--repeats
12 ; | it1 <--+ | | |
13 ; | ctt | | |
14 ; se <------+ | |
15 ; ge <----------+ |
16 ; iea <--------------+
17 S PSANEXT=$P(PSADATA,"^")
18 ;
19 I PSALAST="GE",PSANEXT="GS" Q
20 I PSALAST="GE",PSANEXT'="IEA" D ORDERROR("GE",PSANEXT,"IEA") Q
21 ;
22 I PSALAST="ISA",PSANEXT'="GS" D ORDERROR("ISA",PSANEXT,"GS") Q
23 ;
24 I PSALAST="SE",PSANEXT="ST" Q
25 I PSALAST="SE",PSANEXT'="GE" D ORDERROR("SE",PSANEXT,"GE") Q
26 ;
27 I PSALAST="GS",PSANEXT'="ST" D ORDERROR("GS",PSANEXT,"ST") Q
28 ;
29 I PSALAST="CTT",PSANEXT'="SE" D ORDERROR("CTT",PSANEXT,"SE") Q
30 ;
31 I PSALAST="ST",PSANEXT'="BIG" D ORDERROR("ST",PSANEXT,"BIG") Q
32 ;
33 I PSALAST="IT1",PSANEXT="IT1" Q
34 I PSALAST="IT1",PSANEXT'="CTT"&(PSANEXT'="TDS") D ORDERROR("IT1",PSANEXT,"CTT") Q
35 Q
36 ;
37ORDERROR(PSALAST,PSANEW,PSAEXPEC) ;Segments out of order
38 ;ISA segment should be first
39 I PSALAST="" S PSASEG="ORDER1" D MSG^PSABRKU8 Q
40 ;Segments other than ISA
41 S PSASEG="ORDER2" D MSG^PSABRKU8
42 Q
Note: See TracBrowser for help on using the repository browser.