Skip to contents

Looks up the equivalent code(s) in a target coding system for a given source code, using the built‑in crosswalk CSV tables.

Usage

map_code(code, from = "ICD9CM", to = "CCSCM")

Arguments

code

A single character string specifying the code to map.

from

A single character string naming the source code system (e.g. "ICD9CM", "ATC"). Must be one of the systems listed in supported_inner().

to

A single character string naming the target code system (e.g. "CCSCM", "NDC"). The pair paste0(from, "_to_", to) must be one of supported_cross().

Value

A character vector of mapped code(s) in the target system. If no match is found, returns an empty character vector.

Examples

if (FALSE) { # \dontrun{
# Map an ICD-10 code to its CCS category
map_code("I10", from = "ICD10CM", to = "CCSCM")
} # }