Fast ICD-10 and ICD-9 comorbidities, decoding and validation in R. NB use main instead of master for default branch.
comorbid_charlson(patient_data)
comorbid(patient_data)
, and icd::comorbid
may also be used, and which many consider good practice.Obscure memory access error corrected. Other minor updates.
Perhaps it is an obsession, but for reproducible research, I think it is important to extract data from source wherever possible. ICD-9-CM code definitions are scattered between very old formal documents, text files (with no hierarchical information) and a monstrous RTF document with everything on it. The RTF is not in any way designed to be machine readable for anything other than display, but, with difficulty, can be parsed to get the data.
This version derives ICD-9 codes from the RTF and plain text sources. Previously, icd9
relied on scraping some heading data from an unofficial web site. For the end user, this means greater fidelity to the actual specification (which changes annually), and improved processing of ICD-9 code ranges, e.g. finding parent codes common to a subset of codes in a list, and thus enabling summaries of otherwise complicated lists.
The OpenMP parallelization and C++11 optimization are now working to the satisfaction of CRAN (and Solaris and OS X compilers), using a configure script which builds the right Makevars
each installation. I haven't benchmarked -O3
compiler flag, but this is likely to give a boost.
Other changes and many small improvements and bug fixes are listed in NEWS.md and the git log.
Major change is parallelization and much more efficient coding of comorbidity assignment. Bug fixes.