Creates a concept set for drugs. For other domains, use the createNonDrugConceptSet() function. Alternatively, you can call the createConceptSet() function which automatically routes to the correct function.

Throws a warning of class NoApprovedConceptsWarning if none of the recommended concepts are approved during adjudication.

createDrugConceptSet(
  name,
  clinicalDefinition = NULL,
  llmClient,
  connectionDetails,
  vocabDatabaseSchema,
  tempEmulationSchema = getOption("sqlRenderTempEmulationSchema"),
  cacheFolder = NULL,
  fuzzyVocabSearchType = "HECATE",
  batchSize = 20
)

Arguments

name

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).

clinicalDefinition

Optional: a clinical definition of the concept set target.

llmClient

An ellmer chat object to connect to a large language model, as created for example using ellmer::chat_ollama().

connectionDetails

An object with details for connecting to a database server, as created using DatabaseConnector::createConnectionDetails().

vocabDatabaseSchema

The database and or schema where the OHDSI Vocabulary tables are loaded.

tempEmulationSchema

For database platforms that do not natively support temp tables, a database schema where the user has write access.

cacheFolder

Optional: Folder where intermediary results can be stored.

fuzzyVocabSearchType

Type of fuzzy vocabulary search. Currently only 'HECATE' is supported.

batchSize

The size of the batches fed to the LLM for adjudication.

Value

A concept set expression