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

Description Usage Arguments Value Examples

View source: R/format.R

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
9
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)

wenjie2wang/touch documentation built on Oct. 17, 2018, 3:31 a.m.