Skip to content

Commit f3302c8

Browse files
authored
Merge pull request #296480 from evachen96/patch-7
Update fhir-bulk-delete-operation.md
2 parents 43c0d7d + efd62d4 commit f3302c8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

articles/healthcare-apis/includes/fhir-bulk-delete-operation.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,16 @@ Here's a list of error messages that might occur if the bulk delete operation fa
127127
> [!NOTE]
128128
> If you cancel and then restart a bulk delete job, the deletion process resumes from where it was stopped.
129129
130+
## Preview capabilities for the bulk delete operation
131+
### `$bulk-delete` with `_include` and `_revinclude`
132+
Note: When using FHIR service-supported search parameters with `$bulk-delete`, the `$bulk-delete` operation now supports using `_include` and `_revinclude` in the search criteria for conditional and bulk delete. Please note that this does not affect current behavior of singular deletes, which does not support extra parameters. Additionally, when using bulk delete with FHIR search parameters, consider using the same query in a FHIR search first, so that you can verify the data that you want to delete.
133+
134+
Some examples of using `$bulk-delete` with `_include` and `_revinclude`:
135+
136+
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:
137+
138+
`DELETE [base]/Patient/$bulk-delete?_lastUpdated=lt2021-12-18&_revinclude=*:*`
139+
140+
The following example using `_include` will bulk delete all DiagnosticReport resources that were last updated before 12/18/2021, as well as all ServiceRequest resources that are referenced by those DiagnosticReport resources (via DiagnosticReport.basedOn relationship), and all Encounter resources that are referenced by those ServiceRequest resources (via ServiceRequest.encounters relationship):
141+
142+
`DELETE [base]/DiagnosticReport/$bulk-delete?_lastUpdated=lt2021-12-12&_include=DiagnosticReport:based-on:ServiceRequest&_include:iterate=ServiceRequest:encounter`

0 commit comments

Comments
 (0)