Segments
-
The segment separator is always hex 1E
-
The first segment in a batch is always the 00 Header segment, which is fixed length without delimiters. It serves the same function as X12’s ISA.
-
The GIT segment that you see in TIBCO Foresight products is for requests. It contains the reference number from the G1 segment, plus the elements from the Request Header Segment QT. GIT is a TIBCO Foresight structure and is not part of the standard.
-
The GIR segment that you see in TIBCO Foresight products is for responses. It contains the reference number from the G1 segment, plus the elements from the Response Header Segment RT. GIR is a TIBCO Foresight structure and is not part of the standard.
Enveloping
The first segment in a batch is always the Transmission Header Segment, which serves the same purpose as the X12 ISA. It starts with hex 02 followed by the 00 segment identifier. It has fixed-length, required fields with no delimiters, and ends with hex 03.
Example (element IDs shown below):
Detail Segments
The G1 record starts with hex 02 followed by the segment ID G1 and then fixed-length, undelimited fields in the Request Header Segment or Response Header Segment. It ends with a hex 03.
The G1 record contains the application segments. These always start with the Segment Separator character hex 1E, followed by AM and then the segment ID.
Within a G1, segments after the 07 segment are in any order. Likewise, within a segment, elements can be in any order as long as mandatory elements come before optional elements.
One G1 record can contain up to four claims.
Trailer Segment
The trailer record starts with a hex 02 and ends with a hex 03. All elements are fixed length with no delimiters. It contains a batch number that should match the one in the 00 record, and a count of all 00, G1, and 99 records in the batch.