找回密码
 欢迎注册
搜索
热搜: 活动 交友 discuz
查看: 7463|回复: 20

Java API to HL7 Version 3 RIM

[复制链接]
发表于 2005-9-14 05:27:58 | 显示全部楼层 |阅读模式
HL7 JAVA SIG Co-Chair Dr. Peter Hendler 是我的一个朋友。Dr. Hendler 本人是Kaiser Permanente的医生。以下是他为下周HL7 San Diego 大会准备的一份简介。 参加大会的朋友,如果感兴趣的话,您可以直接到JAVA SIG 去找Peter. 其他朋友如有兴趣,我也可以进一步帮忙搭桥。谢谢。
<br>
<br>
<br>
<br>Java SIG README for demo release, September 9, 2005
<br>
<br>About the Java API to HL7 Version 3 RIM
<br>---------------------------------------
<br>
<br>HL7 Version 3 messages are all derived from the object-oriented data model called the RIM
<br>(Reference Information Model).
<br>
<br>There are a few dozen base RIM objects including ACT, PARTICIPATION, ROLE, and ENTITY.
<br>The data model also includes various complex data types that are classes themselves with
<br>methods as well as data.
<br>
<br>Every domain (pharmacy, lab, clinical notes, administration) is free to subclass the main
<br>RIM classes into more specialized &quot;clone classes&quot;.  For example, a blood glucose is a clone
<br>of observation which itself is a clone of ACT.
<br>
<br>Because the number of clone classes is extremely large and growing all the time, it would
<br>not be practical for an API to include all of them.
<br>
<br>The Java SIG made an early decision to limit our data model to the base RIM classes.
<br>Any clone classes can be represented by their parent in the RIM. This allows our data model
<br>to be stable without the need for endless updates or an unmanageably large data model.
<br>
<br>When an HL7 domain committee such as Laboratory or Orders and Observations wants to create
<br>a new message, for example glucose measurement, it creates a model of this message using
<br>the classes and data types defined in the RIM. Then, using special tooling, it can generate
<br>a definition of the message.  Currently there are two formats for the meta-information that
<br>defines a message type. The older one is called an HMD (Hierarchical Message Definition),
<br>and the new one is called a MIF file (Message Information File). The HMD is being deprecated,
<br>so our API is also changed to focus mainly on MIF files.
<br>
<br>In order to convert a RIM model to its corresponding HL7 XML message instance, you need to
<br>know the order of serialization of the classes, as well as the data types and values.
<br>
<br>Similarly, in order to convert an HL7 V3 message instance into a RIM representation
<br>(which we call a RIM graph), you need the meta-information included in the HMD or the MIF files.
<br>
<br>There are two approaches to implementing these tasks. On the one hand, if your application
<br>will rely on only one or a very few message types, then you can hard-code the meta-information
<br>into your application. This is easy and fast but has the disadvantage of working only on the
<br>few message types for which the application has been written.
<br>
<br>On the other hand, a more versatile but more complex approach is to build a generic API that
<br>can be fed both MIF files and message instances. In this approach an application can
<br>intelligently know how to handle the message and thus load it into memory in its RIM graph
<br>representation. Additionally -- and most usefully -- this information, once in memory, can
<br>automatically be &quot;persisted&quot; into a database; no real-world applications deal only with
<br>temporary data in memory that disappears as soon as the application exits.
<br>
<br>So an ideal API for dealing with HL7 V3 XML messages should have the following features:
<br>
<br>-  It can handle any new or unknown type of message as long as the MIF file were available.
<br>-  It can transform an incoming XML message into a RIM graph representation in memory so that
<br>      the application can perform any required business logic.
<br>-  It can persist the RIM graphs to a database.
<br>-  In reverse, it can reconstruct the RIM graph from the database.
<br>-  It can create a new HL7 V3 XML message from the in-memory representation.
<br>
<br>The Java SIG&#039;s project, the Java API to HL7 Version 3 RIM, has been in development since 2002.
<br>This README introduces a demo version of our API. The API has all five of these features.
<br>
<br>The object-to-relational database mapping is accomplished with the open-source Hibernate technology.
<br>
<br>Running the Java API to HL7 Version 3 RIM Demo
<br>----------------------------------------------
<br>
<br>In order to run this demo, you must have ant and Java 1.5 pre-installed on your computer,
<br>and you must set the environmental variables ANT_HOME and JAVA_HOME. (Naturally, you must be
<br>somewhat familiar with Java and with ant.)
<br>
<br>There are two demos in this package. One of them consists of the following ant targets:
<br>
<br>loadDataMif
<br>loadDataMif3
<br>loadDataMif4
<br>
<br>The first one, loadDataMif, parses an XML message into memory and then persists the message
<br> into a database (Hypersonic database included with this demo). It then reverses the process
<br> by re-creating the message from the database and outputting it to the screen.
<br>
<br>As soon as this target has finished running, you can inspect the database by running a GUI tool.   
<br>Bring up the tool by running this ant target:
<br>
<br>hsqldbManager
<br>
<br>When the SQL manager starts up in its GUI window, select File-&gt;Connect. Then in the URL field
<br>replace
<br>
<br>jdbc:hsqldb:mem:.
<br>
<br>with
<br>
<br>jdbc:hsqldb:demohibernate
<br>
<br>You may then enter an SQL statement such as this:
<br>
<br>SELECT * FROM _ACT
<br>
<br>Then click the &quot;Execute SQL Statement&quot; button. Note that it is not case-sensitive, and you do
<br>not need trailing semicolons.
<br>
<br>Once you have inspected the result, close the SQL manager GUI to free the connection to the database.
<br>
<br>Thereafter, when you run loadDataMif3 or loadDataMif4 (or both), you append data to the database.
<br>This simulates a real-life clinical situation such as appending lab data to a patient object in a
<br>medical record system. Once you have appended the new data with these ant targets, you can bring up
<br>hsqldbManage again and browse the database to see the new data.
<br>
<br>The second demo illustrates how the Java API to HL7 Version 3 RIM can handle any type of message.
<br>The second demo is actually a CDA document, which is based on the RIM, so it is simply just another
<br>flavor of HL7 message.
<br>
<br>The ant target to run for this demo is called
<br>
<br>demoCDAMif207
<br>
<br>It reads a CDA document and constructs the related RIM graph in memory. At this point it opens a
<br>small GUI window that allows you to inspect this memory object. The GUI shows many Java internals
<br>in addition to the CDA-related data, so this ant target provides only a crude way to inspect the
<br>objects in memory (like a debugger).
<br>
<br>At this point the program execution is suspended. When you close the GUI, the demo proceeds to the
<br>next stage, in which the in-memory RIM graph is persisted via Hibernate to the database. Once this
<br>has happened, the demo continues and reverses the process: it gets the data out of the database,
<br>re-creates the in-memory RIM graph, and then re-creates the CDA document from the in-memory
<br>representation.  
<br>
<br>Note that the re-created message is not quite the same as the original. This is because the API may
<br>add some default values. (It may also be because not all the kinks have been worked out! This is a
<br>demo, not a release.) Once this target has finished, then you may open the SQL tool as described
<br>above and browse the CDA data in the database.
<br>
<br>Final Words
<br>-----------
<br>
<br>The five features of the &quot;ideal&quot; API listed above are necessary for any significant clinical
<br>application that is based on HL7 V3 messaging. There are significant person-years of effort
<br>invested to bring the API to its current state. For developers who are more interested in
<br>developing the specific functionality of a clinical application, and less in spending years
<br>of effort building the &quot;plumbing&quot; of HL7 V3 messaging, using this API instead of trying to
<br>duplicate its functionality from scratch should make their efforts noticeably more productive.
<br>
<br>We believe that the Java API to HL7 Version 3 RIM is mature enough to release this demo, but
<br>it still requires code clean-up and quality testing before it is ready to use &quot;as is&quot; to
<br>develop a production application.
<br>
<br>We are releasing this demo in order to introduce the functions and purpose of the API and,
<br>if we&#039;re lucky, to recruit a few more committed developers who would like to contribute to
<br>this effort.
<br>
<br>Thank you for your interest.
<br>
<br>eter Hendler
<br>Todd Freter
<br>Java SIG co-chairs
<br>September 9, 2005
发表于 2005-9-14 08:12:57 | 显示全部楼层

