/** Setup each test */ @Before public void setup() throws Exception { commonMetadata.install(); VisitType outpatient = MetadataUtils.getVisitType(CommonMetadata._VisitType.OUTPATIENT); // Patient #7 has two visits on 1-Jan-2012 (from 9am to 10am and another from 11am to 12pm) TestUtils.saveVisit( TestUtils.getPatient(7), outpatient, TestUtils.date(2012, 1, 1, 9, 0, 0), TestUtils.date(2012, 1, 1, 10, 0, 0)); TestUtils.saveVisit( TestUtils.getPatient(7), outpatient, TestUtils.date(2012, 1, 1, 11, 0, 0), TestUtils.date(2012, 1, 1, 12, 0, 0)); // Patient #8 has visit on 2-Jan-2012 TestUtils.saveVisit( TestUtils.getPatient(8), outpatient, TestUtils.date(2012, 1, 2, 9, 0, 0), TestUtils.date(2012, 1, 2, 10, 0, 0)); }