Concept sets created in R using the `cs` function do not contain details like "CONCEPT_NAME", "DOMAIN_ID", etc. If an OMOP CDM vocabulary is available then these details can be filled in by the `getConceptSetDetails` function.

getConceptSetDetails(x, con, vocabularyDatabaseSchema = NULL)

# S4 method for ConceptSet
getConceptSetDetails(x, con, vocabularyDatabaseSchema = NULL)

# S4 method for Cohort
getConceptSetDetails(x, con, vocabularyDatabaseSchema = NULL)

Arguments

x

A concept set created by cs(), or a Cohort.

con

A connection to an OMOP CDM database

vocabularyDatabaseSchema

Schema name where your OMOP vocabulary format resides. Note that for SQL Server, this should include both the database and schema name, for example 'vocabulary.dbo'.

Value

A modified version of the input (concept set or cohort) with concept details filled in.

Details

Pass a ConceptSet class to hydrate a single set, or a Cohort class to hydrate every concept set in the cohort (entry events, attrition rules, censoring events, the drug-exit concept set, and concept-set attributes such as conditionSourceConcept()) in one call. Concept sets are hydrated once each, even when the same set is reused across the cohort.

Methods (by class)

  • getConceptSetDetails(ConceptSet): Fill in the details for a single concept set

  • getConceptSetDetails(Cohort): Hydrate every concept set in a cohort

Examples

if (FALSE) {
# create a concept set
vocabularyDatabaseSchema = "cdm5"
anemia <- cs(descendants(439777,4013073,4013074), name = "anemia")

# fill in the details from an OMOP CDM
library(DatabaseConnector)
con <- connect(dbms = "postgresql", user = "postgres", password = "", server = "localhost/cdm")
anemia <- getConceptSetDetails(condition_anemia, con, vocabularyDatabaseSchema = "cdm5")

# hydrate every concept set in a cohort definition
cd <- cohort(conditionOccurrence(anemia))
cd <- getConceptSetDetails(cd, con, vocabularyDatabaseSchema = "cdm5")
}