21 12
发新话题
打印

Java API to HL7 Version 3 RIM

Java API to HL7 Version 3 RIM

HL7 JAVA SIG Co-Chair Dr. Peter Hendler 是我的一个朋友。Dr. Hendler 本人是Kaiser Permanente的医生。以下是他为下周HL7 San Diego 大会准备的一份简介。 参加大会的朋友,如果感兴趣的话,您可以直接到JAVA SIG 去找Peter. 其他朋友如有兴趣,我也可以进一步帮忙搭桥。谢谢。



Java SIG README for demo release, September 9, 2005

About the Java API to HL7 Version 3 RIM
---------------------------------------

HL7 Version 3 messages are all derived from the object-oriented data model called the RIM
(Reference Information Model).

There are a few dozen base RIM objects including ACT, PARTICIPATION, ROLE, and ENTITY.
The data model also includes various complex data types that are classes themselves with
methods as well as data.

Every domain (pharmacy, lab, clinical notes, administration) is free to subclass the main
RIM classes into more specialized "clone classes". For example, a blood glucose is a clone
of observation which itself is a clone of ACT.

Because the number of clone classes is extremely large and growing all the time, it would
not be practical for an API to include all of them.

The Java SIG made an early decision to limit our data model to the base RIM classes.
Any clone classes can be represented by their parent in the RIM. This allows our data model
to be stable without the need for endless updates or an unmanageably large data model.

When an HL7 domain committee such as Laboratory or Orders and Observations wants to create
a new message, for example glucose measurement, it creates a model of this message using
the classes and data types defined in the RIM. Then, using special tooling, it can generate
a definition of the message. Currently there are two formats for the meta-information that
defines a message type. The older one is called an HMD (Hierarchical Message Definition),
and the new one is called a MIF file (Message Information File). The HMD is being deprecated,
so our API is also changed to focus mainly on MIF files.

In order to convert a RIM model to its corresponding HL7 XML message instance, you need to
know the order of serialization of the classes, as well as the data types and values.

Similarly, in order to convert an HL7 V3 message instance into a RIM representation
(which we call a RIM graph), you need the meta-information included in the HMD or the MIF files.

There are two approaches to implementing these tasks. On the one hand, if your application
will rely on only one or a very few message types, then you can hard-code the meta-information
into your application. This is easy and fast but has the disadvantage of working only on the
few message types for which the application has been written.

On the other hand, a more versatile but more complex approach is to build a generic API that
can be fed both MIF files and message instances. In this approach an application can
intelligently know how to handle the message and thus load it into memory in its RIM graph
representation. Additionally -- and most usefully -- this information, once in memory, can
automatically be "persisted" into a database; no real-world applications deal only with
temporary data in memory that disappears as soon as the application exits.

So an ideal API for dealing with HL7 V3 XML messages should have the following features:

- It can handle any new or unknown type of message as long as the MIF file were available.
- It can transform an incoming XML message into a RIM graph representation in memory so that
the application can perform any required business logic.
- It can persist the RIM graphs to a database.
- In reverse, it can reconstruct the RIM graph from the database.
- It can create a new HL7 V3 XML message from the in-memory representation.

The Java SIG's project, the Java API to HL7 Version 3 RIM, has been in development since 2002.
This README introduces a demo version of our API. The API has all five of these features.

The object-to-relational database mapping is accomplished with the open-source Hibernate technology.

Running the Java API to HL7 Version 3 RIM Demo
----------------------------------------------

In order to run this demo, you must have ant and Java 1.5 pre-installed on your computer,
and you must set the environmental variables ANT_HOME and JAVA_HOME. (Naturally, you must be
somewhat familiar with Java and with ant.)

There are two demos in this package. One of them consists of the following ant targets:

loadDataMif
loadDataMif3
loadDataMif4

The first one, loadDataMif, parses an XML message into memory and then persists the message
into a database (Hypersonic database included with this demo). It then reverses the process
by re-creating the message from the database and outputting it to the screen.

As soon as this target has finished running, you can inspect the database by running a GUI tool.
Bring up the tool by running this ant target:

hsqldbManager

When the SQL manager starts up in its GUI window, select File->Connect. Then in the URL field
replace

jdbc:hsqldb:mem:.

with

jdbc:hsqldb:demohibernate

You may then enter an SQL statement such as this:

SELECT * FROM _ACT

Then click the "Execute SQL Statement" button. Note that it is not case-sensitive, and you do
not need trailing semicolons.

Once you have inspected the result, close the SQL manager GUI to free the connection to the database.

Thereafter, when you run loadDataMif3 or loadDataMif4 (or both), you append data to the database.
This simulates a real-life clinical situation such as appending lab data to a patient object in a
medical record system. Once you have appended the new data with these ant targets, you can bring up
hsqldbManage again and browse the database to see the new data.

