Thursday, March 4, 2010

XML, XSLT and HL7 Tools

Over the past few days, I have been focusing on modifying some XSLT used by OpenMRS to transform InfoPath-rendered XML to HL7 messages.  OpenMRS uses HAPI, the HL7 open source Java API, to parse and process HL7 messages.  InfoPath generates XML based on schemata that the FormEntry module renders.  Being a complete novice to HL7, I had to gather a few tools to validate formats and examine the message contents.  Specifically, I needed reliable, open source tools for evaluating and processing XML, XSLT and HL7.

For evaluating HL7 messages, I first happened upon HL7Spy (not free, except for a trial period).  It is really good at not only evaluating HL7 messages, but explaining what each section of each field should be.  Apparently, HL7Spy is good for manipulating files with large amounts of messages in them.  I only need to look at one message, for now.  Looking for an open source solution, I tried to implement the HAPI HL7 Conformance Tools, but ran into issues getting the Message Validator to work in my environment.  I then found HL7 Inspector, which is perfectly fine for examining HL7 messages.  It leaves me wanting for more information, but there are numerous random HL7 documents and the HAPI docs to help with that.

I had much better luck finding XML/XSLT tools.  I really liked using the free trial of Stylus Studio, but the free version of EditiX is perfect.  The pay version does some fancy footwork, like XSLT debugging and profiling, but for validation of both XML and XSLT, browsing the DOM and applying transforms, EditiX works.

OpenMRS developers: if you start running into HL7 issues, definitely pick up one or more of these tools.  It will certainly help you understand the message better than counting the number of pipes on each line in a text editor.

3 comments:

  1. I see you're having fun with XSLT J :)

    ReplyDelete
  2. have you tried liquid xml editor (http://www.liquid-technologies.com/xml-editor.aspx) it's not free but it's pretty good.

    ReplyDelete
  3. QuickViewHL7 seems to do the job!

    ReplyDelete