Java API to HL7 Version 3 RIM

<br>好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。
<br>
<br>you can download the free java development kit for HL7 Version 3 RIM from here.
<br>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/hl7sdk/20041116/HL7SDKv10_bin.zip" target="_blank">http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip</a>
<br>
<br><a href="http://trials.nci.nih.gov/trials/projects/infrastructureProject/hl7_sdk/HL7_SDK_QuickStart" target="_blank">http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart</a>
<br>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/JAVASIG_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a>
<br>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/HL7SDK_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>[quote=jing.wang,2005-09-13 16:27]
<br>HL7 JAVA SIG Co-Chair Dr. Peter Hendler 是我的一个朋友。Dr. Hendler 本人是Kaiser Permanente的医生。以下是他为下周HL7 San Diego 大会准备的一份简介。 参加大会的朋友,如果感兴趣的话,您可以直接到JAVA SIG 去找Peter. 其他朋友如有兴趣,我也可以进一步帮忙搭桥。谢谢。
<br>Java SIG README for demo release, September 9, 2005
<br>About the Java API to HL7 Version 3 RIM
<br>---------------------------------------
<br>HL7 Version 3 messages are all derived from the object-oriented data model called the RIM<!--editpost--><br><br><br><div><font class='editinfo'>此帖由 sfinder 在 2005-09-13 19:36 进行编辑...</font></div><!--editpost1-->
发表于 2005-9-14 10:08:44 | 显示全部楼层