The second demo illustrates how the Java API to HL7 Version 3 RIM can handle any type of message.
The second demo is actually a CDA document, which is based on the RIM, so it is simply just another
flavor of HL7 message.

The ant target to run for this demo is called

demoCDAMif207

It reads a CDA document and constructs the related RIM graph in memory. At this point it opens a
small GUI window that allows you to inspect this memory object. The GUI shows many Java internals
in addition to the CDA-related data, so this ant target provides only a crude way to inspect the
objects in memory (like a debugger).

At this point the program execution is suspended. When you close the GUI, the demo proceeds to the
next stage, in which the in-memory RIM graph is persisted via Hibernate to the database. Once this
has happened, the demo continues and reverses the process: it gets the data out of the database,
re-creates the in-memory RIM graph, and then re-creates the CDA document from the in-memory
representation.

Note that the re-created message is not quite the same as the original. This is because the API may
add some default values. (It may also be because not all the kinks have been worked out! This is a
demo, not a release.) Once this target has finished, then you may open the SQL tool as described
above and browse the CDA data in the database.

Final Words
-----------

The five features of the "ideal" API listed above are necessary for any significant clinical
application that is based on HL7 V3 messaging. There are significant person-years of effort
invested to bring the API to its current state. For developers who are more interested in
developing the specific functionality of a clinical application, and less in spending years
of effort building the "plumbing" of HL7 V3 messaging, using this API instead of trying to
duplicate its functionality from scratch should make their efforts noticeably more productive.

We believe that the Java API to HL7 Version 3 RIM is mature enough to release this demo, but
it still requires code clean-up and quality testing before it is ready to use "as is" to
develop a production application.

We are releasing this demo in order to introduce the functions and purpose of the API and,
if we're lucky, to recruit a few more committed developers who would like to contribute to
this effort.

Thank you for your interest.

Peter Hendler
Todd Freter
Java SIG co-chairs
September 9, 2005

TOP

Java API to HL7 Version 3 RIM


好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。

you can download the free java development kit for HL7 Version 3 RIM from here.

http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip

http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart

http://trials.nci.nih.gov/trials/trials...adoc/index.html

http://trials.nci.nih.gov/trials/trials...adoc/index.html









[quote=jing.wang,2005-09-13 16:27]
HL7 JAVA SIG Co-Chair Dr. Peter Hendler 是我的一个朋友。Dr. Hendler 本人是Kaiser Permanente的医生。以下是他为下周HL7 San Diego 大会准备的一份简介。 参加大会的朋友,如果感兴趣的话,您可以直接到JAVA SIG 去找Peter. 其他朋友如有兴趣,我也可以进一步帮忙搭桥。谢谢。
Java SIG README for demo release, September 9, 2005
About the Java API to HL7 Version 3 RIM
---------------------------------------
HL7 Version 3 messages are all derived from the object-oriented data model called the RIM


此帖由 sfinder 在 2005-09-13 19:36 进行编辑...

TOP

Java API to HL7 Version 3 RIM

我主意到你文中的java SIG的版本似乎是新的,你有新的java SIG吗?我在HL7网站上只能下载2002年版的。旧的根本就没有mif的load工具

TOP

Java API to HL7 Version 3 RIM

[quote=sfinder,2005-09-13 17:12]
好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。
you can download the free java development kit for HL7 Version 3 RIM from here.
http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip
http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart
http://trials.nci.nih.gov/trials/trials...adoc/index.html
http://trials.nci.nih.gov/trials/trials...adoc/index.html
---------------------------------------
What NIH uses is the same API developed by Peter's team...

TOP

Java API to HL7 Version 3 RIM

引用天下第七 @ 2005-09-13 19:08)
我主意到你文中的java SIG的版本似乎是新的,你有新的java SIG吗?我在HL7网站上只能下载2002年版的。旧的根本就没有mif的load工具


你是讲API吗?我可以问问Peter.

TOP

Java API to HL7 Version 3 RIM

是的,因为我看了源代码,没有你文中说的内容。

TOP

Java API to HL7 Version 3 RIM

引用jing.wang @ 2005-09-13 21:41)
引用sfinder @ 2005-09-13 17:12)
好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。
you can download the free java development kit for HL7 Version 3 RIM from here.
http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip
http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart
http://trials.nci.nih.gov/trials/trials...adoc/index.html
http://trials.nci.nih.gov/trials/trials...adoc/index.html
---------------------------------------
What NIH uses is the same API developed by Peter's team...


Hi Wang

