Hi,
I am interested in contributing to patient-flag module project in GSOC 2024 and I use this thread to discuss further about project and requirement gathering purposes. This project mainly focus on overhaul the performance issue in patient-flag module.
As a start I have gone through the module to find out potential performance issues. I’ve observed that the current module compute the flags for a patient (or a group of patients) when in form submission. Or do this as AOP for data submitted outside of forms.
Issue in current module
current patient flag module evaluate the flags sequentially, which can cause performance issues when a patient or group of patients has multiple flags.
Solution 1
We can improve performance by enabling asynchronous processing in patient-flag module. So This involves adding an asynchronous function to the flag service class, which will handle the flag evaluation for individual patients or groups of patients using the evaluation logic.Then we can call that async function to where the flag evaluation need. This approach allows multiple flag evaluations to be performed concurrently, potentially improving performance compared to sequential evaluation.
Solution 2
Instead of evaluating all patient flags each time the form submission. we can do incremental updates. Only patient related flags that have changed since the last evaluation or those that are relevant to the current context. This can reduce the amount of computation needed during evaluation process. But This will be complex to implement.
Furthermore, other objectives of this project are to add support for Java 17 and introduce a new functionality to facilitate the translation of patient flags between the Flag - FHIR v5.0.0 Resource and the OMRS Flag model.
When we mapping OMRS flag model between FHIR resource, we have to add the all layers of the tooling FlagResourceProvider
, FhirFlagService
, FlagTranslator
, FhirFlagDao
. I still thinking about the implementing evaluation logic, tags, proprieties and display-points.
I warmly welcome any ideas, suggestions, pointers, or guidance on this.