Learn R Programming

icd9 (version 0.2.1)

parseIcd9Cm: 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

parseIcd9Cm(icd9path = system.file("extdata", "CMS32_DESC_LONG_DX.txt",
  package = "icd9"), save = FALSE, path = "~/icd9/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.