Cohort Builder: Save Search History doesn't work

Hey @mseaton, Today @jdick & I were playing with the cohort builder and found you can’t save searches. You can click Save but that just takes you to a 500 Error page. image

Is this this a known issue? Did it previously work?

Rationale for being interested in this: We thought Saved Searches would be useful to dynamically generate search results (e.g. Active Visits: select patient_id from openmrs.visit where date_started >= curdate()), whereas we thought that Saved Cohorts were really more of a static snapshot at that moment in time.

1 Like

Which versions of the openmrs platform and reportingcompatibility module are you running?

This is the version running on which uses PLatform Version: 2.1.4 Build 2cb839

Hi @grace - I’m not sure to be honest. It certainly used to work - I haven’t personally used it in ages. I do see a ticket in JIRA - - that implies that cohort builder is broken in OpenMRS 2.4+, but that doesn’t seem to be your situation.

I would not imagine that you guys are looking at saved searches from reportingcompatibility module strategically though for MFE patient lists? This is pretty old and deprecated functionality.

Thanks @mseaton. I think we are looking for a way to support simple dynamic lists that would be equivalent to “system lists”. For example, show me all the patients who have an active visit today? Is there a way to do that right now?

@jdick let’s brainstorm a little and see what we can put together. There are a lot of building blocks already in place. Cohort builder just isn’t really maintained and supported all that well any longer. Is it imperative that users are able to define these saved searches via a UI interface at runtime? Or would it be acceptable (even preferable) for these to be configured on the server-side (eg. as config files in the .OpenMRS/configuration directory)?

I think it would be ideal to have a UI to build these things so that non devs could be hte ones creating/maintaining.

I hear you about cohort builder but I actually think it’s pretty awesome. Would love to encourage us to figure out how bring back to life.

We use cohort builder at PIH Rwanda and have had the same issue. I’ve created CB-218 which has a little more detail on how both ‘saved search’ and ‘saved cohort’ are not saving, but migrated ones from OpenMRS 1 appear.

1 Like

@anjisvj do you know if this bug is fixed in the 3.0 version of the cohort builder that you’re working on?

(Details FYI for @tanderson & @mseaton: GSoC 2022: Redo Legacy UI Cohort Builder - Project Updates - #46 by anjisvj

The saved search feature is called in the saved query in the 3.0 cohort builder and it’s working. But the saved cohort is not saving the cohort members. It’s an issue from the rest module. I’m currently working on fixing this. Here’s the issue I created for this.

1 Like