This functionality is missing.
openMRS has such a tool that "lets you perform ad-hoc queries for patients with defined characteristics, and combines multiple queries into more complex ones.
A cohort query returns a list of patients matching the specified criteria. Cohort Builder cannot create lists of data elements other than patients. For example, you can use the cohort builder to search for all patients with any weight observation > 70, but it is not possible to create a list of all observations of weight > 70."
This functionality is missing. openMRS has such a tool that "lets you perform ad-hoc queries for patients with defined characteristics, and combines multiple queries into more complex ones.
A cohort query returns a list of patients matching the specified criteria. Cohort Builder cannot create lists of data elements other than patients. For example, you can use the cohort builder to search for all patients with any weight observation > 70, but it is not possible to create a list of all observations of weight > 70."
Read more: https://guide.openmrs.org/en/Using%20Data/cohort-builder.html