
Recode diagnosis code to ICD-10 three-letter format
Source:R/data_handling.R
recode_icd10_3letters.RdExtracts the first three characters from an ICD-10 diagnosis code if the coding system is ICD-10.
Value
A character vector of the first three letters of ICD-10 codes, or `NA` if `DGREG` is not "ICD10".
Examples
diagnoses <- diagnoses_raw |>
dplyr::mutate(
ICD10_3LETTERS = recode_icd10_3letters(DG, DGREG = DGREG),
)
#> Error: object 'diagnoses_raw' not found