use of org.pmiops.workbench.model.SearchRequest 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.SearchRequest 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.SearchRequest 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);
}
use of org.pmiops.workbench.model.SearchRequest in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsDemoExcluded.
@Test
public void countSubjectsDemoExcluded() throws Exception {
Criteria demoGender = createDemoCriteria("DEMO", "GEN", "8507");
SearchParameter demoGenderSearchParam = createSearchParameter(demoGender, null);
SearchParameter demoGenderSearchParamExclude = createSearchParameter(demoGender, null);
SearchGroupItem excludeSearchGroupItem = new SearchGroupItem().type(demoGender.getType()).searchParameters(Arrays.asList(demoGenderSearchParamExclude));
SearchGroup excludeSearchGroup = new SearchGroup().addItemsItem(excludeSearchGroupItem);
SearchRequest searchRequests = createSearchRequests(demoGender.getType(), Arrays.asList(demoGenderSearchParam));
searchRequests.getExcludes().add(excludeSearchGroup);
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequests), 0);
}
use of org.pmiops.workbench.model.SearchRequest in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsDemoGender.
@Test
public void countSubjectsDemoGender() throws Exception {
Criteria demoGender = createDemoCriteria("DEMO", "GEN", "8507");
SearchParameter demo = createSearchParameter(demoGender, null);
SearchRequest searchRequest = createSearchRequests(demoGender.getType(), Arrays.asList(demo));
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
Aggregations