use of org.openmrs.module.reporting.query.encounter.definition.MappedParametersEncounterQuery in project openmrs-module-pihcore by PIH.
the class PihEncounterQueryLibrary method getEncountersDuringPeriodAtLocation.
@DocumentedDefinition(value = "encountersDuringPeriodAtLocation")
public EncounterQuery getEncountersDuringPeriodAtLocation(List<EncounterType> encounterTypes) {
BasicEncounterQuery q = new BasicEncounterQuery();
q.setWhich(TimeQualifier.ANY);
q.setEncounterTypes(encounterTypes);
q.addParameter(parameter(Date.class, "onOrAfter"));
q.addParameter(parameter(Date.class, "onOrBefore"));
q.addParameter(parameter(Location.class, "locationList"));
return new MappedParametersEncounterQuery(q, ObjectUtil.toMap("onOrAfter=startDate,onOrBefore=endDate,locationList=location"));
}
Aggregations