简体   繁体   English

使用Hapi在单个应用程序中创建HL7消息的多个版本

[英]Creating multiple versions of HL7 messages within a single application using Hapi

I am new to HL7 and Hapi. 我是HL7和Hapi的新手。 By reading hapi tutorials, I figured out how to support parsing of multiple versions of HL7 in a single application: http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/HandlingMultipleVersions.html 通过阅读hapi教程,我了解了如何在单个应用程序中支持解析HL7的多个版本: http : //hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/HandlingMultipleVersions.html

However, I am not sure how to support multiple HL7 versions while creating new messages. 但是,我不确定在创建新消息时如何支持多个HL7版本。 ie If I use packages and structure of version 2.6 and I want to construct HL7 message of version 2.3, How can I do that with Hapi? 即,如果我使用版本2.6的软件包和结构,并且要构造版本2.3的HL7消息,那么如何使用Hapi做到这一点?

The easiest way to accomplish this is actually to just use the structures for the highest version you want to support. 实际上,最简单的方法是仅使用要支持的最高版本的结构。

In HL7 v2.x nothing is ever removed, they only add things to the structures and sometimes mark things as obsolete. 在HL7 v2.x中,什么都没有删除,它们仅将内容添加到结构中,有时将其标记为过时。 So it's possible to create a valid 2.3 message using a 2.6 structure (but not necessarily vice versa). 因此,可以使用2.6结构创建有效的2.3消息(但不一定相反)。

The only thing to watch out for is that you put "2.3" in the version field in the MSH segment, and that you don't accidentally use 2.6 fields that don't exist in HL7 v2.3. 唯一需要注意的是,您在MSH段的version字段中输入了“ 2.3”,并且您不会意外使用HL7 v2.3中不存在的2.6字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM