Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
schuemie committed Oct 8, 2020
1 parent dccc2f4 commit 770847a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/CohortConstruction.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,12 @@ getCohortsJsonAndSqlFromWebApi <- function(baseUrl = baseUrl,
cohortSetReference <- dplyr::rename(cohortSetReference, cohortName = "name")
}
cohortSetReference <- makeBackwardsCompatible(cohortSetReference)
cohortSetReference$json <- ""
cohortSetReference$sql <- ""

ParallelLogger::logInfo("Retrieving cohort definitions from WebAPI")
for (i in 1:nrow(cohortSetReference)) {
ParallelLogger::logInfo("- Retrieving definitions for cohort ", cohortSetReference$cohortFullName[i])
ParallelLogger::logInfo("- Retrieving definitions for cohort ", cohortSetReference$cohortName[i])
cohortDefinition <- ROhdsiWebApi::getCohortDefinition(cohortId = cohortSetReference$webApiCohortId[i],
baseUrl = baseUrl)
cohortSetReference$json[i] <- RJSONIO::toJSON(x = cohortDefinition$expression, digits = 23)
Expand Down
1 change: 1 addition & 0 deletions R/IncidenceRates.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ getIncidenceRate <- function(connectionDetails = NULL,
irYearGender,
irYearAgeGender)
result$incidenceRate <- 1000 * result$cohortCount/result$personYears
result$incidenceRate[is.nan(result$incidenceRate)] <- 0
delta <- Sys.time() - start
ParallelLogger::logInfo(paste("Computing incidence rates took",
signif(delta, 3),
Expand Down

0 comments on commit 770847a

Please sign in to comment.