onaio / fhir-gateway-extension

This repo holds the OpenSRP permissions checker and data access checker
Other
0 stars 1 forks source link

Pagination for List Entries #29

Closed lincmba closed 8 months ago

lincmba commented 8 months ago

succeeds https://github.com/onaio/fhir-gateway-plugin/issues/27

Problem: When the FHIR gateway is used to fetch data from a FHIR server using the List endpoint with a specific ID ([GET] /List?_id=<some-id>), it currently fetches a bundle containing entry URLs. For certain resources, like Locations, with a large number of entries, the gateway faces timeout errors due to the volume of data.

Temporary Fix: The temporary fix for the SID project was to increase the HTTP client timeout .

Proposed Solution: Implement pagination consistent with the current FHIR responses. Introduce two parameters, _page (default set to 1) and _count (default set to 20), passed to the URL. These parameters will help limit the number of items fetched from the FHIR server.

Workflow:

Acceptance Criteria:

ndegwamartin commented 8 months ago

We have to different handler methods for this functionality:

The current implementation works for the first one. We need the second one to have the same implementation.