diff --git a/R/AggregateCovariates.R b/R/AggregateCovariates.R index 8a3c220..6292b1d 100644 --- a/R/AggregateCovariates.R +++ b/R/AggregateCovariates.R @@ -260,7 +260,7 @@ computeTargetAggregateCovariateAnalyses <- function( message("Extracting target cohort counts") sql <- "select cohort_definition_id, - count(*) row_count, + count_big(*) row_count, count(distinct subject_id) person_count, min(datediff(day, cohort_start_date, cohort_end_date)) min_exposure_time, avg(datediff(day, cohort_start_date, cohort_end_date)) mean_exposure_time, diff --git a/inst/settings/resultsDataModelSpecification.csv b/inst/settings/resultsDataModelSpecification.csv index 3dc0e59..ecd5d9e 100644 --- a/inst/settings/resultsDataModelSpecification.csv +++ b/inst/settings/resultsDataModelSpecification.csv @@ -113,7 +113,7 @@ cohort_counts,start_anchor,varchar(15),No,No,No,No,The start anchor cohort_counts,end_anchor,varchar(15),No,No,No,No,The end anchor cohort_counts,min_prior_observation,int,No,No,No,No,Minimum time observed before index cohort_counts,outcome_washout_days,int,No,No,No,No,Patients with outcome during washout are excluded -cohort_counts,row_count,int,Yes,No,No,No,The number of rows in each cohort +cohort_counts,row_count,bigint,Yes,No,No,No,The number of rows in each cohort cohort_counts,person_count,int,Yes,No,No,No,The number of distinct people in each cohort cohort_counts,min_exposure_time,bigint,No,No,No,No,Minimum exposure time across cohort cohort_counts,mean_exposure_time,bigint,No,No,No,No,Mean exposure time across cohort diff --git a/inst/sql/sql_server/ResultTables.sql b/inst/sql/sql_server/ResultTables.sql index edb85e2..5012558 100644 --- a/inst/sql/sql_server/ResultTables.sql +++ b/inst/sql/sql_server/ResultTables.sql @@ -155,7 +155,7 @@ CREATE TABLE @my_schema.@table_prefixcohort_counts( end_anchor varchar(15), min_prior_observation int, outcome_washout_days int, - row_count int NOT NULL, + row_count bigint NOT NULL, person_count int NOT NULL, min_exposure_time int, mean_exposure_time int,