EDI Analysis Report


The EDI analysis report is an XML document that is generated automatically by the Analyze method. It contains complete information about the transmission, including information about

The remainder of this section describes the structure of the analysis report and provides details about the format and content of each section in the report. It is organized as follows:

Document Root

The document root of the EDI analysis report is called AnalyzeReport. It has a single attribute that indicates the EDI dialect of the input document. For example:

<AnalyzeReport dialect="X12"> 

The AnalyzeRoot element contains two subelements – the Interchanges element and the Response element.

Interchanges Element

An interchange is an envelope for a set of EDI messages. The AnalyzeReport element contains a sequence of Interchange elements in which errors have been found. Interchange elements are grouped by a single Interchanges element. For example:

    <Interchanges>
        <Interchange  
		sequence="1"  
		implicit="false"  
		firstSegment="1"  
		lastSegment="11"  
		errors="false"  
		warnings="true"> 

Each Interchange element defines the following attributes:

Segments

Each Interchange element contains a Segments element, which includes header and trailer Segment elements, as well as a Segment element for any segment containing errors.

<Segments>
  <Segment segnum="1" header="true" segname="ISA"> 

Each Segment element defines the following attributes:

SegmentData

Each Segment element contains a SegmentData subelement. The specific contents of the SegmentData subelement varies based on the dialect of the EDI source being converted to XML. For an X12 EDI document, for example, the SegmentData sublement would contain an ISA element, with ISA01, ISA02, subelements, as shown here:

				<SegmentData> 
				   <IEA>
				     <IEA01><!--I16: Number of Included Functional-->1</IEA01>
				     <IEA02><!--I12: Interchange Control Number-->32123</IEA02>
				   </IEA>
				</SegmentData>  
Errors

Each Segment element can also contain an Errors subelement. The Errors subelement contains one or more Error subelements. For example:

<Errors>
 <Error severity="E">
  <ErrorCode>DDEE0008</ErrorCode>
  <NativeErrorCode>7</NativeErrorCode>
  <NativeErrorTable>723</NativeErrorTable>
  <SegmentName>BGN</SegmentName>
  <SegmentNumber>4</SegmentNumber>
  <Value>99</Value>
  <InvalidCharacter/>
  <Element>1</Element>
  <Repeat>1</Repeat>
  <SubElement/>
  <TriElement/>
  <Offset>4</Offset>
  <ElementName>353 (s)</ElementName>
  <Dialect>X12</Dialect>
  <SyntaxVersion>00403</SyntaxVersion>
  <MessageVersion>00403</MessageVersion>
  <CodeListVersion>004030</CodeListVersion>
  <SystemVersion/>
  <HeaderVersion/>
  <ControllingAgency>004030</ControllingAgency>
  <ErrorText>[DDEE0008] ERROR Value 99 not in codelist 353.
  Dialect: X12
  Version: syntax=00403/004030;codelist=004030/;message=
00403/004030;agency=004030
  Message: 831
  Segment: BGN (segment 4)
  Position: BGN01
  Element: 353 (s) Transaction Set Purpose Code
  Value: "99"
  Native error: 7, in table: 723

The value for an element in the data stream cannot be found 
in the codelist associated
with the element. Turning off codelist validation with 
"tbl=no" will eliminate the error.</ErrorText>
 </Error>
</Errors> 

The Error element defines a single attribute:

Each Error element can contain the following subelements. Note that if the element is empty, it is omitted from the report.

Groups

Each Interchange element also contains a Groups subelement, itself containing one or more Group elements. Each Group element defines the following attributes:

Segments

Each Group element contains a Segments element. See Segments for a description.

Messages

Each Group element contains a Messages element, itself containing one or more Message elements. Each Message element defines the following attributes:

Response Element

For EDI dialects for which transmission responses are supported (ATIS, EDIFACT, HIPAA, and X12), the Analyze method generates a Response element in the EDI analysis report. The Response element contains Receipt and Acknowledgement subelements :

<Response> 
 <Receipt>...</Receipt>
 <Acknowledgement>...</Acknowledgement>
</Response> 

The Receipt and Acknowledgement elements each contain a complete EDI message in XML format:

Receipt and Acknowledgement elements can be easily manipulated using .NET and then serialized to EDI for consumption by the EDI sender.

For EDI dialects for which transmission responses are not supported, the analysis report contains an empty Response element.

See Managing Transmission Responses for more information on this topic.