Skip to content

Commit bb08614

Browse files
Merge pull request #270844 from shellyhaverkamp/smh-fhir-delete
FHIR bulk delete common content
2 parents bb132dc + e106be4 commit bb08614

File tree

5 files changed

+93
-65
lines changed

5 files changed

+93
-65
lines changed
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
---
2-
title: Bulk-delete operation for Azure API for FHIR
3-
description: This article describes the bulk-delete operation for Azure API for FHIR.
2+
title: Bulk delete resources from the Azure API for FHIR service in Azure Health Data Services
3+
description: Learn how to bulk delete resources from the Azure API for FHIR service in Azure Health Data Services.
44
author: expekesheth
55
ms.service: healthcare-apis
66
ms.subservice: fhir
77
ms.topic: conceptual
8-
ms.date: 10/22/2022
8+
ms.date: 04/01/2024
99
ms.author: kesheth
1010
---
1111

12-
# Bulk Delete operation
12+
# Bulk delete in Azure API for FHIR
1313

14-
[!INCLUDE [public preview disclaimer](../includes/fhir-bulk-delete-operation.md)]
14+
[!INCLUDE [bulk-delete operation common content](../includes/fhir-bulk-delete-operation.md)]
1515

16-
## Next steps
16+
## Related content
1717

18-
In this article, you learned how to bulk delete resources in the FHIR service. For information about supported FHIR features, see
18+
[Supported FHIR features](fhir-features-supported.md)
1919

20-
>[!div class="nextstepaction"]
21-
>[Supported FHIR features](fhir-features-supported.md)
20+
[FHIR REST API capabilities for Azure Health Data Services FHIR service](fhir-rest-api-capabilities.md)
2221

