From: Luke Kenneth Casson Leighton on
an HL7 v2 importer was written by john paulett, and it has been
enhanced to support some of the HL7 v3 standard, which is XML-based.
no dependencies are required: xml.sax is used so as to reduce the
dependencies to purely python.

additionally, as HL7 has versions/revisions, published data
specifications were pulled from and transformed into
python, automatically. HL7v3 revisions 2.1, 2.2, 2.3, 2.31, 2.4 and
2.5 are supported.

there is still work to be carried out: MSH, PID, NTE, ORC, ORB and OBX
are the presently supported segmentss, with a hard-coded assumption
about the data hierarchy instead of using the same MessageFormat
specifications that have written. this is likely to be
corrected soon, but the project for which the code is being updated
only requires "lab data imports", so support for other MessageFormats
is not a high priority.

in case anyone is interested, this hl7 library is to be used in
gnumed, to be able to import laboratory data reports into the gnumed

code is at:

i realise that this code is pretty specialist, but if you're looking
around for free software libraries or applications that support HL7, is pretty much it, and mirth is pretty heavy-duty
and forces a dependency of java and javascript for scripting, which
may be of concern to some. hence, this smaller library is being
created, in python.