@@ -128,7 +128,7 @@ getConceptRecordCount <- function(conceptIds = NULL,
128
128
'@domain_field_short' domain_field_short,
129
129
'@calendar_type' calendar_type,
130
130
{@incidence} ? {1} : {0} incidence,
131
- {@use_age_group} ? {FLOOR((YEAR(cohort_start_date ) - year_of_birth) / 10) AS age_group, } : {-1} age_group,
131
+ {@use_age_group} ? {FLOOR((YEAR(@domain_start_date ) - year_of_birth) / 10)} : {-1} age_group,
132
132
COUNT_BIG(*) concept_count,
133
133
COUNT_BIG(DISTINCT dt.person_id) subject_count,
134
134
MIN(@domain_start_date) min_date,
@@ -197,7 +197,7 @@ getConceptRecordCount <- function(conceptIds = NULL,
197
197
{@gender_concept_id} ? {p.gender_concept_id, }
198
198
{@use_date_year} ? {DATEPART(yy, @domain_start_date),}
199
199
{@use_date_month} ? {DATEPART(mm, @domain_start_date),}
200
- {@use_age_group} ? {FLOOR((YEAR(cohort_start_date ) - year_of_birth) / 10) AS age_group ,}
200
+ {@use_age_group} ? {FLOOR((YEAR(@domain_start_date ) - year_of_birth) / 10),}
201
201
{@use_date_quarter} ? {DATEPART(qq, @domain_start_date),}};
202
202
203
203
"
0 commit comments