X12 & HIPAA files
The version is the last element in the GS segment or the ST segment. When present, the version in the ST segment takes precedence.
EDIFACT & EANCOM files
The version is the combination of the edition and the release component elements following the message type in the UNH segment.
To be able to read VICS files, ensure that when you use type load factory match the version with StartsWith() rather than an exact match.
if (gs.VersionAndRelease_8 == "004010" && st.TransactionSetIdentifierCode_01 == "850")
if (gs.VersionAndRelease_8.StartsWith("004010") && st.TransactionSetIdentifierCode_01 == "850")
This ensures that EDI files with versions specified as:
will still be picked up by the type factory.
When you use the assembly factory, ensure that there is a message attributed with the exact VICS version in a separate project. Additional info on how to modify EDI templates.
If you have this in your project:
Create a new class for the VICS version of the template:
No. To generate EDI acknowledgments all EDI items need to be published to AckMan. This includes error contexts, control segments, and EDI transactions.
You don't need to invoke IsValid() again for any of the EDI transactions that were either returned as Message by AckMan in the MessageHandler or were originally published to AckMan. The validation had already been done and the handler also provides the extra information of whether the transaction is part of a duplicate functional group or interchange.
To create a custom UNH do the following:
- Inherit your new UNH from UNH in EdiFabric.Core
- Customize your new UNH, e.g. add new properties, etc.
- In the EDI template(s) change the reference of the segment in position one to point to the new UNH.
To create a custom ST do the following:
- Inherit your new ST from ST in EdiFabric.Core
- Customize your new ST, e.g. add new properties, etc.
- In the EDI template(s) change the reference of the segment in position one to point to the new ST.
The parser always requires UNH and ST to either be referenced from the shared segments in EdiFabric.Core or to inherit from them.
UNT and SE are automatically generated when using the EdiWriter. You can, however, turn the auto-generation off by setting autoTrailer to False. This is useful for situations when you want to manually control the trailer generation or have custom UNT or SE, created similarly to the examples above.