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

Implementation Notes

Implementation

Stateless Exploration

  1. Parse the Patient search, including supported _has reverse chains.
  2. Execute direct Patient criteria and each reverse search against the source.
  3. For a resource-type count, parse its standard Patient reference chains and resolve the same Patient criteria internally.
  4. Intersect matching Patient ids internally, restrict the selected resource type, and return a _summary=count searchset Bundle with no entries.

Async Bulk Cohort Creation

  1. Validate asynchronous headers and parse the submitted Group.
  2. Validate the Bulk Cohort profile shape and every member-filter expression.
  3. Resolve and intersect Patient sets through resource ids, subject, patient, or Provenance targets.
  4. Persist an actual-member Group.
  5. Return 202 Accepted with Content-Location; polling returns a FHIR batch-response Bundle.

Group Export

  1. Validate asynchronous headers and standard Bulk Data parameters.
  2. Read the Group and its source Patient references.
  3. Fetch the requested resource types within that Group scope.
  4. Apply _typeFilter to its declared output type.
  5. Apply exclusive _since and _until bounds.
  6. Pseudonymize ids, references, direct identifiers, and dates.
  7. Apply _elements after pseudonymization and add SUBSETTED when requested.
  8. Persist the manifest and NDJSON output.
  9. Return 202 Accepted with Content-Location.

System export follows the same validation/privacy pipeline but starts from all supported source resources instead of Group members.

Component Boundaries

Component Responsibility
FhirSearchQuery resource-aware FHIR search parsing and validation
CohortRequest Bulk Cohort Group and member-filter validation
CohortStore persisted runtime Group lifecycle
BulkExportRequest strict standard Bulk Data inputs
FhirSearchBackend source search, system selection, and Group selection
PrivacyTransformer mandatory pseudonymization
ElementFilter standard root-element reduction and SUBSETTED tagging
BulkStore job manifest and NDJSON persistence

The adapter deliberately does not assign cohort semantics to _typeFilter.