diff --git a/src/main/java/org/ohdsi/webapi/feasibility/FeasibilityStudyQueryBuilder.java b/src/main/java/org/ohdsi/webapi/feasibility/FeasibilityStudyQueryBuilder.java index e940c3706b..7c4d27d16b 100644 --- a/src/main/java/org/ohdsi/webapi/feasibility/FeasibilityStudyQueryBuilder.java +++ b/src/main/java/org/ohdsi/webapi/feasibility/FeasibilityStudyQueryBuilder.java @@ -76,7 +76,7 @@ private String getInclusionRuleInserts(FeasibilityStudy study) private String getInclusionRuleQuery(CriteriaGroup inclusionRule) { String resultSql = INCLUSION_RULE_QUERY_TEMPLATE; - String additionalCriteriaQuery = "\nJOIN (\n" + cohortExpressionQueryBuilder.getCriteriaGroupQuery(inclusionRule, "#primary_events") + ") AC on AC.event_id = pe.event_id"; + String additionalCriteriaQuery = "\nJOIN (\n" + cohortExpressionQueryBuilder.getCriteriaGroupQuery(inclusionRule, "#primary_events", null) + ") AC on AC.event_id = pe.event_id"; additionalCriteriaQuery = StringUtils.replace(additionalCriteriaQuery,"@indexId", "" + 0); resultSql = StringUtils.replace(resultSql, "@additionalCriteriaQuery", additionalCriteriaQuery); return resultSql; diff --git a/src/main/java/org/ohdsi/webapi/ircalc/IRAnalysisQueryBuilder.java b/src/main/java/org/ohdsi/webapi/ircalc/IRAnalysisQueryBuilder.java index 9410d97d39..b35467b0e3 100644 --- a/src/main/java/org/ohdsi/webapi/ircalc/IRAnalysisQueryBuilder.java +++ b/src/main/java/org/ohdsi/webapi/ircalc/IRAnalysisQueryBuilder.java @@ -66,7 +66,7 @@ public IRAnalysisQueryBuilder(ObjectMapper objectMapper) { private String getStrataQuery(CriteriaGroup strataCriteria) { String resultSql = STRATA_QUERY_TEMPLATE; - String additionalCriteriaQuery = "\nJOIN (\n" + cohortExpressionQueryBuilder.getCriteriaGroupQuery(strataCriteria, "#analysis_events") + ") AC on AC.person_id = pe.person_id AND AC.event_id = pe.event_id"; + String additionalCriteriaQuery = "\nJOIN (\n" + cohortExpressionQueryBuilder.getCriteriaGroupQuery(strataCriteria, "#analysis_events", null) + ") AC on AC.person_id = pe.person_id AND AC.event_id = pe.event_id"; additionalCriteriaQuery = StringUtils.replace(additionalCriteriaQuery,"@indexId", "" + 0); resultSql = StringUtils.replace(resultSql, "@additionalCriteriaQuery", additionalCriteriaQuery); return resultSql;