Learn R Programming

icd (version 4.0.9)

chapters_to_map: Convert chapters to lists of codes for use as a comorbidity map

Description

The chapter headings can be converted into the full set of their children, and then used to look-up which chapter, sub-chapter, or 'major' a given code belongs. Always returns a map with short-form ICD-9 codes. These can be converted in bulk with lapply and short_to_decimal.

Usage

chapters_to_map(x, defined = TRUE)

Arguments

x

Either a chapter list itself, or the name of one, e.g. icd9_sub_chapters

defined

Single logical value, if TRUE, the default, only officially defined ICD-9 (currently ICD-9-CM) codes will be used in the expansion, not any syntactically possible ICD-9 code.