Convert EDI File to CSV

Arc allows you to easily embed document translation directly into your EDI integration. The following sample project demonstrates how different ports in Arc are used to automatically convert EDI files into CSV files. The included sample connector configuration aggregates the requested services and procedures from a health care eligibility benefit inquiry (EDI 270) into a single CSV file.

Drop in the Sample EDI File

To get started with the sample, download and install Arc (free 30-day trial). Then download the sample project and extract and copy the contents to the "data" folder in the installation location for Arc. For Windows installations, this is C:\Program Files\RSSBus\Arc by default. Please consult the documentation for the Java build of Arc in Linux/Unix/Mac installations.

Convert the EDI Document from X12 to XML

The X12_IN Connector is an X12 transform that validates EDI documents and converts the file data from X12 format to XML format. The sample package includes an X12 270 document (health care eligibility benefit inquiry). To translate documents manually, navigate to the Flows tab and click the X12_IN Connector in the workspace, then click the Input tab, select the document to translate, and click the Send button to process the file.

Manually Translating EDI Document(s) to XML Format

Configure Automation

To automate the translation, click on the X12 Connector and enable the Send option in the Automation Settings section, located at the bottom of the Settings tab. Then in the workspace of the Flows, select the blue circle from the left side of the X12 Connector and link it to the right side of the MAP_TO_FLAT_XML Connector. By doing so, Arc will automatically translate any X12 documents sent to the Input directory of the connector and the output XML will be moved to the next connector in the flow.

Configuring Automation for the X12 Port

Map Nested XML into Flat XML

The MAP_TO_FLAT_XML Connector provides a visual XML editor between two template files. In the sample package, the connector is configured to translate the nested elements from the XML-formatted EDI 270 document into a flat XML document for conversion into the final CSV file. This sample connector uses separate input.xml and output.xml files as the source and destination, respectively, to build the initial mapping. For more information on using Arc for XML mapping, you can refer to ourĀ Online Help documentation.

Configured Source and Destination Files for the XML Map Connector

Aggregate the Requested Services & Procedures to a CSV File

The CSV Connector maps the data in a flat XML document to a CSV file. This sample takes each requested service and procedure code, along with the other provided detals for provider, subscriber, and trace information, and stores them each as a separate row in the CSV file. The CSV Connector does not require template files, and will automatically apply the XML tags as headers to the output CSV file.

For the MAP_TO_FLAT_XML and CSV ports, the last thing to do is determine whether you wish to perform the aggregation manually or automatically. By default, the ports are already configured for automatic processing.

Configure Automation

To automate the aggregation, click on either the MAP_TO_FLAT_XML or CSV Connector, click the Settings tab, scroll down, and select the checkbox to enable automation. This will cause the connector to automatically map files placed in the Send folder.

Configuring Automation for a Transform Port

Perform Aggregation Manually

To perform the aggregation manually instead, disable the automation settings for the MAP_TO_FLAT_XML and CSV Connector. Then navigate to the MAP_TO_FLAT_XML or CSV Connector, click the Send tab, select the file(s) you wish to map, and click the Send button. With the ports connected in the Flows workspace, files will still be moved between ports.

Manually Send Files Through a Transform Port

More Information & Next Steps

As you can see, with Arc, it is possible to integrate data transformation into your EDI solution, easily aggregating data from an EDI document into a CSV file. For more information on Arc, visit our home page. Download your free, 30-day trial and start controlling your business document exchange today!

Download & Install Sample

Already running Arc? This sample will setup Arc with the data and connector configurations referenced in this article: