Tag Archives: Hl7

HL7 File Rename Application – Based on Open Source HL7 API by UCH

As promised in my previous blog here is a preview of the application I am developing to rename hl7 messages to reflect patient demographic information in the filename.

The HL7 file rename application is a utility software which scans specified folders for HL7 files. The application then parses these files to pickup patient demographic information like firstname, lastname, date of birth etc. from the PDI segment and renames the files to include this information in filename. The benefit is that users can now locate HL7 files for a particular patient using normal file search utilities like windows search, google desktop search etc.

I created this application using Visual C# 2008 express edition & NHapi HL7 parser by UCH. The application is designed to be able to process large volumes and all time consuming operations are performed on independent threads so that the UI remains responsive. The user can also view detailed statistics including current progress, files successfully processed, number of errors, time elapsed, time remaining etc.

homescreen

The flow of the application is as follows.

1. User sets up a new job by clicking on the job setup button. User can select the folder where the HL7 files are located. In this version the user can also select a folder which contains pdf files associated with the HL7 files. User can select the rename mode and auto repair options for messages with parse errors.

jobsetup

2. User starts the scanning and parsing process by clicking on the parse button. This operation is performed on a background thread. Detailed statistics of the processing operation are shown while the operation is being performed.

scan

3. The renaming operation can be performed if at least one file was found. The renaming operation is also performed on a background thread and statistics are visible while the operation is being performed.

pdipreview

rename

4. The message log shows useful information, error messages etc.

completed

These screenshots are from the latest stable version of the application. I will post the source code here soon. Many thanks to the NHapi team for their excellent API. To know more about NHapi please visit http://nhapi.sourceforge.net

Open Source HL7 API – NHapi

While searching for an open source .NET parser for HL7 messages, I came across NHapi and I found it to be great. NHapi is a .NET port of Java based API HAPI and although HAPI comes with a good API documentation the same is not true for NHapi. The only good documentation I could find for NHapi is posted on Ashley Tate’s blog here. I was unable to find any sample code except for some basic code available in the Quickstart Guide for NHapi I will post some sample C# code here once I complete my application.