Learn R Programming

icd (version 3.3)

is_major: Check whether a code is major

Description

Check whether a code is major

Usage

is_major(x)

# S3 method for default is_major(x)

# S3 method for icd10 is_major(x)

# S3 method for icd10cm is_major(x)

# S3 method for icd9 is_major(x)

Arguments

icd

character vector of ICD codes.

Methods (by class)

  • default: Default method which guesses version

  • icd10: check whether a code is an ICD-10 major

  • icd10cm: check whether a code is an ICD-10-CM major. Currently uses stringr which uses stringi which should be quite fast, but does suffer from handling Unicode, locales, etc.

  • icd9: check whether a code is an ICD-9 major