Question

The DSTU for REST delete is simple send, DELETE [base]\[type]\[id].

However, what if the server implements version aware updates? Do I need to send a Content-Location HTTP header as well? As in:

DELETE ...\Patient\123
Content-Location: ...\Patient\123\_history\4

Or does the DELETE implicitly apply to the current version of the resource?

Était-ce utile?

La solution

It certainly makes sense to indicate which version you are expecting to delete, especially since you can still update a resource to "undelete" it, so we're talking multiple versions here. However, the definition of the Content-Location header states:

The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message

and with a DELETE, we do not encode an entity. So, I wonder whether this is allowed. It's worth bringing this up for discussion on the HL7 FHIR site and/or gForge though.

Autres conseils

As far as I know, and as you said in your question, FHIR do not imply with version-aware delete operations. In fact the DELETE operation only means that your resource will not be retrieved by SEARCH or READ operations. That said, given that your server implements a non-standard operation you could just answer to a DELETE request to a version url by deleting that specific version.

Let me say that, IMHO, alter the resource history is contrary to the philosophy that any change should be trackable. See http://www.hl7.org/implement/standards/fhir/security.html#audit

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top