Stream: hapi
Topic: obtaining all resources created / updated after last request
Mareike Przysucha (Feb 23 2022 at 09:13):
Hi everyone.
I am relatively new to hapi, so sorry if my questions are kind of basic.
I am currently trying to get all new resources being created or last-updated after a certain date, and am able to establish a connection to my FHIR-Server (hapi, started with docker).
When I try the following code:
DateRangeParam param = new DateRangeParam().setLowerBound(new DateParam().setValue(lastFetched));
Bundle bundle = client.search().forAllResources().lastUpdated(param).returnBundle(Bundle.class).execute();
with lastFechted
being the date mentioned above, I get the following error:
HTTP 400 : This is the base URL of FHIR server. Unable to handle this request, as it does not contain a resource type or operation name.
I know that something is wrong with my search, and I see, that normally you would specify what kind of resource you are interested in.
But as I am interested in all resources, I am not sure what to do.
Has anyone an advice for me?
Thanks in advance! I really appreciate your help.
Patrick Werner (Feb 23 2022 at 16:22):
Hi Mareike, unfortunately this only works on the Resource level.
Patrick Werner (Feb 23 2022 at 16:22):
So you would have to repeat the search for every resource type of interest
Patrick Werner (Feb 23 2022 at 16:23):
Another option would be FHIR bulk export.
Mareike Przysucha (Feb 23 2022 at 17:18):
Hi Patrick, thanks, then I will do that.
Mareike Przysucha (Feb 23 2022 at 17:18):
The first: Look at the resources of interest.
Mareike Przysucha (Feb 23 2022 at 20:04):
Works.
Last updated: Apr 12 2022 at 19:14 UTC