This is a convenience function that calls the LLM to determine the domain of the concept set target, and then either
calls createNonDrugConceptSet() or createDrugConceptSet(), depending on the domain.
createConceptSet(
name,
seedConceptIds = NULL,
clinicalDefinition = NULL,
llmClient,
connectionDetails,
vocabDatabaseSchema,
tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
cacheFolder = NULL,
excludedVocabularyIds = c("ICDO3"),
seedConceptFinder = DefaultSeedConceptFinder$new(),
conceptRecommender = HecateConceptRecommender$new(),
maxNforAdjudication = 5000,
conceptAdjudicator = DefaultConceptAdjudicator$new(),
condenseConceptSet = TRUE,
fuzzyVocabSearchType = "HECATE",
batchSize = 20
)The name of the concept set to create. This should be an informative name reflecting the concept set target (the idea expressed by the concept set).
Optional: a set of one or more concept IDs that resemble the concept set target.
Optional: a clinical definition of the concept set target.
An ellmer chat object to connect to a large language model, as created for example using
ellmer::chat_ollama().
An object with details for connecting to a database server, as created using
DatabaseConnector::createConnectionDetails().
The database and or schema where the OHDSI Vocabulary tables are loaded.
For database platforms that do not natively support temp tables, a database schema where the user has write access.
Optional: Folder where intermediary results can be stored.
Character vector of OHDSI Vocabulary names to exclude.
An object of class SeedConceptFinder for finding seed concepts when not provided.
An object of class ConceptRecommender for recommending additional concepts.
If the number of concepts to adjudicate is greater than this number, a warning of
class TooManyConceptsWarning is thrown, and the concept set will be simplified to
the first seed concept plus descendants.
An object of class ConceptAdjudicator for adjudicating recommended concepts.
Condense the resulting concept set?
For drugs: type of fuzzy vocabulary search. Currently only 'HECATE' is supported.
For drugs: The size of the batches fed to the LLM for adjudication.
A concept set expression