Skip to content

Bulk Data Export Log Items

Vladimir Ignatov edited this page Jan 13, 2025 · 26 revisions

Common fields in all events

field type description
exportId string unique identifier for this bulk export run
timestamp string event time in ISO-8601 with local timezone
eventId string id of the event, one from the list below
eventDetail object object describing event, see eventDetail options below
...other any Clients can add other properties to every event

Logged Events




kickoff


Kick-off response (export started)

eventId: kickoff

This even is dispatched when an export has been started (after any initial auth requests, after fetching the CapabilityStatement and after the kickoff response is received). The timestamp field represents request when the kickoff response is received.

eventDetail fields:

field type description
exportUrl string URL called for export operation (including group segment if applicable)
softwareName string or null software.name from capability statement, if available
softwareVersion string or null software.version from capability statement, if available
softwareReleaseDate string or null software.releaseDate from capability statement, if available
fhirVersion string or null fhirVersion from capability statement, if available
requestParameters object Object with all GET/POST KV params apart from patient
errorCode number or null Response status code if is not 202, null otherwise
errorBody string or object or null Response body if status code is not 202, null otherwise
responseHeaders object with key and value strings HTTP response headers

status_progress


Status response with 202 response code, or with manifest body including a next link

eventId: status_progress

timestamp represents when the response is received

eventDetail fields:

field type description
body string or object or null response body if available
xProgress string or null X-Progress header value if available
retryAfter string or null Retry-After header value if available

Note: To reduce the log size, the body is only provided if it is OperationOutcome, string, or null. When the status response body contains an export manifest (manifest page), the body property of the eventDetail will be set to null. That is because manifests can be huge and some server implementations may decide to return the last manifest page while waiting for the next one.

status_page_complete


Status request that returns a manifest

This event fires multiple times if partial manifests are supported, and once otherwise.

eventId: status_page_complete

timestamp represents when the response is received

eventDetail fields:

field type description
transactionTime string transactionTime field from manifest
outputFileCount number count of items in output array
deletedFileCount number count of items in deleted array, 0 if deleted is undefined
errorFileCount number count of items in error array

status_complete


Status request that returns a 200 response

eventId: status_complete

timestamp represents when the response is received

eventDetail fields:

field type description
transactionTime string transactionTime field from the manifest

manifest_complete


Shows when all manifest pages have been downloaded

eventId: manifest_complete

timestamp represents when the response is received

eventDetail fields:

field type description
transactionTime string transactionTime field from the last manifest
totalOutputFileCount number total count of items in output arrays from all manifests
totalDeletedFileCount number total count of items in deleted arrays from all manifests
totalErrorFileCount number total count of items in error arrays from all manifests
totalManifests number total number of manifests (1 or more in case of partial manifests)

status_error


Status response with response code other than 202 and 200

eventId: status_error

timestamp represents when the response is received. Typically the code and body fields will show what the error is. However, in some cases the server might reply with non-error code and with seemingly valid body but it might fail some client validation rules. In that case clients can use the message field to log what the error has been or the responseHeaders field to expose headers returned by the server for debugging information.

eventDetail fields:

field type description
body string or object or null response body if available (OperationOutcome or plain text)
code number or null number or null HTTP response code
message string or null error message if available
responseHeaders object with key and value strings HTTP response headers (object with key and value strings)

download_request


File download start (including output, deleted, error or attachment files)

eventId: download_request

eventDetail fields:

field type description
fileUrl string url being retrieved
itemType string output or deleted or error or attachment
resourceType string or null The type value from output array (Bundle for deleted, OperationOutcome for error) or null for attachments

download_complete


File download completed

eventId: download_complete

eventDetail fields:

field type description
fileUrl string url being retrieved
resourceCount number or null count of (non-empty) lines in NDJSON file, or null for attachments
fileSize number size in bytes (after decompression)

download_error


File download failed

eventId: download_error

Typically the code and body fields will show what the error is. However, in some cases the server might reply with non-error code and with seemingly valid body but it might fail some client validation rules. In that case clients can use the message field to log what the error has been or the responseHeaders field to expose headers returned by the server for debugging information.

eventDetail fields:

field type description
fileUrl string url being retrieved
code number or null response HTTP status code if available
body string or object or null response body if available (OperationOutcome or plain text)
message string or null optional error message
responseHeaders object with key and value strings HTTP response headers

export_complete


The entire export is complete dispatched after the last file download is completed.

NOTE: If the client is unable to provide some of these stats, it should report null instead of 0 or omitting them.

eventDetail fields:

field type description
files number or null Total number of NDJSON files downloaded
resources number or null Total number of FHIR resources downloaded
bytes number or null Total bytes downloaded
attachments number or null Total number of attachments processed
duration number or null Total duration in milliseconds