Skip to contents

Get concept ids from a provided path to json files

Usage

codesFromConceptSet(path, cdm, type = c("codelist"))

Arguments

path

Path to a file or folder containing JSONs of concept sets

cdm

A cdm reference created with CDMConnector

type

Can be "codelist", "codelist_with_details", or "concept_set_expression"

Value

Named list with concept_ids for each concept set

Examples

# \donttest{
cdm <- mockVocabRef("database")
#> Warning: There are observation period end dates after the current date: 2025-03-27
#>  The latest max observation period end date found is 2025-12-31
#> Warning: There are observation period end dates after the current date: 2025-03-27
#>  The latest max observation period end date found is 2025-12-31
x <- codesFromConceptSet(cdm = cdm,
                         path =  system.file(package = "CodelistGenerator",
                         "concepts_for_mock"))
x
#> 
#> ── 2 codelists ─────────────────────────────────────────────────────────────────
#> 
#> - oa_desc (3 codes)
#> - oa_no_desc (1 codes)
CDMConnector::cdmDisconnect(cdm)
# }