The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
Search and other APIs need to default to undeleted records
We need to create APIs to provide access to soft-delete records
How does the developer/application know when to hard-delete/purge the records
Solution 2
Generally, we don't have a lot of cases where data will require to be deleted. However, if data is erroneously created many times, the data can become large or an issue.
We don't want private and misplaced medical data on a device
Solution 3
Solution 4
The local changes table will become too big if the device never syncs to the server
The delete-type local changes will be deleted if the device syncs to the server and cannot be shared back to the other devices through p2p
Solution 5 (Log table on FHIR Engine tracking resource changes)
When do we delete these logs? Does the device share these records with multiple p2p devices
Based on the discussion
Have a quick call in the next week
List out all the use-cases so that we can come with a robust solution
Erroneously created tasks and care plans that need to be hard deleted
Erroneously created data needs to be purged
Devices that never connect to the server after initial login. These devices uses p2p sync to share data to the supervisors device which then connects to the internet
Devices that are offline at times and use p2p sync but are connected to the internet once in a while
Mark resources as soft-deleted and provide a flag in the Search API that provides either soft-deleted records
Provide an API that returns a list of Resource IDs for deleted resources filtered by date
Generally, we agreed that:
that we need a purge API
Solution 3 would need each implementer to separately develop this
Other notes
We can use the Patient.active to indicate deleted resources. This solves a lot of the issues with syncing deleted resources. The transient resources/entities have a field like active. Other resources like libraries do not need to have this field
Does the server provide a list of deleted resources using the normal search API? How do apps get updates on deleted resources
Is your feature request related to a problem? Please describe.
Describe the solution you'd like There are several proposed solutions:
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
Would you like to work on the issue? Please state if this issue should be assigned to you or who you think could help to solve this issue.