Delete via reference currently requires download first
given a Patient id I want to delete it from the server. This code is required to make it work.
client.reference('Patient', str(userid)).to_resource().delete()
The code above downloads the resource first, although it is not necessary. It would be good to have
client.reference('Patient', str(userid)).delete()
instead.
Might be related with this https://github.com/beda-software/fhir-py/issues/101
@pavlushkin please take a look, it's related to refactoring you're making for conditional operations
Will be fixed in 2.0.0 using client.delete('Patient', 'id') or client.delete('Patient/id')
Also added helpers for BaseReference to use reference.delete() and reference.patch(**kwargs) as it was requested in the issue