diff --git a/R/runApiServer.R b/R/runApiServer.R index b165d98..bcb2f77 100644 --- a/R/runApiServer.R +++ b/R/runApiServer.R @@ -10,6 +10,7 @@ #' @param host Host address to run the API server on. Defaults to "127.0.0.1" #' @param port Port number to run the API server on. Defaults to 8564 #' @param buildCountsTable Logical indicating whether to build code counts tables. Defaults to FALSE +#' @param visitSourceGroupConceptIds Numeric vector of source concept IDs used to define visit source groups when `buildCountsTable = TRUE`. Defaults to `0`. #' @param ... Additional arguments passed to plumber::pr_run() #' #' @importFrom plumber pr pr_run pr_set_docs pr_set_api_spec @@ -35,6 +36,7 @@ runApiServer <- function( host = "127.0.0.1", port = 8564, buildCountsTable = FALSE, + visitSourceGroupConceptIds = 0, ...) { # # VALIDATE @@ -62,7 +64,7 @@ runApiServer <- function( if (buildCountsTable == TRUE) { ParallelLogger::logInfo("Building code counts tables") - createCodeCountsTables(CDMdbHandler, codeCountsTable = "code_counts") + createCodeCountsTables(CDMdbHandler, codeCountsTable = "code_counts", visitSourceGroupConceptIds = visitSourceGroupConceptIds) } # Call getConceptsWithCodeCounts, to populate the cache diff --git a/man/runApiServer.Rd b/man/runApiServer.Rd index 4e14fb1..66ec98a 100644 --- a/man/runApiServer.Rd +++ b/man/runApiServer.Rd @@ -9,6 +9,7 @@ runApiServer( host = "127.0.0.1", port = 8564, buildCountsTable = FALSE, + visitSourceGroupConceptIds = 0, ... ) } @@ -22,6 +23,8 @@ If NULL, uses test Eunomia database} \item{buildCountsTable}{Logical indicating whether to build code counts tables. Defaults to FALSE} +\item{visitSourceGroupConceptIds}{Numeric vector of source concept IDs used to define visit source groups when \code{buildCountsTable = TRUE}. Defaults to \code{0}.} + \item{...}{Additional arguments passed to plumber::pr_run()} } \description{