This page contains my free utilities and tools for working with HL7 2.x data.
The programs include an HL7 viewer/editor with features like anonymization and diff, 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.
HL7Tools supports file-based and database message storage from a number of popular database systems. Unicode support is built-in.
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, wish to commission a custom program, or are interested in licensing my classes, please contact me directly via email.
Are you a non-profit, charitable, or other public health
system? Do you need assistance with integration to better serve your community?
Let me know - I may be able to help with a low- or no-cost solution.
Subscribe to the RSS feed to be notified of new releases.
None of the programs require installation. Just unzip them to a directory on your hard drive and double-click the exe. If you use the services, they must be registered, but the config programs will do it (and undo it) for you with the touch of a button.
When upgrading from a previous version, it is not necessary to unregister the services. The exe files can be replaced while the services are stopped. The config programs should then be run to review any new or changed settings before starting the services back up.
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 retrieved from a database, messages pasted from the clipboard, or even search entire directory trees to load only messages matching your specific criteria.
The latest features of note are Count Unique Values, Find in Files/Database, Diff, and Anonymization.
Count Unique Values (found on the Messages menu) allows you to enter a key expression and get a list and count of all the distinct values from the currently loaded messages. Want to know how many patients are in these messages? Do a count on PID.3.1. Curious which nursing unit/room combos there are? Count PV1.3.1 + "-" + PV1.3.2.
The Find in Files/Database feature will search a database or directory of hl7 files (recursively if you wish) and load only those messages that match your criteria into the viewer. The matching criteria uses the same powerful syntax as HL7Script "IF" statements.
The same Find in Files/Database feature will let you start a Watch on a directory or database query. HL7Viewer periodically polls for new messages and automatically adds them to the tree. If the maximum message count is reached, the oldest messages will be removed to make room for displaying the new.
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 "glasses" 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.
Anonymization (or de-identification) allows you to quickly anonymize one or more messages based on a definition you configure ahead of time. It tracks value replacements across the whole series of messages to allow sequences of events (e.g. admit, transfer, discharge, cancel discharge) for a given patient/account to be preserved when replaying them in the Test system. For example, if MRN 12345 was changed to ANON001 in the first message, MRN 12345 gets changed to ANON001 in all the messages. A sample definition is included with the release, Generic.anon.ini. For more information, see the following page:
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. Included with HL7Tools are text files named "HL7NamedFields.v.txt" (where v is the HL7 version) that enable this feature. The list of segments in these files 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 they include comments detailing the layout.
The Named Fields files also contain information on data types, length limits, optionality, and repetitions so they can be used to Validate Data in HL7Viewer as well as HL7Script and HL7TransmitterService.
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.
HL7Script is for bulk-processing messages for analysis or transformation. It has its own scripting language you can use to extract the information you need from the input messages. HL7Script has no problem processing very large volumes 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:
HL7ScriptService is the Windows service version of the interactive HL7Script program. It will periodically poll a directory or database for input and process it with a script. Multiple such connections can be configured, each set to poll a different source and use different scripts and settings. The HL7ScriptServiceConfig graphical configuration program makes it easy to set up.
When used in conjunction with the HL7Transmitter service, together they become a powerful interface engine that can accept, transform, and forward messages to and from numerous other systems.
Detailed instructions on using HL7ScriptService are included in the following page:
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.
Messages can be file-based or reside in a database.
Transmitters will periodically poll a directory or database for new hl7 messages and send them to a remote host. After positive acknowledgement, the original message is updated in the database or the 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 database or folder, one message per file. The received messages will be properly ACKnowledged to the sender.
When used in conjunction with HL7ScriptService, together they become a powerful interface engine that can accept, transform, and forward messages to and from numerous other systems.
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.
These are the actual Delphi HL7 classes used to build these programs, but only the interface sections. They are here to give you an idea of the power and flexibility 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.