Open BryanJBryce opened 2 years ago
Hi Bryan,
We've primarily used this library for cutting messages up (at our company we process them from hundreds of different hospitals). Most of the time when building messages, we make them as interpolated strings (and we don't do this very often).
As it is now, you could set the segments
fields of the HL7.Message
struct to be a list of lists and then to_string()
would output the HL7 as a binary. You can see the list parsing by calling HL7.Message.to_lists/1
with some the example messages in the Examples module.
If you have an idea for additions to the API to support building them, we'd be happy to look into extending the library.
Thanks, Scott
Hi @DarkMarmot ,
When you say that you build messages using interpolated strings, you mean that you just take a fixed template and patch the (escaped) values in there?
I was also looking for a library to build HL7 messages.
Thanks, Marc
There's a lot of info in the readme about parsing HL7 messages, but I'm trying to create them and I don't see a straightforward way to add segments to a message. A new message can be created with raw input, or with a header, but how do you add segments?