Java API to HL7 Version 3 RIM

我主意到你文中的java SIG的版本似乎是新的,你有新的java SIG吗?我在HL7网站上只能下载2002年版的。旧的根本就没有mif的load工具
 楼主| 发表于 2005-9-14 10:41:51 | 显示全部楼层

Java API to HL7 Version 3 RIM

[quote=sfinder,2005-09-13 17:12]
<br>好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。
<br>you can download the free java development kit for HL7 Version 3 RIM from here.
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/hl7sdk/20041116/HL7SDKv10_bin.zip" target="_blank">http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip</a>
<br><a href="http://trials.nci.nih.gov/trials/projects/infrastructureProject/hl7_sdk/HL7_SDK_QuickStart" target="_blank">http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart</a>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/JAVASIG_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/HL7SDK_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a>
<br>---------------------------------------
<br>What NIH uses is the same API developed by Peter&#039;s team...
 楼主| 发表于 2005-9-14 10:56:31 | 显示全部楼层

Java API to HL7 Version 3 RIM

<!--quote-天下第七+2005-09-13 19:08--><div class='quotetop'>引用天下第七 &#064; 2005-09-13 19:08)</div><div class='quotemain'><!--quote1-->我主意到你文中的java SIG的版本似乎是新的,你有新的java SIG吗?我在HL7网站上只能下载2002年版的。旧的根本就没有mif的load工具<!--quote2--></div><!--quote3-->
<br>
<br>你是讲API吗?我可以问问Peter.
发表于 2005-9-14 11:35:37 | 显示全部楼层

Java API to HL7 Version 3 RIM

<p>是的,因为我看了源代码,没有你文中说的内容。</p>
发表于 2005-9-14 11:36:33 | 显示全部楼层

Java API to HL7 Version 3 RIM

<!--quote-jing.wang+2005-09-13 21:41--><div class='quotetop'>引用jing.wang &#064; 2005-09-13 21:41)</div><div class='quotemain'><!--quote1--><!--quote-sfinder+2005-09-13 17:12--><div class='quotetop'>引用sfinder &#064; 2005-09-13 17:12)</div><div class='quotemain'><!--quote1-->好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。
<br>you can download the free java development kit for HL7 Version 3 RIM from here.
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/hl7sdk/20041116/HL7SDKv10_bin.zip" target="_blank">http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip</a>
<br><a href="http://trials.nci.nih.gov/trials/projects/infrastructureProject/hl7_sdk/HL7_SDK_QuickStart" target="_blank">http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart</a>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/JAVASIG_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/HL7SDK_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a>
<br>---------------------------------------
<br>What NIH uses is the same API developed by Peter&#039;s team...<!--quote2--></div><!--quote3-->
<br>
<br>Hi  Wang
<br>
<br>I have to say Dr. Peter borrow it from NIH since the whole coding implementation was done by NIH. Dr. Peter may give
<br>some suggestion but he doen&#039;t know how to do the real implementation. (that&#039;s normal for the people in his position)
<br>动嘴不动手,上次在圣帝雅戈被sun的几个技术专家问得不知所云。v3的api实现几乎是听企业的,然后再由SIG出一份标准。这是大家都心知肚明的。也正因为如此所以v3一直没被正式生出来
发表于 2005-9-14 11:44:17 | 显示全部楼层

