View source: R/CharacterzationQueries.R
| getTimeToEvent | R Documentation |
This function extracts all time to event results across databases for specified target and outcome cohorts.
getTimeToEvent(
connectionHandler,
schema,
cTablePrefix = "c_",
cgTablePrefix = "cg_",
databaseTable = "database_meta_data",
characterizationTargetIds = NULL,
outcomeIds = NULL
)
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
characterizationTargetIds |
The characterization target cohort ids of interest |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
limitToFirstInNDays the target cohort was restrict to first in N days
minPriorObservation the target cohort was restrict to require minPriorObservation before index
nestingCohortId the nesting cohort id that a target cohort subject must also be in at index
nestingName the nesting cohort name that a target cohort subject must also be in at index
minAge the min age of the target cohort
maxAge the max age of the target cohort
studyStart the earliest date of the target cohort
studyEnd the latlest date of the target cohort
genderConceptIds the gender concept ids restricted to
outcomeName the outcome name
outcomeId the outcome unique identifier
outcomeType Whether the outcome is the first or subsequent
targetOutcomeType The interval that the outcome occurs
timeToEvent The number of days from index
numEvents The number of target cohort entries
timeScale The correspondin time-scale
Other Characterization:
characterizationCompareBinary(),
characterizationCompareContinuous(),
getAggregateBinaryRiskFactors(),
getAggregateContinuousRiskFactors(),
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCharacterizationCaseSettings(),
getCharacterizationDemographics(),
getCharacterizationTargetSettings(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getContinuousTargetBaseline(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceRates(),
getIncidenceTargetSettings(),
getNonCaseCounts(),
getOutcomesUsedInCharacterization(),
getOutcomesUsedInIncidence(),
getTargetCounts(),
getTargetsUsedInCharacterization(),
getTargetsUsedInIncidence(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
tte <- getTimeToEvent(
connectionHandler = connectionHandler,
schema = 'main'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.