View source: R/clinical_codes.R
code_descriptions_like | R Documentation |
Returns a data frame with clinical codes that match the supplied regular expression. Ignores case by default.
code_descriptions_like(
reg_expr,
code_type,
all_lkps_maps = NULL,
ignore_case = TRUE,
codes_only = FALSE,
preferred_description_only = TRUE,
standardise_output = TRUE,
col_filters = default_col_filters()
)
reg_expr |
a regular expression to search for |
code_type |
character. The type of clinical code system to be searched. Must be one obnf, dmd, icd9, icd10, read2, read2_drugs, read3, opcs4, data_coding_3, data_coding_4, data_coding_5, data_coding_6, sct, or phecode)'. |
all_lkps_maps |
Either a named list of lookup and mapping tables (either
data frames or |
ignore_case |
Should case differences be ignored in the match? |
codes_only |
bool. If |
preferred_description_only |
bool. Return only preferred descriptions
for clinical codes with synonyms. Default value is |
standardise_output |
bool. If |
col_filters |
A named list where each name in the list refers to the
name of a lookup or mapping table. Each item is also a named list, where
the names refer to column names in the corresponding table, and the items
are vectors of values to filter for. For example, |
data frame by default, or a character vector of codes if
codes_only
is TRUE
.
# build dummy all_lkps_maps
all_lkps_maps_dummy <- build_all_lkps_maps_dummy()
# lookup ICD10 code descriptions matching 'cyst'
code_descriptions_like(
reg_expr = "cyst",
code_type = "icd10",
all_lkps_maps = all_lkps_maps_dummy
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.