Java API to HL7 Version 3 RIM

<p><span class="normalname">hi,<a href="http://bbs.miforum.org/profile.php?u=1081" target="_blank">sfinder</a></span></p><p><span class="normalname">你提供的HL7 SDK的下载包中没有源代码</span></p>
发表于 2005-9-14 11:51:16 | 显示全部楼层

Java API to HL7 Version 3 RIM

<img src="http://bbs.miforum.org/images/smiles/cry.gif" border="0" onclick="j&#097;v&#097;script:window.open(this.src);" alt="" style="CURSOR: pointer" onload="j&#097;v&#097;script:if(this.width>screen.width-500)this.style.width=screen.width-500;" /> &nbsp;,我估计是要钱的。我是做实现的,动手不动嘴
 楼主| 发表于 2005-9-14 11:57:08 | 显示全部楼层

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.
<br>
<br>天下第七 - I&#039;ll ask Peter about the source code. I know little about it, but I&#039;ll ask tomorrow.
<br>
<br>If there&#039;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.<!--editpost--><br><br><br><div><font class='editinfo'>此帖由 jing.wang 在 2005-09-13 20:58 进行编辑...</font></div><!--editpost1-->
发表于 2005-9-14 11:57:21 | 显示全部楼层

Java API to HL7 Version 3 RIM

<p><!--quote-sfinder+2005-09-14 11:36--><div class='quotetop'>引用sfinder &#064; 2005-09-14 11:36)</div><div class='quotemain'><!--quote1--><br /><br />Hi Wang <br /><br />I have to say Dr. Peter borrow it from NIH since the whole coding implementation was done by NIH. Dr. Peter may give <br />some suggestion but he doen't know how to do the real implementation. (that's normal for the people in his position) <br />动嘴不动手,上次在圣帝雅戈被sun的几个技术专家问得不知所云。v3的api实现几乎是听企业的,然后再由SIG出一份标准。这是大家都心知肚明的。也正因为如此所以v3一直没被正式生出来<!--quote2--></div><!--quote3--><br />世事知易而行难。听你一说,我才明白。我还想HL7的人很厉害,一定要用JDK1.5. 还使用了泛形,原来都是借过来的。</p>
发表于 2005-9-14 21:52:35 | 显示全部楼层

Java API to HL7 Version 3 RIM

