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
465 stars 246 forks source link

FhirEngine instance creation should be decoupled from Database instance #2457

Open MJ1998 opened 3 months ago

MJ1998 commented 3 months ago

Describe the Issue I think there is a possibility of someone wanting to re-initialize FhirEngine instance while still maintaining the same database. Few reasons:-

  1. library enforced API changes in FhirEngineConfiguration. Application is forced to re-initialize the FhirEngine.
  2. Application wants to sync to a different server. Application wants to re-initialize here.

But above or any changes in the FhirEngineConfiguration API will most likely lead to backward incompatibility. We would need to do versioning to solve for this.

So that this does not become a breaking change in future, when FhirEngineConfiguration API is modified, we should decouple database instance from the FhirEngine instance creation.

Would you like to work on the issue?

MJ1998 commented 3 months ago

@aditya-07 Discussion with @jingtang10 lead me to modify the issue. I think this is more urgent. PTAL.