From fa22dfffa28f70ed319237752ef538a78c8a73df Mon Sep 17 00:00:00 2001 From: Pavel Grafkin Date: Wed, 15 Aug 2018 14:58:08 -0400 Subject: [PATCH] Removed dummy "No matching concept" option in filters for Cost & Util reports (#556) --- .../cohortresults/sql/healthcareutilization/getDrugTypes.sql | 4 ++-- .../sql/healthcareutilization/getVisitConceptsForAnalysis.sql | 4 ++-- .../healthcareutilization/getVisitTypeConceptsForAnalysis.sql | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/resources/cohortresults/sql/healthcareutilization/getDrugTypes.sql b/src/main/resources/resources/cohortresults/sql/healthcareutilization/getDrugTypes.sql index d80b9ff87a..469cabf3ab 100644 --- a/src/main/resources/resources/cohortresults/sql/healthcareutilization/getDrugTypes.sql +++ b/src/main/resources/resources/cohortresults/sql/healthcareutilization/getDrugTypes.sql @@ -1,5 +1,5 @@ select distinct concept_id, concept_name from @results_schema.heracles_results -join @vocabulary_schema.concept on concept_id = cast((CASE WHEN stratum_3 <> '' THEN stratum_3 ELSE '0' END) as INTEGER) +join @vocabulary_schema.concept on concept_id = cast(stratum_3 as INTEGER) where analysis_id in (@analysis_id_list) and cohort_definition_id = @cohort_definition_id and (stratum_2 = CAST(@drug_concept_id AS VARCHAR(255)) or CAST(@drug_concept_id AS VARCHAR(255)) is null) -; +and stratum_3 <> ''; diff --git a/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitConceptsForAnalysis.sql b/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitConceptsForAnalysis.sql index 75f49e40e9..b1440505cf 100644 --- a/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitConceptsForAnalysis.sql +++ b/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitConceptsForAnalysis.sql @@ -1,4 +1,4 @@ select distinct concept_id, concept_name from @results_schema.heracles_results_dist -join @vocabulary_schema.concept on concept_id = cast((CASE WHEN stratum_2 <> '' THEN stratum_2 ELSE '0' END) as INTEGER) -where analysis_id = @analysis_id and cohort_definition_id = @cohort_definition_id +join @vocabulary_schema.concept on concept_id = cast(stratum_2 as INTEGER) +where analysis_id = @analysis_id and cohort_definition_id = @cohort_definition_id and stratum_2 <> '' \ No newline at end of file diff --git a/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitTypeConceptsForAnalysis.sql b/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitTypeConceptsForAnalysis.sql index 7edb5bdb19..9f71fa752d 100644 --- a/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitTypeConceptsForAnalysis.sql +++ b/src/main/resources/resources/cohortresults/sql/healthcareutilization/getVisitTypeConceptsForAnalysis.sql @@ -1,4 +1,4 @@ select distinct concept_id, concept_name from @results_schema.heracles_results_dist -join @vocabulary_schema.concept on concept_id = cast((CASE WHEN stratum_3 <> '' THEN stratum_3 ELSE '0' END) as INTEGER) -where analysis_id = @analysis_id and cohort_definition_id = @cohort_definition_id \ No newline at end of file +join @vocabulary_schema.concept on concept_id = cast(stratum_3 as INTEGER) +where analysis_id = @analysis_id and cohort_definition_id = @cohort_definition_id and stratum_3 <> '' \ No newline at end of file