14

I am new to HL7 and the first thing that came to my mind was, why isn't this format using XML instead? There are a handful of parsers and there are some serious inconsistencies among vendors.


For those new to the health care software business I recommend this read http://www.interfaceware.com/hl7_version2x.html

3
  • I didn't downvote but I'd wager a guess that amongst some developers the mere mention of XML conjures the whole notion of "I have a hammer, everything should be a nail..." Commented Sep 23, 2010 at 18:34
  • lol this question describes the health care insurance industry as a whole Commented Sep 23, 2010 at 18:44
  • You can use an online service for training purposes for conversion of HL7 messages ER7 to XML and back: hl7utils.appspot.com Commented May 22, 2014 at 10:28

5 Answers 5

21

HL7 version 3 is using XML. Earlier versions of HL7 are a health care specific derivative of a pipe delimited format (IIRC its called ER7, not sure though).

Theres nothing particularly wrong with the pipe delimited format. In many ways the newer XML variations are harder to use. It may be old, but for the most part it works and it is well understood.

Sign up to request clarification or add additional context in comments.

Comments

14

Looks like v.2 was created in 1987 according to wikipedia: http://en.wikipedia.org/wiki/Health_Level_7

That's probably your answer.

3 Comments

To clarify this point, remember that in 1987, network bandwidth was a much more precious commodity than today. That's why the format itself is so terse. XML, love it or hate it, has a lot of overhead, and messages containing many different types of data are extremely common.
@gbheath: That's correct, though standard traffic compression is very efficient on XML, by far more verbose since all nodes are semantically explicit. Whereas is HL7, only the segment level is.
Of course, I meant: "Whereas is ER7 variant (HL7 v2), only the segment level is."
8

Just an FYI... HL7 2.x is used far more in practice than the XML variant HL7 3.x.

2.x is simpler and faster to parse.

2 Comments

This because evident upon actually trying to use version 3. Actual examples are very rare, because there just aren't as many people using it. It seems to be forever stuck in the design by committee stage.
ER7 being simpler and faster to parse than XML? In theory that's propbable, in practice I'm not so sure. XML parsers are highly optimized and almost OS level components. Besides, XML schemas allow very fast message validation. Most ER7 equivalents, parsers and validators, are home-made components in today's healthcare softwares, far less robust and performant.
8

There are several versions of hl7 standards using the technology of its time:

  • HL7 v2: Delimited text files
  • HL7 v3: XML based format (on SOAP)
  • HL7 FHIR: The newest format based on JSON and XML on REST that seem to have a bright future.

I wont list the advantages and disadvantages of them - all of them have their positive and negative things.

But if you start a new application and the parsing of the text file you offer issues - it's worth looking at FHIR.

Comments

1

There is an XML encoding for v2 messages, see "ANSI/HL7 V2 XML-2003 June 4, 2003: HL7 Version 2: XML Encoding Syntax Release 1", although I must warn you, it isn't pretty.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.