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

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.

AuthorJack O. Wasey [aut, cre, cph], William Murphy [ctb], R Core Team [ctb, cph]
Date of publication2016-04-15 08:33:09
MaintainerJack O. Wasey <jack@jackwasey.com>
LicenseGPL-3
Version1.3.1
URL https://github.com/jackwasey/icd9
Package repositoryView on CRAN
InstallationInstall the latest version of this package by entering the following in R:
install.packages("icd9")

Getting started

Package overview
README.md
Introducing icd9: working with ICD-9 codes and comorbidities in R

Popular man pages

convert: Convert ICD9 codes between formats and structures.
elixComorbidNames: Comorbidity names
icd9Charlson: Calculate Charlson Comorbidity Index (Charlson Score)
icd9ComorbidDfToMat: convert matrix of comorbidities into data frame, preserving...
icd9-package: Tools for Working with ICD-9 Codes, and Finding Comorbidities
icd9RandomShort: generate random short-form icd9 E codes
icd9VanWalraven: Calculate van Walraven Elixhauser Score
See all...

All man pages Function index File listing

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

Functions

.vermont Man page
\%i9d\% Man page
\%i9da\% Man page
\%i9in\% Man page
\%i9mj\% Man page
\%i9s\% Man page
\%i9sa\% Man page
ahrqComorbid Man page
ahrqComorbidAll Man page
ahrqComorbidNames Man page
ahrqComorbidNamesAbbrev Man page
ahrqComorbidNamesHtn Man page
ahrqComorbidNamesHtnAbbrev Man page
allIsNumeric Source code
asCharacterNoWarn Source code
asIntegerNoWarn Source code
asNumericNoWarn Source code
assertFactorOrCharacter Source code
callgrindStart Source code
cd9FilterPoa Source code
charlsonComorbidNames Man page
charlsonComorbidNamesAbbrev Man page
convert Man page
cr Source code
elixComorbid Man page
elixComorbidNames Man page
elixComorbidNamesAbbrev Man page
elixComorbidNamesHtn Man page
elixComorbidNamesHtnAbbrev Man page
expandRangeWorker Man page Source code
factor_ Man page Source code
factor_nosort Man page Source code
fastIntToStringRcpp Man page Source code
fastIntToStringStd Man page Source code
fixSubchapterNa Source code
generateSysData Man page Source code
getIcdField Source code
getLatestBillableVersion Source code
getNonASCII Source code
getOmpCores Source code
getOmpMaxThreads Source code
getOmpThreads Source code
getVisitId Source code
icd9 Man page
icd9-package Man page
icd9AddLeadingZeroes Man page Source code
icd9AddLeadingZeroesDecimal Man page Source code
icd9AddLeadingZeroesMajor Source code
icd9AddLeadingZeroesMajorSingle Source code
icd9AddLeadingZeroesMajorSingleStd Source code
icd9AddLeadingZeroesShort Man page Source code
icd9Billable Man page
icd9BuildChaptersHierarchy Source code
icd9Chapters Man page
icd9ChaptersMajor Man page
icd9ChaptersSub Man page
icd9ChaptersToMap Man page Source code
icd9Charlson Man page Source code
icd9Charlson.data.frame Man page Source code
icd9CharlsonComorbid Man page Source code
icd9Children Man page Source code
icd9ChildrenCpp Source code
icd9ChildrenDecimal Man page Source code
icd9ChildrenDecimalCpp Source code
icd9ChildrenShort Man page Source code
icd9ChildrenShortCpp Source code
icd9Comorbid Man page Source code
icd9ComorbidAhrq Man page Source code
icd9ComorbidDfToMat Man page Source code
icd9ComorbidElix Man page Source code
icd9ComorbidMatToDf Man page Source code
icd9ComorbidQuanDeyo Man page Source code
icd9ComorbidQuanElix Man page Source code
icd9ComorbidShort Man page Source code
icd9ComorbidShortCpp Man page Source code
icd9Comorbidities Man page Source code
icd9ComorbiditiesAhrq Man page Source code
icd9ComorbiditiesElixHauser Man page Source code
icd9ComorbiditiesQuanDeyo Man page Source code
icd9ComorbiditiesQuanElixhauser Man page Source code
icd9Condense Man page Source code
icd9CondenseDecimal Man page Source code
icd9CondenseShort Man page Source code
icd9Count Man page Source code
icd9CountComorbidBin Man page Source code
icd9CountWide Man page Source code
icd9DecimalToParts Man page Source code
icd9DecimalToPartsCpp Man page Source code
icd9DecimalToShort Man page Source code
icd9DecimalToShortOld Man page Source code
icd9DiffComorbid Man page Source code
icd9DropLeadingZeroes Man page Source code
icd9DropLeadingZeroesDecimal Man page Source code
icd9DropLeadingZeroesMajor Man page Source code
icd9DropLeadingZeroesShort Man page Source code
icd9ExpandMinor Man page Source code
icd9ExpandMinorShim Source code
icd9ExpandRange Man page Source code
icd9ExpandRangeDecimal Man page Source code
icd9ExpandRangeForSas Source code
icd9ExpandRangeMajor Man page Source code
icd9ExpandRangeShort Man page Source code
icd9Explain Man page Source code
icd9Explain.character Man page Source code
icd9Explain.factor Man page Source code
icd9Explain.list Man page Source code
icd9Explain.numeric Man page Source code
icd9ExplainDecimal Man page Source code
icd9ExplainShort Man page Source code
icd9ExtractAlphaNumeric Man page Source code
icd9FilterInvalid Man page Source code
icd9FilterPoa Man page Source code
icd9FilterPoaNo Man page Source code
icd9FilterPoaNotNo Man page Source code
icd9FilterPoaNotYes Man page Source code
icd9FilterPoaYes Man page Source code
icd9FilterValid Man page Source code
icd9GetBillable Man page Source code
icd9GetBillableDecimal Man page Source code
icd9GetBillableShort Man page Source code
icd9GetChapters Man page Source code
icd9GetInvalid Man page Source code
icd9GetInvalidDecimal Man page Source code
icd9GetInvalidMappingDecimal Man page Source code
icd9GetInvalidMappingShort Man page Source code
icd9GetInvalidShort Man page Source code
icd9GetMajor Man page Source code
icd9GetMajorShort Man page Source code
icd9GetNonBillable Man page Source code
icd9GetNonBillableDecimal Man page Source code
icd9GetNonBillableShort Man page Source code
icd9GetReal Man page Source code
icd9GetRealDecimal Man page Source code
icd9GetRealShort Man page Source code
icd9GetValid Man page Source code
icd9GetValidDecimal Man page Source code
icd9GetValidShort Man page Source code
icd9GuessIsShort Man page Source code
icd9Hierarchy Man page
icd9InReferenceCode Man page Source code
icd9IsA Man page Source code
icd9IsBillable Man page Source code
icd9IsBillableDecimal Man page Source code
icd9IsBillableShort Man page Source code
icd9IsE Man page Source code
icd9IsMajor Source code
icd9IsN Man page Source code
icd9IsReal Man page Source code
icd9IsRealDecimal Man page Source code
icd9IsRealShort Man page Source code
icd9IsV Man page Source code
icd9IsValid Man page Source code
icd9IsValidDecimal Man page Source code
icd9IsValidDecimalE Source code
icd9IsValidDecimalN Source code
icd9IsValidDecimalV Source code
icd9IsValidMajor Man page Source code
icd9IsValidMajorE Source code
icd9IsValidMajorN Source code
icd9IsValidMajorV Source code
icd9IsValidMapping Man page Source code
icd9IsValidMappingDecimal Man page Source code
icd9IsValidMappingShort Man page Source code
icd9IsValidShort Man page Source code
icd9IsValidShortE Man page Source code
icd9IsValidShortN Man page Source code
icd9IsValidShortV Man page Source code
icd9LongToWide Man page Source code
icd9LongToWideCpp Source code
icd9MajMinToCode Source code
icd9MajMinToDecimal Source code
icd9MajMinToParts Source code
icd9MajMinToParts_list Source code
icd9MajMinToShort Source code
icd9PartsToDecimal Man page Source code
icd9PartsToShort Man page Source code
icd9PoaChoices Man page
icd9RandomShort Man page Source code
icd9RandomShortE Source code
icd9RandomShortN Source code
icd9RandomShortV Source code
icd9ShortToDecimal Man page Source code
icd9ShortToParts Man page Source code
icd9ShortToPartsCpp Man page Source code
icd9Sort Man page Source code
icd9SortDecimal Man page Source code
icd9SortShort Man page Source code
icd9Valid Man page Source code
icd9ValidDecimal Man page Source code
icd9ValidShort Man page Source code
icd9VanWalraven Man page Source code
icd9VanWalraven.data.frame Man page Source code
icd9VanWalravenComorbid Man page Source code
icd9WebParseGetList Source code
icd9WebParseStartEndToRange Source code
icd9WideToLong Man page Source code
icd9chapters Man page
isNonASCII Source code
listTrimFlat Source code
logicalToBinary Man page Source code
onAttach Source code
onUnload Source code
package-icd9 Man page
parseAhrqSas Man page Source code
parseAndSaveQuick Source code
parseElix Man page Source code
parseEverythingAndSave Source code
parseIcd9Chapters Man page Source code
parseIcd9LeafDescriptions27 Source code
parseLeafDescriptionsAll Man page Source code
parseLeafDescriptionsVersion Man page Source code
parseQuanDeyoSas Man page Source code
parseQuanElix Source code
parseRtfFifthDigitRanges Man page Source code
parseRtfLines Man page Source code
parseRtfQualifierSubset Source code
parseRtfYear Man page Source code
quanDeyoComorbid Man page
quanElixComorbid Man page
quanElixComorbidNames Man page
quanElixComorbidNamesAbbrev Man page
quanElixComorbidNamesHtn Man page
quanElixComorbidNamesHtnAbbrev Man page
randomDecimalIcd9 Source code
randomMajorCpp Source code
randomOrderedPatients Source code
randomPatients Source code
randomShortAhrq Source code
randomShortIcd9 Man page Source code
randomUnorderedPatients Source code
release_questions Source code
runOpenMPVecInt Source code
sasDropOtherAssignment Man page Source code
sasExtractLetStrings Man page Source code
sasFormatExtract Man page Source code
sasParseAssignments Man page Source code
saveInDataDir Source code
skip_on_travis Source code
skip_online_tests Source code
skip_slow_tests Source code
sortOrderShort Source code
strMultiMatch Man page Source code
strPairMatch Man page Source code
strim Source code
strimCpp Source code
strip Source code
stripRtf Man page Source code
swapNamesWithVals Source code
trim Source code
trimCpp Source code
trimLeftCpp Source code
valgrindCallgrindStart Source code
vermont Source code
vermont_dx Man page
warnNumericCode Source code
zip_single Man page Source code

Files

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

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.