$everything on Patient
This operation returns all the information related to one or more patients described in the resource or context on which this operation is invoked. The response is a bundle. Returns resources that the server has that are related to the patient Run Patient-everything:
Patient-everything supported parameters
_since
Include resources updated after the specified timestamp.
Set timeout for every internal search.
Limits return of each resource type. Partial support without pagination.
Examples
Get all resources directly linked to the patient pt-1
:
Get all resources directly linked to the patient pt-1
that were created or updated after Jan 1st 2021:
Performance note
$everything
is a heavy operation that performs several SQL requests. If one of the request's duration is too long, the operation will fail due to timeout.
This can be fixed in two ways:
Add
_timeout=<n-seconds>
search parameter;Optimize the request by adding an index.
Here's the list of search parameters that Aidbox uses to find everything about the patient.
For example, we suspect, that $everything operation is slow because we have a lot of Observations. The internal search for Observations that refer Patient is:
It will be transformed into:
To debug this, we can query using _explain search parameter:
And now we see the SQL and the PostgreSQL plan:
The next step is to optimize the request.
See:
Last updated
Was this helpful?