This document is a DRAFT guidance.

How to Create a Cohort Definition Set Object


Downloading Cohorts from ATLAS

You can create cohorts using ATLAS and extract them using the ROhdsiWebApi package:

cohortIds <- c(1778211, 1778212, 1778213)
ROhdsiWebApi::authorizeWebApi(baseUrl = baseUrl, authMethod = "windows")
cohortDefinitionSet <- ROhdsiWebApi::exportCohortDefinitionSet(
  baseUrl = baseUrl,
  cohortIds = cohortIds

The code connects to ATLAS’ WebAPI, retrieves the cohortDefinitions, and returns a data.frame object with the required fields. The following columns are considered mandatory for OHDSI submission: - cohortId: The cohortId will be the same as the atlasId upon export from ATLAS. This column is provided in case you’d like to alter the numbering scheme for your cohort definition set. - cohortName: The name of the cohort in ATLAS. - json: The Circe compliant JSON representation of the cohort definition.

When the cohort JSON is submitted, the PhenotypeLibrary will create the SQL using Circe. The submitted SQL will only be used when the cohort definitions do not conform to the circe/atlas cohort definition standard.