use of org.openmrs.module.reporting.cohort.definition.CompositionCohortDefinition in project openmrs-module-pihcore by PIH.
the class DailyCheckInsDataSetManager method checkInSplitByPriorConsultation.
private Mapped<CohortDefinition> checkInSplitByPriorConsultation(String columnName, Mapped<CohortDefinition> checkInWithReason, Mapped<CohortDefinition> priorConsult, boolean included) {
CompositionCohortDefinition cd = new CompositionCohortDefinition();
cd.setName(columnName);
cd.setDescription(columnName);
cd.addParameter(getDayParameter());
cd.addParameter(getLocationParameter());
cd.addSearch("checkInWithReason", checkInWithReason);
cd.addSearch("priorConsult", priorConsult);
cd.setCompositionString("checkInWithReason " + (included ? "AND" : "AND NOT") + " priorConsult");
return Mapped.mapStraightThrough(cd);
}
Aggregations