Given a list of CUIs, connect to the UMLS database stored in MySQL, extract CUIs and associated terms, and write a dictionary file for use in note parsing.

phecap_generate_dictionary_file(
  cui_list, dict_file,
  user = "username", password = "password",
  host = "localhost", dbname = "umls", ...)

Arguments

cui_list

a character vector consisting of CUIs of interest.

dict_file

a character scalar for the path to the dictionary file that will be generated.

user

a character scalar for the username for database connection; passed to RMySQL::dbConnect as it is.

password

a character scalar for the password for database connection; passed to RMySQL::dbConnect as it is.

host

a character scalar for the host (or URL) for database connection; passed to RMySQL::dbConnect as it is.

dbname

a character scalar for the database name for database connection; passed to RMySQL::dbConnect as it is.

...

Other arguments passed to RMySQL::dbConnect as they are.

Value

The dictionary will be written to the location given by dict_file. Return the dictionary invisibly.