Converting X12 EDI 835 to CSV

You can now convert X12 EDI 835/ERA transactions to the comma-separated values (CSV) format using our EDI conversion API or the CLI tool.

Stay ahead with our upcoming support for 837 claim transactions, a feature we will be adding shortly.

The API to convert EDI to CSV is similar to our “parse” API. You “post” EDI as text (or upload EDI files; see below) and get a “flattened” CSV representation of your 835/837 back.

The CLI works similarly; you need to specify the --mode csv option (the default output is JSON);

Here is an example of the CSV output (after importing it into Excel). The converter creates columns for each data element from 835. Here, we’re showing only a few columns; download the entire file to see all columns.

Payment Columns

By default, the conversion API creates a row for every service line and duplicates payment/claim level fields on every row:

Line Columns

You can instead convert the header-level and the line-level data separately using API parameters headerOnly=true or lineOnly=true. In this case, only the patient control number and the payer control number fields are repeated for each line for the line-level output:

Line Columns

The CLI converter creates two files by default, one for header-level and one for service line-level data. Use --single-csv option to produce a single file.

There are many repeating groups in 835/837. For example, a payment can have multiple adjustments. In this case, the converter creates a column with the index suffix for each item:

Repeating Columns

The converter repeats columns three or two times by default, depending on the EDI segment. This is configurable using our conversion schema settings (to be documented separately). The converter will create blank columns if needed to keep the CSV layout consistent.

In other words, the CSV will always contain the same number of columns irrespective of the EDI data.

The conversion API is highly performant and well-suited for converting large files. The output is streamed to the client as the EDI is being parsed. The converter parses EDI in “chunks” consisting of multiple EDI transactions. Once a chunk is parsed, it is converted to CSV, and the rows are sent back to the client.

You can also send files to the conversion API in the multipart/form-data encoded format. This allows for converting large files. You can upload and convert multiple files in one go.

The CLI tool supports converting multiple files with the -p option.