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
496 stars 296 forks source link

Isolating Room Components with hapi dependencies #2599

Open MJ1998 opened 4 months ago

MJ1998 commented 4 months ago

Describe the Issue

Room components(@Database, @Dao, @Entity) should be completely independent of hapi dependencies. The primary reason is to maintain a better code structure as the implementation of the DAOs are created by room library. This may help in support multiple FHIR versions (R4, R5) in future. Another reason is to ensure our implementation is future-proof for Room's Kotlin Multiplatform support, introduced in version 2.7.0-alpha01 on May 1, 2024, and currently at version 2.7.0-alpha04.

Also FYI Migrate to KMP Room - https://developer.android.com/training/data-storage/room/room-kmp-migration

Would you like to work on the issue?

jingtang10 commented 4 months ago

Room components(@database, @dao, @entity) should be completely independent of hapi dependencies.

Can you elaborate what you mean by this? Our database API is a way for us to say "save this FHIR resource in our db" or "load this FHIR resource from our db", if it doesn't have dependency on HAPI FHIR what will the APIs do at all?

Regarding migration to kmp, first of all it's a big queestion if/when, but let's forget about that for a moment, how does this help with the migration? Is there anything in the migration guide you linked not doable or at least made more complicated by HAPI dependencies?