捆绑响应= client.search()。forResource(“观察”) .where(....)。returnBundle(Bundle.class).execute();
搜索了一整天仍然无法得到答案。我正在使用hapi fhir http://hapifhir.io/,并使用Java。
除非你已经弄明白了,否则你需要在forRsource()中添加类:
Bundle response = client.search() .forResource(Observation.class)
.where(....) .returnBundle(Bundle.class) .execute();
如果你有超过10个条目,你应该看一下https://github.com/jamesagnew/hapi-fhir/blob/master/examples/src/main/java/example/BundleFetcher.java,它读取Bundle中的所有页面并将它添加到你的Bundle对象!