HL7 v3 (XML) importer

Luke Kenneth Casson Leighton luke.leighton at gmail.com
Fri Aug 6 17:32:31 EDT 2010


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 mirthcorp.com 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 mirthcorp.com 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
database.

code is at: http://github.com/lkcl/hl7

i realise that this code is pretty specialist, but if you're looking
around for free software libraries or applications that support HL7,
http://mirthcorp.com 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.

l.



More information about the Python-list mailing list