[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Database access question for HL7 data
- From: Ronald Bourret <firstname.lastname@example.org>
- To: "Rochester, Dean" <Dean.Rochester@ProMedica.org>,xml-dev <email@example.com>
- Date: Thu, 06 Sep 2001 16:21:20 -0700
"Rochester, Dean" wrote:
> > I have heard that oracle, DB2 and other databases already have XML
> > listeners or parsers built into them. If we have HL7 messages, how can we
> > send them to these database parsers as XML data? Can we do queries or
> > only updates to the databases?
The process varies depending on the database, but usually you will need
to first set up a map of some sort that tells the database how to store
the various bits of the HL7 message in the document. You can then call a
method that invokes the parser and stores the data according to the map.
(I believe this is generally possible over HTTP as well.)
Queries are also supported -- they just reverse the process. SQL Server
has a query language for this purpose; most other databases require you
to retrieve the data according to your mapping, then transform it with
XSLT if you want it in a format other than that used by the mapping.
The real problem here is with HL7 itself. If I recall correctly, this
has a lot of mixed content. The mapping of mixed content to relational
databases is messy and very inefficient. Furthermore, I don't think
any XML-enabled databases support the storage of mixed content except as
a BLOB, and even if they do, I'm pretty sure that they don't store order
information, which is necessary to retrieve sibling text and elements in
the correct order.
Therefore, your choices are to: (1) store complete HL7 documents as
BLOBs and query them with various text tools which may or may not be
XML-aware, (2) store HL7 documents as BLOBs and index them with
side-tables, or (3) use a native XML database.
XML, Databases, and Schemas
Speaker, Geek Cruises' XML Excursion '02