Android - Java parsing HL7 Message with HAPI v 2.2 with DefaultHapiContext

夙愿已清 提交于 2019-12-01 11:23:14

It seems you forgot to add Hapi library to your build. If you using maven you just need to add appropriate maven dependencies as described here http://hl7api.sourceforge.net/using_maven.html

<!-- This is the core HAPI library -->
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-base</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>       

<!-- This is the structure JAR for HL7 v2.1 -->
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v21</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>

<!-- 
        If you want to use log4j for logging (recommended), you should include
        it, as well as the slf4j adaptor
-->
<dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
</dependency>
<dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
</dependency>

<!-- 
        Also add hapi-structures-v22, v23, etc. depending on which versions 
        of HL7 you need to create or parse 
-->     
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v22</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v23</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v231</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v24</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v25</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v251</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>
<dependency>
        <groupId>ca.uhn.hapi</groupId>
        <artifactId>hapi-structures-v26</artifactId>
        <version>${hapi.version.stable}</version>
</dependency>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!