EDI Tools for .NET is a NuGet package that can be easily installed from Visual Studio or Code or added to a project as a DLL reference. .NET 5.0, .NET Core and .NET Framework are supported.
Add the EDI templates (provided as C# files) for the EDI messages you need to use, like 850, 210, 837P, to a project. Configure them to match any partner-specific requirements.
Translate, validate, and acknowledge X12, HIPAA, EDIFACT, HL7, NCPDP, VDA, or flat files. Use Web EDI to view EDI files and create documentation for all EDI formats to share with partners.
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>();
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); }
var stream = File.OpenRead(@"C:\ClaimPayment_837P.txt"); using (var ediReader = new X12Reader(stream, (ISA isa, GS gs, ST st) => typeof(TS837P).GetTypeInfo(), new X12ReaderSettings { Split = true })) { while (ediReader.Read()) { var claim837P = ediReader.Item as TS837P; } }
var claims837P = ediItems.OfType<TS837P>(); foreach (var claim837P in claims837P) { MessageErrorContext errorContext; if (!claim837P.IsValid(out errorContext)) { var errors = errorContext.Flatten(); } }
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); }
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) { XDocument xml = claims837P.Serialize(); }
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(); } } }