Bulk Data Access IG
4.0.0 - STU 4 International flag

Bulk Data Access IG, published by HL7 International / FHIR Infrastructure. This guide is not an authorized publication; it is the continuous build for version 4.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/bulk-data/ and changes regularly. See the Directory of published versions

OperationDefinition: System Level Export Operation Definition

Official URL: http://hl7.org/fhir/uv/bulkdata/OperationDefinition/export Version: 4.0.0
Standards status: Trial-use Maturity Level: 5 Computable Name: BulkDataExport

FHIR Operation through which an authenticated and authorized Data Consumer may request bulk FHIR data from a Data Provider, whether or not the data is associated with a patient. This supports use cases like backing up a Data Provider's FHIR server, or exporting terminology data by restricting the resources returned using the _type parameter. The Data Provider's FHIR Resource Server SHALL support invocation of this operation using the FHIR Asynchronous Bulk Interaction Pattern

Language: en

URL: [base]/$export

Parameters

UseNameScopeCardinalityTypeBindingDocumentation
IN_outputFormat0..1string

Support is required for a Data Provider, optional for a Data Consumer.

The format of the bulk data files generated through the FHIR Asynchronous Bulk Interaction Pattern. Defaults to application/fhir+ndjson. The Data Provider SHALL support Newline Delimited JSON, but MAY choose to support additional output formats. The Data Provider SHALL accept the full content type of application/fhir+ndjson as well as the abbreviated representations application/ndjson and ndjson.

IN_since0..1instant

Support is required for a Data Provider, optional for a Data Consumer.

Resources will be included in the response if their state has changed after the supplied time (e.g., if Resource.meta.lastUpdated is later than the supplied _since time). The Data Provider MAY return resources that are referenced by the resources being returned regardless of when the referenced resources were last updated. For resources where the Data Provider does not maintain a last updated time, the Data Provider MAY include these resources in a response irrespective of the _since value supplied by a Data Consumer.

IN_until0..1instant

Support is optional for a Data Provider, optional for a Data Consumer.

Resources will be included in the response if their state has changed before the supplied time (e.g., if Resource.meta.lastUpdated is earlier than the supplied _until time). The Data Provider MAY return resources that are referenced by the resources being returned regardless of when the referenced resources were last updated. For resources where the Data Provider does not maintain a last updated time, the Data Provider MAY include these resources in a response irrespective of the _until value supplied by a Data Consumer.

IN_type0..*string

Support is optional for a Data Provider, optional for a Data Consumer.

The response SHALL be filtered to only include resources of the specified resource type(s).

If this parameter is omitted, the Data Provider SHALL return all supported resources within the scope of the Data Consumer's authorization, though implementations MAY limit the resources returned to specific subsets of FHIR, such as those defined in the US Core Implementation Guide.

A Data Provider that is unable to support _type SHOULD return an error and FHIR OperationOutcome resource so the Data Consumer can re-submit a request omitting the _type parameter. If the Data Consumer explicitly asks for export of resources that the Data Provider does not support, or asks for only resource types that are outside the Patient Compartment, the Data Provider SHOULD return details via a FHIR OperationOutcome resource in an error response to the request. When a Prefer: handling=lenient header is included in the request, the Data Provider MAY process the request instead of returning an error.

For example _type=Observation could be used to filter a given export response to return only FHIR Observation resources.

IN_elements0..*string

Experimental support is optional for a Data Provider, optional for a Data Consumer.

When provided, the Data Provider SHOULD omit unlisted, non-mandatory elements from the resources returned. Elements SHOULD be of the form [resource type].[element name] (e.g., Patient.id) or [element name] (e.g., id) and only root elements in a resource are permitted. If the resource type is omitted, the element SHOULD be returned for all resources in the response where it is applicable.

A Data Provider is not obliged to return just the requested elements. A Data Provider SHOULD always return mandatory elements whether they are requested or not. A Data Provider SHOULD mark the resources with the tag SUBSETTED to ensure that the incomplete resource is not actually used to overwrite a complete resource.

A Data Provider that is unable to support _elements SHOULD return an error and a FHIR OperationOutcome resource so the Data Consumer can re-submit a request omitting the _elements parameter. When a Prefer: handling=lenient header is included in the request, the Data Provider MAY process the request instead of returning an error.

INincludeAssociatedData0..*codeInclude Associated Data Value Set (Extensible)

Experimental support is optional for a Data Provider, optional for a Data Consumer.

When provided, a Data Provider with support for the parameter and requested values SHALL return or omit a pre-defined set of FHIR resources associated with the request.

A Data Provider that is unable to support the requested includeAssociatedData values SHOULD return an error and a FHIR OperationOutcome resource so the Data Consumer can re-submit a request that omits those values (for example, if a Data Provider does not retain provenance data). When a Prefer: handling=lenient header is included in the request, the Data Provider MAY process the request instead of returning an error.

A Data Consumer MAY include one or more of the following values. If multiple conflicting values are included, the Data Provider SHALL apply the least restrictive value (value that will return the largest dataset).

  • LatestProvenanceResources: Export will include the most recent Provenance resources associated with each of the non-provenance resources being returned. Other Provenance resources will not be returned.
  • RelevantProvenanceResources: Export will include all Provenance resources associated with each of the non-provenance resources being returned.
  • _[custom value]: A Data Provider MAY define and support custom values that are prefixed with an underscore (e.g., _myCustomPreset).
IN_typeFilter0..*string

Support is optional for a Data Provider, optional for a Data Consumer.

String of a FHIR REST search query.

When provided, a Data Provider with support for the parameter and requested search queries SHALL filter the data in the response for resource types referenced in the typeFilter expression to only include resources that meet the specified criteria. FHIR search result parameters such as _include and _sort SHALL NOT be used and a query in the _typeFilter parameter SHALL have the search context of a single FHIR Resource Type. See details.

A Data Provider unable to support the requested _typeFilter queries SHOULD return an error and FHIR OperationOutcome resource so the Data Consumer can re-submit a request that omits those queries. When a Prefer: handling=lenient header is included in the request, the Data Provider MAY process the request instead of returning an error.

INorganizeOutputBy0..1string

Support is optional for a Data Provider, optional for a Data Consumer.

String of a FHIR resource type.

When provided, a Data Provider with support for the parameter SHALL organize the resources in output files by instances of the specified resource type, including a header for each resource of the type specified in the parameter, followed by the resource and resources in the output that contain references to that resource. When omitted, Data Providers SHALL organize each output file with resources of only a single type. See details, example manifest, and example output file.

A Data Provider unable to structure output by the requested organizeOutputBy resource SHOULD return an error and FHIR OperationOutcome resource. When a Prefer: handling=lenient header is included in the request, the Data Provider MAY process the request instead of returning an error.

INallowPartialManifests0..1boolean

Support is optional for a Data Provider, optional for a Data Consumer.

When provided, a Data Provider with support for the parameter MAY distribute the bulk data output files among multiple manifests, providing links for Data Consumers to page through the manifests (see details). Prior to all of the files in the export being available, the Data Provider MAY return a manifest with files that are available along with a 202 Accepted HTTP response status, and subsequently update the manifest with a paging link to a new manifest when additional files are ready for download (see details).