@Test public void serologyAntBodyTest_shouldReturnInfantsWithSerologyAntBodyTest() throws Exception { Concept hivRapidTest = Dictionary.getConcept(Dictionary.HIV_RAPID_TEST_1_QUALITATIVE); Concept negative = Dictionary.getConcept(Dictionary.NEGATIVE); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); Concept unknown = Dictionary.getConcept(Dictionary.UNKNOWN); TestUtils.saveObs(TestUtils.getPatient(6), hivRapidTest, negative, TestUtils.date(2012, 6, 10)); TestUtils.saveObs(TestUtils.getPatient(7), hivRapidTest, unknown, TestUtils.date(2012, 6, 15)); TestUtils.saveObs(TestUtils.getPatient(8), hivRapidTest, poorSampleQuality, TestUtils.date(2012, 6, 20)); CohortDefinition cd = mchcsCohortLibrary.serologyAntBodyTest(); EvaluatedCohort evaluated = Context.getService(CohortDefinitionService.class).evaluate(cd, context); ReportingTestUtils.assertCohortEquals(Arrays.asList(6,8), evaluated); }
public CohortDefinition serologyAntBodyTest() { Concept hivRapidTest = Dictionary.getConcept(Dictionary.HIV_RAPID_TEST_1_QUALITATIVE); Concept negative = Dictionary.getConcept(Dictionary.NEGATIVE); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); Concept positive = Dictionary.getConcept(Dictionary.POSITIVE); return commonCohorts.hasObs(hivRapidTest,negative,poorSampleQuality,positive); }
MchcsCohortLibrary { public CohortDefinition serologyAntBodyTest() { Concept hivRapidTest = Dictionary.getConcept(Dictionary.HIV_RAPID_TEST_1_QUALITATIVE); Concept negative = Dictionary.getConcept(Dictionary.NEGATIVE); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); Concept positive = Dictionary.getConcept(Dictionary.POSITIVE); return commonCohorts.hasObs(hivRapidTest,negative,poorSampleQuality,positive); } }
MchcsCohortLibrary { public CohortDefinition serologyAntBodyTest() { Concept hivRapidTest = Dictionary.getConcept(Dictionary.HIV_RAPID_TEST_1_QUALITATIVE); Concept negative = Dictionary.getConcept(Dictionary.NEGATIVE); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); Concept positive = Dictionary.getConcept(Dictionary.POSITIVE); return commonCohorts.hasObs(hivRapidTest,negative,poorSampleQuality,positive); }  }
MchcsCohortLibrary { public CohortDefinition serologyAntBodyTest() { Concept hivRapidTest = Dictionary.getConcept(Dictionary.HIV_RAPID_TEST_1_QUALITATIVE); Concept negative = Dictionary.getConcept(Dictionary.NEGATIVE); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); Concept positive = Dictionary.getConcept(Dictionary.POSITIVE); return commonCohorts.hasObs(hivRapidTest,negative,poorSampleQuality,positive); }  CohortDefinition pcrWithinMonths(); CohortDefinition pcrInitialTest(); CohortDefinition age2Months(); CohortDefinition pcrInitialWithin2Months(); CohortDefinition ageBetween3And8Months(); CohortDefinition pcrInitialBetween3To8Months(); CohortDefinition serologyAntBodyTest(); CohortDefinition ageBetween9And12Months(); CohortDefinition serologyAntBodyTestBetween9And12Months(); CohortDefinition pcrBetween9And12MonthsAge(); CohortDefinition totalHeitestedBy12Months(); CohortDefinition detectedConfirmedStatus(); CohortDefinition pcrConfirmedPositive2Months(); CohortDefinition pcrConfirmedPositiveBetween3To8Months(); CohortDefinition pcrConfirmedPositiveBetween9To12Months(); CohortDefinition pcrTotalConfirmedPositive(); CohortDefinition ageAt6Months(); CohortDefinition exclusiveBreastFeeding(); CohortDefinition exclusiveReplacementFeeding(); CohortDefinition mixedFeeding(); CohortDefinition exclusiveBreastFeedingAtSixMonths(); CohortDefinition exclusiveReplacementFeedingAtSixMonths(); CohortDefinition mixedFeedingAtSixMonths(); CohortDefinition totalExposedAgedSixMoths(); CohortDefinition motherOnTreatmentAndBreastFeeding(); CohortDefinition motherOnTreatmentAndNotBreastFeeding(); CohortDefinition motherOnTreatmentAndNotBreastFeedingUnknown(); CohortDefinition totalBreastFeedingMotherOnTreatment(); CohortDefinition hivExposedInfants(); CohortDefinition hivExposedInfantsWithin2Months(); CohortDefinition hivExposedInfantsEligibleForCTX(); CohortDefinition hivExposedInfantsWithin2MonthsAndEligibleForCTX(); CohortDefinition scheduledVisitsInCWC(); }
MchcsCohortLibrary { public CohortDefinition serologyAntBodyTest() { Concept hivRapidTest = Dictionary.getConcept(Dictionary.HIV_RAPID_TEST_1_QUALITATIVE); Concept negative = Dictionary.getConcept(Dictionary.NEGATIVE); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); Concept positive = Dictionary.getConcept(Dictionary.POSITIVE); return commonCohorts.hasObs(hivRapidTest,negative,poorSampleQuality,positive); }  CohortDefinition pcrWithinMonths(); CohortDefinition pcrInitialTest(); CohortDefinition age2Months(); CohortDefinition pcrInitialWithin2Months(); CohortDefinition ageBetween3And8Months(); CohortDefinition pcrInitialBetween3To8Months(); CohortDefinition serologyAntBodyTest(); CohortDefinition ageBetween9And12Months(); CohortDefinition serologyAntBodyTestBetween9And12Months(); CohortDefinition pcrBetween9And12MonthsAge(); CohortDefinition totalHeitestedBy12Months(); CohortDefinition detectedConfirmedStatus(); CohortDefinition pcrConfirmedPositive2Months(); CohortDefinition pcrConfirmedPositiveBetween3To8Months(); CohortDefinition pcrConfirmedPositiveBetween9To12Months(); CohortDefinition pcrTotalConfirmedPositive(); CohortDefinition ageAt6Months(); CohortDefinition exclusiveBreastFeeding(); CohortDefinition exclusiveReplacementFeeding(); CohortDefinition mixedFeeding(); CohortDefinition exclusiveBreastFeedingAtSixMonths(); CohortDefinition exclusiveReplacementFeedingAtSixMonths(); CohortDefinition mixedFeedingAtSixMonths(); CohortDefinition totalExposedAgedSixMoths(); CohortDefinition motherOnTreatmentAndBreastFeeding(); CohortDefinition motherOnTreatmentAndNotBreastFeeding(); CohortDefinition motherOnTreatmentAndNotBreastFeedingUnknown(); CohortDefinition totalBreastFeedingMotherOnTreatment(); CohortDefinition hivExposedInfants(); CohortDefinition hivExposedInfantsWithin2Months(); CohortDefinition hivExposedInfantsEligibleForCTX(); CohortDefinition hivExposedInfantsWithin2MonthsAndEligibleForCTX(); CohortDefinition scheduledVisitsInCWC();  }