Pagination

Pagination

FHIR pagination

  1. Send your initial search request

The value in the _count parameter should be a max of 10

GET [base]/fhir/QuestionnaireResponse?based-on:ServiceRequest.identifier=<questionnaireId>&_count=10
  1. Read the response Bundle

The server returns a Bundle containing the first page of results.

  1. Check Bundle.link

Look for a link where:

"relation": "next"
  1. Use the next URL exactly as returned

GET [base]<next.url>

Do not rebuild or edit the URL manually.

  1. Repeat for each page

Each response may contain another next link.

  1. Stop when there is no next link

That means you have reached the last page.

Key rule

Use the server-provided pagination links, not your own page numbers.