@Test public void startedArt_shouldReturnPatientsWhoStartedAfterDate() throws Exception { CohortDefinition cd = artCohortLibrary.startedArt(); context.addParameterValue("onOrAfter", TestUtils.date(2012, 6, 1)); EvaluatedCohort evaluated = Context.getService(CohortDefinitionService.class).evaluate(cd, context); ReportingTestUtils.assertCohortEquals(Arrays.asList(6), evaluated); }
public CohortDefinition startedArt() { DateCalculationCohortDefinition cd = new DateCalculationCohortDefinition(new InitialArtStartDateCalculation()); cd.setName("started ART"); cd.addParameter(new Parameter("onOrAfter", "After Date", Date.class)); cd.addParameter(new Parameter("onOrBefore", "Before Date", Date.class)); return cd; }
ArtCohortLibrary { public CohortDefinition startedArt() { DateCalculationCohortDefinition cd = new DateCalculationCohortDefinition(new InitialArtStartDateCalculation()); cd.setName("started ART"); cd.addParameter(new Parameter("onOrAfter", "After Date", Date.class)); cd.addParameter(new Parameter("onOrBefore", "Before Date", Date.class)); return cd; } }
ArtCohortLibrary { public CohortDefinition startedArt() { DateCalculationCohortDefinition cd = new DateCalculationCohortDefinition(new InitialArtStartDateCalculation()); cd.setName("started ART"); cd.addParameter(new Parameter("onOrAfter", "After Date", Date.class)); cd.addParameter(new Parameter("onOrBefore", "Before Date", Date.class)); return cd; }  }
ArtCohortLibrary { public CohortDefinition startedArt() { DateCalculationCohortDefinition cd = new DateCalculationCohortDefinition(new InitialArtStartDateCalculation()); cd.setName("started ART"); cd.addParameter(new Parameter("onOrAfter", "After Date", Date.class)); cd.addParameter(new Parameter("onOrBefore", "Before Date", Date.class)); return cd; }  CohortDefinition eligibleForArt(); CohortDefinition EligibleForArtExclusive(); CohortDefinition lostToFollowUpPatients(); CohortDefinition onArt(); CohortDefinition missedAppointments(); CohortDefinition onArtAndMissedAppointments(); CohortDefinition onArtAndPregnant(); CohortDefinition onArtAndNotPregnant(); CohortDefinition onOriginalFirstLine(); CohortDefinition onAlternateFirstLine(); CohortDefinition onSecondLine(); CohortDefinition netCohortMonths(int months); CohortDefinition netCohortMonthsBetweenDatesGivenMonths(Integer period); CohortDefinition onRegimen(List<Concept> drugConcepts); CohortDefinition inHivProgramAndOnRegimen(List<Concept> drugConcepts); CohortDefinition pregnantAtArtStart(); CohortDefinition tbPatientAtArtStart(); CohortDefinition whoStageAtArtStart(int stage); CohortDefinition startedArt(); CohortDefinition eligibleAndStartedARTAdult(); CohortDefinition eligibleAndStartedARTAndHivInfectedAndNotOnARTAndHasHivClinicalVisit(); CohortDefinition eligibleAndStartedARTPeds(); CohortDefinition eligibleAndStartedARTPedsAndhivInfectedAndNotOnARTAndHasHivClinicalVisit(); CohortDefinition startedArtExcludingTransferinsOnDate(); CohortDefinition startedArtWhilePregnant(); CohortDefinition startedArtWhileTbPatient(); CohortDefinition startedArtWithWhoStage(int stage); }
ArtCohortLibrary { public CohortDefinition startedArt() { DateCalculationCohortDefinition cd = new DateCalculationCohortDefinition(new InitialArtStartDateCalculation()); cd.setName("started ART"); cd.addParameter(new Parameter("onOrAfter", "After Date", Date.class)); cd.addParameter(new Parameter("onOrBefore", "Before Date", Date.class)); return cd; }  CohortDefinition eligibleForArt(); CohortDefinition EligibleForArtExclusive(); CohortDefinition lostToFollowUpPatients(); CohortDefinition onArt(); CohortDefinition missedAppointments(); CohortDefinition onArtAndMissedAppointments(); CohortDefinition onArtAndPregnant(); CohortDefinition onArtAndNotPregnant(); CohortDefinition onOriginalFirstLine(); CohortDefinition onAlternateFirstLine(); CohortDefinition onSecondLine(); CohortDefinition netCohortMonths(int months); CohortDefinition netCohortMonthsBetweenDatesGivenMonths(Integer period); CohortDefinition onRegimen(List<Concept> drugConcepts); CohortDefinition inHivProgramAndOnRegimen(List<Concept> drugConcepts); CohortDefinition pregnantAtArtStart(); CohortDefinition tbPatientAtArtStart(); CohortDefinition whoStageAtArtStart(int stage); CohortDefinition startedArt(); CohortDefinition eligibleAndStartedARTAdult(); CohortDefinition eligibleAndStartedARTAndHivInfectedAndNotOnARTAndHasHivClinicalVisit(); CohortDefinition eligibleAndStartedARTPeds(); CohortDefinition eligibleAndStartedARTPedsAndhivInfectedAndNotOnARTAndHasHivClinicalVisit(); CohortDefinition startedArtExcludingTransferinsOnDate(); CohortDefinition startedArtWhilePregnant(); CohortDefinition startedArtWhileTbPatient(); CohortDefinition startedArtWithWhoStage(int stage);  }