use of org.openmrs.module.reporting.cohort.EvaluatedCohort in project openmrs-module-pihcore by PIH.
the class InpatientTransferCohortDefinitionEvaluatorTest method testEvaluateTransferOut.
@Test
public void testEvaluateTransferOut() throws Exception {
Location womensInternalMedicine = locationService.getLocation("Sal Fanm");
Date startDate = DateUtil.parseDate("2013-10-03 00:00:00", "yyyy-MM-dd HH:mm:ss");
Date endDate = DateUtil.parseDate("2013-10-03 23:59:59", "yyyy-MM-dd HH:mm:ss");
InpatientTransferCohortDefinition definition = new InpatientTransferCohortDefinition();
definition.setOnOrAfter(startDate);
definition.setOnOrBefore(endDate);
definition.setOutOfWard(womensInternalMedicine);
EvaluatedCohort result = cohortDefinitionService.evaluate(definition, new EvaluationContext());
assertThat(result, isCohortWithExactlyIds(patient5.getId()));
}
Aggregations