Patient-level Export - $everything๏
Note
The features described on this page are available in the following Firely Server editions:
Firely Scale - ๐ / ๐บ๐ธ
Firely Prior Authorization - ๐บ๐ธ
Description๏
This plugin implements the Patient $everything operation, as described in https://www.hl7.org/fhir/operation-patient-everything.html. This operation returns all resources associated with a single patient. The resources returned are determined by the Patient compartment, defined in https://www.hl7.org/fhir/compartmentdefinition-patient.html. Currently, the functionality is only available if you use SQL server or MongoDB for your data.
GET <base-url>/Patient/<patient-id>/$everything
Accept: <any supported FHIR media type>
Optional parameters:
_since: Get only resources changed since this moment
_until: Get only resources changed until this moment
_type: Limit the returned resource types to only the types in this list
Please note that other defined operation parameters have not been implemented (yet).
So if you would want to fetch only Patient 1 and their Observations, changed since the 1st of January, 2021 in FHIR JSON format, you would use:
GET <base-url>/Patient/1/$everything?_type=Patient,Observation&_since=2021-01-01
Accept: application/fhir+json
Configuration๏
Many resources in the Patient compartment reference resources outside the compartment. For example: An Observation might have a performer which is a Practitioner. As Practitioner itself is not in the Patient compartment, the resource would normally not be returned. But using a setting you can control which additional resource types are returned if they are referenced by any of the resources you requested.
"PatientEverythingOperation": {
"AdditionalResources": [ "Organization", "Location", "Substance", "Device", "Medication" ]
}
This is the default value for the setting. As you can see, Practitioner is not included by default out of privacy considerations but you can change that by overriding the setting.
Note: Device was added as an additional resource as it includes a reference to a patient but is not listed in the patientโs compartment yet. As soon as the specification is updated, it will be removed from the appsetttings and returned by default.
To include the plugin in your pipeline, add the following extra Include:
"PipelineOptions": {
"Branches": [
{
"Path": "/",
"Include": [
...
"Vonk.Plugin.PatientEverything"
]
},
...
]
}
Pagination for $everything๏
Pagination for the $everything operation in generally follows the pagination behavior of Firely Server as described in Navigational paging links. Specific to the $everything operation there are a few notes:
The results of the $everything operations are always paginated using a
_continuationTokenfor retrieving the next page.Search Anonymization will not be applied to the
nextlinks of the results bundle.The number of resources returned in one response can be set with the
_countparameter. This parameter is capped by theBundleOptions.MaxCountsetting, meaning that if_countexceeds this value, it will be limited toBundleOptions.MaxCount. If omitted,_countis set to the value ofBundleOptions.DefaultCount.For optimized performance, the
_totalparameter is not supported and will be ignored when being set in the query.
