Create a FHIR search from NoSQL-like query structures.
More...
|
| __init__ (self, resource_type, struct=None) |
|
| construct (self) |
| Constructs the URL with query string from the receiver's params.
|
|
| include (self, reference_field, reference_model=None, reverse=False) |
| Add a resource to be included in the search results.
|
|
'Bundle' | perform (self, server) |
| Construct the search URL and execute it against the given server.
|
|
Iterator[ 'Bundle'] | perform_iter (self, server) |
| Perform the search by calling perform and return an iterator that yields Bundle instances.
|
|
'list[Resource]' | perform_resources (self, server) |
| Performs the search by calling perform_resources_iter and returns a list of Resource instances.
|
|
Iterator[ 'Resource'] | perform_resources_iter (self, server) |
| Performs the search by calling perform_iter and yields Resource instances from each Bundle returned by the search.
|
|
|
'Bundle' | _read_bundle (self, server) |
| Construct the search URL and execute it against the given server.
|
|
Create a FHIR search from NoSQL-like query structures.
◆ __init__()
fhirclient.models.fhirsearch.FHIRSearch.__init__ |
( |
|
self, |
|
|
|
resource_type, |
|
|
|
struct = None |
|
) |
| |
◆ _read_bundle()
'Bundle' fhirclient.models.fhirsearch.FHIRSearch._read_bundle |
( |
|
self, |
|
|
|
server |
|
) |
| |
|
protected |
Construct the search URL and execute it against the given server.
- Parameters
-
server | The server against which to perform the search |
- Returns
- s A Bundle resource
◆ construct()
fhirclient.models.fhirsearch.FHIRSearch.construct |
( |
|
self | ) |
|
Constructs the URL with query string from the receiver's params.
◆ include()
fhirclient.models.fhirsearch.FHIRSearch.include |
( |
|
self, |
|
|
|
reference_field, |
|
|
|
reference_model = None , |
|
|
|
reverse = False |
|
) |
| |
Add a resource to be included in the search results.
Includes will fetch additional resources referred to by the search results, or additional resources which themselves refer to the search results (reverse include). Recursive or iterative includes are not supported. Provides a fluent interface to allow method chaining.
To include Patient resources when searching Observations: ‘s = FHIRSearch(Observation).include('subject’) To include Observation resources when searching Patients:
s = FHIRSearch(Patient).include('subject', Observation, reverse=True)`
- Parameters
-
reference_field | The name of the search parameter (must be FHIRReference type) |
reference_model | The type of the source resource from which the join comes (only used for reverse includes) |
reverse | Whether this is a reverse include |
- Returns
- s This FHIRSearch instance
◆ perform()
'Bundle' fhirclient.models.fhirsearch.FHIRSearch.perform |
( |
|
self, |
|
|
|
server |
|
) |
| |
Construct the search URL and execute it against the given server.
- Parameters
-
server | The server against which to perform the search |
- Returns
- s A Bundle resource
◆ perform_iter()
Iterator['Bundle'] fhirclient.models.fhirsearch.FHIRSearch.perform_iter |
( |
|
self, |
|
|
|
server |
|
) |
| |
Perform the search by calling perform
and return an iterator that yields Bundle instances.
- Parameters
-
server | The server against which to perform the search |
- Returns
- s An iterator of Bundle instances
◆ perform_resources()
'list[Resource]' fhirclient.models.fhirsearch.FHIRSearch.perform_resources |
( |
|
self, |
|
|
|
server |
|
) |
| |
Performs the search by calling perform_resources_iter
and returns a list of Resource instances.
- Parameters
-
server | The server against which to perform the search |
- Returns
- s A list of Resource instances
◆ perform_resources_iter()
Iterator['Resource'] fhirclient.models.fhirsearch.FHIRSearch.perform_resources_iter |
( |
|
self, |
|
|
|
server |
|
) |
| |
Performs the search by calling perform_iter
and yields Resource instances from each Bundle returned by the search.
- Parameters
-
server | The server against which to perform the search |
- Returns
- s An iterator of Resource instances
◆ includes
fhirclient.models.fhirsearch.FHIRSearch.includes |
◆ params
fhirclient.models.fhirsearch.FHIRSearch.params |
◆ resource_type
fhirclient.models.fhirsearch.FHIRSearch.resource_type |
◆ wants_expand
fhirclient.models.fhirsearch.FHIRSearch.wants_expand |
The documentation for this class was generated from the following file: