HapiFhir toListOfResourcesOfType()方法有什么作用?

问题描述 投票:0回答:1

我有这个getPatients()方法,我得到家人姓名与“Goodwin32”相匹配的病人。这是我的代码:

public List<Patient> getPatients(){
        Bundle bundle = client.search().forResource(Patient.class)
                .where(new StringClientParam("family").matches().value("Goodwin32"))
                .prettyPrint()
                .returnBundle(Bundle.class)
                .execute();

我尝试通过调用toListOfResourcesOfType()将包中的信息提取到列表中:

 return BundleUtil.toListOfResourcesOfType(ctx, bundle, Patient.class);

但是,返回的项目仍然是捆绑而不是患者列表?

hl7-fhir hapi hapi-fhir hapi-fhir-android-library
1个回答
0
投票

该方法应该像您期望的那样工作。

你的意思是你从toListOfResourcesOfType方法得到一个Bundles列表?您确定要与之通话的服务器实际上是否正在响应预期的搜索结果?

© www.soinside.com 2019 - 2024. All rights reserved.