Skip to contents

Computes cohort characterization information against the OMOP Common Data Model

Super class

Strategus::StrategusModule -> CharacterizationModule

Public fields

tablePrefix

The table prefix to append to the results tables

Methods

Inherited methods


Method new()

Initialize the module


Method execute()

Execute characterization

Usage

CharacterizationModule$execute(
  connectionDetails,
  analysisSpecifications,
  executionSettings
)

Arguments

connectionDetails

An object of class connectionDetails as created by the DatabaseConnector::createConnectionDetails() function.

analysisSpecifications

An object of type AnalysisSpecifications as created by createEmptyAnalysisSpecificiations().

analysisSpecifications

An object of type AnalysisSpecifications as created by createEmptyAnalysisSpecificiations().

executionSettings

An object of type ExecutionSettings as created by createCdmExecutionSettings() or createResultsExecutionSettings().


Method createResultsDataModel()

Create the results data model for the module

Usage

CharacterizationModule$createResultsDataModel(
  resultsConnectionDetails,
  resultsDatabaseSchema,
  tablePrefix = self$tablePrefix
)

Arguments

resultsConnectionDetails

The connection details to the results database which is an object of class connectionDetails as created by the DatabaseConnector::createConnectionDetails() function.

resultsConnectionDetails

The connection details to the results database which is an object of class connectionDetails as created by the DatabaseConnector::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 getResultsDataModelSpecification()

Get the results data model specification for the module

Usage

CharacterizationModule$getResultsDataModelSpecification(tablePrefix = "")

Arguments

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

CharacterizationModule$uploadResults(
  resultsConnectionDetails,
  analysisSpecifications,
  resultsDataModelSettings
)

Arguments

resultsConnectionDetails

The connection details to the results database which is an object of class connectionDetails as created by the DatabaseConnector::createConnectionDetails() function.

resultsConnectionDetails

The connection details to the results database which is an object of class connectionDetails as created by the DatabaseConnector::createConnectionDetails() function.

analysisSpecifications

An object of type AnalysisSpecifications as created by createEmptyAnalysisSpecificiations().

analysisSpecifications

An object of type AnalysisSpecifications as created by createEmptyAnalysisSpecificiations().

resultsDataModelSettings

The results data model settings as created using [@seealso createResultsDataModelSettings()]


Method createModuleSpecifications()

Creates the CharacterizationModule Specifications

Usage

CharacterizationModule$createModuleSpecifications(
  targetIds,
  outcomeIds,
  outcomeWashoutDays = c(365),
  minPriorObservation = 365,
  dechallengeStopInterval = 30,
  dechallengeEvaluationWindow = 30,
  riskWindowStart = c(1, 1),
  startAnchor = c("cohort start", "cohort start"),
  riskWindowEnd = c(0, 365),
  endAnchor = c("cohort end", "cohort end"),
  minCharacterizationMean = 0.01,
  covariateSettings = FeatureExtraction::createCovariateSettings(useDemographicsGender =
    T, useDemographicsAge = T, useDemographicsAgeGroup = T, useDemographicsRace = T,
    useDemographicsEthnicity = T, useDemographicsIndexYear = T, useDemographicsIndexMonth
    = T, useDemographicsTimeInCohort = T, useDemographicsPriorObservationTime = T,
    useDemographicsPostObservationTime = T, useConditionGroupEraLongTerm = T,
    useDrugGroupEraOverlapping = T, useDrugGroupEraLongTerm = T,
    useProcedureOccurrenceLongTerm = T, useMeasurementLongTerm = T,

    useObservationLongTerm = T, useDeviceExposureLongTerm = T,
    useVisitConceptCountLongTerm = T, useConditionGroupEraShortTerm = T,
    useDrugGroupEraShortTerm = T, useProcedureOccurrenceShortTerm = T,
    useMeasurementShortTerm = T, useObservationShortTerm = T, useDeviceExposureShortTerm
    = T, useVisitConceptCountShortTerm = T, endDays = 0, longTermStartDays = -365,
    shortTermStartDays = -30),
  caseCovariateSettings =
    Characterization::createDuringCovariateSettings(useConditionGroupEraDuring = T,
    useDrugGroupEraDuring = T, useProcedureOccurrenceDuring = T, useDeviceExposureDuring
    = T, useMeasurementDuring = T, useObservationDuring = T, useVisitConceptCountDuring =
    T),
  casePreTargetDuration = 365,
  casePostOutcomeDuration = 365
)

Arguments

targetIds

A vector of cohort IDs to use as the target(s) for the characterization

outcomeIds

A vector of cohort IDs to use as the outcome(s) for the characterization

outcomeWashoutDays

A vector of integers specifying the washout days for each outcome (same length as the outcomeIds)

minPriorObservation

The number of days of minimum observation a patient in the target populations must have

dechallengeStopInterval

description

dechallengeEvaluationWindow

description

riskWindowStart

The number of days after start anchor to start the time-at-risk (can be a vector for multiple TARS)

startAnchor

The TAR starts relative to this either cohort start or cohort end (can be a vector for multiple TARS)

riskWindowEnd

The number of days after end anchor to end the time-at-risk (can be a vector for multiple TARS)

endAnchor

The TAR ends relative to this either cohort start or cohort end (can be a vector for multiple TARS)

minCharacterizationMean

The minimum fraction patients in the target have a covariate for it to be included

covariateSettings

Covariates for the database, cohort and risk factor characterization

caseCovariateSettings

Covariates for the case-series characterization

casePreTargetDuration

The number of days before target start to use for case-series

casePostOutcomeDuration

The number of days after outcome start to use for case-series


Method clone()

The objects of this class are cloneable with this method.

Usage

CharacterizationModule$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.