Description
Is your feature request related to a problem? Please describe.
Currently there's no API to access data in the LocalChangeEntity table
Describe the solution you'd like
In the client app we'd like a way to obtain Read Only access to the LocalChangeEntity table data, specifically the SquashedLocalChanges.
We can add an interface in FhirEngine.kt and the corresponding implementation in FhirEngineImpl.kt
//FhirEngine.kt
suspend fun getUnsyncedLocalChanges(): List<SquashedLocalChange>
//FhirEngineImpl.kt
override suspend fun getUnsyncedLocalChanges() : List<SquashedLocalChange> = database.getAllLocalChanges()
Describe alternatives you've considered
Might be better to have an API that just returns the counts for the grouped changes per resource because if there's too much data in the LocalChangeEntity table it may lead performance issues since obtaining the counts with the above approach is an in memory operation.
Additional context
This will be useful when one wants have the visibility of the Synced/Unsynced resources on the device.
Here is a sample of what can be achieved by this:

Would you like to work on the issue?
Yes
Metadata
Metadata
Assignees
Type
Projects
Status