Good day,
A bug was reported for Search By Person Attributes on the Patient Attributes tab on the new Cohort Builder. On the Patients Attributes Tab, when a “Search By Person Attributes” is done for any attributes except for “Any”, no result is returned.
I tried the same search on both the old and new Cohort Builder and the result was the same for all attributes except Any. On the New Cohort Builder, 502 results are returned while only 2 results were returned on the old Cohort Builder.
Below is a query request object for the new Cohort Builder:
{
"type": "org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition",
"columns": [
{
"name": "firstname",
"key": "reporting.library.patientDataDefinition.builtIn.preferredName.givenName",
"type": "org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"
},
{
"name": "lastname",
"key": "reporting.library.patientDataDefinition.builtIn.preferredName.familyName",
"type": "org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"
},
{
"name": "gender",
"key": "reporting.library.patientDataDefinition.builtIn.gender",
"type": "org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"
},
{
"name": "age",
"key": "reporting.library.patientDataDefinition.builtIn.ageOnDate.fullYears",
"type": "org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"
},
{
"name": "patientId",
"key": "reporting.library.patientDataDefinition.builtIn.patientId",
"type": "org.openmrs.module.reporting.data.patient.definition.PatientDataDefinition"
}
],
"rowFilters": [
{
"key": "reporting.library.cohortDefinition.builtIn.personWithAttribute",
"parameterValues": {
"attributeType": "8d871f2a-c2cc-11de-8d13-0010c6dffd0f",
"values": []
},
"type": "org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition"
}
],
"customRowFilterCombination": "1"
}
And here is the response object for the above query:
{
"uuid": "3e76ef11-9508-466b-bec6-cc7f19cf3f61",
"metadata": {
"columns": []
},
"rows": [],
"definition": {
"class": "org.openmrs.module.reporting.dataset.definition.PatientDataSetDefinition",
"uuid": "3e76ef11-9508-466b-bec6-cc7f19cf3f61",
"name": null,
"description": null,
"parameters": [],
"links": [
{
"rel": "self",
"uri": "http://modules-refapp.openmrs.org/openmrs/ws/reporting/v1/reportingrest/dataSetDefinition/3e76ef11-9508-466b-bec6-cc7f19cf3f61"
},
{
"rel": "full",
"uri": "http://modules-refapp.openmrs.org/openmrs/ws/reporting/v1/reportingrest/dataSetDefinition/3e76ef11-9508-466b-bec6-cc7f19cf3f61?v=full"
}
],
"resourceVersion": "1.8"
},
"links": [
{
"rel": "self",
"uri": "http://modules-refapp.openmrs.org/openmrs/ws/rest/v1/reportingrest/dataSet/3e76ef11-9508-466b-bec6-cc7f19cf3f61"
}
],
"resourceVersion": "1.8"
}
I feel like this isn’t a bug, as I expect all results to be returned when there’s no constraint added to the query; so that’s why on the new Cohort Builder, 502 results are returned for Any
attribute but I could be totally wrong about this. Also, there’s no way for me to confirm if these attributes are currently added to the Patients.
What are your thought’s on this?
cc @mseaton