search_concepts: Search clinical codes in the specified dictionary using dplyr...

View source: R/search.R

search_conceptsR Documentation

Search clinical codes in the specified dictionary using dplyr filter options

Description

Search clinical codes in the specified dictionary using dplyr filter options

Usage

search_concepts(dict, ..., include_synonyms = F, output = "tbl")

Arguments

dict

dictionary object (see cc_from_list/cc_from_file)

...

Query terms passed to dplyr::filter function

include_synonyms

Flag to include synonyms in filtering

output

Output type. tbl is the default. Can also return codes or terms

Value

Depends on output parameter. Default is a dplyr::tbl which can undergo additional processing. Alternatives include a vector of terms or codes.

Examples

## Not run: 
config_file<-paste0(system.file("clinconcept"),"/extdata/dictconfig.json")
config<-cc_from_file("NHSReadV3",config_file)

#return all read codes containing 'asthma' and 'lung'

 asthma_lung_codes<-search_concepts(config,term %like% "asthma" |
 term %like% "lung",include_synonyms=F)

## End(Not run)

rcfgroup/clinconcept documentation built on Nov. 12, 2022, 2:40 a.m.