Generates Keeper profile for (a subset of) persons in the provided cohort.
generateKeeper(
connectionDetails = NULL,
connection = NULL,
cdmDatabaseSchema,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
cohortDatabaseSchema,
cohortTable,
cohortDefinitionId,
sampleSize = 20,
personIds = NULL,
keeperConceptSets,
phenotypeName = NULL,
useDescendants = TRUE,
removePii = TRUE
)An R object of type connectionDetails created using the
DatabaseConnector::createConnectionDetails() function. Not
required of connection is provided.
The connection to the database server created using
DatabaseConnector::connect(). Not required if connectionDetails
is provided.
The name of the database schema that contains the OMOP CDM instance. Requires read permissions to this database. On SQL Server, this should specify both the database and the schema, so for example 'cdm_instance.dbo'.
Some database platforms like Oracle and Impala do not truly support temp tables. To emulate temp tables, provide a schema with write privileges where temp tables can be created.
The name of the database schema that is the location where the cohort to review is stored.
The tablename that contains the cohort to review.
The cohort definition ID that will be used for the cohort.
The maximum number of persons to randomly sample from the cohort.
Only persons with these IDs will be selected. Can be a vector of numeric or string (to avoid integer overflows).
A data frame with Keeper concept sets as generated by
generateKeeperConceptSets().
(Optional) Name of the phenotype. Will be included in the output.
Include the descendants of the concepts specified in the keeperConceptSets, or
use only the verbatim concepts?
Remove person identifiable information such as person ID and cohort start date from
the output? Can be set to FALSE to allow the Keeper results to be joined to
patient data later.
Returns a tibble with fields
generatedId: A person-specific ID generated by this function.
startDay
endDay
conceptId
conceptName
category: "symptoms", "priorDisease", ...
target: Can be "Disease of interest", "Alternative diagnoses", "Both", "Other", or NA
This contains both the Keeper profiles themselves, as well as some meta-data such as the CDM source name, and cohort prevalence.