Skip to content
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

Incorrect offset and _count in the "previous" link of the last page #2509

Closed
xluanlhc opened this issue Mar 26, 2021 · 1 comment · Fixed by #2719
Closed

Incorrect offset and _count in the "previous" link of the last page #2509

xluanlhc opened this issue Mar 26, 2021 · 1 comment · Fixed by #2719
Assignees
Labels

Comments

@xluanlhc
Copy link
Contributor

https://hapi.fhir.org/baseR4/Patient?family=wang&_count=30

Describe the bug
In the last page of the search results (via pagination), the offset and _count in the "previous" link are both wrong, unless the total number of results is a multiple of the page size (_count).

To Reproduce
Steps to reproduce the behavior:
Try this search:
https://hapi.fhir.org/baseR4/Patient?family=wang&_count=30
Click the "next link", you will see the "previous" link looks something like (note the offset and _count):
http://hapi.fhir.org/baseR4?_getpages=3b68200d-ac42-44d4-aca4-c0434cdd5f07&_getpagesoffset=19&_count=11&_pretty=true&_bundletype=searchset

Environment (please complete the following information):

  • HAPI FHIR Version: 5.3
  • OS: Windows
  • Browser: Chrome
@jmarchionatto jmarchionatto self-assigned this Jun 9, 2021
@jmarchionatto jmarchionatto linked a pull request Jun 9, 2021 that will close this issue
@jmarchionatto
Copy link
Collaborator

Fixed by #2719

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants