-
Notifications
You must be signed in to change notification settings - Fork 518
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
Support _skip parameter for pagination #2454
Comments
@almostchristian - Apologizes on delayed response. We would be interested to review. |
@EXPEkesheth I created a draft PR here #3536 |
Thanks @almostchristian - have scheduled it in our queue for review. We will respond back once we have reviewed or have additional questions. |
@almostchristian |
Paging with FHIR server currently uses a continuation token which is not meant to be directly manipulated by the client. This limits traditional paging GUIs other than an infinite scrolling list.
Ideally it should look something like below:
I created a POC to enable this for the SQL Server provider. Please have a look.
https://github.com/almostchristian/fhir-server/tree/fhir/paging
The change involves converting the usages of
TOP
intoOFFSET
A lot of change had to be done to support sorting, which is still tricky. Since sorting can happen in two phases, the skip parameter in the POC resets when the second phase starts. I denote the second phase with a hyphen in the skip parameter,
The search urls when sorting is involved can look like below. In here, repurposed
ct
as the skip parameter.Since I am currently working with a fork of FHIR server, I plan to go introduce this to our implementation. The sorting issue is a bummer, but I don't think this can be avoided without a big redesign. I'd like to hear feedback on this implementation. The E2E integration tests all pass, but I'm not sure if there is some edge cases not covered in the integration tests that could break this.
In terms of performance, the generated query plan is the same with the original, but the OFFSET version seems to be heavier compared to the TOP version outside of the first page, but I'd need to do proper testing on a large db.
AB#105830
The text was updated successfully, but these errors were encountered: