google / android-fhir

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.
https://google.github.io/android-fhir/
Apache License 2.0
480 stars 253 forks source link

Make it possible for FHIR engine to not create local changes #702

Open jingtang10 opened 3 years ago

jingtang10 commented 3 years ago

Is your feature request related to a problem? Please describe. At the moment FHIR engine has the in-built assumption that all data changes need to be synced with the FHIR server. This means whenever any FHIR resources are created/updated/removed, a local change record is created which is synced the next time the device has connectivity.

This works fine when there is a FHIR server that is the 'source of truth'. However, some developers might not want to use FHIR engine this way. They might simply store FHIR resources locally and handle synchronization themselves separately not using the sync APIs we provided. In this case, the local changes are still recorded but they will never be used, but they will take up disk spaces...

Describe the solution you'd like An option for FHIR engine to not create local changes. Considerations: is this option mutable? can the user change this option later on? If it is, what does it mean for the synchronization mechanism? if the user turns this on, does new changes get synced with the server via the sync API?

Describe alternatives you've considered NA

Additional context NA

Would you like to work on the issue? @deepankarb will take this

jingtang10 commented 2 years ago

@bausmeier @trevorgowing this is related to p2p sync as we discussed

bausmeier commented 2 years ago

@jingtang10 I'm not actually sure if this will be useful to us now that we know that any of the devices should be able to sync to the server: https://github.com/opensrp/fhircore/issues/281#issuecomment-981735626.