Delete a FHIR Resource
Delete a FHIR resource from SAP Health Data Services for FHIR using the delete request.
During deletion, the resource is stored in the database and is not available for the transactional operations.
HTTP Request
You can use an HTTP DELETE request to delete a FHIR resource from SAP Health Data Services for FHIR:
DELETE [base]/[type]/[id]
Path Parameters
-
base: Service endpoint to interact with FHIR resources. For more information, see Service Endpoint.
-
type: The type of resource, for example, Patient or Encounter.
-
id: The resource ID
HTTP Status Response Codes
The following HTTP status response codes are returned for the delete request:
|
HTTP Code |
Scenario |
Description |
|---|---|---|
|
204 |
Only One Version Exists |
For 204, check the header response. |
|
204 |
No Instance Exists |
For 204, check the header response. |
|
404 |
Missing Functional or Instance-Based Authorization or No Data Found. |
Successive read of deleted record or authorization error |
|
409 |
Record Referencing to Another Resource |
Deletion fails because of referential integrity validation error. |
Restriction
The following are the current restrictions when deleting a FHIR resource:
|
Interaction |
Description |
|---|---|
|
Conditional delete |
Deletion of resources based on some selection criteria is not supported. |
|
Bring back to life |
Deleted resources cannot be brought back to life using an HTTP PUT request. |
|
Historic record |
Deletion of resources based on a specific version is not supported. |
|
Cascade delete |
Deletion of dependent resources is not supported. |