Get a cohort definition set

getPlCohortDefinitionSet(cohortIds)

Arguments

cohortIds

IDs of cohorts to extraction from the library.

Value

A tibble with the cohort ID, name, sql, and JSON for the provided cohort IDs. Can be used by the CohortGenerator package.

Examples

cohorts <- getPhenotypeLog()
subsetIds <- cohorts$cohortId[1:3]
getPlCohortDefinitionSet(subsetIds)
#> # A tibble: 3 x 4
#>   cohortId cohortName                                   json               sql  
#>      <dbl> <chr>                                        <chr>              <chr>
#> 1        2 COVID-19 diagnosis or SARS-CoV-2 test (1pos) "{\n\t\"cdmVersio~ "CRE~
#> 2        3 Cough or Sputum                              "{\n\t\"cdmVersio~ "CRE~
#> 3        4 Diarrhea                                     "{\n\t\"cdmVersio~ "CRE~