delete method
Deletes a FHIR resource.
Implements the FHIR standard delete interaction
(DSTU2,
STU3,
R4). Note:
Unless resource versioning is disabled by setting the
disable_resource_versioning flag on the FHIR store, the deleted resources
will be moved to a history repository that can still be retrieved through
vread and related methods, unless they are removed by the purge method.
For samples that show how to call delete
, see
Deleting a FHIR resource.
Request parameters:
name
- Required. The name of the resource to delete.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/datasets/\[^/\]+/fhirStores/\[^/\]+/fhir/\[^/\]+/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a HttpBody.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<HttpBody> delete(
core.String name, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return HttpBody.fromJson(response_ as core.Map<core.String, core.dynamic>);
}