Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/OHDSI/Characterization i…
Browse files Browse the repository at this point in the history
…nto develop
  • Loading branch information
jreps committed Jan 10, 2025
2 parents 449c109 + 96f793a commit 379ec32
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Authors@R: c(
person("Chris", "Knoll", , "[email protected]", role = c("aut"))
)
Maintainer: Jenna Reps <[email protected]>
Description: Various characterizations of target and outcome cohorts.
Description: Various characterizations of target and outcome cohorts for data mapped to the OMOP CDM.
License: Apache License 2.0
URL: https://ohdsi.github.io/Characterization, https://github.com/OHDSI/Characterization
BugReports: https://github.com/OHDSI/Characterization/issues
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Characterization 2.1.1
======================
- fixed result database column type for mean_exposure_time

Characterization 2.1.0
======================
- risk factors and case series now restrict to first outcome only.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Database migrations for verion 2.1.1

{DEFAULT @package_version = package_version}
{DEFAULT @migration = migration}
{DEFAULT @table_prefix = ''}

-- Change the column type of mean_exposure_time
ALTER TABLE @database_schema.@table_prefixcohort_counts ALTER COLUMN mean_exposure_time TYPE float;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Database migrations for verion 2.1.1

{DEFAULT @package_version = package_version}
{DEFAULT @migration = migration}
{DEFAULT @table_prefix = ''}

-- Change the column type of mean_exposure_time
ALTER TABLE @database_schema.@table_prefixcohort_counts ALTER COLUMN mean_exposure_time float;

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Database migrations for verion 2.1.1

{DEFAULT @package_version = package_version}
{DEFAULT @migration = migration}
{DEFAULT @table_prefix = ''}

-- Change the column type of mean_exposure_time
ALTER TABLE @database_schema.@table_prefixcohort_counts RENAME TO _cohort_counts_old;

CREATE TABLE @database_schema.@table_prefixcohort_counts (
database_id varchar(100) NOT NULL,
cohort_type varchar(10),
target_cohort_id int,
outcome_cohort_id int,
risk_window_start int,
risk_window_end int,
start_anchor varchar(15),
end_anchor varchar(15),
min_prior_observation int,
outcome_washout_days int,
row_count int NOT NULL,
person_count int NOT NULL,
min_exposure_time int,
mean_exposure_time float,
max_exposure_time int
);

INSERT INTO @database_schema.@table_prefixcohort_counts
(database_id, cohort_type, target_cohort_id, outcome_cohort_id,
risk_window_start, risk_window_end, start_anchor, end_anchor,
min_prior_observation, outcome_washout_days,row_count, person_count,
min_exposure_time, mean_exposure_time, max_exposure_time)
SELECT database_id, cohort_type, target_cohort_id, outcome_cohort_id,
risk_window_start, risk_window_end, start_anchor, end_anchor,
min_prior_observation, outcome_washout_days,row_count, person_count,
min_exposure_time, mean_exposure_time, max_exposure_time
FROM _cohort_counts_old;

DROP TABLE _cohort_counts_old;
2 changes: 1 addition & 1 deletion man/Characterization-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 379ec32

Please sign in to comment.