@Test public void pcrWithinMonths_shouldReturnInfantPatientsWithPcrWithinMonths() throws Exception { Concept pcrTest = Dictionary.getConcept(Dictionary.HIV_DNA_POLYMERASE_CHAIN_REACTION); Concept detected = Dictionary.getConcept(Dictionary.DETECTED); Concept hivTest = Dictionary.getConcept(Dictionary.HIV_STATUS); Concept positive = Dictionary.getConcept(Dictionary.POSITIVE); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); TestUtils.saveObs(TestUtils.getPatient(6), pcrTest, detected, TestUtils.date(2013, 6, 10)); TestUtils.saveObs(TestUtils.getPatient(7), pcrTest, poorSampleQuality, TestUtils.date(2013, 6, 15)); TestUtils.saveObs(TestUtils.getPatient(8), hivTest, positive, TestUtils.date(2013, 6, 20)); CohortDefinition cd =mchcsCohortLibrary.pcrWithinMonths(); EvaluatedCohort evaluated = Context.getService(CohortDefinitionService.class).evaluate(cd, context); ReportingTestUtils.assertCohortEquals(Arrays.asList(6, 7), evaluated); }
public CohortDefinition pcrWithinMonths() { Concept pcrTest = Dictionary.getConcept(Dictionary.HIV_DNA_POLYMERASE_CHAIN_REACTION); Concept detected = Dictionary.getConcept(Dictionary.DETECTED); Concept equivocal = Dictionary.getConcept(Dictionary.EQUIVOCAL); Concept inhibitory = Dictionary.getConcept(Dictionary.INHIBITORY); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); return commonCohorts.hasObs(pcrTest,detected,equivocal,inhibitory,poorSampleQuality); }
MchcsCohortLibrary { public CohortDefinition pcrWithinMonths() { Concept pcrTest = Dictionary.getConcept(Dictionary.HIV_DNA_POLYMERASE_CHAIN_REACTION); Concept detected = Dictionary.getConcept(Dictionary.DETECTED); Concept equivocal = Dictionary.getConcept(Dictionary.EQUIVOCAL); Concept inhibitory = Dictionary.getConcept(Dictionary.INHIBITORY); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); return commonCohorts.hasObs(pcrTest,detected,equivocal,inhibitory,poorSampleQuality); } }
MchcsCohortLibrary { public CohortDefinition pcrWithinMonths() { Concept pcrTest = Dictionary.getConcept(Dictionary.HIV_DNA_POLYMERASE_CHAIN_REACTION); Concept detected = Dictionary.getConcept(Dictionary.DETECTED); Concept equivocal = Dictionary.getConcept(Dictionary.EQUIVOCAL); Concept inhibitory = Dictionary.getConcept(Dictionary.INHIBITORY); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); return commonCohorts.hasObs(pcrTest,detected,equivocal,inhibitory,poorSampleQuality); }  }
MchcsCohortLibrary { public CohortDefinition pcrWithinMonths() { Concept pcrTest = Dictionary.getConcept(Dictionary.HIV_DNA_POLYMERASE_CHAIN_REACTION); Concept detected = Dictionary.getConcept(Dictionary.DETECTED); Concept equivocal = Dictionary.getConcept(Dictionary.EQUIVOCAL); Concept inhibitory = Dictionary.getConcept(Dictionary.INHIBITORY); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); return commonCohorts.hasObs(pcrTest,detected,equivocal,inhibitory,poorSampleQuality); }  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 pcrWithinMonths() { Concept pcrTest = Dictionary.getConcept(Dictionary.HIV_DNA_POLYMERASE_CHAIN_REACTION); Concept detected = Dictionary.getConcept(Dictionary.DETECTED); Concept equivocal = Dictionary.getConcept(Dictionary.EQUIVOCAL); Concept inhibitory = Dictionary.getConcept(Dictionary.INHIBITORY); Concept poorSampleQuality = Dictionary.getConcept(Dictionary.POOR_SAMPLE_QUALITY); return commonCohorts.hasObs(pcrTest,detected,equivocal,inhibitory,poorSampleQuality); }  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();  }