Secondary Use FHIR Server Implementation Guide
0.1.0 - ci-build

Secondary Use FHIR Server Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Bulk Export

Bulk Export

Endpoints

  • System export: GET [base]/$export
  • Cohort export: GET [base]/Group/{id}/$export
  • Status: GET [base]/bulk-status/{jobId}
  • Cancellation: DELETE [base]/bulk-status/{jobId}
  • NDJSON: GET [base]/bulk-files/{jobId}/{type}.ndjson

Kickoff requires:

Accept: application/fhir+json
Prefer: respond-async

The server returns 202 Accepted with Content-Location. Jobs complete synchronously in this prototype, so the first status poll normally returns HTTP 200 with the completed manifest.

Supported Standard Parameters

Parameter Behavior
_outputFormat application/fhir+ndjson (default), application/ndjson, or ndjson
_type comma-separated supported resource types
_since include resources with meta.lastUpdated strictly after the instant
_until include resources with meta.lastUpdated strictly before the instant
_typeFilter resource-scoped FHIR search; filters that output type independently
_elements comma-separated qualified or unqualified root elements

Unknown parameters are rejected with a FHIR OperationOutcome; they are never silently ignored.

Type Filter Semantics

_type=Patient&_typeFilter=Patient?gender=female

returns female Patient resources. _typeFilter does not construct a cohort or cause other resource types to follow the matching patients. Use Group/{id}/$export when patient cohort scope is required.

Elements and SUBSETTED

Selectors have the form element or ResourceType.element. Only root elements are supported. Mandatory elements are retained. Every filtered resource receives:

{
  "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationValue",
  "code": "SUBSETTED"
}

in Resource.meta.tag.

Manifest

The status response follows the Bulk Data manifest shape and includes transactionTime, request, requiresAccessToken, output, and error. Each output entry contains type, count, and an NDJSON url. Cancellation returns HTTP 202; a missing job or file returns a FHIR OperationOutcome.