Skip to content

Commit

Permalink
Fixes for export and migration of source concepts
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Nov 16, 2023
1 parent 84c923a commit 884b097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inst/sql/sql_server/CohortSourceCodes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ IF OBJECT_ID('tempdb..@include_source_concept_table', 'U') IS NOT NULL

SELECT codeset_id AS concept_set_id,
concept_sets.concept_id,
COALESCE(source_concept_id, 0),
COALESCE(source_concept_id, 0) as source_concept_id,
{@by_month} ? {
event_year,
event_month,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

-- FSQLITE : ALTER TABLE @database_schema.@table_prefix@included_source_concept ALTER COLUMN source_concept_id BIGINT;
ALTER TABLE @database_schema.@table_prefix@included_source_concept RENAME TO _included_source_concept_old;
CREATE TABLE @database_schema.@included_source_concept (
CREATE TABLE @database_schema.@table_prefix@included_source_concept (
database_id VARCHAR NOT NULL,
cohort_id BIGINT NOT NULL,
concept_set_id INT NOT NULL,
Expand All @@ -16,7 +16,7 @@ CREATE TABLE @database_schema.@included_source_concept (
PRIMARY KEY(database_id, cohort_id, concept_set_id, concept_id)
);

INSERT INTO @database_schema.@included_source_concept (
INSERT INTO @database_schema.@table_prefix@included_source_concept (
database_id,
cohort_id,
concept_set_id,
Expand Down

0 comments on commit 884b097

Please sign in to comment.