Learn R Programming

icd9 (version 1.0)

parseIcd9Descriptions: read the ICD-9-CM description data as provided by the Center for Medicaid Services.

Description

ICD9-CM data unfortunately has no comma separation, so have to pre-process. Note that this canonical data doesn't specify non-diagnostic higher-level codes, just the specific diagnostic 'child' codes.

Usage

parseIcd9Descriptions(icd9path = system.file("extdata",
  "CMS32_DESC_LONG_DX.txt", package = "icd9"), save = FALSE, path = "data")

Arguments

icd9path

path of the source data which is in /extddata in the installed package, but would be in inst/extdata in development tree.

save

logical whether to attempt to save output in package source tree data directory

path

Absolute path in which to save parsed data

Value

invisibly return the result

Details

ideally would get ICD9-CM data zip directly from CMS web page, and extract, but the built-in unzip only extracts the first file in a zip.