Introduction
This example shows how to use the hl7.serialize.lua module to serialize an HL7 message using specified non-standard delimiters and/or escape characters.
If you have any questions please contact us at support@interfaceware.com.
Using the Code [top]
- Import the HL7: Custom Delimiters channel from the Builtin: Iguana Protocols repository
- Experiment with the code to find out how it works
- Then add the module to your Translator project
- Copy the require statement from the channel and add it at the top of your script
Note: This module uses require to return a single function - Adapt the code to your own requirements
- hl7.serialize{} to serialize the code with the desired delimiters and/or escape characters
- Interactive scripting help is included for this module
This is the github code for the main module:
How it works [top]
The hl7.serialize{}
function serializes an HL7 node tree (message) using the supplied delimiters, if no delimiters are supplied the HL7 defaults delimiters are used.
You can also supply (a parameter for) non-standard escapes for embedded delimiters, if no escapes are supplied it uses the HL7 default escapes are used.
More information [top]
- Source code for the main module on github
- Source code for the hl7.serialize.lua module on github