Stream: hapi
Topic: HAPI FHIR Pagination
Uma Prasath (Oct 03 2017 at 23:11):
Hi,
The context is regarding pagination for HealthcareService rest endpoint for Search using HAPI FHIR. I could see the HAPI FHIR Pagination generates Hateos url for next, prev as below. But this won't work in a clustered environment.
v3?_getpages=02d9f81a-0dee-4756-b2ff-b873067f7081&_getpagesoffset=2&_count=2&_format=json&_bundletype=searchset".
I could not find a way to override the bundle's paging url. As per the FHIR spec, it should be like the one below.
<link>
<relation value="first"/>
<url value="http://example.org/Patient?name=peter&stateid=23&page=1"/>
</link>
<link>
<relation value="previous"/>
<url value="http://example.org/Patient?name=peter&stateid=23&page=2"/>
</link>
<link>
<relation value="next"/>
<url value="http://example.org/Patient?name=peter&stateid=23&page=4"/>
</link>
The issue is, the FHIR implementation cache the search query for a given uuid and provides the pagination url but this won't work in a clustered environment. Because if the first request goes to node1 and it cache the search query and the subsequent request goes to node2 it wont have the cached search query for the given uuid and it won't paginate.
Could you please point me to some reference implementation ?
Shubham gupta (Nov 30 2021 at 10:26):
Hi Everyone,
How can i get the total number of users for any given resource such as Patient, Practitioner, Person from client.search() ? so that i can mange the page number in pagination.
Last updated: Apr 12 2022 at 19:14 UTC