Hello everyone ! I will be working on the project “Redo Legacy UI Cohort Builder” for GSoC 2022. In this project, Cohort Builder will be rebuilt for OpenMRS 3.0 as a micro frontend module.
The Cohort Builder is a tool in OpenMRS 1.0 in the Reporting Compatibility module (included with most OpenMRS installations) that lets the user perform ad-hoc queries for patients with defined characteristics, and combines multiple queries into more complex ones.
Great to have you working on this project Anjula!!
FWIW, I connected w/ @jdick on Friday, and he confirmed that rebuilding the Cohort Builder as a react, carbon microfrontend is exactly what he had envisioned. I’m sorry as I think I may have previously introduced confusion in that regard.
Apparently though one of the needs has been that there is no REST API to support the Cohort Builder (if I understand correctly). But adding this REST support would require some Java work specifically. @bistenes or @jayasanka or @ibacher or @dkayiwa do you know if there is a plan for this?
The thing JJ had been hoping we could accomplish one day (which is probably outside the scope of this GSOC project) is to use the Cohort Builder to build patient lists which self-update. So you’re not just saving the SQL, nor are you saving a list of specific patients from one-point-in-time, but you could also save a dynamic query that will update itself when a new patient appears who matches the original criteria. E.g. this would be useful for dynamically generating patients meeting “Lost to Follow Up” criteria, for example. This would then be connected to the O3 Patient Lists functionality, so a non-admin user could just click “show me all pts who meet LTFU criteria” and it would magically work. (@slubwama I wrote a note to myself that you may have thoughts on this, though I can’t remember why…?)
CCing as well @mseaton who was originally involved in writing this module.
Regarding the REST API, we could leverage the ‘Adhoc API’ for the initial version. But we might need to write some minor endpoints to achieve some tasks, ex: to save a search. @anjisvj Correct me if I’m wrong.
I think you already proposed a plan for this right?
Thank you @grace for the clarification. According to my project proposal, there is a feature called “Cohort Run Scheduler” to schedule run the cohorts. Which is similar to the schedule task runner.
Thank you! @jayasanka So how are we going to move the existing code base? Can we transfer the repo? I’m currently working on this ticket on a separate branch.
@Ciarán Duffy offered me some help regarding the UI/UX of the cohort builder. So I shared with him the mockups I drew for the cohort builder. He gave me some suggestions and most importantly he was kind enough to give me a whole new design.
IMO this proposed UI is way clearer and easy to use. I would like to have some feedback from you as well.
(FYI @anjisvj - Samuel Lubwama is a leader of the UgandaEMR implementation of OpenMRS with over 1,500 sites, and he sees users using the Cohort Module in the field quite often, so thought he’d be a great resource for specific feedback )