Skip to contents

Function that maps code and gets description of the mapped codes

Usage

map_describe(
  codes,
  icdVer_dest,
  code_type = c("dg", "pc"),
  method = c("gem", "reverse-gem", "both", "multi-stage"),
  match_method = c("exact", "prefix"),
  keepMapCode = FALSE
)

Arguments

codes

A vector of ICD diagnosis or procedure codes.

icdVer_dest

A number, either 9 or 10, indicating the destination ICD version.

code_type

A string, either "dg" or "pc," indicating the codes are diagnosis or procedure, respectively.

method

A string, either "gem", "reverse-gem", "both", or "multi-stage". See documentation on map_code for more details.

match_method

A string, specifying the method for matching the codes

  • "exact" matches the provided code exactly.

  • "prefix" treats the provided code as a prefix for matching.

keepMapCode

Boolean - if true, returned data frame will keep the map code and associated columns, otherwise they are dropped.

Value

A dataframe with the original ICD code, the matching code, descriptions for both, and potentially columns for the map codes.