Search in sources :

Example 1 with SearchParameter

use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.

the class CohortBuilderControllerTest method countSubjectsICD9MeasurementChild.

@Test
public void countSubjectsICD9MeasurementChild() throws Exception {
    SearchParameter icd9 = createSearchParameter(icd9MeasurementChild, "003.1");
    SearchRequest searchRequest = createSearchRequests(icd9MeasurementChild.getType(), Arrays.asList(icd9));
    assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Example 2 with SearchParameter

use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.

the class CohortBuilderControllerTest method countSubjectsCPTMeasurement.

@Test
public void countSubjectsCPTMeasurement() throws Exception {
    SearchParameter cpt = createSearchParameter(cptMeasurement, "0001Q");
    SearchRequest searchRequest = createSearchRequests(cptMeasurement.getType(), Arrays.asList(cpt));
    assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Example 3 with SearchParameter

use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.

the class CohortBuilderControllerTest method countSubjectsICD9ProcedureOccurrenceParent.

@Test
public void countSubjectsICD9ProcedureOccurrenceParent() throws Exception {
    SearchParameter icd9 = createSearchParameter(icd9ProcedureParent, "002");
    SearchRequest searchRequest = createSearchRequests(icd9ProcedureParent.getType(), Arrays.asList(icd9));
    assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Example 4 with SearchParameter

use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.

the class CohortBuilderControllerTest method countSubjectsICD10ConditionOccurrenceParent.

@Test
public void countSubjectsICD10ConditionOccurrenceParent() throws Exception {
    SearchParameter icd10 = createSearchParameter(icd10ConditionParent, "A");
    SearchRequest searchRequest = createSearchRequests(icd10ConditionParent.getType(), Arrays.asList(icd10));
    assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Example 5 with SearchParameter

use of org.pmiops.workbench.model.SearchParameter in project workbench by all-of-us.

the class CohortBuilderControllerTest method countSubjectsICD10MeasurementChild.

@Test
public void countSubjectsICD10MeasurementChild() throws Exception {
    SearchParameter icd10 = createSearchParameter(icd10MeasurementChild, "R92.2");
    SearchRequest searchRequest = createSearchRequests(icd10MeasurementChild.getType(), Arrays.asList(icd10));
    assertParticipants(controller.countParticipants(cdrVersion.getCdrVersionId(), searchRequest), 1);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Aggregations

SearchParameter (org.pmiops.workbench.model.SearchParameter)39 Test (org.junit.Test)34 SearchRequest (org.pmiops.workbench.model.SearchRequest)27 SearchGroupItem (org.pmiops.workbench.model.SearchGroupItem)10 ArrayList (java.util.ArrayList)9 QueryJobConfiguration (com.google.cloud.bigquery.QueryJobConfiguration)8 SearchGroup (org.pmiops.workbench.model.SearchGroup)7 Criteria (org.pmiops.workbench.cdr.model.Criteria)6 Attribute (org.pmiops.workbench.model.Attribute)5 QueryParameterValue (com.google.cloud.bigquery.QueryParameterValue)4 ListMultimap (com.google.common.collect.ListMultimap)3 LocalDate (java.time.LocalDate)3 ArrayListMultimap (com.google.common.collect.ArrayListMultimap)2 LinkedHashMap (java.util.LinkedHashMap)2 HashMap (java.util.HashMap)1 List (java.util.List)1 CriteriaDao (org.pmiops.workbench.cdr.dao.CriteriaDao)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1 Service (org.springframework.stereotype.Service)1