-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenMRS pagination #1003
Comments
@PiusKariuki I'd like you to look at this too please. Is the issue clear? Maybe we should talk it over? |
Hi @josephjclark . Yeah I'd like to talk this over and see how we can solve this. Are you free for a call? |
Great. I think it has to be tomorrow now, I need to get my head down on a few things. I'll propose a meeting time now |
Awesome. I got the link. See you then. |
To util we'll add
We should log with query params every individual request (shows a heartbeat to users) Ensure each request logs with query parameters |
We've hit on a couple of problems with OpenMRS pagination.
In 4.3.0, if you do searchPatient({ q: 'foo', limit: '100' } (does limit really have to be a string??) , it'll auto-page all data in pages of 100. It will not download 100 search results and return.
In other words, limit is actually working as pageSize, not limit, which is super misleading.
Against the new 5.0 branch, what we need to ensure is this:
limit
pageSize
andoffset
options. These do not map directly to url query parameters.pageSize
controls how many are downloaded per page.limit
controls how many in total are downloaded. The API needs to take care to not download more than the limit. I think by default we should download everything? Note that just 400 patient records seems to blow up the worker (although we're working on that)http.*
namespace should not auto-page by default. It should do whatever you ask of it.If you passquery.limit
, it'll just send that to the server and give you a page of dataautopage: true
option tohttp.get
? Or maybe we supportoptions.limit
andoptions.pageSize
, and forhttp.get
we'll honour them for you?. But if we disable autopage by default forhttp
, we can add options to enable it as minor patches later.The text was updated successfully, but these errors were encountered: