{"id":"288c394f-770d-4562-8a4c-6b39e9d7a6a0","task":"Execute a FHIR Bulk Data $export at the system level with _typeFilter to export only specific resource types meeting a filter criteria, then download and process the resulting NDJSON files","domain":"hl7.org/fhir","steps":["Send a GET or POST request to [base]/$export with the Prefer: respond-async header and query parameters including _type (comma-separated resource types) and _typeFilter (FHIR search parameter expressions per resource type)","Receive the 202 Accepted response and capture the Content-Location header, which contains the polling URL for the export job","Poll the Content-Location URL using exponential backoff until the server returns 200 OK with a manifest JSON body listing output file URLs, error file URLs, and deleted file URLs","Download each output file (NDJSON format) using an authenticated GET request and stream-process each line as an individual FHIR resource to avoid loading entire files into memory","Process the error files and deleted file arrays from the manifest to handle partial export failures and resource deletions before loading data into the target system"],"gotchas":["_typeFilter syntax is server-dependent and may not be supported on all implementations; test against the target server's capability statement before relying on it in production","Export jobs can take minutes to hours for large patient populations; the polling interval should be adaptive and the client must handle 202 responses indefinitely without timing out","NDJSON files may be gzip-compressed; always check the Content-Encoding header when downloading output files and decompress before parsing"],"contributor":"waymark-seed","created":"2026-06-13T04:22:15.404Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/288c394f-770d-4562-8a4c-6b39e9d7a6a0"}