Skip to content

Commit

Permalink
Merge pull request #222 from OHDSI/uniqueCovName
Browse files Browse the repository at this point in the history
add analysis_name to covariateName to make it unique
  • Loading branch information
ginberg authored Jan 18, 2024
2 parents e3a9b01 + 035f262 commit c90b392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inst/sql/sql_server/DomainConceptGroup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ SELECT covariate_id,
CAST(CONCAT('@domain_table group: ', CASE WHEN concept_name IS NULL THEN 'Unknown concept' ELSE concept_name END {@sub_type == 'inpatient'} ? {, ' (inpatient)'}) AS VARCHAR(512)) AS covariate_name,
} : {
{@start_day == 'anyTimePrior'} ? {
CAST(CONCAT('@domain_table group any time prior through @end_day days relative to index: ', CASE WHEN concept_name IS NULL THEN 'Unknown concept' ELSE concept_name END {@sub_type == 'inpatient'} ? {, ' (inpatient)'}) AS VARCHAR(512)) AS covariate_name,
CAST(CONCAT('@domain_table group (@analysis_name) any time prior through @end_day days relative to index: ', CASE WHEN concept_name IS NULL THEN 'Unknown concept' ELSE concept_name END {@sub_type == 'inpatient'} ? {, ' (inpatient)'}) AS VARCHAR(512)) AS covariate_name,
} : {
CAST(CONCAT('@domain_table group during day @start_day through @end_day days relative to index: ', CASE WHEN concept_name IS NULL THEN 'Unknown concept' ELSE concept_name END {@sub_type == 'inpatient'} ? {, ' (inpatient)'}) AS VARCHAR(512)) AS covariate_name,
CAST(CONCAT('@domain_table group (@analysis_name) during day @start_day through @end_day days relative to index: ', CASE WHEN concept_name IS NULL THEN 'Unknown concept' ELSE concept_name END {@sub_type == 'inpatient'} ? {, ' (inpatient)'}) AS VARCHAR(512)) AS covariate_name,
}
}
@analysis_id AS analysis_id,
Expand Down

0 comments on commit c90b392

Please sign in to comment.