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/includes/fhir-bulk-delete-operation.md
+53-7Lines changed: 53 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The bulk delete capability allows you to delete resources from FHIR® service
12
12
FHIR service requires specific headers and roles enabled to use bulk delete capability
13
13
14
14
## Headers
15
-
To perform bulk delete capability header parameters needed are:
15
+
Bulk delete capability header parameters are:
16
16
17
17
-**Accept**: application/fhir+json
18
18
@@ -120,7 +120,7 @@ Here's a list of error messages that might occur if the bulk delete operation fa
120
120
121
121
- What are the steps for resolution if my bulk delete job seems to be stuck?<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.
122
122
123
-
- Will API interactions see any latency 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.
123
+
- Do API interactions see any latency 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.
124
124
125
125
> [!NOTE]
126
126
> If you cancel and then restart a bulk delete job, the deletion process resumes from where it was stopped.
@@ -131,7 +131,7 @@ Note: The `$bulk-delete` operation now supports using `_include` and `_revinclud
131
131
132
132
Some examples of using `$bulk-delete` with `_include` and `_revinclude`:
133
133
134
-
The following example using `_revinclude` will bulk delete all Patient resources that were last updated before 12/18/2021, as well as all resources that reference to those patients:
134
+
The following example using `_revinclude` will bulk delete all Patient resources that were last updated before December 18, 2021, and all resources that reference to those patients:
Note: This feature is available in Azure Health Data Services FHIR Server only, and is not available in Azure API for FHIR.
143
+
>[!Note]
144
+
> The `_not-referenced` feature is available in Azure Health Data Services FHIR Server only, and isn't available in Azure API for FHIR.
144
145
145
-
As mentioned in the "Query parameters" section above, the `$bulk-delete` operation uses FHIR service supported search parameters. This includes the new `_not-referenced` parameter, which allows you to search for and delete resources that are not referenced by any other resources.
146
+
As mentioned in the "Query parameters" section, the `$bulk-delete` operation uses FHIR service supported search parameters. This includes the new `_not-referenced` parameter, which allows you to search for and delete resources that are not referenced by any other resources.
146
147
147
-
The following example will bulk delete all Patient resources that are not referenced by any other resources:
The `$bulk-delete` operation supports configuring excluded resource types. When you perform a bulk delete operation, these resource types are excluded from deletion. This means that if you include this parameter and specify a comma separated list of resource types in your bulk delete request, those resource types will not be deleted, and the operation will complete successfully deleting everything else in the request, without deleting the specified excluded resource types.
157
+
158
+
The following example will delete all resources in your FHIR server, except for the `Patient` resource type:
The `$bulk-delete` operation supports removing references to resources that are being deleted. This means that if you delete a resource that is referenced by another resource, the reference will be removed from the referencing resource. The reference that has been removed with be replaced with the following value:
168
+
169
+
`"display": "Referenced resource deleted"`
170
+
171
+
>[!Note]
172
+
> This feature only works with hard delete, so you must also set the `_hardDelete` query parameter to `true`.
173
+
174
+
This is useful for maintaining data integrity and ensuring that resources that are no longer needed are properly cleaned up.
175
+
176
+
The following example will bulk hard delete all Patient resources, and remove references to those patients from other resources.
In the example above, if a Patient resource is referenced by a DiagnosticReport resource and an Observation resource, the reference to that Patient will be removed from the DiagnosticReport and Observation resources.
0 commit comments