Search in sources :

Example 1 with MappedParametersObsQuery

use of org.openmrs.module.reporting.query.obs.definition.MappedParametersObsQuery in project openmrs-module-pihcore by PIH.

the class PihObsQueryLibrary method getObsDuringPeriod.

@DocumentedDefinition(value = "obsDuringPeriod")
public ObsQuery getObsDuringPeriod(List<Concept> questionConcepts) {
    BasicObsQuery q = new BasicObsQuery();
    q.setConceptList(questionConcepts);
    q.addParameter(parameter(Date.class, "onOrAfter"));
    q.addParameter(parameter(Date.class, "onOrBefore"));
    return new MappedParametersObsQuery(q, ObjectUtil.toMap("onOrAfter=startDate,onOrBefore=endDate"));
}
Also used : BasicObsQuery(org.openmrs.module.reporting.query.obs.definition.BasicObsQuery) MappedParametersObsQuery(org.openmrs.module.reporting.query.obs.definition.MappedParametersObsQuery) Date(java.util.Date) DocumentedDefinition(org.openmrs.module.reporting.definition.library.DocumentedDefinition)

Aggregations

Date (java.util.Date)1 DocumentedDefinition (org.openmrs.module.reporting.definition.library.DocumentedDefinition)1 BasicObsQuery (org.openmrs.module.reporting.query.obs.definition.BasicObsQuery)1 MappedParametersObsQuery (org.openmrs.module.reporting.query.obs.definition.MappedParametersObsQuery)1