beda-software / fhir-py

FHIR Client for python
MIT License
174 stars 32 forks source link

Add support for `_cascade=delete` param to `delete` method #123

Closed mrouhi13 closed 7 months ago

mrouhi13 commented 7 months ago

The delete method needs to support _cascade param in case the resource has been referenced in the other resources. Currently, there is no way to force delete a resource, so it would be nice if add this feature to the delete method.

Something like this:

client.reference('Practitioner', id=practitioner_id).to_resource().delete(cascade=True)

or

client.reference('Practitioner', id=practitioner_id).to_resource().delete(params={'_cascade': 'delete'})

mrouhi13 commented 7 months ago

I figured out this feature was implemented before in another way, so I closed the issue.