android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Add soft delete to data access layer

Open fredhersch opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. Add SOFT DELETE for local database resources. See research issue #471

Describe the solution you'd like Within healthcare apps, resources (like observations etc) are often considered immutable. Most relevant resources (like Observations) do not have a 'status'. If there is a desire to delete data, should we provide the option to do a soft delete.

Currently within the SDK, resources can be DELETED (using the data-access API).

To support SOFT DELETE, we would look to:

  • Add 'flag' to the db for resources
  • Within search results, by default only return resources where SOFT DELETE is NOT TRUE
  • Provide additional search param for returning resources where SOFT DELETE is TRUE

Describe alternatives you've considered Relying on server side functionality

Additional context There are likely to be significant changes to implementations as this will change the APIs. Part of the the issue will be to look at db migration scripts to minimize the impact

fredhersch avatar May 31 '21 11:05 fredhersch