Closed LanaNYC closed 2 months ago
Description:
This PR introduces pagination to FHIRClient, allowing efficient navigation of large FHIR datasets. Key methods include:
FHIRClient
fetch_next_page
next
get_next_link
sanitize_next_link
execute_pagination_request
Testing:
client_pagination_test.py
Notes:
Please review and provide feedback.
Fixes: #108
PR Title: Add Pagination to FHIRClient with Unit Tests
Description:
This PR introduces pagination to
FHIRClient
, allowing efficient navigation of large FHIR datasets. Key methods include:fetch_next_page
: Retrieves the next page via thenext
link in the FHIR Bundle.get_next_link
: Extracts thenext
link from the Bundle's links.sanitize_next_link
: Validates and sanitizes thenext
link URL.execute_pagination_request
: Handles the HTTP request and manages errors when fetching the next page.Testing:
client_pagination_test.py
cover pagination, handling missingnext
links, and errors.Notes:
Please review and provide feedback.
Fixes: #108