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.
|
|
| perform (self, server) |
| Construct the search URL and execute it against the given server.
|
|
| perform_resources (self, server) |
| Performs the search by calling perform , then extracts all Bundle entries and returns a list of Resource instances.
|
|
Create a FHIR search from NoSQL-like query structures.
◆ __init__()
fhirclient.models.fhirsearch.FHIRSearch.__init__ |
( |
|
self, |
|
|
|
resource_type, |
|
|
|
struct = None |
|
) |
| |
◆ 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()
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_resources()
fhirclient.models.fhirsearch.FHIRSearch.perform_resources |
( |
|
self, |
|
|
|
server |
|
) |
| |
Performs the search by calling perform
, then extracts all Bundle entries and returns a list of Resource instances.
- Parameters
-
server | The server against which to perform the search |
- Returns
- s A list 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: