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/overview-of-search.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,7 @@ FHIR specifies a set of search result parameters to help manage the information
137
137
|`_contained`| No | No ||
138
138
|`_containedType`| No | No ||
139
139
|`_score`| No | No ||
140
-
140
+
|`_not-referenced`| Yes | No |`_not-referenced=*:*` to search for resources that are not referenced by any other resources. For example, `/Patient?_not-referenced=*:*` is used to search for Patient resources that are not referenced by any other resources.|
141
141
Note:
142
142
1. By default, `_sort` arranges records in ascending order. You can also use the prefix `-` to sort in descending order. The FHIR service only allows you to sort on a single field at a time.
143
143
1. FHIR service supports wild card searches with revinclude. Adding a "*.*" query parameter in a revinclude query directs the FHIR service to reference all the resources mapped to the source resource.
- A user or application needs to be assigned to the `FHIR Data Writer` role, to perform the bulk delete capability.
24
-
- a user or application needs to be assigned to the `FHIR Data Contributor` role, to perform
25
-
-- bulk delete capability with a hard delete query parameter.
26
-
-- bulk delete on soft deleted resources.
24
+
- a user or application needs to be assigned to the `FHIR Data Contributor` role, to perform bulk delete capability with a hard delete query parameter and bulk delete on soft deleted resources.
27
25
28
26
## Bulk delete operation details
29
27
### `$bulk-delete` operation
@@ -42,7 +40,7 @@ You can execute the `$bulk-delete` operation at the system level or for individu
42
40
```
43
41
44
42
> [!NOTE]
45
-
> Use the `$bulk-delete` operation with caution. Deleted resources can't be restored.
43
+
> Use the `$bulk-delete` operation with caution. Deleted resources can't be restored. We recommend that you first run a FHIR search with the same parameters as the bulk delete job to verify the data that you want to delete.
46
44
47
45
48
46
#### Query parameters
@@ -52,7 +50,7 @@ Query parameters allow you to filter the raw resources you plan to delete. To su
52
50
|Query parameter | Default Value | Description|
53
51
|------------------------|---|------------|
54
52
|_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.|
55
-
|_purgeHistory|False|Allows you to delete history versions associated with resource. It will not delete current version of the resource and soft deleted resources. Note: When _purgeHistory used with the _hardDelete parameter set to true, it permanently deletes all versions associated with the resource.|
53
+
|_purgeHistory|False|Allows you to delete history versions associated with resource. It doesn't delete the current version of the resource and soft deleted resources. Note: When _purgeHistory used with the _hardDelete parameter set to true, it permanently deletes all versions associated with the resource.|
56
54
|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`|
57
55
58
56
All the query parameters are optional.
@@ -115,21 +113,21 @@ Here's a list of error messages that might occur if the bulk delete operation fa
115
113
116
114
|HTTP Status Code | Details | Recommended action |
|500 |Connection to database failed | Create a gitsupport ticket to resolve the issue.|
116
+
|500 |Connection to database failed | To resolve the issue, create a Get Support ticket.|
119
117
|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. |
120
118
121
119
## FAQ
122
120
123
-
- 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.
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.
124
122
125
-
- 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.
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.
126
124
127
125
> [!NOTE]
128
126
> If you cancel and then restart a bulk delete job, the deletion process resumes from where it was stopped.
129
127
130
128
## Preview capabilities for the bulk delete operation
131
129
### `$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.
130
+
Note: The `$bulk-delete`operation now supports using `_include` and `_revinclude` in the search criteria for conditional and bulk delete. This new feature doesn't affect current behavior of singular deletes, which doesn't 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
131
134
132
Some examples of using `$bulk-delete` with `_include` and `_revinclude`:
135
133
@@ -140,3 +138,11 @@ The following example using `_revinclude` will bulk delete all Patient resources
140
138
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):
Note: This feature is available in Azure Health Data Services FHIR Server only, and is not available in Azure API for FHIR.
144
+
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
+
147
+
The following example will bulk delete all Patient resources that are not referenced by any other resources:
0 commit comments