FHIR pagination is not a single mechanism that can be assumed to behave identically across servers, and incremental synchronization makes those differences consequential. The FHIR specification defines a searchset Bundle with link relations for paging, but it leaves page-size defaults, offset support, and total-count precision to implementers. For a synchronization client, the practical question is whether a server can return only resources changed since a timestamp and whether the client can reliably walk every page without missing or duplicating records. The answer depends on three layers: the normative search contract, the server's documented pagination parameters, and the client's deduplication strategy. This article examines those layers using the FHIR R5 search specification, Google Cloud Healthcare API, Flexpa, Pathling, OpenMRS, and InterSystems IRIS for Health documentation. [1][2][3][5][6][8]

The Search Contract: Ordering, Totals, and Page Links

The FHIR specification establishes a fixed sequence for search processing. Filters are applied first, then the result set is sorted, then paging is applied, and only after that are included resources added for each page. This ordering matters for synchronization because a client that requests _include or _revinclude resources must expect those related resources to appear on the same page as the primary matches, even if some included resources were already returned on earlier pages. The specification states that all _include resources related to the primary resources for a page should be returned as part of that same page. [1]

Bundle.total represents the number of resources matching the search parameters, not the number returned in a particular response. The specification allows a client to send the _total parameter to indicate whether it wants an accurate count, an estimate, or no count at all. This distinction is important for incremental synchronization because a client cannot use Bundle.total as a progress indicator unless it knows whether the server is returning a precise number. The specification notes that calculating a precise number may be onerous for the server depending on its design. [1]

Timestamp Filters and the Incremental Pull Pattern

Incremental synchronization typically begins with a timestamp filter rather than a page offset. Flexpa documents a pattern using the ge prefix with _lastUpdated, such as Observation?_lastUpdated=ge2026-10-01T00:00:00Z, to retrieve only resources changed since the previous pull. Flexpa also warns that some resources, including Binary and Provenance, can store a new version even when nothing clinical changed. Those resources appear in each incremental pull, so the client should update existing copies by resource id instead of adding new copies. The same filter applies to Patient $everything through the _since parameter. [3]

Pathling describes a bulk export synchronization pipeline that uses the since parameter to retrieve only changed records after an initial full export. The documented approach combines incremental exports with Delta Lake merge functionality, where SaveMode.MERGE handles conflicts and updates automatically. This is a different synchronization model from page-by-page search: the bulk export endpoint produces files rather than searchset Bundles, and the merge step resolves record identity. The Pathling documentation attributes error handling and retry mechanisms to the bulk client rather than to FHIR pagination itself. [5]

A Validation Workflow for Your Own Endpoint

A useful hypothetical validation scenario is to create a small set of test resources, run an initial full pull, modify one resource, add one resource, and then run an incremental pull using _lastUpdated=ge with the timestamp of the first pull. Record whether the modified resource appears with the same id, whether the new resource appears, and whether any unchanged Binary or Provenance resources reappear. Then request the same incremental search with _count=1 and walk every next link, recording the resource ids on each page. Compare the concatenated page list against the unpaged result to detect duplicates or omissions. This is a suggestion for testing your own endpoint, not a claim about any vendor's tested behavior. [3]

Vendor Pagination Parameters: Count, Offset, and What Is Missing

Servers differ in which pagination parameters they expose. Flexpa documents _count to control page size and _offset to control page number, with a default page size of 20 and a maximum allowed page size of 1000. Flexpa also returns link relations for self, first, next, and previous in the searchset Bundle. The _offset parameter is a Flexpa-specific extension to the FHIR search contract, not a normative FHIR parameter. A synchronization client written against Flexpa can therefore request a specific page, but a client written against another server cannot assume that _offset exists. [3]

InterSystems IRIS for Health takes the opposite position. A community response from Patrick Jamieson states that the IRIS for Health FHIR server does not expose an _offset or _skip parameter for random-access paging. The documented options are standard FHIR paging through Bundle.link next and previous links, control over page size and maximum total results, or paging over SQL through the FHIR SQL Builder where OFFSET and FETCH are available. A follow-up comment from Robert Dingwell notes that a page attribute appeared in navigation links during testing, but the primary documentation answer remains that arbitrary page jumps are not supported through FHIR search. [8]

Total Counts as Estimates and the Cost of Accuracy

Google Cloud Healthcare API documents that the search total is an estimate until the last page is returned. The fhir.search method includes Bundle.total, but the documentation states that an accurate search total is returned with the last page of search results. For a synchronization client, this means that a running total displayed during a multi-page pull is provisional. Google recommends that applications display the current best estimate and recognize when the total becomes accurate after the final page. The documentation also recommends deduplicating included resources in the cache after each prefetch to reduce memory use. [2]

OpenMRS community discussion raises a related concern about performance. Burke Mamlin notes that returning a total count for arbitrary criteria, complex filters, or criteria that include unindexed data would not perform well in systems with hundreds of thousands or millions of encounters. Ian Bacher adds that the FHIR2 search API can be abused to create a pathological query. The OpenMRS FHIR2 API returns a total element for all searches even though the specification does not strictly require it, and it supports _summary=count for clients that want only the total. The default page size is 10, configurable through fhir2.paging.default, with a maximum controlled by fhir2.paging.maximum, which defaults to 100. [6]

Deduplication and Page Boundaries in Synchronization

Flexpa documents a deduplication rule that is directly relevant to incremental synchronization. Flexpa deduplicates on identity, not on meaning. A resource is considered the same if it has the same resource type and id, even if the content differs. Flexpa also states that two payers never write to the same resource, and Patient/$everything fetches every linked patient in parallel and matches on resource type and id before returning the Bundle. This guarantees that a given stored resource appears exactly once even when two fetches reach it. However, when paged with _count, each page is returned as it is read, so a resource can appear on more than one page. [3]

This page-boundary behavior creates a specific risk for synchronization clients. If a client assumes that each page contains only new resources, it may insert duplicates when the same resource appears on consecutive pages. The Flexpa documentation addresses this by instructing clients to update existing copies by resource id for resources such as Binary and Provenance that reappear in each incremental pull. The same identity-based update rule applies to any resource that crosses a page boundary. A synchronization client should therefore treat resource id as the merge key and apply an upsert operation rather than a blind insert. [3]