static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Read NCPDP file to the end ReadNCPDPFileToEnd.Run(); ReadNCPDPFileToEndAsync.Run(); // Read one item at a time ReadNCPDPFileStreaming.Run(); ReadNCPDPFileStreamingAsync.Run(); // Read using partner-specific template (inherited) ReadNCPDPFileWithInheritedTemplate.Run(); // Read using dynamic template resolution ReadNCPDPFileWithTemplateResolution.RunWithAssemblyFactory(); ReadNCPDPFileWithTemplateResolution.RunWithTypeFactory(); // Read NCPDP file with corrupt transmission header ReadNCPDPFileCorrupt.Run(); // Read NCPDP file with corrupt G1 ReadNCPDPFileCorrupt.Run2(); // Split transactions to repeating loops ReadNCPDPFileSplitting.Run(); // Read NCPDP file with batches of B1 and RESPONSE ReadNCPDPFileToEndWithResponse.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Write EDI to stream and then to string or file WriteEDIToStream.Run(); WriteEDIToStreamAsync.Run(); // Write EDI directly to file WriteEDIToFile.Run(); // Write EDI with custom delimiters (this includes all delimiters set in ISA) WriteEDIWithCustomDelimiters.Run(); // Write EDI with postfix (such as new line) after each segment WriteEDIWithNewLines.Run(); // Write batches WriteEDITransactionBatch.Run(); WriteEDIGroupBatch.Run(); WriteEDIInterchangeBatch.Run(); // Retain trailing data element delimiters for empty data elements WriteEDIWithEmptyDataElements.Run(); // Write transaction only WriteEDITransactionOnly.Run(); // Turn auto-trailers off WriteEDIWithoutAutoTrailers.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Read EDI file to the end ReadEDIFileToEnd.Run(); ReadEDIFileToEndAsync.Run(); // Read one item at a time ReadEDIFileStreaming.Run(); ReadEDIFileStreamingAsync.Run(); // Read batches of transactions ReadEDIFileBatch.Run(); // Split transactions to repeating loops ReadEDIFileSplitting.Run(); ReadEDIFileSplitting.RunWithCopy(); // Read EDI files with issues ReadEDIFileCorrupt.Run(); ReadEDIFileWithErrors.Run(); // Read transaction only ReadEDIFileTransactionOnly.Run(); // Read using partner-specific template (inherited) ReadEDIFileWithInheritedTemplate.Run(); // Read using dynamic template resolution ReadEDIFileWithTemplateResolution.RunWithAssemblyFactory(); ReadEDIFileWithTemplateResolution.RunWithTypeFactory(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Write NCPDP to stream and then to string or file WriteNCPDPToStream.Run(); WriteNCPDPToStreamAsync.Run(); // Write NCPDP directly to file WriteNCPDPToFile.Run(); // Write NCPDP with custom delimiters WriteNCPDPWithCustomDelimiters.Run(); // Write NCPDP with postfix (such as new line) after each segment WriteNCPDPWithNewLines.Run(); // Write batches WriteNCPDPBatch.Run1(); WriteNCPDPBatch.Run2(); // Retain trailing data element delimiters for empty data elements WriteNCPDPWithEmptyDataElements.Run(); // Write transaction only WriteNCPDPTransactionOnly.Run(); // Turn auto-trailers off WriteNCPDPWithoutAutoTrailers.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Validate custom EDI codes //ValidateCustomEDICodes.Run(); //ValidateCustomEDICodes.Run2(); // Validate transactions after reading ValidateEDITransationsAfterRead.Run(); // Validate transactions before writing them out ValidateEDITransationsBeforeWrite.Run(); // Validate transactions with custom code ValidateEDITransationsWithCustomCode.Run(); // Validate data element alpha and alphanumeric data types ValidateDataElementTypes.Basic(); ValidateDataElementTypes.Extended(); // Validate control segments, ISA and GS ValidateISAorGS.Run(); // Validate sample transactions Validate810.Run(); Validate850.Run(); Validate837P.Run(); // Validate async ValidateEDITransationsAsync.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Validate custom NCPDP codes ValidateCustomNCPDPCodes.Run(); ValidateCustomNCPDPCodes.Run2(); // Validate transactions ValidateNCPDPTransations.Run(); // Validate transactions with custom code ValidateNCPDPTransationsWithCustomCode.Run(); // Validate data element alpha and alphanumeric data types ValidateDataElementTypes.Unoa(); ValidateDataElementTypes.Unob(); // Validate control segment TransmissionHeader ValidateUIB.Run(); // Validate async ValidateNCPDPTransationsAsync.Run(); // Validate before writing ValidateEDITransationsBeforeWrite.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Write EDI to stream and then to string or file WriteHL7ToStream.Run(); WriteHL7ToStreamAsync.Run(); // Write EDI directly to file WriteHL7ToFile.Run(); // Write EDI with custom delimiters (this includes all delimiters set in ISA) WriteHL7WithCustomDelimiters.Run(); // Write EDI with postfix (such as new line) after each segment //WriteHL7WithNewLines.Run(); // Write batches WriteHL7Batch.Run1(); WriteHL7Batch.Run2(); WriteHL7BHSBatch.Run(); WriteHL7FHSBatch.Run(); // Retain trailing data element delimiters for empty data elements WriteHL7WithEmptyDataElements.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Validate custom EDI codes ValidateCustomEDICodes.Run(); ValidateCustomEDICodes.Run2(); // Validate transactions after reading ValidateEDITransationsAfterRead.Run(); // Validate transactions before writing them out ValidateEDITransationsBeforeWrite.Run(); // Validate transactions with custom code ValidateEDITransationsWithCustomCode.Run(); // Validate data element alpha and alphanumeric data types ValidateDataElementTypes.Unoa(); ValidateDataElementTypes.Unob(); // Validate control segments, UNB and UNG ValidateUNBorUNG.Run(); // Validate sample transactions ValidateINVOIC.Run(); ValidateORDERS.Run(); // Validate async ValidateEDITransationsAsync.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); ReadVDA.Run(); ReadVDABatch.Run(); ReadVDAAsync.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); Read(); Write(); EVVExample.Read(); EVVExample.Write(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Serialize to JSON SerializeToJson.Run(); // Deserialize from JSON DeserializeFromJson.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Map using XSLT EDIToCustomObjectWithXslt.Run(); // Map using AutoMapper EDIToCustomObjectWithAutoMapper.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Parse ORDERS ParsePO(@"\..\..\..\Files\EDIFACT\PurchaseOrder.txt"); // Parse modified ORDERS ParseModifiedPO(@"\..\..\..\Files\EDIFACT\PurchaseOrderModified.txt"); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Export to custom CSV ExportToCsv.Run(); // Import from custom CSV ImportFromCsv.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Parse 850 ParsePO(@"\..\..\..\Files\X12\PurchaseOrder.txt"); // Parse modified 850 ParseModifiedPO(@"\..\..\..\Files\X12\PurchaseOrderModified.txt"); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Save purchase order to DB. This will automatically create a DB structure for the full D96A version the first time it is executed. // NOTE: edit the connection string in app.config, by default it looks for a local SQL Server instance SaveToDb.Run(); // Pull the latest purchase order from the DB PullFromDb.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Serialize to XML SerializeToXml.WithXmlSerializer(); SerializeToXml.WithDataContractSerializer(); // Deserialize from XML DeserializeFromXml.WithXmlSerializer(); DeserializeFromXml.WithDataContractSerializer(); }
static void Main(string[] args) { // Translator Demo // Supported versions/transactions are: // NCPDP Telecommunications D.0, all classes that begin with TS in namespace EdiFabric.Templates.Ncpdp // If you need a different NCPDP version or transaction, please contact us at https://support.edifabric.com/hc/en-us/requests/new, EdiFabric supports all versions and transactions for NCPDP. SerialKey.Set(Common.SerialKey.Get()); Translate_NCPDP_D0(); }
static void Main(string[] args) { // Translator Demo // Supported versions/transactions are: // HL7 2.6, all classes that begin with TS in namespace EdiFabric.Templates.HL726 // If you need a different HL7 version or transaction, please contact us at https://support.edifabric.com/hc/en-us/requests/new, EdiFabric supports all versions and transactions for HL7. SerialKey.Set(Common.SerialKey.Get()); Translate_HL7_26(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Write EDI to stream and then to string or file WriteNCPDPToStream.Run(); WriteNCPDPToStreamAsync.Run(); // Write EDI directly to file WriteNCPDPToFile.Run(); // Write batches WriteNCPDPBatch.Run1(); WriteNCPDPBatch.Run2(); }
static void Main(string[] args) { // Translator Demo // Supported versions/transactions are: // X12 004010, all classes that begin with TS in namespace EdiFabric.Templates.X12004010 // HIPAA 005010, all classes that begin with TS in namespace EdiFabric.Templates.Hipaa5010 // If you need a different X12 version or transaction, please contact us at https://support.edifabric.com/hc/en-us/requests/new, EdiFabric supports all versions and transactions for X12/HIPAA. SerialKey.Set(Common.SerialKey.Get()); Translate_HIPAA_5010(); Translate_X12_4010(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Read HL7 file to the end ReadHL7FileToEnd.Run(); ReadHL7FileToEndAsync.Run(); // Read one item at a time ReadHL7FileStreaming.Run(); ReadHL7FileStreamingAsync.Run(); // Read batches of transactions ReadHL7FileBatch.Run(); // Split transactions to repeating loops ReadHL7FileSplitting.Run(); ReadHL7FileSplitting.RunWithCopy(); // Read HL7 files with issues ReadHL7FileCorrupt.Run(); // Read using partner-specific template (inherited) ReadHL7FileWithInheritedTemplate.Run(); // Read using dynamic template resolution ReadHL7FileWithTemplateResolution.RunWithAssemblyFactory(); ReadHL7FileWithTemplateResolution.RunWithTypeFactory(); // Read file with ADD segments ReadHL7FileWithADD.Run(); // Read file with unlimited number of repeating data element in the last position ReadHL7FileWithQPD.Run(); // Read file with continuation started ReadHL7FileWithDSC.Run(); // Read file with continuation to a DSC // Placeholder segment HXX is not parsed or validated ReadHL7FileWithADDandDSC.Run(); // Read file with escaped delimiters ReadHL7FileWithEscapedDelimiters.Run(); // Read with custom FHS or BHS ReadHL7FileWithCustomFHSorBHS.Run(); }
static void Main(string[] args) { // Translator Demo // Supported versions/transactions are: // EDIFACT D96A, all classes that begin with TS in namespace EdiFabric.Templates.EdifactD96A // Custom CUSCAR and PAXLST version EDIFACT D03B for US Customs, the classes are TSCUSCAR and TSPAXLST in namespace EdiFabric.Templates.EdifactD03B // Custom BAPLIE version EDIFACT D13B for SMDG, the class is TSBAPLIE in namespace EdiFabric.Templates.EdifactD13B // INVOIC EANCOM D01B Syntax 3, the class is TSINVOIC in namespace EdiFabric.Templates.EancomD01B // If you need a different EDIFACT/EANCOM version or transaction, please contact us at https://support.edifabric.com/hc/en-us/requests/new, EdiFabric supports all versions and transaction for EDIFACT/EANCOM. SerialKey.Set(Common.SerialKey.Get()); // Change the path to point to your own file to test with var path = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\Edifact\PurchaseOrders.txt"); List <IEdiItem> ediItems; using (var reader = new EdifactReader(path, "EdiFabric.Templates.Edifact", new EdifactReaderSettings { ContinueOnError = true })) ediItems = reader.ReadToEnd().ToList(); foreach (var message in ediItems.OfType <EdiMessage>()) { if (!message.HasErrors) { // Message was successfully parsed MessageErrorContext mec; if (message.IsValid(out mec)) { // Message was successfully validated } else { // Message failed validation with the following validation issues: var validationIssues = mec.Flatten(); } } else { // Message was partially parsed with errors } } } // Add a breakpoint here, run in debug mode and inspect ediItems
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Generate CONTRL for valid group GenerateValidCONTRL.Run(); // Generate CONTRL for invalid group GenerateInvalidCONTRL.Run(); // Generate CONTRL for duplicates GenerateCONTRLForDuplicateTransaction.Run(); GenerateCONTRLForDuplicateGroup.Run(); GenerateCONTRLForDuplicateInterchange.Run(); // Generate CONTRL with explicit control numbers GenerateCONTRLWithCustomControlNumbers.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); var path = Directory.GetCurrentDirectory() + @"\..\..\..\Files\Hipaa\ClaimPayment.txt"; Stream ediStream = File.OpenRead(path); List <IEdiItem> ediItems; using (var ediReader = new X12Reader(ediStream)) ediItems = ediReader.ReadToEnd().ToList(); var tran = ediItems.OfType <TS837P>().Single(); Save837P(tran); var edi = Pull837P(ediItems); Console.ReadKey(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); // Validate custom EDI codes ValidateCustomHL7Codes.Run(); ValidateCustomHL7Codes.Run2(); // Validate transactions ValidateHL7Transations.Run(); // Validate transactions with custom code ValidateHL7TransationsWithCustomCode.Run(); // Validate data element alpha and alphanumeric data types ValidateDataElementTypes.Default(); // Validate control segments, FHS and BHS ValidateFHSorBHS.Run(); // Validate async ValidateHL7TransationsAsync.Run(); }
static void Main(string[] args) { SerialKey.Set(Common.SerialKey.Get()); WriteCSVFile.Run(); WriteCSVFileAsync.Run(); }
static void Main(string[] args) { SerialKey.Set(EDIFACT.Common.SerialKey.Get()); Read(); Write(); }