This function adds dot to diagnosis codes of the given ICD version.
Usage
insert_dot(dx, version = c(10, 9))Examples
library(touch)
## for ICD-9 codes
icd9codes <- c("0011", "001.1", "316", "E950", "E9808", "V90", "v100")
insert_dot(icd9codes, 9)
#> [1] "001.1" "001.1" "316" "E950" "E980.8" "V90" "V10.0"
## for ICD-10 codes
icd10codes <- c("A010", "M61019", "p52", "p528")
insert_dot(icd10codes)
#> [1] "A01.0" "M61.019" "P52" "P52.8"