I have to say Dr. Peter borrow it from NIH since the whole coding implementation was done by NIH. Dr. Peter may give
some suggestion but he doen't know how to do the real implementation. (that's normal for the people in his position)
动嘴不动手,上次在圣帝雅戈被sun的几个技术专家问得不知所云。v3的api实现几乎是听企业的,然后再由SIG出一份标准。这是大家都心知肚明的。也正因为如此所以v3一直没被正式生出来

TOP

Java API to HL7 Version 3 RIM

hi,sfinder

你提供的HL7 SDK的下载包中没有源代码

TOP

Java API to HL7 Version 3 RIM

 ,我估计是要钱的。我是做实现的,动手不动嘴

TOP

Java API to HL7 Version 3 RIM

sfinder - what can I say, one is entitled to his/her own opinion. Fortunately I do not have to persuade you.

天下第七 - I'll ask Peter about the source code. I know little about it, but I'll ask tomorrow.

If there's enough interest in this forum, I am more than happy to work with the administrators of the forum to see if a live session can be arranged with Dr. Hendler and folks here. After all, collaboration is the key to success.


此帖由 jing.wang 在 2005-09-13 20:58 进行编辑...

TOP

Java API to HL7 Version 3 RIM

引用sfinder @ 2005-09-14 11:36)


Hi Wang

I have to say Dr. Peter borrow it from NIH since the whole coding implementation was done by NIH. Dr. Peter may give
some suggestion but he doen't know how to do the real implementation. (that's normal for the people in his position)
动嘴不动手,上次在圣帝雅戈被sun的几个技术专家问得不知所云。v3的api实现几乎是听企业的,然后再由SIG出一份标准。这是大家都心知肚明的。也正因为如此所以v3一直没被正式生出来

世事知易而行难。听你一说,我才明白。我还想HL7的人很厉害,一定要用JDK1.5. 还使用了泛形,原来都是借过来的。

TOP

Java API to HL7 Version 3 RIM

天下第七,

here is the source. It is free.

http://trials.nci.nih.gov/trials/trials...7SDKv10_src.zip


”HL7北美“是个很小的群体,就象个村子,大家都认识。干这行太久了,知道了太多不该知道的东西,原有的美感就没了。就像恋爱和结婚。
不过觉得还是让中国将来的用户对我们有点美感好<grin>






[quote=天下第七,2005-09-13 22:44]
hi,sfinder

你提供的HL7 SDK的下载包中没有源代码
[/quote


此帖由 sfinder 在 2005-09-14 11:42 进行编辑...

TOP

Java API to HL7 Version 3 RIM

引用jing.wang @ 2005-09-13 22:57)
sfinder - what can I say, one is entitled to his/her own opinion. Fortunately I do not have to persuade you. 
天下第七 - I'll ask Peter about the source code. I know little about it, but I'll ask tomorrow. 
If there's enough interest in this forum, I am more than happy to work with the administrators of the forum to see if a live session can be arranged with Dr. Hendler and folks here. After all, collaboration is the key to success.


不好意思,话说过头了,其实从学术上和peter探讨是很有益处。热切盼望王女士能牵线搭桥。
PETER原来(现在)是个类风湿专家,对医疗信息电脑化有很大的热情,尤其对HL7做了很多无偿的工作。他是我们几个v3 JAVA API实现小组的一个小组长(CO-CHAIR). 这几个小组分别是来自Oracle,National Cancer Institute,University of Las Vegas,Kaiser Permanente。我们几个小组的工作其实是由SUN来领导的。因此说白了就是用SUN原来的那套标准来实现。

TOP

Java API to HL7 Version 3 RIM

引用sfinder @ 2005-09-14 21:52)

天下第七,

here is the source. It is free.

http://trials.nci.nih.gov/trials/trials...7SDKv10_src.zip


”HL7北美“是个很小的群体,就象个村子,大家都认识。干这行太久了,知道了太多不该知道的东西,原有的美感就没了。就像恋爱和结婚。
不过觉得还是让中国将来的用户对我们有点美感好<grin>

i am very appreciated, sfinder. you are very nice.






引用天下第七 @ 2005-09-13 22:44)

hi,sfinder

你提供的HL7 SDK的下载包中没有源代码
[/quote

TOP

Java API to HL7 Version 3 RIM

引用jing.wang @ 2005-09-14 10:41)

引用sfinder @ 2005-09-13 17:12)

好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。
you can download the free java development kit for HL7 Version 3 RIM from here.
http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip
http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart
http://trials.nci.nih.gov/trials/trials...adoc/index.html
http://trials.nci.nih.gov/trials/trials...adoc/index.html
---------------------------------------
What NIH uses is the same API developed by Peter's team...

it seems that java SIG has more functions according to readme file you offer initially. by the way, i found there're no hmd files or mif files in the distributed java api, so it is impossible to create message at all.  

TOP

 21 12
发新话题