View Source Elixir HL7

hex.pm version hex.pm downloads hex.pm license

An Elixir library for working with HL7 v2.x healthcare data

Elixir HL7 provides functions to parse, query and modify healthcare data that conforms to the HL7 v2.x standards. It should be able to reconstruct any HL7 Message without data loss or corruption.

It also provides basic support for reading HL7 file streams with configurable delimiters (MLLP included).

This library has been tested on a fairly wide variety of real-world HL7 messages to ensure correctness and flexibility.

You can learn more about HL7 here:

Please report an issue if something appears to be handled incorrectly.

Note

We are building a simpler and more Elixir-friendly API for this library, centered on the HL7 and HL7.Path modules.

The new API will lead to the deprecation of HL7.Query and related code.

These will likely not be removed for some time, and their removal will coincide with a major version release. For now, the two systems can exchange data when needed.

Getting started

Add this library to your mix.exs file:

defp deps do
  [{:elixir_hl7, "~> 0.9.2"}]
end

Use the Tabs Below to Explore the Library

The HL7.Examples module contains functions with sample data that you can use in unit tests or to explore the API,

iex> hl7_text = HL7.Examples.wikipedia_sample_hl7()
...> to_string()
...> Enum.take(30)
"ADT" 

Files

The HL7 module contains utility functions to open file streams of HL7 message content with support for MLLP and standard :line storage. Other formats are somewhat supported by specifying expected prefix and suffix delimiters between messages.

Sockets

A separate library, Elixir-MLLP, exists to manage MLLP connections. MLLP is a simple protocol on top of TCP that is commonly used for sending and receiving HL7 messages.

Status

This project is approaching a v1.0 release. The API is mostly stable at this point.

Also, please be aware of the details of the license (Apache 2.0).

Roadmap

Extending the HL7 base namespace to provide a simpler and more powerful API.

License

Elixir-HL7 source code is released under Apache 2 License. Check the LICENSE file for more information.