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
Several records of resources with same resource Id returned leading to duplication #2512
Comments
Additional context
|
Hey @SebaMutuku. You are probably right in why duplicate resources are being returned in search - because of duplicate DateTimeIndexEntity records. However, I am not able to observe duplicate DateTimeIndexEntity records when updating same resource locally. Can you provide steps to replicate it ? |
Hello @MJ1998? attached is the SQLite DB for patient shown on the screenshot below Patient ID |
|
@MJ1998 yes, that's the entry causing duplication. If you check it on this line https://github.com/google/android-fhir/blob/master/engine/src/main/java/com/google/android/fhir/search/MoreSearch.kt#L58 you will see what the query returns |
@SebaMutuku @allan-on Can you please add the Search Query passed into the Also, can you specify the engine version that's being used. |
@aditya-07 are you available for us to have a debugging session? If yes, let me know when I can set one up. |
Yes, that sounds like a good idea. Feel free to setup one today (Wednesday) or tomorrow between 11am-6pm IST. |
@aditya-07 here's the sample database we have had a look at together |
Describe the bug
When editing or updating resources in the db, severral resources with the same last updated exist on the db. When searching for the resources on code at
fhirEngine.search<Resource>(search)
the query
Result - Records 2 & 4 are similar
Component
fhirEngine.search<Resource>(search)
To Reproduce
Update any resource, save it in the app SQlite DB then try querying them. Several records will be returned depending on how many times you have made changes on the resources
Expected behavior
A single record of any resources should be returned when we make any changes to a resource.
Screenshots
An example is when updating a patient active status to false. Patients
Adrew Kife
returns two resources with same details.The text was updated successfully, but these errors were encountered: