Skip to content
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

Resource Indexer Exception in causes observations sync download to fail. #869

Closed
aditya-07 opened this issue Oct 26, 2021 · 1 comment · Fixed by #986
Closed

Resource Indexer Exception in causes observations sync download to fail. #869

aditya-07 opened this issue Oct 26, 2021 · 1 comment · Fixed by #986
Assignees
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working

Comments

@aditya-07
Copy link
Contributor

Describe the bug
Resource Indexer has issue extracting Temperature QuantityValue in the following Observation taken from the Synthea dataset.

{
	"resourceType": "Observation",
	"id": "1595",
	"meta": {
		"versionId": "1",
		"lastUpdated": "2021-10-21T08:29:32.481+00:00",
		"source": "#RqWIwZVJSul7Y3tp"
	},
	"status": "final",
	"category": [{
		"coding": [{
			"system": "http://terminology.hl7.org/CodeSystem/observation-category",
			"code": "vital-signs",
			"display": "vital-signs"
		}]
	}],
	"code": {
		"coding": [{
			"system": "http://loinc.org",
			"code": "8331-1",
			"display": "Oral temperature"
		}],
		"text": "Oral temperature"
	},
	"subject": {
		"reference": "Patient/1561"
	},
	"encounter": {
		"reference": "Encounter/1593"
	},
	"effectiveDateTime": "2011-09-15T12:22:44-04:00",
	"issued": "2011-09-15T12:22:44.702-04:00",
	"valueQuantity": {
		"value": 37.65532501487887,
		"unit": "Cel",
		"system": "http://unitsofmeasure.org",
		"code": "Cel"
	}
}

Exception:

10-26 12:21:42.804 20937 20978 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.fhir.ucum.Decimal.asDecimal()' on a null object reference
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.UnitConverter.getCanonicalForm$engine_debug(UnitConverter.kt:47)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.index.ResourceIndexer.quantityIndex(ResourceIndexer.kt:307)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.index.ResourceIndexer.extractIndexValues(ResourceIndexer.kt:96)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.index.ResourceIndexer.index(ResourceIndexer.kt:68)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.db.impl.dao.ResourceDao.insertResource(ResourceDao.kt:202)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.db.impl.dao.ResourceDao.insertAll$suspendImpl(ResourceDao.kt:74)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.db.impl.dao.ResourceDao.insertAll(Unknown Source:4)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.db.impl.DatabaseImpl.insertRemote(DatabaseImpl.kt:68)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.db.impl.DatabaseImpl$insertSyncedResources$2.invokeSuspend(DatabaseImpl.kt:97)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.db.impl.DatabaseImpl$insertSyncedResources$2.invoke(Unknown Source:12)
10-26 12:21:42.805 20937 20978 W System.err: 	at com.google.android.fhir.db.impl.DatabaseImpl$insertSyncedResources$2.invoke(Unknown Source:7)
10-26 12:21:42.805 20937 20978 W System.err: 	at androidx.room.RoomDatabaseKt$withTransaction$2.invokeSuspend(RoomDatabase.kt:58)
10-26 12:21:42.805 20937 20978 W System.err: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
10-26 12:21:42.805 20937 20978 W System.err: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
10-26 12:21:42.805 20937 20978 W System.err: 	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
10-26 12:21:42.805 20937 20978 W System.err: 	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
10-26 12:21:42.805 20937 20978 W System.err: 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
10-26 12:21:42.806 20937 20978 W System.err: 	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
10-26 12:21:42.806 20937 20978 W System.err: 	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
10-26 12:21:42.806 20937 20978 W System.err: 	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
10-26 12:21:42.806 20937 20978 W System.err: 	at androidx.room.RoomDatabaseKt$acquireTransactionThread$$inlined$suspendCancellableCoroutine$lambda$2.run(RoomDatabase.kt:121)
10-26 12:21:42.806 20937 20978 W System.err: 	at androidx.room.TransactionExecutor$1.run(TransactionExecutor.java:47)
10-26 12:21:42.806 20937 20978 W System.err: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
10-26 12:21:42.806 20937 20978 W System.err: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
10-26 12:21:42.806 20937 20978 W System.err: 	at java.lang.Thread.run(Thread.java:923)
10-26 12:21:42.809 20937 20972 D FhirSynchronizer: download ended at 1635231102809, Tue Oct 26 12:21:42 GMT+05:30 2021, total time 11397 ms

@aditya-07 aditya-07 added the type:bug Something isn't working label Oct 26, 2021
@epicadk
Copy link
Contributor

epicadk commented Oct 30, 2021

FHIR/Ucum-java#26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants