insert_dot: Insert Dot to ICD-9 and ICD-10 Diagnosis Codes

View source: R/format.R

insert_dotR Documentation

Insert Dot to ICD-9 and ICD-10 Diagnosis Codes

Description

This function adds dot to diagnosis codes of the given ICD version.

Usage

insert_dot(dx, version = c(10, 9))

Arguments

dx

A character vector for the diagnosis codes

version

The version of the diagnosis codes. Two available options are 10 and 9. The default version is 10 for ICD-10. This argument can be either a numerical value (nummerical vector of length one) or a character string (character vector of length one).

Value

A character vector representing the diagnosis codes in decimal format.

Examples

library(touch)

## for ICD-9 codes
icd9codes <- c("0011", "001.1", "316", "E950", "E9808", "V90", "v100")
insert_dot(icd9codes, 9)

## for ICD-10 codes
icd10codes <- c("A010", "M61019", "p52", "p528")
insert_dot(icd10codes)

LiYanStat/touch documentation built on July 9, 2022, 3:39 a.m.