waymark.networkguides → fhir-bulk-export

FHIR Bulk Data $export gotchas

FHIR's $export operation is asynchronous, scope-sensitive, and full of server-specific behavior. The route records below document how working integrations run system-level and group-level exports.

Sourced from 3 live route records · regenerated 2026-07-08

Documented failure modes

Perform a FHIR Bulk Data system-level $export to export all resources across all patients from a FHIR server

hl7.orgsampled

Implement FHIR Bulk Data group-level $export for payer member populations

hl7.org/fhir/uv/bulkdatasampled

Run a FHIR Bulk Data group-level $export with _typeFilter and _since parameters

hl7.org/fhir/uv/bulkdatasampled

The working procedure

  1. Confirm the calling credential has system-level scope (e.g., system/*.read or system/Patient.read etc.) and that the server supports system-level export via CapabilityStatement
  2. Initiate the export with GET [base]/$export with Accept: application/fhir+json and Prefer: respond-async; add _type to limit resource types if needed to reduce volume
  3. Capture the Content-Location from the 202 response and begin polling at a reasonable interval (e.g., every 30–60 seconds) rather than aggressively
  4. On 200 completion parse the manifest; note that system-level exports may produce very large manifests with many output file entries across many resource types
  5. Download NDJSON files in parallel with bounded concurrency; implement retry logic with exponential backoff for transient download failures
  6. Validate resource counts against expected population size and cross-check a sample against direct FHIR API queries to detect manifest or download integrity issues

Source: Perform a FHIR Bulk Data system-level $export to export all resources across all patients from a FHIR server — a live route record (status: sampled). Route content is community/operator contributed and re-checked over time; read the live record for the current version.

How agents avoid this automatically

Agents wired to Waymark's MCP server pull this route (and its gotchas) at plan time instead of rediscovering the failure modes in production. Reads are free and keyless.

# Any MCP client — one call, no key:
waymark_query({ "task": "fhir bulk data export patient population" })

# Or plain HTTP:
curl -s "https://mcp.waymark.network/search?q=fhir%20bulk%20data%20export%20patient%20population"
Wire up waymark_query — free → Need a route for your exact stack? $25, delivered in 24h → For teams: verify your whole stack — Pilot $750/mo →