Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何"$提交;HAPI FHIR的包裹?_Java_Hl7 Fhir_Hapi_Hapi Fhir - Fatal编程技术网

Java 如何"$提交;HAPI FHIR的包裹?

Java 如何"$提交;HAPI FHIR的包裹?,java,hl7-fhir,hapi,hapi-fhir,Java,Hl7 Fhir,Hapi,Hapi Fhir,我打算给FHIR服务器打个电话。出于同样的原因,我使用以下代码片段调用服务器 Bundle bundle = new Bundle(); bundle.setType(BundleType.BATCH); bundle.addEntry() .setResource(coverageEligibilityRequest) .getRequest() .setUrl("CoverageEligibilityReque

我打算给FHIR服务器打个电话。出于同样的原因,我使用以下代码片段调用服务器

    Bundle bundle = new Bundle();
    bundle.setType(BundleType.BATCH);
    bundle.addEntry()
        .setResource(coverageEligibilityRequest)
        .getRequest()
        .setUrl("CoverageEligibilityRequest/$submit")
        .setMethod(Bundle.HTTPVerb.POST);
其中,我以以下方式配置了
客户端

    IGenericClient client = ctx.newRestfulGenericClient("https://www.amk.com/R4/");

我期待在
包中
覆盖范围内包含
患者
的响应

    Bundle response = client.transaction().withBundle(bundle).withAdditionalHeader("Authorization", "Bearer " +accessToken).execute();

这是正确的方法吗

由于使用了邮递员,我可以点击并得到响应,我点击的URL是
https://www.amk.com/R4/CoverageEligibilityRequest/$submit

{
    "resourceType": "Bundle",
    "type": "batch",
    "entry": [
        {
            "resource": {
                "resourceType": "CoverageEligibilityRequest",
                "patient": {
                 ...
                 ...
                 },
            "request": {
                "method": "POST",
                "url": "CoverageEligibilityRequest/$submit"
            }
        }
    ]
}
我可以知道如何通过Hapi FHIR进行吗?我需要走这条路吗

Parameters outParams = client
         .operation()
         .onInstance(new IdType("Patient", "1"))
         .named("$submit")
         .withParameters(inParams)
         .useHttpPost() 
         .execute();
但是这里我们传递的是
而不是
患者

如果能在这方面得到任何帮助,我将不胜感激