Skip to content

Commit

Permalink
Adding nesting_cohort_id to exposures_outcome_set table
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Nov 13, 2023
1 parent ba0714a commit 736e40f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions R/Export.R
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ exportExposuresOutcomes <- function(outputFolder, exportFolder) {

exposuresOutcomeSet <- tibble(
exposuresOutcomeSetId = i,
nestingCohortId = eso$nestingCohortId,
outcomeId = eso$outcomeId
)
sccsExposuresOutcomeSet[[length(sccsExposuresOutcomeSet) + 1]] <- exposuresOutcomeSet
Expand Down
1 change: 1 addition & 0 deletions inst/csv/resultsDataModelSpecification.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sccs_era,era_name,varchar,No,No,No,A name for the era. Is NULL for eras derived
sccs_era,database_id,varchar,Yes,Yes,No,Foreign key referencing the database.
sccs_exposures_outcome_set,exposures_outcome_set_id,int,Yes,Yes,No,A unique identifier for a set of exposures and an outcome.
sccs_exposures_outcome_set,outcome_id,int,Yes,No,No,A cohort ID.
sccs_exposures_outcome_set,nesting_cohort_id,int,No,No,No,A cohort ID.
sccs_exposure,exposures_outcome_set_id,int,Yes,Yes,No,A foreign key referencing the sccs_exposures_outcome_set table.
sccs_exposure,era_id,int,Yes,Yes,No,A foreign key referencing the sccs_era table.
sccs_exposure,true_effect_size,float,No,No,No,"If known, the true effect size. For negatitive controls this equals 1."
Expand Down
5 changes: 5 additions & 0 deletions inst/sql/sql_server/migrations/Migration_2-v5_1_0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Database migrations for version 5.1.0
-- This migration updates the schema:
-- 1. Adds the nesting_cohort_id to the sccs_exposures_outcome_set table

ALTER TABLE @database_schema.@table_prefixsccs_exposures_outcome_set ADD nesting_cohort_id FLOAT

0 comments on commit 736e40f

Please sign in to comment.