You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
PatientListViewModel Null Pointer Exception Line 77
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.android.fhir.reference, PID: 10872
java.lang.NullPointerException
at com.google.android.fhir.reference.PatientListViewModel.getSearchResults(PatientListViewModel.kt:77)
at com.google.android.fhir.reference.PatientListViewModel$getSearchResults$1.invokeSuspend(Unknown Source:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7397)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Component
Reference App
To Reproduce
Start the reference app
Expected behavior
The app not to crash
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Device: HMD Global Nokia 6.1
Android version: 10
Build number: 00WW_4_15C_SP11
Version: N/A
Additional context
I think this is caused by a race condition between the two queries that are executed on view model initialisation.
Search Patients
Count Patients
On line 77 the result of the Count Patients Query is being used to limit the result of the Search Patients Query.
I am guessing the desired behaviour here is to limit the number of Patients displayed and then page through the remaining Patients, rather than using the result of the count query to limit the search results.
Would you like to work on the issue?
I can work on this issue if desired.
The text was updated successfully, but these errors were encountered:
@bausmeier No, I have not tackled it yet. It is on my list but if it is blocking you, are you welcome to tackle it and then I can review and test it for you.
Describe the bug
PatientListViewModel Null Pointer Exception Line 77
Component
Reference App
To Reproduce
Start the reference app
Expected behavior
The app not to crash
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
I think this is caused by a race condition between the two queries that are executed on view model initialisation.
On line 77 the result of the Count Patients Query is being used to limit the result of the Search Patients Query.
I am guessing the desired behaviour here is to limit the number of Patients displayed and then page through the remaining Patients, rather than using the result of the count query to limit the search results.
Would you like to work on the issue?
I can work on this issue if desired.
The text was updated successfully, but these errors were encountered: