Uses RxNav approximateTerm, then fetches properties for each candidate and
filters to ingredient-type concepts (TTY IN and, optionally, PIN).
Usage
find_ingredients(
term,
max_entries = 10,
include_pin = TRUE,
show_progress = interactive()
)Arguments
- term
Character vector (free text).
- max_entries
Integer. Max approximate-term candidates per input (default 10).
- include_pin
Logical. Include precise-ingredient (
PIN) CUIs (default TRUE).- show_progress
Logical. Show a progress bar in interactive sessions. Progress is shown only when at least 5 inputs are supplied.
Examples
if (identical(Sys.getenv("RXREF_ONLINE"), "1")) {
find_ingredients("metformin")
}
