These functions help search for mappings between an a concept and a Metathesaurus identifier in the MRCONSO Table. All queries are cached using the R.cache package for quicker retrieval of the more computationally expensive searches.

search_string(
  conn,
  concept,
  split = " ",
  schema = "mth",
  match_case = TRUE,
  cache_only = FALSE,
  skip_cache = FALSE,
  override_cache = FALSE
)

Arguments

conn

Postgres connection

concept

Concept to be searched

split

Regular expression to split the concept on to generate words for this style of search. Defaults to a space.

schema

Metathesaurus schema

match_case

If TRUE, both the MRCONSO STR column and the `concept` argument are converted to lowercase.

cache_only

If TRUE, only the cache is loaded and database querying is skipped. If a cache did not exist for the query, a NULL will be returned.

skip_cache

If TRUE, the cache is skipped altogether. The database is directly queried and the resultset is not cached.

override_cache

If TRUE, the cache is not loaded, the database is directly queried and the resultset is cached, overwriting any existing cache that may have been present.

Value

Dataframe of 0 or more rows of all the fields in the MRCONSO Table.

Details

A 'String' style of search splits the concept into a vector of length 1 or greater based on the `split` argument. Seaches of this style will return all matches where all the results of the split were present.

See also