0

我有这个 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);

但是,退回的物品仍然是捆绑包而不是患者列表?

4

1 回答 1

0

该方法应该完全按照您的预期工作。

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

于 2019-04-25T19:44:47.977 回答