@Test public void enrolledExcludingTransfers() throws Exception { Program hivProgram = MetadataUtils.existing(Program.class, HivMetadata._Program.HIV); Concept transferInDate = Dictionary.getConcept(Dictionary.TRANSFER_IN_DATE); TestUtils.enrollInProgram(Context.getPatientService().getPatient(6), hivProgram, TestUtils.date(2012, 6, 1)); TestUtils.enrollInProgram(Context.getPatientService().getPatient(7), hivProgram, TestUtils.date(2012, 6, 1)); TestUtils.saveObs(Context.getPatientService().getPatient(7), transferInDate, TestUtils.date(2012, 6, 1), TestUtils.date(2012, 6, 1)); TestUtils.enrollInProgram(Context.getPatientService().getPatient(8), hivProgram, TestUtils.date(2012, 7, 1)); CohortDefinition cd = hivCohortLibrary.enrolledExcludingTransfers(); context.addParameterValue("onOrAfter", TestUtils.date(2012, 6, 1)); context.addParameterValue("onOrBefore", TestUtils.date(2012, 6, 30)); EvaluatedCohort evaluated = Context.getService(CohortDefinitionService.class).evaluate(cd, context); ReportingTestUtils.assertCohortEquals(Arrays.asList(6), evaluated); }
public CohortDefinition enrolledExcludingTransfers() { return commonCohorts.enrolledExcludingTransfers(MetadataUtils.existing(Program.class, HivMetadata._Program.HIV)); }
HivCohortLibrary { public CohortDefinition enrolledExcludingTransfers() { return commonCohorts.enrolledExcludingTransfers(MetadataUtils.existing(Program.class, HivMetadata._Program.HIV)); } }
HivCohortLibrary { public CohortDefinition enrolledExcludingTransfers() { return commonCohorts.enrolledExcludingTransfers(MetadataUtils.existing(Program.class, HivMetadata._Program.HIV)); }  }
HivCohortLibrary { public CohortDefinition enrolledExcludingTransfers() { return commonCohorts.enrolledExcludingTransfers(MetadataUtils.existing(Program.class, HivMetadata._Program.HIV)); }  CohortDefinition referredFrom(Concept... entryPoints); CohortDefinition referredNotFrom(Concept... entryPoints); CohortDefinition enrolled(); CohortDefinition enrolledExcludingTransfers(); CohortDefinition enrolledExcludingTransfersAndReferredFrom(Concept... entryPoints); CohortDefinition enrolledExcludingTransfersAndNotReferredFrom(Concept... entryPoints); CohortDefinition hasCd4Result(); CohortDefinition hasHivVisit(); CohortDefinition onCtxProphylaxis(); CohortDefinition transferredOutDeadAndLtf(); CohortDefinition inHivProgramAndOnCtxProphylaxis(); CohortDefinition inHivProgramAndOnFluconazoleProphylaxis(); CohortDefinition inHivProgramAndOnAnyProphylaxis(); CohortDefinition testedForHiv(); CohortDefinition testedHivStatus(Concept status); CohortDefinition startedArtFromTransferringFacilityOnDate(); CohortDefinition firstProgramEnrollment(Integer outcomePeriod); }
HivCohortLibrary { public CohortDefinition enrolledExcludingTransfers() { return commonCohorts.enrolledExcludingTransfers(MetadataUtils.existing(Program.class, HivMetadata._Program.HIV)); }  CohortDefinition referredFrom(Concept... entryPoints); CohortDefinition referredNotFrom(Concept... entryPoints); CohortDefinition enrolled(); CohortDefinition enrolledExcludingTransfers(); CohortDefinition enrolledExcludingTransfersAndReferredFrom(Concept... entryPoints); CohortDefinition enrolledExcludingTransfersAndNotReferredFrom(Concept... entryPoints); CohortDefinition hasCd4Result(); CohortDefinition hasHivVisit(); CohortDefinition onCtxProphylaxis(); CohortDefinition transferredOutDeadAndLtf(); CohortDefinition inHivProgramAndOnCtxProphylaxis(); CohortDefinition inHivProgramAndOnFluconazoleProphylaxis(); CohortDefinition inHivProgramAndOnAnyProphylaxis(); CohortDefinition testedForHiv(); CohortDefinition testedHivStatus(Concept status); CohortDefinition startedArtFromTransferringFacilityOnDate(); CohortDefinition firstProgramEnrollment(Integer outcomePeriod);  }