use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.
the class CohortBuilderControllerTest method countSubjectsCPTProcedureOccurrence.
@Test
public void countSubjectsCPTProcedureOccurrence() throws Exception {
SearchParameter cpt = createSearchParameter(cptProcedure, "0001T");
SearchRequest searchRequest = createSearchRequests(cptProcedure.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 countSubjectsICD10ProcedureOccurrenceChild.
@Test
public void countSubjectsICD10ProcedureOccurrenceChild() throws Exception {
SearchParameter icd10 = createSearchParameter(icd10ProcedureChild, "16070");
SearchRequest searchRequest = createSearchRequests(icd10ProcedureChild.getType(), Arrays.asList(icd10));
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 countSubjectsCPTDrugExposure.
@Test
public void countSubjectsCPTDrugExposure() throws Exception {
SearchParameter cpt = createSearchParameter(cptDrug, "90703");
SearchRequest searchRequest = createSearchRequests(cptDrug.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 countSubjectsICD9ProcedureOccurrenceChild.
@Test
public void countSubjectsICD9ProcedureOccurrenceChild() throws Exception {
SearchParameter icd9 = createSearchParameter(icd9ProcedureChild, "002.1");
SearchRequest searchRequest = createSearchRequests(icd9ProcedureChild.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 countSubjectsDemoAge.
@Test
public void countSubjectsDemoAge() throws Exception {
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 demo = createSearchParameter(demoAge, null);
demo.attribute(new Attribute().operator("=").operands(Arrays.asList(age.toString())));
SearchRequest searchRequests = createSearchRequests(demoAge.getType(), Arrays.asList(demo));
assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequests), 1);
}
Aggregations