Package: CohortGenerator 1.1.0

Anthony Sena

CohortGenerator: Cohort Generation for the OMOP Common Data Model

Generate cohorts and subsets using an Observational Medical Outcomes Partnership (OMOP) Common Data Model (CDM) Database. Cohorts are defined using 'CIRCE' (<https://github.com/ohdsi/circe-be>) or SQL compatible with 'SqlRender' (<https://github.com/OHDSI/SqlRender>).

Authors:Anthony Sena [aut, cre], Jamie Gilbert [aut], Gowtham Rao [aut], Freddy Avila Cruz [aut], Martijn Schuemie [aut], Observational Health Data Science and Informatics [cph]

CohortGenerator_1.1.0.tar.gz
CohortGenerator_1.1.0.zip(r-4.7)CohortGenerator_1.1.0.zip(r-4.6)CohortGenerator_1.1.0.zip(r-4.5)
CohortGenerator_1.1.0.tgz(r-4.6-any)CohortGenerator_1.1.0.tgz(r-4.5-any)
CohortGenerator_1.1.0.tar.gz(r-4.7-any)CohortGenerator_1.1.0.tar.gz(r-4.6-any)
CohortGenerator_1.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
CohortGenerator/json (API)
NEWS

# Install 'CohortGenerator' in R:
install.packages('CohortGenerator', repos = c('https://ohdsi.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/ohdsi/cohortgenerator/issues

Pkgdown/docs site:https://ohdsi.github.io

Uses libs:
  • openjdk– OpenJDK Java runtime, using Hotspot JIT
Datasets:

On CRAN:

Conda:

hadesopenjdk

8.51 score 14 stars 278 scripts 452 downloads 66 exports 55 dependencies

Last updated from:62a8a0ba25. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64WARNING235
source / vignettesOK243
linux-release-x86_64WARNING219
macos-release-arm64WARNING146
macos-oldrel-arm64WARNING125
windows-develWARNING182
windows-releaseWARNING189
windows-oldrelWARNING171
wasm-releaseOK131

Exports:addCohortSubsetDefinitionaddCohortTemplateDefintionaddExcludeOnIndexSubsetDefinitionaddIndicationSubsetDefinitionaddRestrictionSubsetDefinitionaddSqlCohortDefinitionaddUnionCohortDefinitioncheckAndFixCohortDefinitionSetDataTypesCohortSubsetDefinitionCohortSubsetOperatorCohortTemplateDefinitioncomputeChecksumcomputeCohortAttritioncreateAtcCohortTemplateDefinitioncreateCohortSubsetcreateCohortSubsetDefinitioncreateCohortSubsetOperatorcreateCohortTablescreateCohortTemplateDefintioncreateDemographicSubsetcreateDemographicSubsetOperatorcreateEmptyCohortDefinitionSetcreateEmptyNegativeControlOutcomeCohortSetcreateLimitSubsetcreateLimitSubsetOperatorcreateResultsDataModelcreateRxNormCohortTemplateDefinitioncreateSnomedCohortTemplateDefinitioncreateSubsetCohortWindowcreateUnionCohortTemplateDemographicSubsetOperatordropCohortStatsTablesexportCohortStatsTablesexportCohortSubsetStatsTablesgenerateCohortSetgenerateNegativeControlOutcomeCohortsgetCohortCountsgetCohortDefinitionSetgetCohortInclusionRulesgetCohortStatsgetCohortTableNamesgetCohortValidationCountsgetDataMigratorgetExcludeOnIndexSubsetDefinitionIdsgetIndicationSubsetDefinitionIdsgetLastGeneratedCohortChecksumsgetRestrictionSubsetDefinitionIdsgetResultsDataModelSpecificationsgetSubsetDefinitionsgetTemplateDefinitionsinsertInclusionRuleNamesisCamelCaseisCohortDefinitionSetisFormattedForDatabaseUploadisSnakeCaseLimitSubsetOperatormigrateDataModelreadCsvrunCohortGenerationsampleCohortDefinitionSetsaveCohortDefinitionSetsaveCohortSubsetDefinitionSubsetCohortWindowSubsetOperatoruploadResultswriteCsv

Dependencies:backportsbitbit64blobcheckmateclicliprcpp11crayonDatabaseConnectorDBIdbplyrdigestdplyrfastmapgenericsgluehmsjsonlitelaterlifecyclelubridatemagrittrmemuseParallelLoggerpillarpkgconfigpoolprettyunitsprogresspurrrR6RcppreadrResultModelManagerrJavarlangrstudioapisnowSqlRenderstringistringrtibbletidyrtidyselecttimechangetriebeardtzdburltoolsutf8vctrsvroomwithrxml2zip

Creating Cohort Subset Definitions

Rendered fromCreatingCohortSubsetDefinitions.Rmdusingknitr::rmarkdownon May 24 2026.

Last update: 2026-02-10
Started: 2023-03-10

Generating Cohorts

Rendered fromGeneratingCohorts.Rmdusingknitr::rmarkdownon May 24 2026.

Last update: 2026-02-10
Started: 2021-12-15

Sampling Cohorts

Rendered fromSamplingCohorts.Rmdusingknitr::rmarkdownon May 24 2026.

Last update: 2025-11-12
Started: 2024-05-28

Using Template Cohorts

Rendered fromUsingTemplateCohorts.Rmdusingknitr::rmarkdownon May 24 2026.

Last update: 2026-02-10
Started: 2025-11-12

Readme and manuals

Help Manual

Help pageTopics
Add cohort subset definition to a cohort definition setaddCohortSubsetDefinition
Add Cohort template definition to cohort setaddCohortTemplateDefintion
Add exclude on index subset definitionaddExcludeOnIndexSubsetDefinition
Add Indication Subset DefinitionaddIndicationSubsetDefinition
Add Restriction Subset DefinitionaddRestrictionSubsetDefinition
Add an sql cohort definitionaddSqlCohortDefinition
Add union cohort definition to cohort definition setaddUnionCohortDefinition
Check if a cohort definition set is using the proper data typescheckAndFixCohortDefinitionSetDataTypes
Cohort Subset DefinitionCohortSubsetDefinition
Cohort Subset OperatorCohortSubsetOperator
Class for automating the creation of bulk cohortsCohortTemplateDefinition
Computes the checksum for a valuecomputeChecksum
Compute cohort attrition from inclusion rule statisticscomputeCohortAttrition
Create ATC Cohort Template DefinitioncreateAtcCohortTemplateDefinition
Create Cohort Subset OperatorcreateCohortSubset
Create Subset DefinitioncreateCohortSubsetDefinition
A definition of subset functions to be applied to a set of cohortscreateCohortSubsetOperator
Create cohort tablescreateCohortTables
Create Cohort Template DefinitioncreateCohortTemplateDefintion
Create Demographic Subset OperatorcreateDemographicSubset
Create createDemographicSubset Subset operatorcreateDemographicSubsetOperator
Create an empty cohort definition setcreateEmptyCohortDefinitionSet
Create an empty negative control outcome cohort setcreateEmptyNegativeControlOutcomeCohortSet
Create Limit Subset OperatorcreateLimitSubset
Create Limit Subset OperatorcreateLimitSubsetOperator
Create the results data model tables on a database server.createResultsDataModel
Create Rx Norm Cohort Template DefinitioncreateRxNormCohortTemplateDefinition
Create SNOMED Cohort Template DefinitioncreateSnomedCohortTemplateDefinition
Create a relative time window for cohort subset operationscreateSubsetCohortWindow
Create cohort template to union multiple cohortscreateUnionCohortTemplate
Demographic Subset OperatorDemographicSubsetOperator
Drop cohort statistics tablesdropCohortStatsTables
Export the cohort statistics tables to the file systemexportCohortStatsTables
Export cohort subset statistics tables to the file systemexportCohortSubsetStatsTables
Generate a set of cohortsgenerateCohortSet
Generate a set of negative control outcome cohortsgenerateNegativeControlOutcomeCohorts
Count the cohort(s)getCohortCounts
Get a cohort definition setgetCohortDefinitionSet
Get Cohort Inclusion Rules from a cohort definition setgetCohortInclusionRules
Get Cohort Inclusion Stats Table DatagetCohortStats
Used to get a list of cohort table names to use when creating the cohort tablesgetCohortTableNames
Validate cohortgetCohortValidationCounts
Get database migrations instancegetDataMigrator
Get Exclude On Index Subset Definition IdsgetExcludeOnIndexSubsetDefinitionIds
Get Indication Subset Definition IdsgetIndicationSubsetDefinitionIds
Get last generated cohort checksumsgetLastGeneratedCohortChecksums
Get Restriction Subset Definition IdsgetRestrictionSubsetDefinitionIds
Get specifications for CohortGenerator results data modelgetResultsDataModelSpecifications
Get cohort subset definitions from a cohort definition setgetSubsetDefinitions
Extract template definitions from a cohort definition setgetTemplateDefinitions
Used to insert the inclusion rule names from a cohort definition set when generating cohorts that include cohort statisticsinsertInclusionRuleNames
Used to check if a string is in lower camel caseisCamelCase
Is the data.frame a cohort definition set?isCohortDefinitionSet
Is the data.frame formatted for uploading to a database?isFormattedForDatabaseUpload
Used to check if a string is in snake caseisSnakeCase
Limit Subset OperatorLimitSubsetOperator
Migrate Data modelmigrateDataModel
OMOP CDM Drug Exposure Sample DataomopCdmDrugExposure
OMOP CDM Person Sample DataomopCdmPerson
Used to read a .csv filereadCsv
Run a cohort generation and export resultsrunCohortGeneration
Sample Cohort Definition SetsampleCohortDefinitionSet
Save the cohort definition set to the file systemsaveCohortDefinitionSet
Save cohort subset definitions to jsonsaveCohortSubsetDefinition
Time Window For Cohort Subset OperatorSubsetCohortWindow
Abstract base class for subsets.SubsetOperator
Upload results to the database server.uploadResults
Used to write a .csv filewriteCsv