use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsDemoGenderAndAge.
@Test
public void countSubjectsDemoGenderAndAge() throws Exception {
Criteria demoGender = createDemoCriteria("DEMO", "GEN", "8507");
SearchParameter demoGenderSearchParam = createSearchParameter(demoGender, null);
LocalDate birthdate = LocalDate.of(1980, 8, 01);
LocalDate now = LocalDate.now();
Integer age = Period.between(birthdate, now).getYears();
Criteria demoAge = createDemoCriteria("DEMO", "AGE", null);
SearchParameter demoAgeSearchParam = createSearchParameter(demoAge, null);
demoAgeSearchParam.attribute(new Attribute().operator("=").operands(Arrays.asList(age.toString())));
SearchRequest searchRequests = createSearchRequests(demoAge.getType(), Arrays.asList(demoGenderSearchParam, demoAgeSearchParam));
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequests), 1);
}
use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsICD9ConditionOccurrenceParent.
@Test
public void countSubjectsICD9ConditionOccurrenceParent() throws Exception {
SearchParameter icd9 = createSearchParameter(icd9ConditionParent, "001");
SearchRequest searchRequest = createSearchRequests(icd9ConditionParent.getType(), Arrays.asList(icd9));
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsCPTObservation.
@Test
public void countSubjectsCPTObservation() throws Exception {
SearchParameter cpt = createSearchParameter(cptObservation, "0001Z");
SearchRequest searchRequest = createSearchRequests(cptObservation.getType(), Arrays.asList(cpt));
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsICD9ConditionOccurrenceChild.
@Test
public void countSubjectsICD9ConditionOccurrenceChild() throws Exception {
SearchParameter icd9 = createSearchParameter(icd9ConditionChild, "001.1");
SearchRequest searchRequest = createSearchRequests(icd9ConditionChild.getType(), Arrays.asList(icd9));
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsICD10MeasurementParent.
@Test
public void countSubjectsICD10MeasurementParent() throws Exception {
SearchParameter icd10 = createSearchParameter(icd10MeasurementParent, "R92");
SearchRequest searchRequest = createSearchRequests(icd10MeasurementParent.getType(), Arrays.asList(icd10));
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
Aggregations