Functions | |
| Optional[ 'Bundle'] | _fetch_next_page ('Bundle' bundle, 'FHIRServer' server) |
Fetch the next page of results using the next link provided in the bundle. | |
| Optional[str] | _get_next_link ('Bundle' bundle) |
Extract the next link from the Bundle's links. | |
| str | _sanitize_next_link (str next_link) |
Sanitize the next link by validating its scheme and hostname against the origin server. | |
| 'Bundle' | _execute_pagination_request (str sanitized_url, 'FHIRServer' server) |
| Execute the request to retrieve the next page using the sanitized URL via Bundle.read_from. | |
| Iterator[ 'Bundle'] | iter_pages ('Bundle' first_bundle, 'FHIRServer' server) |
| Iterator that yields each page of results as a FHIR Bundle. | |
|
protected |
Execute the request to retrieve the next page using the sanitized URL via Bundle.read_from.
| sanitized_url | The sanitized URL to fetch the next page. |
| server | The FHIR server instance to perform the request. |
| HTTPError | If the request fails due to network issues or server errors. |
|
protected |
Fetch the next page of results using the next link provided in the bundle.
| bundle | The FHIR Bundle containing the next link. |
| server | The FHIR server instance for handling requests and authentication. |
|
protected |
Extract the next link from the Bundle's links.
| bundle | The FHIR Bundle containing pagination links. |
|
protected |
Sanitize the next link by validating its scheme and hostname against the origin server.
This function ensures the next link URL uses a valid scheme (http or https) and that it contains a hostname. This provides a basic safeguard against malformed URLs without overly restricting flexibility.
| next_link | The raw next link URL. |
| ValueError | If the URL's scheme is not `http` or `https`, or if the hostname does not match the origin server. |
| Iterator['Bundle'] fhirclient._utils.iter_pages | ( | 'Bundle' | first_bundle, |
| 'FHIRServer' | server | ||
| ) |
Iterator that yields each page of results as a FHIR Bundle.
| first_bundle | The first Bundle to start pagination. |
| server | The FHIR server instance to perform the request. |