This page contains my free utilities and tools for working with HL7 data.

The programs include an HL7 viewer/editor, a tool for analysis and transformation of messages that has its own easy-to-use scripting language, a TCP/IP transmitter/receiver service, and a bulk message sorting utility.

Please feel free to email me any questions or suggestions you may have. I'd love to hear from you! If anything starts to look like a common question, I'll make sure it is documented.

This is what I do for a living. I have spent a lot of time perfecting my HL7 classes in my spare time, so unlike my other freeware, I have not included the source code for these programs. I have placed the interface sections of my class source files down at the bottom of the page if you would like to get a better idea of their capabilities. If you are in need of some HL7 expertise or wish to commission a custom program, please contact me directly via email.

Table of Contents

Download

Latest Update: 2017-12-03

HL7Tools.zip
2.0MB, All HL7 programs and files mentioned on this page.
ReleaseNotes.txt
35K, The combined release notes for all the HL7 programs.

HL7Viewer

HL7Viewer

HL7Viewer is a utility for viewing and editing HL7 data in an expandable/collapsible tree view (no more counting pipe characters!). You can view messages from files containing one or many messages, messages pasted from the clipboard, or even search entire directories to load only messages meeting your specific criteria.

Features Include:

The latest features of note are Diff, Find in Files, and Anonymization.

A Diff is a comparison between two things (often text files) that shows where they differ by displaying them side-by-side. With HL7Viewer you can diff HL7 messages. Select the first message for the diff by right-clicking and choosing "Select for Diff". A little icon will appear next to the message to indicate the selection. Then right-click on another message and select "Diff with Selected". The differences are displayed in an easy-to-read grid. The results can be saved to a csv or text file.

The Find in Files feature will search a directory/wildcard of hl7 files (recursively if you wish) and load only those messages that match your criteria into the viewer. Much faster than loading everything and then filtering to remove the unwanted messages. Both Find in Files and message filtering use the HL7Script "IF" syntax to specify your matching criteria.

Anonymization allows you to quickly anonymize one or more messages based on an anonymizer definition you configure ahead of time. It persists data across the whole series of messages, so if MRN 12345 gets changed to TEST001, it gets changed to TEST001 in all the messages. A sample definition is included with the release, Generic.anon.ini. For more information, see the Anonymizer Definitions page.

Included with HL7Viewer is a text file called "HL7NamedFields.txt". There is an option within the program to show Named Fields rather than displaying each piece of data by its numeric position within a segment. For example, you may prefer to see MSH.MessageType.TriggerEvent instead of MSH.9.2. The provided field names are based off of the HL7 2.35 specifications. The list of fields is not exhaustive, just the ones I happen to encounter on a regular basis. Feel free to add your own (your custom Z-segments, for example) -- the file format should be pretty easy to understand and it includes comments. HL7Script and HL7TransmitterService can use named fields as well.

A recent addition to Named Fields is support for max length, optionality, repetitions, table, and ID values. Max length, optionality, repetitions, and data type can be used in any combination to Validate Data in one (right-click) or all (Messages menu) messages.

There is no installer for HL7Viewer. Just save it to your hard drive and create a shortcut to it. You can associate *.hl7 files with HL7Viewer if you wish, and it will open them when double-clicked. Program settings are stored in the registry under HKCU\Software\Ray Marron\HL7Viewer.

What you see here is all the documentation that exists for HL7Viewer, but every menu option shows a detailed hint in the status bar when hovered over. Hopefully, if you are familiar with HL7 it should be fairly intuitive. Please feel free to email any questions you may have.

Return to Top

HL7Script

HL7Script

HL7Script is for bulk-processing of messages for analysis or transformation. It has its own scripting language you can use to extract the information you need from the input messages. HL7Viewer tends to bog down when you start getting into the thousands of messages, but HL7Script has no problem processing hundreds of megabytes of data since it works on them one-at-a-time.

You can use HL7Script to modify messages or output a subset of messages that match your desired criteria. You can analyze large volumes of messages to get aggregate data like how many unique nursing unit/room combinations were seen in this time period, or how many patients had a particular set of diagnosis codes.

There is no installer for HL7Script. Just copy it to your hard drive, create a shortcut and start using it. Program settings are stored in the registry under HKCU\Software\Ray Marron\HL7Script.

Detailed instructions on the script language used by HL7Script are included in the following page, along with numerous sample scripts:

HL7Script Language and Service Reference

Return to Top

HL7ScriptService

HL7ScriptServiceConfig

HL7ScriptService is the Windows service version of the interactive HL7Script program. It will periodically poll a directory for files containing HL7 messages and process them with a script. Multiple such connections can be configured, each set to poll a different directory and use different scripts and settings. It includes a graphical configuration program to make it easy to set up, HL7ScriptServiceConfig.exe.

When used in conjunction with the HL7Transmitter service, together they become a powerful interface engine that can acccept, transform, and forward messages to and from numerous other systems.

Detailed instructions on using HL7ScriptService are included in the following page:

HL7Script Language and Service Reference

Return to Top

HL7Transmitter

HL7TransmitterConfig

HL7TransmitterService.exe is a Windows service that is used to transmit and receive HL7 messages using the Minimal Low-Level Protocol (MLLP) over TCP/IP connections. Multiple transmitters and receivers can be configured. It includes a graphical configuration program to make it easy to set up, HL7TransmitterConfig.exe.

Transmitters will connect to a remote host and periodically poll a directory for files containing individual hl7 messages. When new files are found, they are sent to the remote host. After positive acknowledgement, the original message file can be deleted or moved to an archive directory for a period of time.

Receivers will listen on a port for connections and save the messages it receives to a folder, one message per file. The received messages will be properly ACKnowledged.

When used in conjunction with HL7ScriptService, together they become a powerful interface engine that can acccept, transform, and forward messages to and from numerous other systems.

HL7Transmitter Service Reference

Return to Top

HL7Sort

HL7Sort is a command-line utility that will read an input file or directory full of HL7 messages and write them to an output file in a user-selected sorted order but otherwise unchanged. HL7Viewer is fine for sorting a few hundred messages, but HL7Sort can work on very large files.

To see help for the program, just run it without any arguments.

Return to Top

HL7 Classes

These are the actual HL7 classes used to build these programs, but only the interface sections. These are here to give you an idea of the flexibility and power of the classes should you need some custom work done or are considering licensing the classes for yourself. Please contact me directly by email with any questions.

llHL7Msg.txt
llHL7Script.txt
llHL7NamedFields.txt
llHL7Anonymizer.txt

Return to Top

License

The works on this page by Ray Marron are licensed under specific terms found in license.txt distributed as part of hl7tools.zip.