23-
>[!div class="nextstepaction"]
24-
>[FHIR REST API capabilities for Azure Health Data Services FHIR service](fhir-rest-api-capabilities.md)
25-
26-
FHIR® is a registered trademark of [HL7](https://hl7.org/fhir/) and is used with the permission of HL7.
22+
[!INCLUDE [FHIR trademark statement](../includes/healthcare-apis-fhir-trademark.md)]

articles/healthcare-apis/azure-api-for-fhir/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@
125125
href: tutorial-member-match.md
126126
- name: Patient/$everything
127127
href: patient-everything.md
128-
- name: $purge-history operation
128+
- name: $purge-history
129129
href: purge-history.md
130-
- name: bulk-delete operation
130+
- name: $bulk-delete
131131
href: bulk-delete-operation.md
132132
- name: $validate
133133
expanded: false
Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
---
2-
title: Bulk-delete operation for Azure Health Data Services FHIR service.
3-
description: This article describes the bulk-delete operation for the AHDS FHIR service.
2+
title: Bulk delete resources from the FHIR service in Azure Health Data Services
3+
description: Learn how to bulk delete resources from the FHIR service in Azure Health Data Services.
44
author: expekesheth
55
ms.service: healthcare-apis
66
ms.subservice: fhir
77
ms.topic: conceptual
8-
ms.date: 10/22/2022
8+
ms.date: 04/01/2024
99
ms.author: kesheth
1010
---
1111

12-
# Bulk Delete
12+
# Bulk delete in the FHIR service
1313

14-
[!INCLUDE [bulk-delete operation details](../includes/fhir-bulk-delete-operation.md)]
14+
[!INCLUDE [bulk-delete operation common content](../includes/fhir-bulk-delete-operation.md)]
1515

16-
## Next steps
16+
## Related content
1717

18-
In this article, you learned how to bulk delete resources in the FHIR service. For information about supported FHIR features, see
18+
[Supported FHIR features](fhir-features-supported.md)
1919

20-
>[!div class="nextstepaction"]
21-
>[Supported FHIR features](fhir-features-supported.md)
20+
[FHIR REST API capabilities for Azure Health Data Services FHIR service](fhir-rest-api-capabilities.md)
2221

23-
>[!div class="nextstepaction"]
24-
>[FHIR REST API capabilities for Azure Health Data Services FHIR service](fhir-rest-api-capabilities.md)
25-
26-
FHIR® is a registered trademark of [HL7](https://hl7.org/fhir/) and is used with the permission of HL7.
22+
[!INCLUDE [FHIR trademark statement](../includes/healthcare-apis-fhir-trademark.md)]

articles/healthcare-apis/fhir/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ items:
111111
href: tutorial-member-match.md
112112
- name: Patient/$everything
113113
href: patient-everything.md
114-
- name: $purge-history operation
114+
- name: $purge-history
115115
href: purge-history.md
116-
- name: $bulk-delete operation
116+
- name: $bulk-delete
117117
href: fhir-bulk-delete.md
118118
- name: $validate
119119
items:
Lines changed: 71 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,80 @@
11
---
2-
title: "include file"
3-
description: Explains bulk delete operation capability
4-
services: healthcare-apis
5-
ms.service: fhir
6-
ms.topic: "include"
7-
ms.date: 10/24/2023
2+
title: Common content for the `$bulk-delete` operation
3+
description: Explains the `$bulk-delete` operation for the FHIR service and the Azure API for FHIR service in Azure Health Data Services.
4+
ms.service: healthcare-apis
5+
ms.topic: include
6+
ms.date: 04/01/2024
87
ms.author: kesheth
9-
ms.custom: "include file"
108
---
11-
`$bulk-delete' allows you to delete resources from FHIR server asynchronously. Bulk delete operation can be executed at system level or for individual resource type.
12-
* System level: Execution of the operation at system-level enables deletion of FHIR resources across all the resource types in FHIR server.
9+
10+
The `$bulk-delete` operation allows you to delete resources from the FHIR server asynchronously. You can execute the `$bulk-delete` operation at the system level or for individual resource types.
11+
12+
- **System level**: Execution of the operation at system-level enables deletion of FHIR resources across all the resource types on the FHIR server.
1313

1414
```http
1515
DELETE /$bulkDelete
1616
```
17-
* Individual resource type: Execution of the operation at individual resource types allows deletion of FHIR resources mapping to specified resource type in the url.
17+
18+
- **Individual resource types**: Execution of the operation for individual resource types allows deletion of FHIR resources that map to the resource type in the URL.
1819
1920
```http
2021
DELETE /<Resource Type>/$bulkDelete
2122
```
23+
2224
> [!NOTE]
23-
> Bulk delete is a an operation to be used with caution. Resources in FHIR service once deleted cannot be reverted.
25+
> Use the `$bulk-delete` operation with caution. Deleted resources can't be restored.
2426
25-
Bulk delete operation is currently in public preview. Review disclaimer for details.
26-
[!INCLUDE [public preview disclaimer](../includes/common-publicpreview-disclaimer.md)]
27+
## Headers
28+
The `$bulk-delete` operation requires two header parameters:
29+
30+
- **Accept**: application/fhir+json
2731
32+
- **Prefer**: respond-async
2833
29-
## Headers
30-
Bulk-Delete operation requires two header parameters
31-
* Accept: application/fhir+json
32-
* Prefer: respond-async
34+
## Role requirements
35+
36+
- To perform the `$bulk-delete` operation, a user or application needs to be assigned to the `FHIR Data Writer` role.
37+
38+
- To perform the `$bulk-delete` operation with a hard delete query parameter, a user or application needs to be assigned to the `FHIR Data Contributor` role.
3339
34-
## Query Parameters
35-
Query parameters allow you to filter raw resources you intend to delete. To support filtering, FHIR service query parameters are:
40+
## Query parameters
41+
42+
Query parameters allow you to filter the raw resources you plan to delete.
43+
44+
To support filtering, the query parameters are:
3645
3746
|Query parameter | Default Value | Description|
3847
|------------------------|---|------------|
39-
|_hardDelete|False|For deletion of resource including history version, pass value true.|
40-
|_purgeHistory|False|Allows to delete history versions associated with resource.|
41-
|FHIR service supported search parameters||Allows to specify search criteria and resources matching the search criteria are deleted.Example: address:contains=Meadow subject:Patient.birthdate=1987-02-20|
48+
|_hardDelete|False|Allows you to hard delete a resource. If you don't pass this parameter or set hardDelete to false, the historic versions of the resource are still available.|
49+
|_purgeHistory|False|Allows you to delete history versions associated with resource.|
50+
|FHIR service supported search parameters||Allows you to specify search criteria and resources matching the search criteria are deleted. For example: `address:contains=Meadow subject:Patient.birthdate=1987-02-20`|
4251
4352
All the query parameters are optional.
4453
45-
## $bulk-delete Response
46-
After request is made to bulk delete FHIR resources, in response you should receive Content-Location header with the absolute URL of an endpoint for subsequent status requests, such as a polling endpoint.
54+
## `$bulk-delete` operation response
55+
56+
After a request is made to bulk delete FHIR resources, in response you receive a Content-Location header with the absolute URL of an endpoint for subsequent status requests, such as a polling endpoint.
57+
58+
## Polling endpoint
59+
60+
Request to the polling endpoint is one of the four outcomes depending on the status of the `$bulk-delete` job. The outcome is provided within OperationOutcome of the FHIR response.
61+
62+
1. **Jobs in progress**: This outcome states the job is in progress. Status Code 202.
4763
48-
**Polling endpoint:**
49-
Request to polling endpoint has one of the four outcomes depending on the status of the bulk-delete job. The outcome is provided within OperationOutcome of FHIR response
50-
1. Jobs in progress: This outcome states the job is in progress. Status Code 202
51-
2. Completed: This outcome states the job has successfully completed. At completion, the information of number of resources deleted would be provided at individual resource type level. Status code 200
52-
3. Canceled: This outcome states job is canceled by the user and provides information on number of resources delete at individual resource type level. Status code 200
53-
4. Failed: This outcome states job has failed. Status code depends on failure type.
64+
1. **Completed**: This outcome states the job completed successfully. At completion, the information about the number of resources deleted is provided at individual resource type level. Status code 200.
65+
66+
1. **Canceled**: This outcome states the user canceled the job and provides information on the number of resources deleted at the individual resource level. Status code 200.
67+
68+
1. **Failed**: This outcome states the job failed. Status code depends on the failure type.
5469
5570
Sample request and response for determining the status
56-
Request:
71+
request:
72+
5773
```
5874
{{fhir_url}}/_operations/bulk-delete/<id>
5975
```
60-
Sample response of successfully completed delete job.
76+
Here's a sample response for a successfully completed delete job:
77+
6178
```
6279
{
6380
"resourceType": "Parameters",
@@ -67,18 +84,37 @@ Sample response of successfully completed delete job.
6784
"part": [
6885
{
6986
"name": "Practitioner",
70-
"valueDecimal": 10.0
87+
"valueInteger64": 10.0
7188
},
7289
{
7390
"name": "Specimen",
74-
"valueDecimal": 7.0
91+
"valueInteger64": 7.0
7592
},
7693
{
7794
"name": "Device",
78-
"valueDecimal": 3.0
95+
"valueInteger64": 3.0
7996
}
8097
]
8198
}
8299
]
83100
}
84101
```
102+
103+
## `$bulk-delete` operation error messages
104+
105+
Here's a list of error messages that might occur if the `$bulk-delete` operation fails.
106+
107+
|HTTP Status Code | Details | Recommended action |
108+
|-----------------|---------|--------------------|
109+
|500 |Connection to database failed | Create a gitsupport ticket to resolve the issue.|
110+
|429 |Throttling errors | For Azure API for FHIR, you can increase RUs and retry the job. For Azure Health Data Services FHIR Server, you can try to delete a smaller amount of data at a time. |
111+
112+
## FAQ
113+
114+
- My `$bulk-delete` job seems to be stuck. What are the steps for resolution?<br/><br/> To check if a `$bulk-delete` job is stuck, run a FHIR search with the same parameters as the bulk delete job and _summary=count. If the count of resources is going down, the job is working. You can also cancel the `$bulk-delete` job and try again.
115+
116+
- Do API interactions see any latency impact when a `$bulk-delete` operation job is executed concurrently?<br/><br/>When you run a `$bulk-delete` operation, you might see increased latency on concurrent calls to the service. To avoid a latency increase, we recommend that you cancel the `$bulk-delete` job, and then rerun it during a period of lower traffic.
117+
118+
> [!NOTE]
119+
> If you cancel and then restart a `$bulk-delete` operation, the deletion process resumes from where it was stopped.
120+

0 commit comments

Comments
 (0)