Question

I would like to delete multiple resources by using a transaction, but I can't find any example nor information how resources should be marked in the bundle for delete.

Thank you.

Was it helpful?

Solution

This is done by adding a <deleted-entry> Atom entry to the transaction Bundle, much like it's done when returning a Resource's history (which can contain deletions as well).

You can find information about it here: http://www.hl7.org/implement/standards/fhir/xml.html#atom-deleted. It's actually a pretty recent addition to the Atom specification (see http://www.rfc-base.org/rfc-6721.html for more information).

The Java reference implementation has a setDeleted() on AtomEntry to make that work.

OTHER TIPS

Thank you for your answer. I've managed to delete my posted Composition resource by using such code:

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Delete in Transaction</title>
    <id>1181060367157445874</id>
    <updated>2014-04-28T15:48:16.863+03:00</updated>
    <deleted-entry xmlns="http://purl.org/atompub/tombstones/1.0" ref="http://spark.furore.com/fhir/Composition/19843313"/>
</feed>

`

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top