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
Copy file name to clipboardExpand all lines: articles/healthcare-apis/fhir/import-data.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ ms.author: kesheth
11
11
12
12
# Import FHIR data
13
13
14
-
The import operation allows you to ingest FHIR® data into the FHIR server with high throughput.
14
+
The `import` operation allows you to ingest FHIR® data into the FHIR server with high throughput.
15
15
16
16
## Import operation modes
17
17
18
-
The `$import` operation supports two modes: initial mode and incremental mode. Each mode has different features and use cases.
18
+
The `import` operation supports two modes: initial mode and incremental mode. Each mode has different features and use cases.
19
19
20
20
#### Initial mode
21
21
@@ -36,37 +36,37 @@ The `$import` operation supports two modes: initial mode and incremental mode. E
36
36
- Allows you to ingest soft deleted resources. This capability is beneficial when you migrate from Azure API for FHIR to the FHIR service in Azure Health Data Services.
37
37
38
38
> [!IMPORTANT]
39
-
> The `$import` operation doesn't support conditional references in resources.
39
+
> The `import` operation doesn't support conditional references in resources.
40
40
>
41
41
> Also, if multiple resources share the same resource ID, then only one of those resources is imported at random. An error is logged for the resources sharing the same resource ID.
42
42
43
43
## Performance considerations
44
44
45
-
To achieve the best performance with the `$import` operation, consider these factors:
45
+
To achieve the best performance with the `import` operation, consider these factors:
46
46
47
-
-**Use large files for import.** The file size of a single import operation should be more than 200 MB. Smaller files might result in slower import times.
47
+
-**Use large files for import.** The file size of a single `import` operation should be more than 200 MB. Smaller files might result in slower import times.
48
48
49
-
-**Import FHIR resource files as a single batch.** For optimal performance, import all the FHIR resource files that you want to ingest in the FHIR server in one import operation. Importing all the files in one operation reduces the overhead of creating and managing multiple import jobs.
49
+
-**Import FHIR resource files as a single batch.** For optimal performance, import all the FHIR resource files that you want to ingest in the FHIR server in one `import` operation. Importing all the files in one operation reduces the overhead of creating and managing multiple import jobs.
50
50
51
-
-**Limit the number of parallel import jobs.** You can run multiple import jobs at the same time, but running multiple jobs might affect the overall throughput of the import operation. The FHIR server can handle up to five parallel import jobs. If you exceed this limit, the FHIR server might throttle or reject your requests.
51
+
-**Limit the number of parallel import jobs.** You can run multiple `import` jobs at the same time, but running multiple jobs might affect the overall throughput of the import operation. The FHIR server can handle up to five parallel `import` jobs. If you exceed this limit, the FHIR server might throttle or reject your requests.
52
52
53
-
## Perform the $import operation
53
+
## Perform the import operation
54
54
55
55
### Prerequisites
56
56
57
-
- You need the **FHIR Data Importer** role on the FHIR server to use `$import`.
57
+
- You need the **FHIR Data Importer** role on the FHIR server to use the `import` operation.
58
58
59
-
- Configure the FHIR server for `$import`. The FHIR data must be stored in resource-specific files in FHIR NDJSON format on the Azure blob store. For more information, see [Configure import settings](configure-import-data.md).
59
+
- Configure the FHIR server. The FHIR data must be stored in resource-specific files in FHIR NDJSON format on the Azure blob store. For more information, see [Configure import settings](configure-import-data.md).
60
60
61
61
- All the resources in a file must be the same type. You can have multiple files per resource type.
62
62
63
63
- The data must be in the same tenant as the FHIR service.
64
64
65
-
- The maximum number of files allowed per `$import` operation is 10,000.
65
+
- The maximum number of files allowed per `import` operation is 10,000.
66
66
67
67
### Call $import
68
68
69
-
Make a ```POST``` call to ```<<FHIR service base URL>>/$import``` with the request header and body shown.
69
+
Make a `POST` call to `<<FHIR service base URL>>/$import` with the request header and body shown.
| inputFormat | String representing the name of the data source format. Only FHIR NDJSON files are supported. | 1..1 |```application/fhir+ndjson```|
83
-
| mode | Import mode value | 1..1 | For an initial mode import, use the `InitialLoad` mode value. For incremental mode import, use the `IncrementalLoad` mode value. If no mode value is provided, the `IncrementalLoad`` mode value is used by default. |
83
+
| mode | Import mode value | 1..1 | For an initial mode `import`, use the `InitialLoad` mode value. For incremental mode `import`, use the `IncrementalLoad` mode value. If no mode value is provided, the `IncrementalLoad`` mode value is used by default. |
84
84
| input | Details of the input files. | 1..*| A JSON array with the three parts described in the table. |
85
85
86
86
| Input part name | Description | Card. | Accepted values |
| type | Resource type of input file | 1..1 | A valid [FHIR resource type](https://www.hl7.org/fhir/resourcelist.html) that matches the input file. |
89
89
|URL | Azure storage URL of the input file | 1..1 | URL value of the input file. The value can't be modified. |
90
-
| etag | Etag of the input file on Azure storage; used to verify the file content isn't changed after $import registration. | 0..1 | Etag value of the input file. |
90
+
| etag | Etag of the input file on Azure storage; used to verify the file content isn't changed after `import` registration. | 0..1 | Etag value of the input file. |
After an $import is initiated, an empty response body with a `callback` link is returned in the `Content-location` header of the response, together with an `202-Accepted` status code. Store the callback link to check the import status.
141
141
142
-
The `$import` operation registration is implemented as an idempotent call. The same registration payload yields the same registration, which affects ability to reprocess files with the same name. Refrain from updating files in-place, instead we suggest you use different file name for updated data, or, if update in-place with same file name is unavoidable, add e-tags in the registration payload.
142
+
The import operation registration is implemented as an idempotent call. The same registration payload yields the same registration, which affects ability to reprocess files with the same name. Refrain from updating files in-place, instead we suggest you use different file name for updated data, or, if update in-place with same file name is unavoidable, add e-tags in the registration payload.
143
143
144
-
To check import status, make the REST call with the ```GET``` method to the `callback` link returned in the previous step.
144
+
To check import status, make the REST call with the `GET` method to the `callback` link returned in the previous step.
145
145
146
146
Interpret the response by using the table:
147
147
@@ -188,15 +188,15 @@ Table describes the important fields in the response body:
188
188
}
189
189
```
190
190
### Ingest soft deleted resources
191
-
Incremental mode import supports ingestion of soft deleted resources. You need to use the extension to ingest soft deleted resources in the FHIR service.
191
+
Incremental mode `import` supports ingestion of soft deleted resources. You need to use the extension to ingest soft deleted resources in the FHIR service.
192
192
193
193
Add the extension to the resource to inform the FHIR service that the resource was soft deleted.
After the `$import` operation completes successfully, perform history search on the resource to validate soft deleted resources. If you know the ID of the deleted resource, use the URL pattern in the example.
199
+
After the `import` operation completes successfully, perform history search on the resource to validate soft deleted resources. If you know the ID of the deleted resource, use the URL pattern in the example.
200
200
201
201
```json
202
202
<FHIR_URL>/<resource-type>/<resource-id>/_history
@@ -207,13 +207,13 @@ If you don't know the ID of the resource, do a history search on the resource ty
207
207
<FHIR_URL>/<resource-type>/_history
208
208
```
209
209
210
-
## Troubleshoot the $import operation
210
+
## Troubleshoot the import operation
211
211
212
-
Here are the error messages that occur if the `$import` operation fails, and recommended actions to take to resolve the issue.
212
+
Here are the error messages that occur if the `import` operation fails, and recommended actions to take to resolve the issue.
213
213
214
214
#### 200 OK, but there's an error with the URL in the response
215
215
216
-
**Behavior:** The `$import` operation succeeds and returns `200 OK`. However, `error.url` is present in the response body. Files present at the `error.url` location contain JSON fragments similar to the example:
216
+
**Behavior:** The `import` operation succeeds and returns `200 OK`. However, `error.url` is present in the response body. Files present at the `error.url` location contain JSON fragments similar to the example:
217
217
218
218
```json
219
219
{
@@ -236,7 +236,7 @@ Here are the error messages that occur if the `$import` operation fails, and rec
236
236
237
237
#### 400 Bad Request
238
238
239
-
**Behavior:** The `$import` operation failed and `400 Bad Request` is returned. The response body includes this content:
239
+
**Behavior:** The import operation failed and `400 Bad Request` is returned. The response body includes this content:
240
240
241
241
```json
242
242
{
@@ -256,7 +256,7 @@ Here are the error messages that occur if the `$import` operation fails, and rec
256
256
257
257
#### 403 Forbidden
258
258
259
-
**Behavior:** The `$import` operation failed and `403 Forbidden` is returned. The response body contains this content:
259
+
**Behavior:** The import operation failed and `403 Forbidden` is returned. The response body contains this content:
260
260
261
261
```json
262
262
{
@@ -278,7 +278,7 @@ Here are the error messages that occur if the `$import` operation fails, and rec
278
278
279
279
#### 500 Internal Server Error
280
280
281
-
**Behavior:** The `$import` operation failed and `500 Internal Server Error` is returned. The response body contains this content:
281
+
**Behavior:** The import operation failed and `500 Internal Server Error` is returned. The response body contains this content:
0 commit comments