Lightning-fast EDI translator

Read large EDI files, split by loops or transactions, de-batch multiple transmissions, or extract data from corrupt files with a stream-based EDI parser.

  • Read EDI files into .NET objects
  • Supports batches and broken files
  • All readers are stream-based and async
  • Automatic splitting for large transactions
  • Automatic EDI delimiters detection
Parse EDI files to .NET objects
var stream = File.OpenRead(@"C:\ClaimPayment_837P.txt"); 
List<IEdiItem> ediItems;
using (var reader = new X12Reader(stream, "EdiFabric.Templates.Hipaa"))
{
    var items = await reader.ReadToEndAsync();
    ediItems = items.ToList();
}

var claims837P = ediItems.OfType<TS837P>();

See Examples X12 EDIFACT HL7 NCPDP SCRIPT

Intuitive EDI generator

Generate EDI files and batches and write them out to files or streams. Configurable EDI delimiters, EDI trailers, and/or postfixes are applied automatically.

  • Write .NET objects to EDI files
  • Supports batches and multiple interchanges
  • All writers are stream-based and async
  • Automatic trailers emission
  • Configurable EDI delimiters and line suffixes
Generate EDI files from .NET objects
var claim837P = new TS837P();
// build claim
var isa = new ISA();
// build ISA
var gs = new GS();
// build gs

using (var stream = new MemoryStream())
    using (var writer = new X12Writer(stream))
    {
        writer.Write(isa);
        writer.Write(gs);
        writer.Write(claim837P);
    }
See Examples X12 EDIFACT HL7 NCPDP SCRIPT

Adhere to any EDI format

Our EDI templates define a standard way for accessing and manipulating EDI transactions. All EDI templates are fully configurable to match any partner-specific requirement.

  • EDI messages are represented with C# models
  • C# models are classes annotated with our EDI attributes
  • Segments and elements are shared across versions
  • All class and property names can be renamed
  • All models can be modified to match any format
Ready to use C# EDI models
[Segment("NM1", typeof(X12_ID_98_18), typeof(X12_ID_1065))]
public class NM1_OrderingProviderName : NM1, I_NM1
{
    [Required]
    [DataElement("98", typeof(X12_ID_98_18))]
    [Pos(1)]
    public override string EntityIdentifierCode_01 { get; set; }

    [Required]
    [DataElement("1065", typeof(X12_ID_1065))]
    [Pos(2)]
    public override string EntityTypeQualifier_02 { get; set; }

See Examples X12 EDIFACT HIPAA EANCOM PNRGOV VDA

Comply with the standard EDI rules

Rigorous EDI validation to ensure EDI conforms to the agreed syntax rules. CAQH compliant HIPAA validation for all HIPAA SNIP levels. Generate TA1 997 999 or CONTRL

  • Validation rules based on attributes
  • All EDI models are compliant with their EDI standard
  • Get instant validation details for all EDI messages
  • Generate 997, 999, TA1, or CONTRL acknowledgments
  • Async validation that also works with split messages
Validate and acknowledge EDI files
var claims837P = ediItems.OfType<TS837P>();

foreach (var claim837P in claims837P)
{
    MessageErrorContext errorContext;
    if (!claim837P.IsValid(out errorContext))
    {
        var errors = errorContext.Flatten();
    }
}
See Examples X12 EDIFACT HL7 NCPDP SCRIPT

Export & import JSON, XML or CSV

Convert between EDI and XML using XmlSerializer, and between EDI and JSON using Newtonsoft.Json or System.Text.Json, or any serializer of your choice.

  • Export .NET objects to JSON using your favorite serializer
  • Export .NET objects to XML using your favorite serializer
  • Import into .NET objects from JSON
  • Import into .NET objects from XML
  • Write custom import/export to support custom CSV files
Export & import JSON and XML using the built-in .NET serializers
var stream = File.OpenRead(@"C:\ClaimPayment_837P.txt"); 
List<IEdiItem> ediItems;

using (var reader = new X12Reader(stream, "EdiFabric.Templates.Hipaa"))
{
    ediItems = reader.ReadToEnd().ToList();
}

var claims837P = ediItems.OfType<TS837P>();
foreach (var claim837P in claims837P)
{
    var json = Newtonsoft.Json.JsonConvert.SerializeObject(claim837P);
}
See Examples X12 EDIFACT HL7 NCPDP SCRIPT

Support for Entity Framework

All EDI templates for X12 and EDIFACT are fully prepared for use with Entity Framework to automatically create, query, and maintain databases.

  • All models are Entity Framework compatible
  • Use Entity Framework Migrations to create/update databases
  • DbContexts are included for X12, EDIFACT, and all HIPAA 5010 documents
EDI to database with Entity Framework
var stream = File.OpenRead(@"C:\ClaimPayment_837P.txt");           
using (var reader = new X12Reader(stream, "EdiFabric.Templates.Hipaa"))
    while(reader.Read()) {
        var claim837P = reader.Item as TS837P;
        if(claim837P != null) {
            using (var db = new HIPAA_5010_837P_Context()) {
                claim837P.ClearCache();
                db.TS837P.Add(claim837P);
                db.SaveChanges();
            }
        }
    }
See Examples X12 EDIFACT

Read and write flat files

Use the exact same principles as for EDI files when you need to work with delimited, positional, or mixed-mode files, such as CSV, VDA, ERP output, or vendor feeds.

  • Read flat and VDA files into .NET objects
  • Write .NET objects to flat and VDA files
  • Supports positional, delimited, or mixed-mode flat files
  • Automatic text padding at element or segment level
  • Data validation using the same attributes as EDI
Parse and generate flat files
var stream = File.OpenRead(@"C:\Flat_PO.txt");
using (var reader = new StreamReader(stream, Encoding.UTF8, true))
{
    using (var flatReader = new FlatReader(reader, typeof(FlatPO)))
    {
        var result = await flatReader.ReadToEndAsync();
    }
}

Keep up with new CPT or EDI codes

CPT codes are used to reflect the changes in health care, and new codes are developed for new services; current codes may be revised, and old, unused codes discarded.

  • Dynamically validate external EDI codes
  • No need to recompile or redeploy
  • Maintain partner-specific EDI codes
  • Support for HIPAA SNIP validation level types
  • Claims/benefits splitting to process large files
Validate external EDI or CPT codes
var codeSetMap = new Dictionary<string, List<string>>();
codeSetMap.Add("X12_ID_128", new List { "Code 1", "Code 2" });
var claims837P = ediItems.OfType<TS837P>();

foreach (var claim837P in claims837P)
{
    MessageErrorContext errorContext;
    if (!claim837P.IsValid(out errorContext, 
        new ValidationSettings { DataElementCodesMap = codeSetMap }))
    {
        var errors = errorContext.Flatten();
    }
}
See Examples X12 EDIFACT HL7 NCPDP SCRIPT

Get Started in No Time

All your EDI translation and validation operations in one place so you can reuse and attach them to any of your internal processes or solutions in a standard way.