Skip to content

Commit

Permalink
Fix cdmresults drill-down reports (#2257)
Browse files Browse the repository at this point in the history
Fixes #2248.
  • Loading branch information
TomWhite-MedStar authored Apr 25, 2023
1 parent 10f24a7 commit 7d288ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ FROM
ON num.stratum_2 = denom.stratum_1
--calendar year
INNER JOIN
@vocab_database_schema.concept c1 ON CAST(CASE WHEN analysis_id = 1002 THEN num.stratum_1 ELSE null END AS INT) = c1.concept_id
@vocab_database_schema.concept c1 ON CAST(CASE WHEN num.analysis_id = 1002 THEN num.stratum_1 ELSE null END AS INT) = c1.concept_id
WHERE c1.concept_id = @conceptId
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SELECT
5) AS y_prevalence_1000_pp --prevalence, per 1000 persons
FROM (
SELECT
num.analysis_id AS num_analysis_id
num.analysis_id AS num_analysis_id,
num.stratum_1 AS num_stratum_1,
num.stratum_2 AS num_stratum_2,
num.stratum_3 AS num_stratum_3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM (
SELECT analysis_id, stratum_1, stratum_2, count_value
FROM @results_database_schema.achilles_results
WHERE analysis_id = 602
GROUP BY stratum_1, stratum_2, count_value
GROUP BY analysis_id, stratum_1, stratum_2, count_value
) num
INNER JOIN (
SELECT stratum_1, count_value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ WHERE vo1.visit_start_date>=c1.cohort_start_date and vo1.visit_end_date<=c1.coho
--}
group by c1.cohort_definition_id,
--{@CDM_version == '4'}?{
vo1.place_of_service_CONCEPT_ID
vo1.place_of_service_CONCEPT_ID;
--}
--{@CDM_version == '5'}?{
vo1.visit_CONCEPT_ID
vo1.visit_CONCEPT_ID;
--}
;

0 comments on commit 7d288ef

Please # to comment.