天下第七,
<br>
<br>here is the source. It is free.
<br>
<br><a href="http://trials.nci.nih.gov/trials/trialslfs/download/hl7sdk/20041116/HL7SDKv10_src.zip" target="_blank">http://trials.nci.nih.gov/trials/trials...7SDKv10_src.zip</a>
<br>
<br>
<br>”HL7北美“是个很小的群体,就象个村子,大家都认识。干这行太久了,知道了太多不该知道的东西,原有的美感就没了。就像恋爱和结婚。
<br>不过觉得还是让中国将来的用户对我们有点美感好&lt;grin&gt;
<br>
<br>
<br>
<br>
<br>
<br>
<br>[quote=天下第七,2005-09-13 22:44]
<br>hi,<a href="http://bbs.miforum.org/profile.php?u=1081" target="_blank">sfinder</a>
<br>
<br>你提供的HL7 SDK的下载包中没有源代码
<br>[/quote<!--editpost--><br><br><br><div><font class='editinfo'>此帖由 sfinder 在 2005-09-14 11:42 进行编辑...</font></div><!--editpost1-->
发表于 2005-9-15 00:34:42 | 显示全部楼层

Java API to HL7 Version 3 RIM

<!--quote-jing.wang+2005-09-13 22:57--><div class='quotetop'>引用jing.wang &#064; 2005-09-13 22:57)</div><div class='quotemain'><!--quote1-->sfinder - what can I say, one is entitled to his/her own opinion. Fortunately I do not have to persuade you.&nbsp; <br>天下第七 - I&#039;ll ask Peter about the source code. I know little about it, but I&#039;ll ask tomorrow.&nbsp; <br>If there&#039;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.<!--quote2--></div><!--quote3-->
<br>
<br>不好意思,话说过头了,其实从学术上和peter探讨是很有益处。热切盼望王女士能牵线搭桥。
<br>ETER原来(现在)是个类风湿专家,对医疗信息电脑化有很大的热情,尤其对HL7做了很多无偿的工作。他是我们几个v3 JAVA API实现小组的一个小组长(CO-CHAIR). 这几个小组分别是来自Oracle,National Cancer Institute,University of Las Vegas,Kaiser Permanente。我们几个小组的工作其实是由SUN来领导的。因此说白了就是用SUN原来的那套标准来实现。
发表于 2005-9-15 08:30:03 | 显示全部楼层

Java API to HL7 Version 3 RIM

<p><!--quote-sfinder+2005-09-14 21:52--><div class='quotetop'>引用sfinder &#064; 2005-09-14 21:52)</div><div class='quotemain'><!--quote1--><br />天下第七, <br /><br />here is the source. It is free. <br /><br /><a href="http://trials.nci.nih.gov/trials/trialslfs/download/hl7sdk/20041116/HL7SDKv10_src.zip" target="_blank">http://trials.nci.nih.gov/trials/trials...7SDKv10_src.zip</a> <br /><br /><br />&rdquo;HL7北美&ldquo;是个很小的群体,就象个村子,大家都认识。干这行太久了,知道了太多不该知道的东西,原有的美感就没了。就像恋爱和结婚。 <br />不过觉得还是让中国将来的用户对我们有点美感好&lt;grin&gt; <br /><br />i am very appreciated, sfinder. you are very nice.<img src="http://bbs.miforum.org/images/smiles/tongue-out.gif" border="0" onclick="j&#097;v&#097;script:window.open(this.src);" alt="" style="CURSOR: pointer" onload="j&#097;v&#097;script:if(this.width>screen.width-500)this.style.width=screen.width-500;" />  </p><p><br /><br /><br /><br /><br /><!--quote-天下第七+2005-09-13 22:44--><div class='quotetop'>引用天下第七 &#064; 2005-09-13 22:44)</div><div class='quotemain'><!--quote1--> <br />hi,<a href="http://bbs.miforum.org/profile.php?u=1081" target="_blank">sfinder</a> <br /><br />你提供的HL7 SDK的下载包中没有源代码 <br />[/quote<br /><!--quote2--></div><!--quote3--><br /></p>
发表于 2005-9-15 14:50:58 | 显示全部楼层

Java API to HL7 Version 3 RIM

<!--quote-jing.wang+2005-09-14 10:41--><div class='quotetop'>引用jing.wang &#064; 2005-09-14 10:41)</div><div class='quotemain'><!--quote1--><br /><!--quote-sfinder+2005-09-13 17:12--><div class='quotetop'>引用sfinder &#064; 2005-09-13 17:12)</div><div class='quotemain'><!--quote1--> <br />好像去年就有HL7 Version 3 RIM 企业应用级的API放在网上免费下载了。 <br />you can download the free java development kit for HL7 Version 3 RIM from here. <br /><a href="http://trials.nci.nih.gov/trials/trialslfs/download/hl7sdk/20041116/HL7SDKv10_bin.zip" target="_blank">http://trials.nci.nih.gov/trials/trials...7SDKv10_bin.zip</a> <br /><a href="http://trials.nci.nih.gov/trials/projects/infrastructureProject/hl7_sdk/HL7_SDK_QuickStart" target="_blank">http://trials.nci.nih.gov/trials/projec..._SDK_QuickStart</a> <br /><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/JAVASIG_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a> <br /><a href="http://trials.nci.nih.gov/trials/trialslfs/download/Release1_0Javadoc/HL7SDK_javadoc/index.html" target="_blank">http://trials.nci.nih.gov/trials/trials...adoc/index.html</a> <br />--------------------------------------- <br />What NIH uses is the same API developed by Peter's team...<br /><!--quote2--></div><!--quote3--><br />it seems that java SIG has more functions according to&nbsp;readme file&nbsp;you offer initially. by the way, i found&nbsp;there're no hmd files or mif files in the distributed java api, so it is impossible to create message at all.&nbsp;&nbsp;
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

快速回复 返回顶部 返回列表