Skip to content

Conversation

@RakinduM
Copy link
Contributor

Description

Added pagination support to the FHIR search operations with comprehensive test coverage. This implements standard FHIR pagination using Bundle links and allows for automatic fetching of multiple pages with configurable limits.

Related Issue

#129

Changes Made

  • Added pagination parameters (follow_pagination and max_pages) to search methods
  • Implemented pagination logic following FHIR Bundle.link specifications
  • Added tests for pagination functionality

Testing

Added the following test cases in test_fhir.gateway.py:

  • test_search_with_pagination: Verifies multi-page result fetching
  • test_search_with_max_pages: Tests page limit enforcement
  • test_search_with_pagination_empty_next_link: Validates handling of bundles without next links
  • test_search_with_pagination_and_provenance: Tests integration with provenance metadata

Checklist

  • I have read the contributing guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@RakinduM RakinduM marked this pull request as ready for review October 19, 2025 08:28
@RakinduM RakinduM changed the title Add pagination support to FHIRGateway.search method and correspondin Add pagination support to FHIRGateway.search method Oct 20, 2025
@RakinduM
Copy link
Contributor Author

Hi @jenniferjiangkells, If it is possible, could you add the Hacktoberfest-Accepted label ?

@jenniferjiangkells jenniferjiangkells linked an issue Oct 28, 2025 that may be closed by this pull request
@jenniferjiangkells
Copy link
Member

Hi @RakinduM thanks for this - looks good to me. I have linked it to the issue which is tagged with hacktoberfest :)

@jenniferjiangkells jenniferjiangkells merged commit dc75743 into dotimplement:main Oct 28, 2025
4 checks passed
@RakinduM
Copy link
Contributor Author

Hi @jenniferjiangkells, Glad to hear that! I spent some good time on this and really enjoyed working on it :).
Thanks for linking it to the issue and tagging Hacktoberfest!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle pagination in FHIR search

2 participants