148.8. 依赖项

要在 Camel 路由中使用 HL7,您需要添加上面列出的有关 camel-hl7 的依赖项,该依赖关系实施此数据格式。

HAPI 库被分成一个基础库和几个结构 ,每个 HL7v2 消息版本对应:

默认情况下,l -hl7 只引用 HAPI 基本库。应用程序负责包含结构库本身。例如,如果应用程序与 HL7v2 消息版本 2.4 和 2.5 一起工作,则必须添加以下依赖项:

<dependency>
    <groupId>ca.uhn.hapi</groupId>
    <artifactId>hapi-structures-v24</artifactId>
    <version>2.2</version>
    <!-- use the same version as your hapi-base version -->
</dependency>
<dependency>
    <groupId>ca.uhn.hapi</groupId>
    <artifactId>hapi-structures-v25</artifactId>
    <version>2.2</version>
    <!-- use the same version as your hapi-base version -->
</dependency>

或者,包含基本库的 OSGi 捆绑包可以从 中央 Maven 存储库 下载所有结构库和所需的依赖项(在捆绑包类路径中)。

<dependency>
    <groupId>ca.uhn.hapi</groupId>
    <artifactId>hapi-osgi-base</artifactId>
    <version>2.2</version>
</dependency>