samply / blaze

A FHIR® Server with internal, fast CQL Evaluation Engine
https://samply.github.io/blaze
Apache License 2.0
157 stars 18 forks source link

Implement Permanent Removal of Resources (Purging) #399

Open alexanderkiel opened 3 years ago

alexanderkiel commented 3 years ago

As Blaze implements versioning of resources, the delete interaction only marks resources as deleted. In some scenarios, for example for GDPR compliance, it might be necessary to really remove a resource from Blaze.

Other Work

FHIR Standard

GDPR

Plan

We like to implement:

Encryption of Paging Links

1995

Delete History

FHIR Spec #1382

DELETE [base]/[type]/[id]/_history - remove all versions of the resource except the current version (which if the resource has been deleted, will be an empty placeholder)

Delete History Version

FHIR Spec

DELETE [base]/[type]/[id]/_history/[vid] - remove the specified version of the resource. It is an error to remove the 'current' version. (Must first perform a regular delete, and can then delete the non-current version.)

Patient Purge

FHIR Spec #1298

POST /Patient/[id]/$purge - get rid of all current + historical data for a whole Patient compartment

Implement Index Garbage Collection

1505

Implement Resource Store Garbage Collection

2171

Cut Off the Transaction Log

Implement Replication in Distributed Storage Mode without Transaction Log

MM-Lehmann commented 3 years ago

Must have (MVP): removal of a single resource by reference (id) Should have: cascading removal of all resources referencing a particular Patient(-id) Could have: cascading removal of all resource referencing any given resource ... by REST API

MM-Lehmann commented 2 years ago

Is there any other way to completely wipe the server via REST?

alexanderkiel commented 2 years ago

Is there any other way to completely wipe the server via REST?

No, you have to shutdown Blaze, delete the docker volume and restart it.

JohannesOehm commented 2 years ago

Are there any update on this? This prevents us currently from using Blaze in our DIC.

alexanderkiel commented 2 years ago

@JohannesOehm Would it be sufficient to be able to purge a single resource with all of it's history? That would be "Instance-Level Expunge" in HAPI. Would it be ok if metadata about the transactions that created/updated/deleted the resource will still exist but the resource contents are purged from disk?

MM-Lehmann commented 2 years ago

That would be sufficient for us

Am 19.10.2022 um 14:28, Alexander Kiel @.***> schrieb:

@JohannesOehm Would it be sufficient to be able to purge a single resource with all of it's history? That would be "Instance-Level Expunge" in HAPI. Would it be ok if metadata about the transactions that created/updated/deleted the resource will still exist but the resource contents are purged from disk?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

JohannesOehm commented 2 years ago

It would be better if the resources ID is also deleted, but we can replace the resource IDs, which currently hold the patients pseudonym with some random numbers, so it is also fine for us.