Search in sources :

Example 6 with SearchRequest

use of org.pmiops.workbench.model.SearchRequest 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)

Example 7 with SearchRequest

use of org.pmiops.workbench.model.SearchRequest 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);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Example 8 with SearchRequest

use of org.pmiops.workbench.model.SearchRequest 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);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Example 9 with SearchRequest

use of org.pmiops.workbench.model.SearchRequest 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);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Example 10 with SearchRequest

use of org.pmiops.workbench.model.SearchRequest 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);
}
Also used : SearchRequest(org.pmiops.workbench.model.SearchRequest) SearchParameter(org.pmiops.workbench.model.SearchParameter) Test(org.junit.Test)

Aggregations

SearchRequest (org.pmiops.workbench.model.SearchRequest)31 Test (org.junit.Test)27 SearchParameter (org.pmiops.workbench.model.SearchParameter)27 SearchGroup (org.pmiops.workbench.model.SearchGroup)8 SearchGroupItem (org.pmiops.workbench.model.SearchGroupItem)8 Criteria (org.pmiops.workbench.cdr.model.Criteria)6 QueryJobConfiguration (com.google.cloud.bigquery.QueryJobConfiguration)4 LocalDate (java.time.LocalDate)3 Attribute (org.pmiops.workbench.model.Attribute)3 ArrayList (java.util.ArrayList)2 BadRequestException (org.pmiops.workbench.exceptions.BadRequestException)2 Gson (com.google.gson.Gson)1 JsonSyntaxException (com.google.gson.JsonSyntaxException)1 StringJoiner (java.util.StringJoiner)1 CdrVersion (org.pmiops.workbench.db.model.CdrVersion)1 CohortReview (org.pmiops.workbench.db.model.CohortReview)1 Workspace (org.pmiops.workbench.db.model.Workspace)1 NotFoundException (org.pmiops.workbench.exceptions.NotFoundException)1 MaterializeCohortResponse (org.pmiops.workbench.model.MaterializeCohortResponse)1