View source: R/clinical_codes.R
get_mapping_df | R Documentation |
Returns a data frame with 'from' and 'to' columns for a specified pair of coding systems.
get_mapping_df(
from,
to,
all_lkps_maps = NULL,
rename_from_to = NULL,
na.rm = TRUE,
reverse_mapping = "error",
col_filters = default_col_filters()
)
from |
A clinical coding system to map from. |
to |
A clinical coding system to map to. |
all_lkps_maps |
Either a named list of lookup and mapping tables (either
data frames or |
rename_from_to |
Optionally supply a named vector to rename the 'from'
and 'to' columns. For example |
na.rm |
If |
reverse_mapping |
If 'error' (default), an error raised if attempting to map between coding systems for which a mapping table does not exist. If 'warning', will raise a warning and attempt to use an existing mapping table in the opposite direction (for example, a mapping from ICD10 to Read 3 would be attempted using the Read 3-to-ICD10 mapping table). |
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, |
A data frame with column names 'from' and 'to'.
Other Clinical code lookups and mappings:
codes_starting_with()
,
default_col_filters()
,
lookup_codes()
,
map_codes()
,
reformat_icd10_codes()
# build dummy all_lkps_maps
all_lkps_maps_dummy <- build_all_lkps_maps_dummy()
# get mapping data frame for Read 2 to ICD10
get_mapping_df(
from = "read3",
to = "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.