You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This operation follows the [FHIR Asynchronous Bulk Data Request Pattern](https://www.hl7.org/fhir/async-bulk.html); the completion response is specified once in [Common Operation Behavior — Asynchronous Delivery](operations-common.html#asynchronous-delivery):
7
+
This operation follows the [FHIR Asynchronous Interaction Request Pattern](https://build.fhir.org/ig/HL7/api-incubator-ig/branches/simplified-async-interaction/async-interaction.html); the asynchronous flow is specified once in [Common Operation Behavior - Asynchronous Delivery](operations-common.html#asynchronous-delivery):
8
8
9
9
1. Client sends request with `Prefer: respond-async` header and query source parameters
10
10
2. Server returns `202 Accepted` with `Content-Location` header pointing to status URL
11
11
3. Client polls the status URL for export progress
12
12
4. Server responds with `202 Accepted` while export is in progress (MAY include interim results)
13
-
5. Upon completion, the status poll returns `200 OK` with the manifest `Parameters` resource (`exportId`, `status`, `output`, …) **in the response body**
14
-
6. Client downloads the exported files from the `output.location` URLs in the manifest
13
+
5. Once the export has finished (successfully or not), the status poll returns `303 See Other` with a `Location` header carrying the result URL and an empty body
14
+
6. Client fetches the result URL; a successful export returns `200 OK` with the manifest `Parameters` resource (`exportId`, `status`, `output`, …), and a failed export returns the error status code with an `OperationOutcome`
15
+
7. Client downloads the exported files from the `output.location` URLs in the manifest
15
16
16
-
**Note**: This operation uses a FHIR `Parameters` resource as the manifest instead of the Bulk Data JSON manifest object to:
17
-
18
-
- Provide structured status reporting and metadata
19
-
- Allow extensible output metadata specific to export operations
20
-
- Maintain consistency with other FHIR operations
21
-
22
-
**Note**: Completion is signalled by `200 OK` with the manifest in the body of the status-poll response, as in the FHIR Asynchronous Bulk Data Request Pattern. The operation does not use a `303 See Other` redirect to a separate result resource, so standard Bulk Data clients interoperate without special handling.
17
+
The result resource for this operation is the manifest `Parameters` resource described under [Output Parameters](#output-parameters). Clients MUST treat the status and result URLs as opaque values.
23
18
24
19
##### Async Flow Diagram
25
20
@@ -43,11 +38,17 @@ sequenceDiagram
43
38
rect rgb(240, 255, 240)
44
39
Note over C,S: Step 3: Completion
45
40
C->>S: GET /status/abc123
41
+
S-->>C: 303 See Other<br/>Location: /result/abc123<br/>(empty body)
-`Accept` (recommended) - Specifies the format of the status response, including the completion (`200 OK`) response that carries the manifest
107
+
-`Accept` (recommended) - Specifies the format of interim status responses and error responses on the status URL; the completing poll returns `303 See Other` with an empty body
108
+
109
+
##### Result Request
110
+
111
+
-`Accept` (recommended) - Specifies the representation of the result: the manifest `Parameters` resource on success, or the `OperationOutcome` on failure
105
112
106
113
##### Header Scope
107
114
108
-
Each status-poll request's headers apply to **that poll's response**. Because
109
-
completion is delivered as `200 OK` with the manifest in the body of the
110
-
status-poll response (there is no separate result resource), the `Accept` header
111
-
sent on the completing poll governs the representation of the manifest. This
112
-
allows a client to negotiate a different representation for interim status
113
-
responses (e.g. minimal JSON) than for the final manifest if it chooses.
115
+
Each request's headers apply to **that request's response**. Because
116
+
completion is delivered as `303 See Other` with an empty body, the`Accept`
117
+
header that governs the representation of the manifest is the one sent on the
118
+
result `GET`, not the one sent on the completing status poll. This allows a
119
+
client to negotiate a different representation for interim status responses
120
+
(e.g. minimal JSON) than for the final manifest if it chooses.
114
121
115
122
#### Parameters
116
123
@@ -241,9 +248,10 @@ SQLQuery profile for the binding rules and the mapping from
241
248
242
249
#### Output Parameters
243
250
244
-
Output parameters appear in the **completion response** — the `200 OK`
245
-
status-poll response that carries the manifest. They are not present in the
246
-
`202 Accepted` responses returned while the export is still in progress.
251
+
Output parameters form the **manifest** - the `Parameters` resource returned
252
+
with `200 OK` from the result URL after the completing poll's `303 See Other`
253
+
redirect. They are not present in the `202 Accepted` responses returned while
254
+
the export is still in progress.
247
255
248
256
##### Export Identifiers
249
257
@@ -310,21 +318,21 @@ For large exports, servers MAY partition the output into multiple files. When pa
0 commit comments