The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
Is your feature request related to a problem? Please describe.
The initial load calculated-expression algorithm is very inefficient:
In a nutshell what it does right now is, for each questionnaireItem, find other questionnaireItems that's using calculated-expressions, then process the calculation.
Problem is, it's finding ALL calculated-expression for each questionnaireItem, so in one of our forms, we have around 420 normal questionnaireItem, and 80 questionnaireItem with calculated-expression within a form, it will be 33.600(420*80) processes in total. Each calculated-expression is processed 420 times and it's a waste of resource, 1 time is enough. This is a rough estimation, but you see my point.
Describe the solution you'd like
During initial load, directly find all calculated-expression within a form, and process that. It will be 80 process in total.
Describe alternatives you've considered
N/A
Additional context
The following is total calculation and the time it takes to process it
Is your feature request related to a problem? Please describe. The initial load calculated-expression algorithm is very inefficient:
Describe the solution you'd like During initial load, directly find all calculated-expression within a form, and process that. It will be 80 process in total.
Describe alternatives you've considered N/A
Additional context
The following is total calculation and the time it takes to process it
Before improvement (~70 seconds)
After improvement (<1 second)
Would you like to work on the issue? Yes