search_plan
How a FHIR R4 search is to be run, decided before it is sent.
Module
Functions
search_filters
def search_filters( search_params: Mapping[str, str | Sequence[str]], codes: Sequence[str] | None,) ‑> SearchFilters:Which of the searches for a resource type search_params make.
The same for every patient, so a search's timeouts can be counted across
patients apart from the type's other searches. Every filter param counts by
name; code and category count by value too, as they pick what a search
is for. Droppable params are left out: dropping one retries the same
search.
Arguments
search_params: The search's params.codes: The search'scodevalues, when passed separately.
Classes
PlanAction
class PlanAction(*args, **kwds):What to do with a search.
Attributes
SKIP_UNSUPPORTED: Send nothing: the server does not serve the type.SKIP_UNAVAILABLE: Send nothing: the search kept timing out and its recheck is not due. An answer already cached forparamsis still served, as that costs the server nothing.SPLIT_CODES: Run one search per code: the provider rejects a list.RUN: Sendparams.
SearchPlan
class SearchPlan( action: PlanAction, filters: SearchFilters = (), params: Mapping[str, str | Sequence[str]] = {}, droppable: tuple[str, ...] = (), left_off: tuple[str, ...] = (),):How a search is to be run.
Arguments
action: What to do with the search.filters: Which of the type's searches it is (seesearch_filters); empty for a type skipped as unsupported.params: What to send, forRUN; forSKIP_UNAVAILABLE, what would be sent.droppable: The params, in the order to try them, that may be dropped and the search retried without them if it fails, forRUNandSKIP_UNAVAILABLE.left_off: The droppable params left out ofparamsbecause the server is known to reject them, forRUNandSKIP_UNAVAILABLE.
Variables
-
action : PlanAction
-
droppable : tuple[str, ...]
-
filters : SearchFilters
-
left_off : tuple[str, ...]
-
params : Mapping[str, str | Sequence[str]]