HIPAA EDI Development Suite

EDI File Splitter

Split Large HIPAA EDI Files To Avoid Performance Issues

The libraries are proving to be invaluable to our project



Main Features

  • Split large HIPAA EDI files into smaller, more manageable ones
  • Split HIPAA files at the Envelope (ISA), Functional Group (GS),  or Transaction (ST) level
  • Specify how many Functional Groups or Transactions should go in each file
  • Customizable output filenames and extensions
  • Auto placement of segment, transaction and functional group counts in the SE, GE and IEA segments


It may be more efficient to process smaller HIPAA EDI files than a large one in some circumstances.  For example, with multiple files multi-threaded techniques can be employed to speed up overall load time. Some systems work faster with smaller files.  EDIFileSplitter is a high-speed multi-threaded splitter that can split on a Interchange (ISA), Functional Group (GS) or Transaction (ST) level.  The number of functional groups or transactions per file is configurable.

Memory usage is transient and does not depend on how much RAM is available.  Because input and output buffer sizes can be customized there are less IO calls and overall performance is increased.

Files can also be split in asynchronous mode.  An event is then thrown when the split operation is complete.

Output file names and extensions are customizable.  The current date can be appended to the name of each generated file.  The date string is guaranteed to be unique.

Auto Placement of Number of Segments, Transactions and Functional Headers

SE segments must contain the total amount of segments used within that specific header.  EDIFileSplitter will automatically keep a count of the number of segments used in the header and goes as far as to actually enter that data in the SE segment.  Additionally the number of ST transactions and GS Functional Groups are also tracked and added to the GE and IEA segments

The Code

EDIFileSplitter ediFileSplitter = new EDIFileSplitter();

// Split the file at the header level (ST segment)
ediFileSplitter.FileSplitLevel = FileSplitLevel.HEADER;

// Place 2 ST headers per file
ediFileSplitter.NumberOfItemsPerFile = 2;
ediFileSplitter.OnFileOperationCompleted += new EventHandler(splitter_OnFileOperationCompleted);

   string currentDirectory = Directory.GetCurrentDirectory();
   ediFileSplitter.Split("837P_2ST_SE_Loops.txt", currentDirectory);
catch (Exception ex)

private void splitter_OnFileOperationCompleted(object sender, FileOperationCompletedEventArgs e)
    if (e.Status != FileOperationStatus.Success)
       MessageBox.Show("Error splitting file", "Error");
    else if (e.Status == FileOperationStatus.Success)
       MessageBox.Show("File Split Success", "Success");

Example Usage with file

You may need to split a HIPAA EDI file into multiple files for a variety of reasons.  EDIFileSplitter can help you accomplish this quickly and efficiently.

The following HIPAA EDI file is an X12 837P EDI file that contains 2 ST headers.  This file can be split easily into two files with 1 ST header each.

Original EDI File

After using the EDIFileSplitter component the following two files are created:



There are now two separate files.  In this example we split the original file on the ST header with one ST header per file.

Take Charge Of HIPAA

RDPCrystal EDI Library