Closed f-odhiambo closed 2 years ago
Impact:
The sync state received is Success which means that syncing is successful (ResourceIndexer catching exception), however, this resource might have failed indexing (which help indexing on searchable properties to make select faster)
There is only one resource on Ona server which has this char
658 Observation 3544 {"resourceType":"Observation","id":"3544","meta":{"versionId":"2","lastUpdated":"2021-10-22T08:30:05.782+00:00","source":"#99a9ea901b0386f8"},"status":"final","code":{"coding":[{"system":"http://loinc.org","code":"718-7","display":"G6PD levels in Blood"}],"text":"G6PD"},"subject":{"reference":"Patient/3536"},"performer":[{"reference":"Practitioner/3539","display":"Nurse Jane"}],"valueQuantity":{"value":6.3,"unit":"μg Hb/","system":"http://unitsofmeasure.org","code":"μg Hb/"},"referenceRange":[{"low":{"value":1,"unit":"μg Hb/","system":"http://unitsofmeasure.org","code":"μg Hb/"},"high":{"value":6.6,"unit":"μg Hb/","system":"http://unitsofmeasure.org","code":"μg Hb/"}}]}
Full stacktrace is as follows
org.fhir.ucum.UcumException: Error processing unit 'μg Hb/': unexpected character 'μ' at position 0
12:55:35.807 fhircore.anc at org.fhir.ucum.Lexer.consume(Lexer.java:52)
12:55:35.807 fhircore.anc at org.fhir.ucum.Lexer.<init>(Lexer.java:36)
12:55:35.807 fhircore.anc at org.fhir.ucum.ExpressionParser.parse(ExpressionParser.java:27)
12:55:35.808 fhircore.anc at org.fhir.ucum.UcumEssenceService.getCanonicalForm(UcumEssenceService.java:249)
12:55:35.808 fhircore.anc at com.google.android.fhir.UnitConverter.getCanonicalForm$engine_release(UnitConverter.kt:44)
12:55:35.808 fhircore.anc at com.google.android.fhir.index.ResourceIndexer.quantityIndex(ResourceIndexer.kt:310)
12:55:35.808 fhircore.anc at com.google.android.fhir.index.ResourceIndexer.extractIndexValues(ResourceIndexer.kt:99)
12:55:35.808 fhircore.anc at com.google.android.fhir.index.ResourceIndexer.index(ResourceIndexer.kt:69)
12:55:35.808 fhircore.anc at com.google.android.fhir.db.impl.dao.ResourceDao.insertResource(ResourceDao.kt:202)
12:55:35.808 fhircore.anc at com.google.android.fhir.db.impl.dao.ResourceDao.insertAll$suspendImpl(ResourceDao.kt:74)
12:55:35.808 fhircore.anc at com.google.android.fhir.db.impl.dao.ResourceDao.insertAll(Unknown Source:0)
12:55:35.808 fhircore.anc at com.google.android.fhir.db.impl.DatabaseImpl.insertRemote(DatabaseImpl.kt:68)
12:55:35.808 fhircore.anc at com.google.android.fhir.db.impl.DatabaseImpl$insertSyncedResources$2.invokeSuspend(DatabaseImpl.kt:97)
12:55:35.808 fhircore.anc at com.google.android.fhir.db.impl.DatabaseImpl$insertSyncedResources$2.invoke(Unknown Source:10)
12:55:35.808 fhircore.anc at androidx.room.RoomDatabaseKt$withTransaction$2.invokeSuspend(RoomDatabase.kt:58)
The G6PD is also represented by U/gHb which due to special character is deformed into above obs. We can replace the char 'μ' with 'U' as well, however, SDK needs to handle the special characters.
cool, so we need to create an SDK issue and that's where this must be fixed?
Yes. Its although not a blocker for us.
By not a blocker, do you mean that we can fix µ handling without an SDK change? Or that this error is only effecting indexing so it's not a blocker in general?
K, I'm trying to understand if we should close this issue, or remove it from the milestone, and if there's remaining work for us to do right now on this. What do you think?
Oh. Ok. Yeah, we can not anything further on this from our end so can close issue.
I will create an issue for this on SDK and raise it on Thu on the developers call CC @pld @maimoonak
Describe the bug Error while syncing observation details causing the app to crash
Additional context