@upendo, I have just tested out the Cohort Builder on modules-refapp.openmrs.org (after @dkayiwa uploaded the latest version there for me at Login), and I have run into what seem like some showstopper bugs. So, I don’t think this is ready for implementers to test out yet.
Issues:
- The overall flow of screens does not work as expected. I expect that when I fill out the form on top and click Search, then a new row should be added in the Search History (initially showing that it’s loading the results, and eventually showing a concrete number), but the screen that we’re seeing should not change. I do not want to see a list of patient names unless I explicitly click to view one of the results.
- the primary use cases is for a data analyst who is sitting down for a session that will include multiple searches and combinations. They’re first interested in the numbers of results, not the specific names. (A secondary use case is for a doctor or analyst to find specific patients with some criteria, but they can access this with just one more click.)
- For Concept/Observation
- I choose a numeric concept (“Weight (kg)”), then I go to the “Enter a value in kg” field, but it does not work. E.g. I try to type “20” but instead each time I press a key the cursor goes back to the start of the text field, so it ends up with “02”.
- even if I then do that search, the number I typed has no effect on the query
- I entered an Until Date of “18-09-2017” and I get zero results. This can’t be right; there must be obs on this server from earlier than today.
- In both the <20 and the Until 18-09-2017 cases, the query description is the same: “Patients with observations whose question is Weight (kg)”. The description needs to indicate all constraints that were applied, otherwise the user has no way to interpret what they’re seeing in the search history:
- Now that I’m trying to use it, the UI is pretty confusing. I will try to submit a PR with some cosmetic changes to clarify things, instead of trying to describe them all.
- I refreshed the browser after letting my session timeout and I ended up at this url, with a StringIndexOutOfBoundsException stack trace: Login
- I would like a “clear search history” option. (E.g. when I logged in fresh, it still shows my past searches, and in this case I actually want to start fresh.)
- actually I’d even prefer that when you load the page fresh after logging in, it says something like “Do you want to resume your previous search history (with 4 searches), from (x minutes/days/months) ago? [Discard] [Resume]”, but this is a low priority.
- I would expect that when you click Back after viewing a result from the search history, then the query form should be reset. (The way it works now, if I (1) do a query about obs, (2) do a query about encounters, (3) view the results of the obs query, (4) click Back, (5) I see a full-screen set of questions about Encounters, which confuses me.)
- In Search By Encounter the date field shows through the encounter type dropdown:
The Observations search is the most important thing in the Cohort Builder, so it need to work flawlessly or else we can’t put this in front of end users.
(I have not tested out the other tabs yet, because I saw blocker bugs in the first tab.)