简体   繁体   中英

Find the observation with the given ID, hapi Fhir

Bundle response = client.search() .forResource("Observation")
.where(....) .returnBundle(Bundle.class) .execute();

Searched a whole while and still can not get the answer. I am using hapi fhir http://hapifhir.io/ , and using Java.

Unless you figured it out already, you need to add the class in the forRsource():

Bundle response = client.search() .forResource(Observation.class)
.where(....) .returnBundle(Bundle.class) .execute();

And if you have more than 10 Entries, you should have a look at https://github.com/jamesagnew/hapi-fhir/blob/master/examples/src/main/java/example/BundleFetcher.java which reads all the pages in the Bundle and adds it to your Bundle object!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM