Skip to content

Commit

Permalink
JSS article, benchmarks, test improvements, documentation improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Wasey committed May 5, 2018
1 parent 950aeb9 commit 8412f15
Show file tree
Hide file tree
Showing 394 changed files with 47,606 additions and 2,518 deletions.
17 changes: 12 additions & 5 deletions .Rbuildignore
@@ -1,7 +1,8 @@
^_config\.yml$
aclocal\.m4$
IGNORE.*_alt\.[Rr]$
IGNORE.*_alt\.cpp$
IGNORE.*_alt.*\.[Rr]$
IGNORE.*_alt.*\.cpp$
IGNORE.*_alt.h$
^appveyor\.yml$
\.aspell$
autom4te\.cache$
Expand All @@ -25,9 +26,8 @@ cran-comments\.md$
.*\.gcov$
^\.git/.*
^data\/icd10_who.*$
data-raw
^data-raw\/.*$
^deprecated-tests$
^inst\/data-raw\/.*$
^docs$
^Efficient.*\.md$
icd.*\.aux$
icd.*\.so$
Expand Down Expand Up @@ -56,9 +56,16 @@ standalone\/.*
scrape_icd10_who
^\.settings$
.*standalone.*
^tests-slow$
^tests-build$
^tests-deprecated$
^todo$
^tools$
^\.travis\.yml$
^vignettes\/jss\.bst$
^vignettes\/jss\.cls$
^vignettes\/.*_files$
^vignettes\/.*_latexmk$
^vignettes\/.*\.dvi$
^vignettes\/.*\.fls$
^.*\.xcworkspace$
1 change: 0 additions & 1 deletion .Rinstignore
Expand Up @@ -7,5 +7,4 @@ man\/icd9cm_generate_chapters_hierarchy
man\/icd_update_everything
man\/parse_leaf_descriptions_all
man\/parse_leaf_desc_icd9cm_v27
R\/benchmark\.R

