我在正在Eclipse中工作的Grails项目中使用FhirContext对象时遇到一些麻烦。我打算使用类似于此页面顶部的代码:
http://jamesagnew.github.io/hapi-fhir/doc_rest_client.html
我很确定,为此,我需要向项目中添加依赖项,然后导入一些库(我也不确定到底需要哪些库。)
我通过创建一个maven POM文件,将依赖项粘贴到其中,然后在BuildConfig.groovy文件中添加“pom true”行来添加在以下链接中找到的依赖项。
http://jamesagnew.github.io/hapi-fhir/download.html
仍然,当包含fhir库时仍然出现错误,因此无法使用任何FhirContext对象。
最佳答案
在google组(here)上,建议在BuildConfig.groovy中使用以下内容:
dependencies {
// HAPI - FHIR
compile 'ca.uhn.hapi.fhir:hapi-fhir-base:1.0'
compile 'ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:1.0'
// HAPI - FHIR Support
compile 'org.jscience:jscience:4.3.1'
compile 'org.apache.commons:commons-lang3:3.4'
}
关于grails - 如何在Grails项目中为RESTful客户端集成hapi-fhir依赖关系?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30675001/