Cascading deletes

By enabling the cascading delete, a user can perform the delete on parent resource, then all the corresponding child resources will be deleted as well.

In order to perform a cascading delete:

  • First, the allow_cascading_deletes property must be enabled on the HDR-FHIR Server.
  • And then, to perform a cascaded delete, the client HTTP request must include either a special URL parameter (_cascade) or a special header to indicate that a cascading delete is desired.

The following example shows how to delete using a URL parameter.

Table 11-9 Delete using URL parameter

HTTP Method DELETE
URL http(s)://<HOSTNAME>:<PORT>/oracle-fhir-server/fhir/Patient/100004?_cascade=delete

The following example shows how to delete using HTTP header.

Table 11-10 Delete using HTTP Header

HTTP Method DELETE
URL http(s)://<HOSTNAME>:<PORT>/oracle-fhir-server/fhir/Patient/100004?_cascade=delete
Http Header X-cascade.delete