Cohort Tables

Functions that support creating the necessary cohort tables.

createCohortTables()

Create cohort tables

getCohortTableNames()

Used to get a list of cohort table names to use when creating the cohort tables

Cohort Defintion Set

Functions that support working with a cohort definition set

saveCohortDefinitionSet()

Save the cohort definition set to the file system

getCohortDefinitionSet()

Get a cohort definition set

createEmptyCohortDefinitionSet()

Create an empty cohort definition set

checkAndFixCohortDefinitionSetDataTypes()

Check if a cohort definition set is using the proper data types

isCohortDefinitionSet()

Is the data.frame a cohort definition set?

Cohort Generation

Functions that support generating cohorts.

generateCohortSet()

Generate a set of cohorts

createEmptyCohortDefinitionSet()

Create an empty cohort definition set

Cohort Counts

Function for obtaining the counts of subjects and events for one or more cohorts

getCohortCounts()

Count the cohort(s)

Cohort Subset

Functions and R6 classes for creating cohort subset definitions and subset operators.

addCohortSubsetDefinition()

Add cohort subset definition to a cohort definition set

CohortSubsetDefinition

Cohort Subset Definition

CohortSubsetOperator

Cohort Subset Operator

createCohortSubset()

A definition of subset functions to be applied to a set of cohorts

createCohortSubsetDefinition()

Create Subset Definition

createDemographicSubset()

Create createDemographicSubset Subset

createLimitSubset()

Create Limit Subset

createSubsetCohortWindow()

A definition of subset functions to be applied to a set of cohorts

DemographicSubsetOperator

Criteria Subset

getSubsetDefinitions()

Get cohort subset definitions from a cohort definition set

LimitSubsetOperator

Limit Subset Operator

saveCohortSubsetDefinition()

Save cohort subset definitions to json

SubsetCohortWindow

to List

SubsetOperator

SubsetOperator

Cohort Statistics

Functions for inserting inclusion rule names from a cohort definition, exporting the cohort statistics to the file system and a helper function for dropping those tables when they are no longer needed.

getCohortStats()

Get Cohort Inclusion Stats Table Data

insertInclusionRuleNames()

Used to insert the inclusion rule names from a cohort definition set when generating cohorts that include cohort statistics

exportCohortStatsTables()

Export the cohort statistics tables to the file system

dropCohortStatsTables()

Drop cohort statistics tables

Negative Control Outcomes

Functions for creating negative control outcome cohorts for use in population-level estimation.

createEmptyNegativeControlOutcomeCohortSet()

Create an empty negative control outcome cohort set

generateNegativeControlOutcomeCohorts()

Generate a set of negative control outcome cohorts

CSV File Helpers

Functions for reading and writing CSV files to ensure adherance to the HADES standard when interfacing between R and SQL/File System: https://ohdsi.github.io/Hades/codeStyle.html#Interfacing_between_R_and_SQL

readCsv()

Used to read a .csv file

writeCsv()

Used to write a .csv file

isCamelCase()

Used to check if a string is in lower camel case

isSnakeCase()

Used to check if a string is in snake case

isFormattedForDatabaseUpload()

Is the data.frame formatted for uploading to a database?

Record Keeping

Functions that support record keeping of tasks performed. CohortGenerator uses these functions when running in incremental mode to only generate cohorts when their definition has changed from a previous run.

getRequiredTasks()

Get a list of tasks required when running in incremental mode

recordTasksDone()

Record a task as complete

isTaskRequired()

Is a task required when running in incremental mode

saveIncremental()

Used in incremental mode to save values to a file

computeChecksum()

Computes the checksum for a value