Generate cohorts with the HADES CohortGenerator Package
Source:R/Module-CohortGenerator.R
CohortGeneratorModule.Rd
Generates cohorts against the OMOP Common Data Model
Super class
Strategus::StrategusModule
-> CohortGeneratorModule
Public fields
cohortDefinitionSharedResourcesClassName
A constant for the name of the cohort definition shared resources section of the analysis specification
negativeControlOutcomeSharedResourcesClassName
A constant for the name of the negative control outcome shared resources section of the analysis specification
Methods
Public methods
CohortGeneratorModule$createCohortSharedResourceSpecifications()
CohortGeneratorModule$createNegativeControlOutcomeCohortSharedResourceSpecifications()
CohortGeneratorModule$validateCohortSharedResourceSpecifications()
CohortGeneratorModule$validateNegativeControlOutcomeCohortSharedResourceSpecifications()
Method execute()
Generates the cohorts
Arguments
connectionDetails
An object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.executionSettings
An object of type
ExecutionSettings
as created bycreateCdmExecutionSettings()
orcreateResultsExecutionSettings()
.
Method createResultsDataModel()
Create the results data model for the module
Usage
CohortGeneratorModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
tablePrefix = ""
)
Arguments
resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsDatabaseSchema
The schema in the results database that holds the results data model.
tablePrefix
A prefix to apply to the database table names (optional).
tablePrefix
A prefix to apply to the database table names (optional).
Method uploadResults()
Upload the results for the module
Usage
CohortGeneratorModule$uploadResults(
resultsConnectionDetails,
analysisSpecifications,
resultsDataModelSettings
)
Arguments
resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.resultsConnectionDetails
The connection details to the results database which is an object of class
connectionDetails
as created by theDatabaseConnector::createConnectionDetails()
function.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.analysisSpecifications
An object of type
AnalysisSpecifications
as created bycreateEmptyAnalysisSpecificiations()
.resultsDataModelSettings
The results data model settings as created using [@seealso
createResultsDataModelSettings()
]
Method createCohortSharedResourceSpecifications()
Create shared specifications for the cohort definition set
Method createNegativeControlOutcomeCohortSharedResourceSpecifications()
Create shared specifications for the negative control outcomes cohort set
Usage
CohortGeneratorModule$createNegativeControlOutcomeCohortSharedResourceSpecifications(
negativeControlOutcomeCohortSet,
occurrenceType,
detectOnDescendants
)
Arguments
negativeControlOutcomeCohortSet
The negative control outcome cohort definition set defines the concepts to use to construct negative control outcome cohorts. See the CohortGenerator package for more details.
occurrenceType
Either "first" or "all
detectOnDescendants
When TRUE, the concept ID for the negative control will use the
concept_ancestor
table and will detect descendant concepts when constructing the cohort.
Method validateCohortSharedResourceSpecifications()
Validate the cohort shared resource specifications
Method validateNegativeControlOutcomeCohortSharedResourceSpecifications()
Validate the cohort shared resource specifications