Generate cohorts with the HADES CohortGenerator Package
Source:R/Module-CohortGenerator.R
CohortGeneratorModule.RdGenerates cohorts against the OMOP Common Data Model
Super class
StrategusModule -> CohortGeneratorModule
Public fields
cohortDefinitionSharedResourcesClassNameA constant for the name of the cohort definition shared resources section of the analysis specification
negativeControlOutcomeSharedResourcesClassNameA 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()
CohortGeneratorModule$execute()
Generates the cohorts
Arguments
connectionDetailsAn object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().executionSettingsAn object of type
ExecutionSettingsas created bycreateCdmExecutionSettings()orcreateResultsExecutionSettings().
CohortGeneratorModule$createResultsDataModel()
Create the results data model for the module
Usage
CohortGeneratorModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
tablePrefix = ""
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsDatabaseSchemaThe schema in the results database that holds the results data model.
tablePrefixA prefix to apply to the database table names (optional).
tablePrefixA prefix to apply to the database table names (optional).
CohortGeneratorModule$getResultsDataModelSpecification()
Get the results data model specification for the module
CohortGeneratorModule$uploadResults()
Upload the results for the module
Usage
CohortGeneratorModule$uploadResults(
resultsConnectionDetails,
analysisSpecifications,
resultsDataModelSettings
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().resultsDataModelSettingsThe results data model settings as created using
createResultsDataModelSettings().
CohortGeneratorModule$createModuleSpecifications()
Creates the CohortGenerator Module Specifications
CohortGeneratorModule$createCohortSharedResourceSpecifications()
Create shared specifications for the cohort definition set
CohortGeneratorModule$createNegativeControlOutcomeCohortSharedResourceSpecifications()
Create shared specifications for the negative control outcomes cohort set
Usage
CohortGeneratorModule$createNegativeControlOutcomeCohortSharedResourceSpecifications(
negativeControlOutcomeCohortSet,
occurrenceType,
detectOnDescendants
)Arguments
negativeControlOutcomeCohortSetThe negative control outcome cohort definition set defines the concepts to use to construct negative control outcome cohorts. See the CohortGenerator package for more details.
occurrenceTypeEither "first" or "all
detectOnDescendantsWhen TRUE, the concept ID for the negative control will use the
concept_ancestortable and will detect descendant concepts when constructing the cohort.
CohortGeneratorModule$validateCohortSharedResourceSpecifications()
Validate the cohort shared resource specifications
CohortGeneratorModule$validateNegativeControlOutcomeCohortSharedResourceSpecifications()
Validate the cohort shared resource specifications