Skip to content

Commit 51a6c6e

Browse files
committed
Updating bulk delete doc with notReferenced
1 parent c45b3bc commit 51a6c6e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You can execute the `$bulk-delete` operation at the system level or for individu
4242
```
4343
4444
> [!NOTE]
45-
> Use the `$bulk-delete` operation with caution. Deleted resources can't be restored.
45+
> Use the `$bulk-delete` operation with caution. Deleted resources can't be restored.
4646
4747
4848
#### Query parameters
@@ -140,3 +140,11 @@ The following example using `_revinclude` will bulk delete all Patient resources
140140
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):
141141
142142
`DELETE [base]/DiagnosticReport/$bulk-delete?_lastUpdated=lt2021-12-12&_include=DiagnosticReport:based-on:ServiceRequest&_include:iterate=ServiceRequest:encounter`
143+
144+
### `$bulk-delete` with `_not-referenced`
145+
Note: This feature is available in Azure Health Data Services FHIR Server only, and is not available in Azure API for FHIR.
146+
147+
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.
148+
149+
The following example will bulk delete all Patient resources that are not referenced by any other resources:
150+
`DELETE [base]/Patient/$bulk-delete?_not-referenced=*:*`

0 commit comments

Comments
 (0)