Skip to content

Reporting progress of run operation #276

@niquola

Description

@niquola

Let's discuss how to report progress of async operation:

  • FHIR Bulk Export API uses x-progress header
  • Another option is to use response body with special elements

@smunini

For the in-progress state, we should harmonize with the response headers that Bulk Data
$export uses, notably X-Progress, and Retry-After. See here

@niquola

Respond with FHIR Parameter object:

{
  "resourceType": "Parameters",
  "parameter": [
     { "name": "status", "valueString": "in-progress" },
     { "name": "message", "valueString": "Processing large source (65% complete)" },
     { "name": "progress", "valueInteger": 65 },
     { "name": "time", 
       "part": [ 
       { "name": "start", "valueInstant": "2025-02-25T15:10:23Z" },
         { "name": "end", "valueInstant": "2025-02-25T15:12:23Z" },
         { "name": "duration", "valueInteger": 120 }
      ]
    }
  ]
}

Respond with JSON object with the following fields:

Field Type Description
status string Status of the export ("in-progress")
progress number Progress of the export (0-100)
time object Timing information
time.start datetime Start time of export
time.end datetime Estimated end time of export
time.duration number Duration in seconds
message string Human readable status message
{
    "status": "in-progress",
    "message": "Processing large source (65% complete)",
    "progress": 65,
    "time": {
        "start": "2025-02-25T15:10:23Z",
        "end": "2025-02-25T15:12:23Z",
        "duration": 120
    }
}

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions