Skip to contents

Inserts period into an ICD-10-CM code in between the 3rd and 4th characters, if not present or if the code is longer than 3 characters

Usage

insert_period(x)

Arguments

x

vector of ICD-10-CM codes

Value

vector of ICD-10-CM codes with period inserted

Examples

insert_period("F320")
#> [1] "F32.0"

# Not inserted if code is only 3 characters
insert_period("F32")
#> [1] "F32"