5 changes: 4 additions & 1 deletion .covrignore
@@ -1,6 +1,9 @@
inst/include/icd_RcppExports.h
src/RcppExports.cpp
R/RcppExports.R
R/parse-icd10cm-xml.R
R/fuzz.R
R/*_alt.R
src/*_alt.cpp
src/*_alt*.cpp
src/*.h

1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -15,6 +15,7 @@ conftest.err
*.dll
.DS_Store
.externalToolBuilders
*.gcno
i9test.RData
icd\.Rcheck
icd_*.tar.gz
Expand Down
55 changes: 36 additions & 19 deletions .travis.yml
Expand Up @@ -9,33 +9,49 @@ language: r
sudo: false
cache: packages

addons:
apt:
packages:
- r-cran-rodbc
- unixodbc-dev
# duplicate what's in DESCRIPTION
r_binary_packages:
- checkmate
- magrittr
- Rcpp
- stringr
- testthat

r:
- oldrel
- release
- devel

matrix:
allow_failures:
- r: oldrel

repos:
CRAN: https://cloud.r-project.org
r_packages:
- knitr
- roxygen2
- rmarkdown

r_github_packages:
- jimhester/covr
- jimhester/lintr

r:
- devel
- release
- oldrel

cran: https://cloud.r-project.org

warnings_are_errors: true

env:
- LINTR_COMMENT_BOT=false ICD_STRIP=false OMP_NUM_THREADS=1 CFLAGS="-O0 -Werror -Wall -Wextra -pedantic -Wno-unused-parameter -Wno-unused-variable" CXXFLAGS="-O0 -Werror -Wall -Wextra -pedantic -Wno-unused-parameter -Wno-unused-variable" R_CHECK_CRAN_INCOMING_=FALSE _R_CHECK_FORCE_SUGGESTS_=FALSE
- LINTR_COMMENT_BOT=true ICD_STRIP=true OMP_NUM_THREADS=2 CFLAGS="-O3 -march=native" CXXFLAGS="-O3 -march=native" R_CHECK_CRAN_INCOMING_=FALSE _R_CHECK_FORCE_SUGGESTS_=FALSE
global:
- R_CHECK_CRAN_INCOMING_=FALSE _R_CHECK_FORCE_SUGGESTS_=FALSE
- LINTR_COMMENT_BOT=false
- ICD_COVERAGE=false
matrix:
- OMP_NUM_THREADS=1 CFLAGS="-Og -Werror -Wall -Wextra -pedantic" CXXFLAGS="-Og -Werror -Wall -Wextra -pedantic"
- OMP_NUM_THREADS=2 CFLAGS="-O3 -march=native" CXXFLAGS="-O3 -march=native"

matrix:
fast_finish: true
include:
- env: LINTR_COMMENT_BOT=true
- env: ICD_COVERAGE=true ICD_TEST_DEPRECATED=true ICD_TEST_BUILD_DATA=true ICD_TEST_SLOW=true
allow_failures:
- r: oldrel
- env: ICD_COVERAGE=true ICD_TEST_DEPRECATED=true ICD_TEST_BUILD_DATA=true ICD_TEST_SLOW=true

before_script:
- ls -aR
Expand All @@ -48,7 +64,8 @@ before_script:
after_success:
- ls -aR
- cat ./icd.Rcheck/tests/test-all.Rout
- Rscript -e "covr::codecov(quiet = FALSE)"
- if [ "$ICD_COVERAGE" = "true" ]; then
Rscript -e "covr::codecov(quiet = FALSE)"; fi
- Rscript -e "lintr::lint_package()"

notifications:
Expand Down
64 changes: 8 additions & 56 deletions DESCRIPTION
@@ -1,13 +1,14 @@
Package: icd
Title: Tools for Working with ICD-9 and ICD-10 Codes, and
Finding Comorbidities
Version: 3.0.0
Date: 2018-04-20
Version: 3.1.2
Date: 2018-05-05
Authors@R:
c(person(given = "Jack O.",
family = "Wasey",
role = c("aut", "cre", "cph"),
email = "jack@jackwasey.com"),
email = "jack@jackwasey.com",
comment = c(ORCID = "0000-0003-3738-4637")),
person(given = "William",
family = "Murphy",
role = "ctb",
Expand Down Expand Up @@ -38,12 +39,12 @@ Maintainer: Jack O. Wasey <jack@jackwasey.com>
Description: Calculate comorbidities, Charlson scores, perform
fast and accurate validation, conversion, manipulation, filtering and
comparison of ICD-9 and ICD-10 codes. This package enables a work flow
from raw lists of ICD codes in hospital billing databases to
from raw lists of ICD codes in hospital databases to
comorbidities. ICD-9 and ICD-10 comorbidity mappings from Quan (Deyo
and Elixhauser versions), Elixhauser and AHRQ included. Common
ambiguities and code formats are handled.
License: GPL-3
URL: https://github.com/jackwasey/icd
URL: https://jackwasey.github.io/icd/
BugReports: https://github.com/jackwasey/icd/issues
Depends:
R (>= 3.4)
Expand All @@ -58,8 +59,9 @@ Suggests:
RODBC,
roxygen2 (>= 5.0.0),
rmarkdown,
rticles,
stringr,
testthat,
testthat (>= 0.11.1),
xml2
LinkingTo:
Rcpp,
Expand All @@ -75,53 +77,3 @@ Copyright: See file (inst/)COPYRIGHTS
LazyData: true
LazyDataCompression: xz
RoxygenNote: 6.0.1
Collate:
'RcppExports.R'
'as_char_no_warn.R'
'attr.R'
'catch-routine-registration.R'
'children.R'
'children_alt.R'
'convert.R'
'class.R'
'comorbid.R'
'comorbid_alt.R'
'condense.R'
'datadocs.R'
'diff_comorbid.R'
'env.R'
'explain-table.R'
'explain.R'
'factor_nosort.R'
'filter.R'
'generate_mappings.R'
'generate_spelling.R'
'generate_sysdata.R'
'guess.R'
'hcc.R'
'icd-package.R'
'manip.R'
'parse-ahrq-ccs.R'
'parse-comorbid.R'
'parse-icd10.R'
'parse-icd10cm-xml.R'
'parse-rtf.R'
'parse.R'
'parse_hcc.R'
'print.icd_comorbidity_map.R'
'ranges.R'
'ranges_alt.R'
'real.R'
'sas.R'
'save_in_data_dir.R'
'score.R'
'sort.R'
'sort_alt.R'
'to_data_raw.R'
'unzip_single.R'
'util-file.R'
'util-test.R'
'util.R'
'valid.R'
'z-deprecated.R'
'zzz.R'
14 changes: 14 additions & 0 deletions NAMESPACE
Expand Up @@ -29,6 +29,8 @@ S3method(expand_minor,icd9)
S3method(expand_range,character)
S3method(expand_range,icd10cm)
S3method(expand_range,icd9)
S3method(expand_range_major,default)
S3method(expand_range_major,icd10cm)
S3method(expand_range_major,icd9)
S3method(explain,default)
S3method(explain,icd10)
Expand All @@ -52,13 +54,21 @@ S3method(get_invalid,comorbidity_map)
S3method(get_invalid,default)
S3method(get_invalid,icd10)
S3method(get_invalid,icd9)
S3method(get_major,icd10)
S3method(get_major,icd9)
S3method(get_valid,character)
S3method(get_valid,icd10)
S3method(get_valid,icd10cm)
S3method(get_valid,icd9)
S3method(get_visit_name,data.frame)
S3method(get_visit_name,matrix)
S3method(guess_version,character)
S3method(guess_version,data.frame)
S3method(guess_version,factor)
S3method(guess_version,icd10)
S3method(guess_version,icd10cm)
S3method(guess_version,icd9)
S3method(guess_version,icd9cm)
S3method(is_billable,default)
S3method(is_billable,icd10)
S3method(is_billable,icd10cm)
Expand All @@ -68,6 +78,10 @@ S3method(is_defined,default)
S3method(is_defined,icd10)
S3method(is_defined,icd10cm)
S3method(is_defined,icd9)
S3method(is_major,default)
S3method(is_major,icd10)
S3method(is_major,icd10cm)
S3method(is_major,icd9)
S3method(is_valid,comorbidity_map)
S3method(is_valid,default)
S3method(is_valid,icd10)
Expand Down
12 changes: 7 additions & 5 deletions NEWS.md
@@ -1,10 +1,12 @@
# Version 3.0
* function names without 'icd_' prefix, old names kept for compatiblity, but easier now to write `comorbid(patient_data)` and `icd::comorbid` may also be used.
* Comorbidities for ICD-10 codes now 1.5 - 2 orders of magnitude faster using matrix multiplication to solve problem under the hood
* major improvement in comorbidity calculation speed using matrix multiplication behind the scenes. ICD-10 codes were slower than ICD-9 code comorbidities before, and are now 1.5 - 2 orders of magnitude faster.
* Added AHRQ clinical condition software (CCS) classification for ICD-9 and ICD-10, thanks to Vitaly Druker, fixes #127
* Assume C++11, which is now four years old, and enables code simplification.
* rename all functions to remove the icd_, people can use the concise icd:: if library(icd) was not callled.
* deprecated rarely or unused code, including %i9in%
* added 'charlson' synonyms for 'quan_deyo', e.g. Charlson comorbidities can now be found using `comorbid_charlson(patient_data)`
* Added AHRQ clinical condition software (CCS) classification for ICD-9 and ICD-10, thanks to Vitaly Druker, fixes #127
* function names have lost the 'icd_' prefix, old names kept for compatiblity, but easier now to write `comorbid(patient_data)`, and `icd::comorbid` may also be used, and which many consider good practice.
* Assume C++11, which is now four years old, enabling code simplification
* rename all functions to remove the icd_, people can use the concise icd:: if library(icd) was not callled
* deprecated rarely or unused code, including %i9in%

# Version 2.4.1
* updated HCC to include 2017 data, thanks to @anobel fixes #136
Expand Down

0 comments on commit 8412f15

Please sign in to comment.