cartograph_key <-
function(parent_dataframe) {
cartograph <-
dplyr::bind_rows(
data.frame(bifurcation = "1",
sequence = "1",
dplyr_function = "filter_at",
dplyr_function_arg = "vars(CUI), any_vars(!is.na(.))",
status = "MAPPED_TO_SINGLE_CUI",
definition = "concept mapped to a single cui that fully encapsulates meaning of the native concept",
parent = "PARENT"),
data.frame(bifurcation = "2",
sequence = "1",
dplyr_function = "filter_at",
dplyr_function_arg = "vars(CUI_FLAG), any_vars(!is.na(.))",
status = "FLAGGED",
definition = "concept mapped to a single cui that fully encapsulates meaning of the native concept",
parent = "MAPPED_TO_SINGLE_CUI"),
data.frame(bifurcation = "2",
sequence = "2",
dplyr_function = "filter_at",
dplyr_function_arg = "vars(CUI_FLAG), any_vars(is.na(.))",
status = "FINAL",
definition = "concept mapped to a single cui that fully encapsulates meaning of the native concept",
parent = "MAPPED_TO_SINGLE_CUI"),
data.frame(bifurcation = "1",
sequence = "2",
dplyr_function = "filter_at",
dplyr_function_arg = "vars(CUI_01), any_vars(!is.na(.))",
status = "MAPPED_TO_COORDINATE_CUIS",
definition = "concept mapped to a multiple cuis that varies in coverage and overlap of meaning of the native concept",
parent = "PARENT"),
data.frame(bifurcation = "1",
sequence = "3",
dplyr_function = "filter_at",
dplyr_function_arg = "vars(CUI, CUI_01), all_vars(is.na(.))",
status = "UNMAPPED",
definition = "concepts that have not been mapped",
parent = "PARENT"),
data.frame(bifurcation = "2",
sequence = "1",
dplyr_function = "filter_at",
dplyr_function_arg = "vars(contains('DENOVO')), any_vars(!(is.na(.)))",
status = "DENOVO",
definition = "concepts that may need denovo concept creation due to their meaning",
parent = "UNMAPPED"),
data.frame(bifurcation = "2",
sequence = "2",
dplyr_function = "filter_at",
dplyr_function_arg = "vars(contains('FOLLOWUP')), any_vars(!(is.na(.)))",
status = "FOLLOWUP",
definition = "concepts that may need denovo concept creation due to their meaning",
parent = "UNMAPPED"),
data.frame(bifurcation = "1",
sequence = "4",
dplyr_function = "setdiff",
dplyr_function_arg = "PARENT, dplyr::bind_rows(MAPPED_TO_SINGLE_CUI, MAPPED_TO_COORDINATE_CUIS, UNMAPPED)",
status = "ORPHAN",
definition = "concepts lost in this bifurcation",
parent = "PARENT"),
data.frame(bifurcation = "2",
sequence = "3",
dplyr_function = "setdiff",
dplyr_function_arg = "MAPPED_TO_SINGLE_CUI, dplyr::bind_rows(FLAGGED, FINAL)",
status = "ORPHAN",
definition = "concepts lost in this bifurcation",
parent = "MAPPED_TO_SINGLE_CUI"),
data.frame(bifurcation = "2",
sequence = "3",
dplyr_function = "setdiff",
dplyr_function_arg = "UNMAPPED, dplyr::bind_rows(DENOVO, FOLLOWUP)",
status = "ORPHAN",
definition = "concepts lost in this bifurcation",
parent = "UNMAPPED")
) %>%
dplyr::mutate_at(vars(bifurcation, sequence), as.integer) %>%
dplyr::arrange(bifurcation, parent, sequence)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.