icd9: Tools for Working with ICD-9 Codes, and Finding Comorbidities

Obsolete: 'icd9' is replaced by CRAN package 'icd'. Calculate comorbidities, Charlson scores, perform fast and accurate validation, conversion, manipulation, filtering and comparison of ICD-9-CM (clinical modification) codes. ICD-9 codes appear numeric but leading and trailing zeroes, and both decimal and non-decimal "short" format codes exist. The package enables a work flow from raw lists of ICD-9 codes from hospital billing databases to comorbidities. ICD-9 to comorbidity mappings from Quan (Deyo and Elixhauser versions), Elixhauser and AHRQ included. Any other mapping of codes, such as ICD-10, to comorbidities can be used.

Author
Jack O. Wasey [aut, cre, cph], William Murphy [ctb], R Core Team [ctb, cph]
Date of publication
2016-04-15 08:33:09
Maintainer
Jack O. Wasey <jack@jackwasey.com>
License
GPL-3
Version
1.3.1
URLs

View on CRAN

Man pages

ahrqComorbid
AHRQ comorbidities
ahrqComorbidAll
AHRQ comorbidities, with HTN, CHF and renal failure subgroups
convert
Convert ICD9 codes between formats and structures.
elixComorbid
Elixhauser comorbidities
elixComorbidNames
Comorbidity names
expandRangeWorker
expand range worker function
factor_
Fast Factor Generation
fastIntToString
fast convert integer vector to character vector
generateSysData
Generate sysdata.rda
icd9AddLeadingZeroes
Add leading zeroes to incomplete ICD codes
icd9Billable
list of annual versions of billable leaf nodes of ICD-9-CM
icd9Chapters
ICD-9-CM chapters
icd9ChaptersToMap
convert the chapter headings to lists of codes
icd9Charlson
Calculate Charlson Comorbidity Index (Charlson Score)
icd9Children
Expand ICD-9 codes to all possible sub-codes
icd9Comorbid
find comorbidities from ICD-9 codes.
icd9ComorbidDfToMat
convert matrix of comorbidities into data frame, preserving...
icd9ComorbidMatToDf
convert matrix of comorbidities into data frame, preserving...
icd9Condense
Condense ICD-9 code by replacing complete families with...
icd9Count
count ICD codes or comorbidities for each patient
icd9DiffComorbid
show the difference between two comorbidity mappings
icd9DropLeadingZeroes
drop zero padding from decimal ICD-9 code.
icd9ExpandMinor
expand decimal part of ICD-9 code to cover all possible...
icd9ExpandRange
take two ICD-9 codes and expand range to include all child...
icd9Explain
explain ICD9 codes
icd9ExtractAlphaNumeric
extract alphabetic, and numeric part of icd9 code prefix
icd9FilterInvalid
Filter ICD-9 codes by invalidity.
icd9FilterPoa
Filters data frame based on present-on-arrival flag
icd9FilterValid
Filter ICD-9 codes by validity.
icd9GetChapters
get ICD-9 Chapters from vector of ICD-9 codes
icd9GetMajor
Get major (three-digit) part of ICD-9 codes
icd9GetValid
invalid subset of decimal or short ICD-9 codes
icd9GuessIsShort
guess whether short or long
icd9Hierarchy
ICD9-CM diagnosis code lookup
icd9InReferenceCode
match ICD9 codes
icd9IsA
test whether elements of vector begin with V, E (or any other...
icd9IsBillable
Determine whether codes are billable leaf-nodes
icd9IsN
do codes belong to numeric, V or E classes?
icd9IsReal
Check whether ICD-9 codes exist
icd9IsValid
check whether ICD-9 codes are syntactically valid
icd9IsValidMapping
validate an icd9 mapping to comorbidities
icd9LongToWide
convert ICD data from long to wide format
icd9-package
Tools for Working with ICD-9 Codes, and Finding Comorbidities
icd9PoaChoices
present-on-admission flags
icd9RandomShort
generate random short-form icd9 E codes
icd9ShortToDecimal
Convert ICD-9 codes between short and decimal forms
icd9Sort
sort short-form icd9 codes
icd9VanWalraven
Calculate van Walraven Elixhauser Score
icd9WideToLong
convert ICD data from wide to long format
logicalToBinary
encode TRUE as 1, and FALSE as 0 (integers)
parseAhrqSas
parse AHRQ data
parseElix
Generate Elixhauser comorbidities
parseIcd9Chapters
Read higher-level ICD-9 structure from a reliable web site
parseLeafDescriptionsAll
get billable codes from all available years
parseLeafDescriptionsVersion
read the ICD-9-CM description data as provided by the Center...
parseQuanDeyoSas
parse original SAS code defining Quan's update of Deyo...
parseRtfFifthDigitRanges
parse a row of RTF source data for ranges to apply fifth...
parseRtfLines
parse a character vector containing RTF strings
parseRtfYear
parse RTF description of entire ICD-9-CM for a specific year
quanDeyoComorbid
Quan adaptation of Deyo/Charlson comorbidities
quanElixComorbid
Quan adaptation of Elixhauser comorbidities
randomShortIcd9
genereate random short icd9 codes
sasDropOtherAssignment
drop superfluous assignment name when the name is already...
sasExtractLetStrings
extract quoted or unquoted SAS string definitions
sasFormatExtract
extract assignments from a SAS FORMAT definition.
sasParseAssignments
get assignments from a character string strings.
stripRtf
Strip RTF
strMultiMatch
return the actual matches from a bracketed regex
vermont_dx
de-identified data from public Vermont source for 2013
zip_single
unzip a single file

Files in this package

icd9
icd9/COPYING
icd9/inst
icd9/inst/COPYING
icd9/inst/COPYRIGHTS
icd9/inst/extdata
icd9/inst/extdata/comformat2012-2013.txt
icd9/inst/extdata/ICD9_E_Charlson.sas
icd9/inst/extdata/ICD9_E_Elixhauser.sas
icd9/inst/extdata/all-covariates.xls
icd9/inst/doc
icd9/inst/doc/introduction.R
icd9/inst/doc/introduction.html
icd9/inst/doc/introduction.Rmd
icd9/inst/include
icd9/inst/include/icd9_RcppExports.h
icd9/inst/include/icd9.h
icd9/tests
icd9/tests/testthat
icd9/tests/testthat/test-icd9.R
icd9/tests/testthat/test-LongToWide.R
icd9/tests/testthat/test-is.R
icd9/tests/testthat/test-sas.R
icd9/tests/testthat/test-openmp.R
icd9/tests/testthat/test-hierarchy.R
icd9/tests/testthat/test-filter.R
icd9/tests/testthat/test-convert.R
icd9/tests/testthat/test-parse.R
icd9/tests/testthat/test-ranges.R
icd9/tests/testthat/test-billable.R
icd9/tests/testthat/test-reshape.R
icd9/tests/testthat/test-valid.R
icd9/tests/testthat/test-score.R
icd9/tests/testthat/test-explain.R
icd9/tests/testthat/helper-base.R
icd9/tests/testthat/test-condense.R
icd9/tests/testthat/test-comorbid-calcs.R
icd9/tests/testthat/test-util.R
icd9/tests/testthat/test-comorbid.R
icd9/tests/test-all.R
icd9/src
icd9/src/convert.cpp
icd9/src/ranges.cpp
icd9/src/cutil.c
icd9/src/config.h.win
icd9/src/ranges.h
icd9/src/config.h.in
icd9/src/is.h
icd9/src/comorbidCommon.cpp
icd9/src/longToWide.cpp
icd9/src/manip.h
icd9/src/comorbid.cpp
icd9/src/util.h
icd9/src/Makevars.in
icd9/src/Makevars.win64
icd9/src/convert.h
icd9/src/local.h
icd9/src/util.cpp
icd9/src/cutil.h
icd9/src/Makevars.win
icd9/src/RcppExports.cpp
icd9/src/manip.cpp
icd9/src/comorbidSetup.cpp
icd9/src/is.cpp
icd9/NAMESPACE
icd9/data
icd9/data/mappingNames.rda
icd9/data/icd9Billable.RData
icd9/data/vermont_dx.RData
icd9/data/icd9ChaptersMajor.RData
icd9/data/quanDeyoComorbid.RData
icd9/data/icd9Hierarchy.RData
icd9/data/quanElixComorbid.RData
icd9/data/icd9ChaptersSub.RData
icd9/data/elixComorbid.RData
icd9/data/ahrqComorbid.RData
icd9/data/icd9Chapters.rda
icd9/R
icd9/R/convert.R
icd9/R/explain.R
icd9/R/parse-rtf.R
icd9/R/manip.R
icd9/R/sysdata.rda
icd9/R/score.R
icd9/R/filter.R
icd9/R/datadocs.R
icd9/R/benchmark.R
icd9/R/icd9-package.R
icd9/R/valid.R
icd9/R/parse-comorbid.R
icd9/R/RcppExports.R
icd9/R/real.R
icd9/R/comorbid.R
icd9/R/parse.R
icd9/R/condense.R
icd9/R/util.R
icd9/R/ranges.R
icd9/R/sas.R
icd9/R/zzz.R
icd9/vignettes
icd9/vignettes/introduction.Rmd
icd9/README.md
icd9/MD5
icd9/build
icd9/build/vignette.rds
icd9/DESCRIPTION
icd9/configure
icd9/man
icd9/man/icd9FilterValid.Rd
icd9/man/icd9Charlson.Rd
icd9/man/icd9GetValid.Rd
icd9/man/icd9Condense.Rd
icd9/man/ahrqComorbidAll.Rd
icd9/man/icd9ExpandMinor.Rd
icd9/man/icd9IsBillable.Rd
icd9/man/parseRtfYear.Rd
icd9/man/icd9InReferenceCode.Rd
icd9/man/quanElixComorbid.Rd
icd9/man/parseIcd9Chapters.Rd
icd9/man/parseElix.Rd
icd9/man/stripRtf.Rd
icd9/man/expandRangeWorker.Rd
icd9/man/elixComorbid.Rd
icd9/man/icd9DiffComorbid.Rd
icd9/man/icd9FilterInvalid.Rd
icd9/man/parseLeafDescriptionsAll.Rd
icd9/man/parseAhrqSas.Rd
icd9/man/zip_single.Rd
icd9/man/parseRtfFifthDigitRanges.Rd
icd9/man/icd9RandomShort.Rd
icd9/man/icd9ComorbidDfToMat.Rd
icd9/man/icd9ExtractAlphaNumeric.Rd
icd9/man/vermont_dx.Rd
icd9/man/icd9GuessIsShort.Rd
icd9/man/convert.Rd
icd9/man/sasFormatExtract.Rd
icd9/man/icd9-package.Rd
icd9/man/icd9Chapters.Rd
icd9/man/icd9IsReal.Rd
icd9/man/randomShortIcd9.Rd
icd9/man/icd9GetChapters.Rd
icd9/man/generateSysData.Rd
icd9/man/icd9LongToWide.Rd
icd9/man/parseQuanDeyoSas.Rd
icd9/man/icd9Children.Rd
icd9/man/icd9ExpandRange.Rd
icd9/man/elixComorbidNames.Rd
icd9/man/parseRtfLines.Rd
icd9/man/icd9VanWalraven.Rd
icd9/man/sasParseAssignments.Rd
icd9/man/sasDropOtherAssignment.Rd
icd9/man/icd9WideToLong.Rd
icd9/man/strMultiMatch.Rd
icd9/man/icd9Billable.Rd
icd9/man/logicalToBinary.Rd
icd9/man/icd9IsValidMapping.Rd
icd9/man/icd9ComorbidMatToDf.Rd
icd9/man/icd9ShortToDecimal.Rd
icd9/man/icd9IsA.Rd
icd9/man/icd9Comorbid.Rd
icd9/man/icd9Hierarchy.Rd
icd9/man/icd9AddLeadingZeroes.Rd
icd9/man/icd9GetMajor.Rd
icd9/man/quanDeyoComorbid.Rd
icd9/man/fastIntToString.Rd
icd9/man/icd9PoaChoices.Rd
icd9/man/icd9ChaptersToMap.Rd
icd9/man/icd9FilterPoa.Rd
icd9/man/ahrqComorbid.Rd
icd9/man/icd9IsValid.Rd
icd9/man/icd9DropLeadingZeroes.Rd
icd9/man/sasExtractLetStrings.Rd
icd9/man/factor_.Rd
icd9/man/icd9Sort.Rd
icd9/man/icd9IsN.Rd
icd9/man/icd9Explain.Rd
icd9/man/parseLeafDescriptionsVersion.Rd
icd9/man/icd9Count.Rd
icd9/configure.win
icd9/cleanup
icd9/.Rinstignore