-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prototype to create a separate sync module #429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Jing! Left a few comments.
import org.hl7.fhir.r4.model.ResourceType | ||
|
||
@Dao | ||
interface SyncedResourceDao { | ||
|
||
@Insert(onConflict = OnConflictStrategy.REPLACE) suspend fun insert(entity: SyncedResourceEntity) | ||
|
||
@Transaction | ||
suspend fun insertAll(resources: List<SyncedResourceEntity>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use kotlin var args for API consistency?
sync/src/androidTest/java/com/google/android/fhir/sync/ExampleInstrumentedTest.kt
Show resolved
Hide resolved
* `SyncData(ResourceType.Patient, mapOf("address-country" to "United States")` | ||
*/ | ||
typealias ParamMap = Map<String, String> | ||
typealias SyncData = Map<ResourceType, ParamMap> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we improve on the naming SyncData
. Off the cuff it sounds like data that needs be synced whereas this is more like Sync parameters by resource. Maybe ResourceSyncParams
?
closing this as this is being reworked in #482 |
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #428
Description
Separate the sync code into a new module. This is done via creating clear separation of concerns in the
FhirEngine
API.Alternative(s) considered
This is an improvement on the existing approach.
Type
Choose one: Feature
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project./gradlew check
and./gradlew connectedCheck
to test my changes locally