string search of concepts by name in the CONCEPT_RELATIONSHIP table
Source:R/omop_relations_names.R
omop_relations_names.Rd
a different (and quicker) way of finding relationships than omop_relations() that gets relations of a specified concept note that names are not contained in CONCEPT_RELATIONSHIP so the function joins to CONCEPT to query
Usage
omop_relations_names(
findstring,
ignore_case = TRUE,
exact = FALSE,
fixed = FALSE,
c_ids = NULL,
d_ids = NULL,
v_ids = NULL,
cc_ids = NULL,
standard = NULL,
messages = TRUE
)
ornames(
findstring,
ignore_case = TRUE,
exact = FALSE,
fixed = FALSE,
c_ids = NULL,
d_ids = NULL,
v_ids = NULL,
cc_ids = NULL,
standard = NULL,
messages = TRUE
)
Arguments
- findstring
to search for or regex, e.g. "^a" to find those starting with A
- ignore_case
ignore case in string comparison, default TRUE
- exact
TRUE for exact string search, "start" for exact start, "end" for exact end, default=FALSE for str_detect
- fixed
default FALSE allows regex,TRUE uses grepl exact matching
- c_ids
one or more concept_id to filter by, default NULL for all
- d_ids
one or more domain_id to filter by, default NULL for all
- v_ids
one or more vocabulary_id to filter by, default NULL for all
- cc_ids
one or more concept_class_id to filter by, default NULL for all
- standard
one or more standard_concept to filter by, default NULL for all, S,C
- messages
whether to print info messages, default=TRUE
Examples
#1 min to return 38 concepts
orn <- omop_relations_names("diffuse large B cell lymphoma")
#> returning 38 concepts
#omop_relations_names("AJCC/UICC Stage")
#omop_relations_names("chemotherapy", v_ids="LOINC")
#omop_relations_names("chemotherapy", v_ids=c("LOINC","SNOMED"), d_ids=c("Observation","Procedure"))
#set the findstring to "" to get all rows satisfying the other conditions
#omop_relations_names("", v_ids="Gender")
#omop_relations_names("", d_ids="Type Concept", standard="S")