View source: R/TreatmentPatternsQueries.R
| getAnalysisCohorts | R Documentation |
This function extracts analysis ids, events cohorts, and databases per target from treatment patterns
getAnalysisCohorts(connectionHandler, schema, tpTablePrefix = "tp_")
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) |
tpTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler and the schema
Returns a data.frame with the columns:
databaseName a concatinated string of all the database names ran for that analysis
databaseId a concatinated string of all the database ids ran for that analysis
analysisId the analysis ids for the treament patterns run
targetCohortName the target cohort name
targetCohortId the target cohort unique identifier
eventCohortList a concatinated string of all the event cohort names ran for that target
exitCohortList a concatinated string of all the exit cohort names ran for that target
Other TreatmentPatterns:
getEventDuration(),
getTreatmentPathways()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
cohortAnalysis <- getAnalysisCohorts(
connectionHandler = connectionHandler,
schema = "main"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.