Data Integrity Module vs Patient Flags

I have been working with the patient flags module, and have find a number of overlaps with the Data Integrity module (which I have been working with actively), and I think it may be time to think about merging resources and having one patient querying module and showing messages on the patient dashboard

I would lean towards Patient Flags - with some additions as below:

  1. Support for using cohorts defined in the Reporting module @mseaton Any advice? @dkayiwa/@darius any lessons from Cohort builder to OWA

  2. OWA for Reference Application usage

  3. Support for querying across programs, can be solved by #1 above

  4. Export of patients who match a flag to Excel/CSV

  5. Manually adding a flag to a patient which is not based on a query of data @mogoodrich @craigappl - what do you think?

Looking forward to your inputs

1 Like

@ssmusoke, good question - interested to hear others’ thoughts, but if there is a ton of duplicate functionality it definitely makes sense to consider merging these modules.

As for how to incorporate the reporting module cohorts in, this would be relatively straightforward to do. You would basically just implement another FlagEvaluator that refers to an existing Cohort Definition by uuid (which could look both at saved Cohort Definitions or those defined in Definition Libraries), and any necessary parameter values. This would likely save this as XML in the format expected by the reporting module, which would then be able to evaluate it.


Also an interesting comparison between the two modules: Data Integrity module stores the results of the validation checks to speed up querying while patient flags runs the flag queries at each invocation.

One middle ground would be to add a option to the definition of a patient flag whether to persist the results to the database which can improve processing for many flags within an implementation