Skip to content

Commit

Permalink
event cohorts change
Browse files Browse the repository at this point in the history
  • Loading branch information
cebarboza committed Nov 20, 2023
1 parent 6d796b6 commit b3feed6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/runStudy.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ runStudy <- function(connectionDetails,
# Target and treatment cohorts sections
targetCohorts <- readr::read_csv(file.path(outputFolder, "cohortsGenerated.csv")) %>%
filter(cohortId <= 100)
treatmentCohorts <- readr::read_csv(file.path(outputFolder, "cohortsGenerated.csv")) %>%
eventCohorts <- readr::read_csv(file.path(outputFolder, "cohortsGenerated.csv")) %>%
filter(between(cohortId, 100, 114))
for (i in seq(1:length(targetCohorts$cohortId))) {
outputSubDir <- file.path(outputFolder, 'treatmentPatterns', targetCohorts[i,]$cohortId)
Expand All @@ -78,7 +78,7 @@ runStudy <- function(connectionDetails,
}
# TreatmentPathways for each target cohort with treatments
cohortsGenerated <- targetCohorts[i,] %>%
dplyr::bind_rows(treatmentCohorts)
dplyr::bind_rows(eventCohorts)
cohortIds <- cohortsGenerated$cohortId
runTreatmentPatterns(connectionDetails = connectionDetails,
cdmDatabaseSchema = cdmDatabaseSchema,
Expand Down

0 comments on commit b3feed6

Please sign in to comment.