Problem with Cohort Builder OWA

@mozzy Realizing the flaw with the approach I mentioned before, I feel doing it that way would increase the time complexity to a great extent as there are multiple filters that I may have to apply on the entire data set. Looking at the reporting UI, I see that evaluators are playing a big role in fetching data, I am not really able to comprehend why this is happening, but I have started to feel that there is something that needs to be fixed in evaluators.

now , what specifically do you want to fetch at the end ?

I want to get all patients who satisfy a given parameter

What do you mean a given parameter , can you be more specific ?

And By the way @darius, For the codedObsSearchAdvanced cohortDefenition , we shoudnt have the “operator1” param in the post body, its supposed to be "values" , it should be like

rowFilters[{"key":"reporting.library.cohortDefinition.builtIn.codedObsSearchAdvanced","parameterValues":{"timeModifier":"ANY","question":"1284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","values":["e8b3e9e1-233b-41ac-8437-26b8c09834a2"],"markHide":true},"type":"org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition"}],"customRowFilterCombination":"1"} .

by parameter I mean, the condition name, and the date range

@haripriya , i belive theres a diference between these two statements,

  1. A patient recorded with a coded_obs value say malaria.
  2. A patient assigned a Malaria Conditon .

The querry to the adhocquery resource that we are trying to fix ,returns Patients with coded_obs value ,not patients assigned a given condition. And even the date ranges( before and after) are for when the obs was created , not when the condition was created.

Its seems to me we shall need a spcific search handler for that rather than quering the adhocquery resource.

cc @dkayiwa @darius

1 Like

@mozzy Does this mean that we will have to find another way rather than using adhocquery of reporting module? If yes, What’s the plan in your mind? :slight_smile:

i have Writen a new CondtionCorhortDefenition Class for the ConditonList

1 Like

In a mean time , am going to create these two tickets for the bug here,

  1. The Cohort Builder Owa sends a wrong request PayLoad to the adhocquery resource to fetch patients with given coded-obs value.
    it sends this

Yet it should be like

  1. A ticket for the Reporting Rest , even when you send the right request PayLoad , it still cant filter out patients with a given coded-obs value
1 Like

Created these two tickets here For the bug here https://issues.openmrs.org/browse/REPORT-855 https://issues.openmrs.org/browse/CB-215

@haripriya am also going to write new CohortDefinition class in the reporting module to filter out patients based on conditions

Created Ticket Below https://issues.openmrs.org/browse/REPORT-856

cc @dkayiwa

1 Like