diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 11536c9..a05627d 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -5,7 +5,7 @@ articles:
A-introduction: A-introduction.html
B-comorbidity-scores: B-comorbidity-scores.html
C-changes: C-changes.html
-last_built: 2024-05-25T14:23Z
+last_built: 2024-05-25T14:48Z
urls:
reference: https://ellessenne.github.io/comorbidity/reference
article: https://ellessenne.github.io/comorbidity/articles
diff --git a/docs/search.json b/docs/search.json
index 43c151e..1930dd8 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -1 +1 @@
-[{"path":[]},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting project team [INSERT EMAIL ADDRESS]. complaints reviewed investigated result response deemed necessary appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately. Project maintainers follow enforce Code Conduct good faith may face temporary permanent repercussions determined members project’s leadership.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing","title":"Contributing","text":"want contribute project make better, help welcome. small, simple changes fixing typos can edit file directly GitHub clicking Edit button opening . complicated changes, manually create pull request (PR) forking repository. See next section information. submit non-trivial pull request (e.g. just fixing typo), may add name Authors@R field contributor (ctb) R package DESCRIPTION file wish.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONTRIBUTING.html","id":"pull-request-workflow","dir":"","previous_headings":"","what":"Pull Request Workflow","title":"Contributing","text":"Create personal fork project Github, clone fork local machine; Create new branch work ; Implement/fix feature, comment code; Follow code style project, including indentation; Run tests using devtools: devtools::test(); Write adapt tests needed; Add change documentation needed. Please run roxygen2, include changes .Rd files pull request - re-roxygenise documentation ; Push branch fork Github; fork open pull request correct branch. step--step workflow adapted https://github.com/MarcDiethelm/contributing. Working first Pull Request? can learn free series Contribute Open Source Project GitHub.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing","text":"contributing project agree adhere Contributors Code Conduct: please read CONDUCT.md proposing change.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/A-introduction.html","id":"mapping-comorbidities","dir":"Articles","previous_headings":"","what":"Mapping Comorbidities","title":"Introduction","text":"comorbidity() function can used apply mapping algorithms dataset. , instance, use Quan et al. (2005) version Charlson Comorbidity Index: resulting data frame row per subject, column IDs, column condition included given score (e.g. 17 conditions Charlson score). different columns also labelled compatibility RStudio viewer, see e.g. View(charlson_df) running code computer. see supported mapping algorithms, please see vignette:","code":"charlson_df <- comorbidity( x = df, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE ) str(charlson_df) #> Classes 'comorbidity' and 'data.frame': 100 obs. of 18 variables: #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ mi : int 0 0 0 0 0 0 0 0 0 0 ... #> $ chf : int 0 1 1 0 0 1 1 0 1 1 ... #> $ pvd : int 0 0 0 0 0 0 0 0 0 0 ... #> $ cevd : int 0 0 0 0 0 0 0 0 0 0 ... #> $ dementia: int 0 0 0 0 0 0 0 0 0 0 ... #> $ cpd : int 1 1 1 1 0 0 1 1 1 1 ... #> $ rheumd : int 0 0 0 0 0 0 0 0 0 0 ... #> $ pud : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mld : int 0 0 0 0 0 0 0 0 0 0 ... #> $ diab : int 0 0 0 0 0 0 0 0 0 0 ... #> $ diabwc : int 1 0 1 1 1 1 1 1 1 1 ... #> $ hp : int 0 0 0 0 0 0 0 0 0 0 ... #> $ rend : int 0 0 0 0 0 0 0 0 0 0 ... #> $ canc : int 1 1 1 1 1 1 1 1 1 1 ... #> $ msld : int 0 0 0 0 0 0 0 0 0 0 ... #> $ metacanc: int 0 0 0 0 0 0 0 0 0 0 ... #> $ aids : int 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \"variable.labels\")= chr [1:18] \"ID\" \"Myocardial infarction\" \"Congestive heart failure\" \"Peripheral vascular disease\" ... #> - attr(*, \"map\")= chr \"charlson_icd10_quan\" length(unique(df$id)) == nrow(charlson_df) #> [1] TRUE vignette(\"B-comorbidity-scores\", package = \"comorbidity\")"},{"path":"https://ellessenne.github.io/comorbidity/articles/A-introduction.html","id":"comorbidity-scores","dir":"Articles","previous_headings":"","what":"Comorbidity Scores","title":"Introduction","text":"calculating data frame comorbid conditions, can used calculate comorbidity scores using score() function. Say want calculate Charlson comorbidity score, weighted using Quan et al. (2011) weights: returns single value per subject: pure combination conditions required (e.g. unweighted score), pass NULL value weights argument score() function: , available weighting systems/algorithms described vignette mentioned .","code":"quan_cci <- score(x = charlson_df, weights = \"quan\", assign0 = FALSE) table(quan_cci) #> quan_cci #> 2 3 4 5 6 #> 7 18 20 30 25 length(quan_cci) == nrow(charlson_df) #> [1] TRUE unw_cci <- score(x = charlson_df, weights = NULL, assign0 = FALSE) table(unw_cci) #> unw_cci #> 1 2 3 4 #> 7 25 43 25"},{"path":"https://ellessenne.github.io/comorbidity/articles/A-introduction.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Introduction","text":"Charlson et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. DOI: 10.1016/0021-9681(87)90171-8 Quan H et al. Coding algorithms defining comorbidities ICD-9-CM ICD-10 administrative data. Medical Care 2005; 43(11):1130-1139. DOI: 10.1097/01.mlr.0000182534.19832.83 Quan H et al. Updating validating Charlson Comorbidity Index score risk adjustment hospital discharge abstracts using data 6 countries. American Journal Epidemiology 2011;173(6):676-82. DOI: 10.1093/aje/kwq433","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/B-comorbidity-scores.html","id":"supported-mapping-algorithms","dir":"Articles","previous_headings":"","what":"Supported Mapping Algorithms","title":"Supported Comorbidity Mappings and Scores","text":"{comorbidity} package can apply comorbidity mappings corresponding Charlson Elixhauser comorbidity scores. ICD-9 ICD-10 coding systems supported, algorithms described paper Quan et al. (2005). resulting mapping algorithms denoted charlson_icd9_quan charlson_icd10_quan Charlson score (based ICD-9 ICD-10 systems, respectively), elixhauser_icd9_quan elixhauser_icd10_quan Elixhauser score. Furthermore, Swedish (Ludvigsson et al., 2021) Australian (Sundararajan et al., 2004) modifications Charlson score implemented well, identified charlson_icd10_se charlson_icd10_am respectively.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/B-comorbidity-scores.html","id":"supported-weighting-algorithms","dir":"Articles","previous_headings":"","what":"Supported Weighting Algorithms","title":"Supported Comorbidity Mappings and Scores","text":"Different weighting algorithms proposed combine different conditions single measure, Charlson Elixhauser index. Currently, following weighting algorithms supported Charlson score: original weights Charlson et al. (1987), denoted charlson; Updated weights Quan et al. (2011), denoted quan. , Elixhauser score: Weights proposed van Walraven et al. (2009), denoted vw; Swiss weights modification Sharma et al. (2021), denoted swiss.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/B-comorbidity-scores.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Supported Comorbidity Mappings and Scores","text":"Charlson et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. DOI: 10.1016/0021-9681(87)90171-8 Elixhauser et al. Comorbidity measures use administrative data. Medical Care 1998; 36(1):8-27. DOI: 10.1097/00005650-199801000-00004 Ludvigsson JF et al. Adaptation Charlson Comorbidity Index register-based research Sweden. Clinical Epidemiology 2021; 13:21–41. DOI: 10.2147/clep.s282475 Quan H et al. Coding algorithms defining comorbidities ICD-9-CM ICD-10 administrative data. Medical Care 2005; 43(11):1130-1139. DOI: 10.1097/01.mlr.0000182534.19832.83 Quan H et al. Updating validating Charlson Comorbidity Index score risk adjustment hospital discharge abstracts using data 6 countries. American Journal Epidemiology 2011;173(6):676-82. DOI: 10.1093/aje/kwq433 Sharma N et al. Comparing Charlson Elixhauser comorbidity indices different weightings predict -hospital mortality: analysis national inpatient data. BMC Health Services Research 2021; 21(1). DOI: 10.1186/s12913-020-05999-5 Sundararajan V et al. New ICD-10 version Charlson comorbidity index predicted -hospital mortality. Journal Clinical Epidemiology 2004; 57(12):1288-1294. DOI: 10.1016/j.jclinepi.2004.03.012 van Walraven C, Austin PC, Jennings , Quan H Forster AJ. modification Elixhauser comorbidity measures point system hospital death using administrative data. Medical Care 2009; 47(6):626-633. DOI: 10.1097/MLR.0b013e31819432e5","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"comorbidity-mapping-and-scoring-are-now-distinct-functions","dir":"Articles","previous_headings":"","what":"Comorbidity Mapping and Scoring are Now Distinct Functions","title":"Updating to {comorbidity} 1.0.0","text":"previous release {comorbidity}, comorbidity mapping scoring algorithms applied jointly single function call: Note , {comorbidity} version 1.0.4, ami condition renamed mi. See #53 GitHub details. Now, first need apply mapping algorithm: …yields results shown . , need calculate comorbidity scores, can use score() function: yields unweighted scores (e.g. equivalent score column ). need weighted scores (e.g. wscore column , assumes old Charlson score weights 1987), can pass name supported scoring algorithm: , results score() function equivalent obtained using previously-released version.","code":"comorbidity(x = sim_data, id = \"id\", code = \"code\", score = \"charlson\", icd = \"icd10\", assign0 = FALSE) #> id ami chf pvd cevd dementia copd rheumd pud mld diab diabwc hp rend canc #> 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 #> 2 2 0 0 0 0 0 0 0 0 0 1 1 0 0 1 #> 3 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 #> 4 4 0 0 0 1 0 0 0 0 0 0 0 0 0 1 #> 5 5 0 0 0 0 0 0 0 0 0 1 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 0 0 0 0 0 0 0 0 0 0 0 0 1 1 #> 8 8 0 0 0 1 0 0 1 0 0 1 1 0 0 1 #> 9 9 0 0 0 0 0 0 0 0 0 0 0 0 0 1 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 #> msld metacanc aids score index wscore windex #> 1 0 0 0 2 1-2 4 3-4 #> 2 0 0 0 3 3-4 5 >=5 #> 3 0 0 0 1 1-2 1 1-2 #> 4 0 0 0 2 1-2 3 3-4 #> 5 0 0 0 1 1-2 1 1-2 #> 6 0 0 0 0 0 0 0 #> 7 0 0 0 2 1-2 4 3-4 #> 8 0 0 0 5 >=5 7 >=5 #> 9 0 0 0 1 1-2 2 1-2 #> 10 0 0 0 1 1-2 2 1-2 com <- comorbidity(x = sim_data, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) com #> id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld #> 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 #> 2 2 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 #> 3 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 #> 4 4 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 #> 5 5 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 #> 8 8 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 #> 9 9 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> metacanc aids #> 1 0 0 #> 2 0 0 #> 3 0 0 #> 4 0 0 #> 5 0 0 #> 6 0 0 #> 7 0 0 #> 8 0 0 #> 9 0 0 #> 10 0 0 score(com, assign0 = FALSE, weights = NULL) #> [1] 2 3 1 2 1 0 2 5 1 1 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" score(com, assign0 = FALSE, weights = \"charlson\") #> [1] 4 5 1 3 1 0 4 7 2 2 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" #> attr(,\"weights\") #> [1] \"charlson\""},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"supported-mapping-and-scoring-algorithms","dir":"Articles","previous_headings":"","what":"Supported Mapping and Scoring Algorithms","title":"Updating to {comorbidity} 1.0.0","text":"new version includes updated comorbidity mapping scoring algorithms. Furthermore, designed way simplify addition new scores future. currently supported comorbidity mapping algorithms described following vignette: Alternatively, new function provided display supported algorithms R console: picked auto-magically internal data structures, always --date.","code":"vignette(\"02-comorbidityscores\", package = \"comorbidity\") available_algorithms() #> Supported comorbidity mapping algorithms: #> * charlson_icd9_quan #> * charlson_icd10_quan #> * charlson_icd10_se #> * charlson_icd10_am #> * charlson_icd10_am_ucodes #> * elixhauser_icd9_quan #> * elixhauser_icd10_quan #> #> Supported scoring weights algorithms: #> * For charlson_icd9_quan: charlson, quan #> * For charlson_icd10_quan: charlson, quan #> * For charlson_icd10_se: charlson, quan #> * For charlson_icd10_am: charlson, quan #> * For charlson_icd10_am_ucodes: charlson, quan #> * For elixhauser_icd9_quan: vw, swiss #> * For elixhauser_icd10_quan: vw, swiss"},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"computational-speed","dir":"Articles","previous_headings":"","what":"Computational Speed","title":"Updating to {comorbidity} 1.0.0","text":"internal re-writing package API allowed optimising code speed efficiency. managed estimate, using simulated data, main comorbidity mapping function (e.g. comorbidity()) approximately twice fast version 0.5.3, across variety sample sizes: main computational bottleneck, applying scoring algorithm fast general.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"reverting-to-previous-release","dir":"Articles","previous_headings":"","what":"Reverting to previous release","title":"Updating to {comorbidity} 1.0.0","text":"understand new release might break workflows, apologies . feedback, please feel free e-mail maintainer package open issue GitHub, latter strongly suggested. Finally, required, can revert previous release installing GitHub:","code":"library(remotes) remotes::install_github(\"ellessenne/comorbidity@0.5.3\")"},{"path":"https://ellessenne.github.io/comorbidity/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Alessandro Gasparini. Author, maintainer. Hojjat Salmasian. Contributor. ICD-9-CM scores Jonathan Williman. Contributor. Sing Yi Chia. Contributor. Edmund Teo. Contributor.","code":""},{"path":"https://ellessenne.github.io/comorbidity/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Gasparini, (2018). comorbidity: R package computing comorbidity scores. Journal Open Source Software, 3(23), 648, https://doi.org/10.21105/joss.00648","code":"@Article{, author = {Alessandro Gasparini}, title = {comorbidity: An R package for computing comorbidity scores}, journal = {Journal of Open Source Software}, year = {2018}, volume = {3}, issue = {23}, pages = {648}, doi = {10.21105/joss.00648}, url = {https://doi.org/10.21105/joss.00648}, }"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"the-comorbidity-package-computing-comorbidity-scores-in-r-","dir":"","previous_headings":"","what":"Computing Comorbidity Scores in R","title":"Computing Comorbidity Scores in R","text":"Last updated: 2024-05-25 16:22:51.19159 comorbidity R package computing comorbidity scores weighted Charlson score Elixhauser comorbidity score; ICD-10 ICD-9 coding systems supported.","code":""},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Computing Comorbidity Scores in R","text":"comorbidity CRAN. can install usual : Alternatively, can install development version GitHub :","code":"install.packages(\"comorbidity\") # install.packages(\"remotes\") remotes::install_github(\"ellessenne/comorbidity\")"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"simulating-icd-10-codes","dir":"","previous_headings":"","what":"Simulating ICD-10 codes","title":"Computing Comorbidity Scores in R","text":"comorbidity packages includes function named sample_diag() allows simulating ICD diagnostic codes straightforward way. instance, simulate ICD-10 codes: also possible simulate two different versions ICD-10 coding system. default simulate ICD-10 codes 2011 version: Alternatively, use 2009 version:","code":"# load the comorbidity package library(comorbidity) # set a seed for reproducibility set.seed(1) # simulate 50 ICD-10 codes for 5 individuals x <- data.frame( id = sample(1:5, size = 50, replace = TRUE), code = sample_diag(n = 50) ) x <- x[order(x$id, x$code), ] print(head(x, n = 15), row.names = FALSE) ## id code ## 1 B02 ## 1 B582 ## 1 I749 ## 1 J450 ## 1 L893 ## 1 Q113 ## 1 Q26 ## 1 Q978 ## 1 T224 ## 1 V101 ## 1 V244 ## 1 V46 ## 2 A665 ## 2 C843 ## 2 D838 set.seed(1) x1 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30) ) set.seed(1) x2 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD10_2011\") ) # should return TRUE all.equal(x1, x2) ## [1] TRUE set.seed(1) x1 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD10_2009\") ) set.seed(1) x2 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD10_2011\") ) # should not return TRUE all.equal(x1, x2) ## [1] \"Component \\\"code\\\": 30 string mismatches\""},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"simulating-icd-9-codes","dir":"","previous_headings":"","what":"Simulating ICD-9 codes","title":"Computing Comorbidity Scores in R","text":"ICD-9 codes can easily simulated :","code":"set.seed(2) x9 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD9_2015\") ) x9 <- x9[order(x9$id, x9$code), ] print(head(x9, n = 15), row.names = FALSE) ## id code ## 1 01130 ## 1 01780 ## 1 30151 ## 1 3073 ## 1 36907 ## 1 37845 ## 1 64212 ## 1 66704 ## 1 72633 ## 1 9689 ## 1 V289 ## 2 0502 ## 2 09169 ## 2 20046 ## 2 25082"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"computing-comorbidity-scores","dir":"","previous_headings":"","what":"Computing comorbidity scores","title":"Computing Comorbidity Scores in R","text":"main function comorbidity package named comorbidity(), can used compute supported comorbidity score; scores can specified setting score argument, required. Say 3 individuals total 30 ICD-10 diagnostic codes: compute Charlson comorbidity domains: set assign0 argument FALSE apply hierarchy comorbidity codes, described ?comorbidity::comorbidity. Alternatively, compute Elixhauser score: Weighted unweighted comorbidity scores can obtained using score() function: Code Elixhauser score omitted, works analogously. Conversely, say 5 individuals total 100 ICD-9 diagnostic codes: Charlson Elixhauser comorbidity codes can easily computed : Scores:","code":"set.seed(1) x <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30) ) charlson <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) charlson ## id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld metacanc aids ## 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 ## 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ## 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 elixhauser <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd10_quan\", assign0 = FALSE) elixhauser ## id chf carit valv pcd pvd hypunc hypc para ond cpd diabunc diabc hypothy rf ld pud aids lymph ## 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 ## 2 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 3 3 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ## metacanc solidtum rheumd coag obes wloss fed blane dane alcohol drug psycho depre ## 1 0 1 0 0 0 0 0 0 0 0 0 0 0 ## 2 0 1 0 0 0 0 0 0 0 0 0 0 0 ## 3 0 0 0 0 0 0 0 0 0 0 0 0 0 unw_cci <- score(charlson, weights = NULL, assign0 = FALSE) unw_cci ## [1] 2 1 0 ## attr(,\"map\") ## [1] \"charlson_icd10_quan\" quan_cci <- score(charlson, weights = \"quan\", assign0 = FALSE) quan_cci ## [1] 6 2 0 ## attr(,\"map\") ## [1] \"charlson_icd10_quan\" ## attr(,\"weights\") ## [1] \"quan\" all.equal(unw_cci, quan_cci) ## [1] \"Attributes: < Length mismatch: comparison on first 1 components >\" ## [2] \"Mean relative difference: 1.666667\" set.seed(3) x <- data.frame( id = sample(1:5, size = 100, replace = TRUE), code = sample_diag(n = 100, version = \"ICD9_2015\") ) charlson9 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd9_quan\", assign0 = FALSE) charlson9 ## id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld metacanc aids ## 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ## 2 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 3 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ## 4 4 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 ## 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 elixhauser9 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd9_quan\", assign0 = FALSE) elixhauser9 ## id chf carit valv pcd pvd hypunc hypc para ond cpd diabunc diabc hypothy rf ld pud aids lymph ## 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 2 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ## 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 4 4 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## metacanc solidtum rheumd coag obes wloss fed blane dane alcohol drug psycho depre ## 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 2 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 3 0 0 0 0 0 0 0 0 0 0 0 1 0 ## 4 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 5 0 0 1 0 0 0 0 0 0 0 0 0 0 unw_eci <- score(elixhauser9, weights = NULL, assign0 = FALSE) vw_eci <- score(elixhauser9, weights = \"vw\", assign0 = FALSE) all.equal(unw_eci, vw_eci) ## [1] \"Attributes: < Length mismatch: comparison on first 1 components >\" ## [2] \"Mean relative difference: 2\""},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Computing Comorbidity Scores in R","text":"find comorbidity useful, please cite publications:","code":"citation(\"comorbidity\") ## To cite package 'comorbidity' in publications use: ## ## Gasparini, (2018). comorbidity: An R package for computing comorbidity scores. Journal ## of Open Source Software, 3(23), 648, https://doi.org/10.21105/joss.00648 ## ## A BibTeX entry for LaTeX users is ## ## @Article{, ## author = {Alessandro Gasparini}, ## title = {comorbidity: An R package for computing comorbidity scores}, ## journal = {Journal of Open Source Software}, ## year = {2018}, ## volume = {3}, ## issue = {23}, ## pages = {648}, ## doi = {10.21105/joss.00648}, ## url = {https://doi.org/10.21105/joss.00648}, ## }"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Computing Comorbidity Scores in R","text":"details comorbidity mapping scoring algorithm available within package can found two accompanying vignettes, can accessed CRAN directly R session: list available algorithms can printed interactively using available_algorithms() function:","code":"vignette(\"A-introduction\", package = \"comorbidity\") vignette(\"B-comorbidity-scores\", package = \"comorbidity\") available_algorithms() ## Supported comorbidity mapping algorithms: ## * charlson_icd9_quan ## * charlson_icd10_quan ## * charlson_icd10_se ## * charlson_icd10_am ## * charlson_icd10_am_ucodes ## * elixhauser_icd9_quan ## * elixhauser_icd10_quan ## ## Supported scoring weights algorithms: ## * For charlson_icd9_quan: charlson, quan ## * For charlson_icd10_quan: charlson, quan ## * For charlson_icd10_se: charlson, quan ## * For charlson_icd10_am: charlson, quan ## * For charlson_icd10_am_ucodes: charlson, quan ## * For elixhauser_icd9_quan: vw, swiss ## * For elixhauser_icd10_quan: vw, swiss"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"copyright","dir":"","previous_headings":"","what":"Copyright","title":"Computing Comorbidity Scores in R","text":"icon hex sticker made Freepik www.flaticon.com.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":null,"dir":"Reference","previous_headings":"","what":"Australian mortality data, 2010 — australia10","title":"Australian mortality data, 2010 — australia10","text":"dataset containing Australian mortality data, obtained Stata 17.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Australian mortality data, 2010 — australia10","text":"","code":"australia10"},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Australian mortality data, 2010 — australia10","text":"data frame 3,322 rows 3 variables: cause ICD-10 code representing cause death sex Gender deaths Number deaths","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Australian mortality data, 2010 — australia10","text":"R code used download process dataset Stata available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/available_algorithms.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Currently Supported Algorithms — available_algorithms","title":"Display Currently Supported Algorithms — available_algorithms","text":"function prints (currently) supported implemented comorbidity mapping, one , supported scoring weighting algorithm.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/available_algorithms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Currently Supported Algorithms — available_algorithms","text":"","code":"available_algorithms()"},{"path":"https://ellessenne.github.io/comorbidity/reference/available_algorithms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Currently Supported Algorithms — available_algorithms","text":"","code":"available_algorithms() #> Supported comorbidity mapping algorithms: #> \t* charlson_icd9_quan #> \t* charlson_icd10_quan #> \t* charlson_icd10_se #> \t* charlson_icd10_am #> \t* charlson_icd10_am_ucodes #> \t* elixhauser_icd9_quan #> \t* elixhauser_icd10_quan #> #> Supported scoring weights algorithms: #> \t* For charlson_icd9_quan: charlson, quan #> \t* For charlson_icd10_quan: charlson, quan #> \t* For charlson_icd10_se: charlson, quan #> \t* For charlson_icd10_am: charlson, quan #> \t* For charlson_icd10_am_ucodes: charlson, quan #> \t* For elixhauser_icd9_quan: vw, swiss #> \t* For elixhauser_icd10_quan: vw, swiss"},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity-package.html","id":null,"dir":"Reference","previous_headings":"","what":"comorbidity: Computing Comorbidity Scores — comorbidity-package","title":"comorbidity: Computing Comorbidity Scores — comorbidity-package","text":"Computing comorbidity indices scores weighted Charlson score (Charlson, 1987 doi:10.1016/0021-9681(87)90171-8 ) Elixhauser comorbidity score (Elixhauser, 1998 doi:10.1097/00005650-199801000-00004 ) using ICD-9-CM ICD-10 codes (Quan, 2005 doi:10.1097/01.mlr.0000182534.19832.83 ). Australian Swedish modifications Charlson Comorbidity Index available well (Sundararajan, 2004 doi:10.1016/j.jclinepi.2004.03.012 Ludvigsson, 2021 doi:10.2147/CLEP.S282475 ), together different weighting algorithms Charlson Elixhauser comorbidity scores.","code":""},{"path":[]},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"comorbidity: Computing Comorbidity Scores — comorbidity-package","text":"Maintainer: Alessandro Gasparini alessandro@ellessenne.xyz (ORCID) contributors: Hojjat Salmasian hsalmasian@bwh.harvard.edu (ICD-9-CM scores) [contributor] Jonathan Williman jonathan.williman@otago.ac.nz (ORCID) [contributor] Sing Yi Chia cxycsy@hotmail.com (ORCID) [contributor] Edmund Teo ed_teo8@yahoo.com.sg (ORCID) [contributor]","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":null,"dir":"Reference","previous_headings":"","what":"Comorbidity mapping. — comorbidity","title":"Comorbidity mapping. — comorbidity","text":"Maps comorbidity conditions using algorithms Charlson Elixhauser comorbidity scores.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comorbidity mapping. — comorbidity","text":"","code":"comorbidity(x, id, code, map, assign0, labelled = TRUE, tidy.codes = TRUE)"},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comorbidity mapping. — comorbidity","text":"x tidy data.frame (data.table; tibbles supported ) one column containing individual ID column containing diagnostic codes. Extra columns ID codes discarded. Column names must syntactically valid names, otherwise forced calling make.names() function. id String denoting name column x containing individual ID. code String denoting name column x containing diagnostic codes. Codes must upper case punctuation order properly recognised. map String denoting mapping algorithm used (values case-insensitive). Possible values Charlson score either ICD-10 ICD-9-CM codes (charlson_icd10_quan, charlson_icd9_quan) Elixhauser score, using either ICD-10 ICD-9-CM (elixhauser_icd10_quan, elixhauser_icd9_quan). mapping based paper Quan et al. (2011). also possible obtain Swedish (charlson_icd10_se) Australian (charlson_icd10_am) modification Charlson score using ICD-10 codes. assign0 Logical value denoting whether apply hierarchy comorbidities: comorbidity present patient different degrees severity, milder form assigned value 0. , type comorbidity counted patient. assign0 = TRUE, comorbidities affected argument : \"Mild liver disease\" (mld) \"Moderate/severe liver disease\" (msld) Charlson score; \"Diabetes\" (diab) \"Diabetes complications\" (diabwc) Charlson score; \"Cancer\" (canc) \"Metastatic solid tumour\" (metacanc) Charlson score; \"Hypertension, uncomplicated\" (hypunc) \"Hypertension, complicated\" (hypc) Elixhauser score; \"Diabetes, uncomplicated\" (diabunc) \"Diabetes, complicated\" (diabc) Elixhauser score; \"Solid tumour\" (solidtum) \"Metastatic cancer\" (metacanc) Elixhauser score. labelled Logical value denoting whether attach labels comorbidity, compatible RStudio viewer via utils::View() function. Defaults TRUE. tidy.codes Logical value, defaulting TRUE, denoting whether ICD codes tidied. TRUE, codes converted upper case non-alphanumeric characters removed using regular expression [^[:alnum:]]. can set FALSE speed computations, please aware case codes assumed formatted . codes incorrectly formatted, may lead wrong results: use risk!","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comorbidity mapping. — comorbidity","text":"data frame id columns relative comorbidity domain, one row per individual. Charlson score, following variables included dataset: id variable defined user; mi, myocardial infarction; chf, congestive heart failure; pvd, peripheral vascular disease; cevd, cerebrovascular disease; dementia, dementia; cpd, chronic pulmonary disease; rheumd, rheumatoid disease; pud, peptic ulcer disease; mld, mild liver disease; diab, diabetes without complications; diabwc, diabetes complications; hp, hemiplegia paraplegia; rend, renal disease; canc, cancer (malignancy); msld, moderate severe liver disease; metacanc, metastatic solid tumour; aids, AIDS/HIV. Please note combine \"chronic obstructive pulmonary disease\" \"chronic pulmonary disease\" Swedish version Charlson index, comparability (compatibility) definitions/implementations. Conversely, Elixhauser score dataset contains following variables: id variable defined user; chf, congestive heart failure; carit, cardiac arrhythmias; valv, valvular disease; pcd, pulmonary circulation disorders; pvd, peripheral vascular disorders; hypunc, hypertension, uncomplicated; hypc, hypertension, complicated; para, paralysis; ond, neurological disorders; cpd, chronic pulmonary disease; diabunc, diabetes, uncomplicated; diabc, diabetes, complicated; hypothy, hypothyroidism; rf, renal failure; ld, liver disease; pud, peptic ulcer disease, excluding bleeding; aids, AIDS/HIV; lymph, lymphoma; metacanc, metastatic cancer; solidtum, solid tumour, without metastasis; rheumd, rheumatoid arthritis/collaged vascular disease; coag, coagulopathy; obes, obesity; wloss, weight loss; fed, fluid electrolyte disorders; blane, blood loss anaemia; dane, deficiency anaemia; alcohol, alcohol abuse; drug, drug abuse; psycho, psychoses; depre, depression; Labels presented user using RStudio viewer (e.g. via utils::View() function) convenience, labelled = TRUE.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Comorbidity mapping. — comorbidity","text":"ICD-10 ICD-9-CM coding Charlson Elixhauser scores based work Quan et al. (2005). ICD-10 ICD-9 codes must upper case alphanumeric characters order properly recognised; set tidy.codes = TRUE properly tidy codes automatically (default behaviour). message printed R console non-alphanumeric characters found.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Comorbidity mapping. — comorbidity","text":"Quan H, Sundararajan V, Halfon P, Fong , Burnand B, Luthi JC, et al. Coding algorithms defining comorbidities ICD-9-CM ICD-10 administrative data. Medical Care 2005; 43(11):1130-1139. Charlson , Pompei P, Ales KL, et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. Ludvigsson JF, Appelros P, Askling J et al. Adaptation Charlson Comorbidity Index register-based research Sweden. Clinical Epidemiology 2021; 13:21-41. Sundararajan V, Henderson T, Perry C, Muggivan , Quan H, Ghali WA. New ICD-10 version Charlson comorbidity index predicted -hospital mortality. Journal Clinical Epidemiology 2004; 57(12):1288-1294.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comorbidity mapping. — comorbidity","text":"","code":"set.seed(1) x <- data.frame( id = sample(1:15, size = 200, replace = TRUE), code = sample_diag(200), stringsAsFactors = FALSE ) # Charlson score based on ICD-10 diagnostic codes: comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) #> id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld #> 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 #> 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 9 9 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 11 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 12 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 13 13 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 #> 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> metacanc aids #> 1 0 0 #> 2 0 1 #> 3 0 0 #> 4 0 0 #> 5 0 0 #> 6 0 0 #> 7 0 0 #> 8 0 0 #> 9 0 0 #> 10 0 0 #> 11 0 0 #> 12 0 0 #> 13 0 0 #> 14 0 0 #> 15 0 0 # Elixhauser score based on ICD-10 diagnostic codes: comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd10_quan\", assign0 = FALSE) #> id chf carit valv pcd pvd hypunc hypc para ond cpd diabunc diabc hypothy rf #> 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 2 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 #> 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 9 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 11 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 12 12 0 0 0 0 0 0 0 0 1 0 0 0 0 0 #> 13 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> ld pud aids lymph metacanc solidtum rheumd coag obes wloss fed blane dane #> 1 0 0 0 0 0 1 0 0 0 0 0 0 0 #> 2 0 0 1 0 0 0 0 0 0 0 0 0 0 #> 3 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 4 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 5 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 6 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 1 0 0 0 0 1 0 0 0 0 0 0 0 #> 8 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 9 0 0 0 0 0 1 1 0 0 0 0 0 0 #> 10 0 0 0 0 0 1 0 0 0 0 0 0 0 #> 11 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 12 0 0 0 0 0 0 0 1 0 0 0 0 0 #> 13 0 1 0 0 0 1 0 0 0 0 0 0 0 #> 14 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 15 0 0 0 0 0 1 0 0 0 0 0 0 0 #> alcohol drug psycho depre #> 1 0 0 0 0 #> 2 0 0 0 0 #> 3 0 0 0 0 #> 4 0 0 0 0 #> 5 0 0 0 0 #> 6 0 0 0 0 #> 7 1 0 0 0 #> 8 0 0 0 0 #> 9 0 0 0 0 #> 10 0 0 0 0 #> 11 0 0 0 0 #> 12 0 1 1 0 #> 13 0 0 0 0 #> 14 0 0 0 0 #> 15 0 0 0 0 # The following example describes how the `assign0` argument works. # We create a dataset for a single patient with two codes, one for # uncomplicated diabetes (\"E100\") and one for complicated diabetes # (\"E102\"): x2 <- data.frame( id = 1, code = c(\"E100\", \"E102\"), stringsAsFactors = FALSE ) # Then, we calculate the Quan-ICD10 Charlson score: ccF <- comorbidity(x = x2, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) # With `assign0 = FALSE`, both diabetes comorbidities are counted: ccF[, c(\"diab\", \"diabwc\")] #> diab diabwc #> 1 1 1 # Conversely, with `assign0 = TRUE`, only the more severe diabetes with # complications is counted: ccT <- comorbidity(x = x2, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = TRUE) ccT[, c(\"diab\", \"diabwc\")] #> diab diabwc #> 1 0 1"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"dataset containing 2009 version ICD-10 codes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"","code":"icd10_2009"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"data frame 10,817 rows 4 variables: Code ICD-10 diagnostic code Code.clean ICD-10 diagnostic code, removing punctuation ICD.title Code description, plain English. Status Additional information, available.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"CDC Website: https://goo.gl/6e2mvb","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"dataset containing 2011 version ICD-10 codes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"","code":"icd10_2011"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"data frame 10,856 rows 4 variables: Code ICD-10 diagnostic code Code.clean ICD-10 diagnostic code, removing punctuation ICD.title Code description, plain English. Status Additional information, available.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"CDC Website: https://goo.gl/rcTJJ2","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"dataset containing 2017 version ICD10-CM coding system.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"","code":"icd10cm_2017"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"data frame 71,486 rows 2 variables: Code ICD-10-CM diagnostic code Description Description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"dataset containing 2018 version ICD10-CM coding system.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"","code":"icd10cm_2018"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"data frame 71,704 rows 2 variables: Code ICD-10-CM diagnostic code Description Description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"dataset containing 2022 version ICD10-CM coding system.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"","code":"icd10cm_2022"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"data frame 72,750 rows 2 variables: Code ICD-10-CM diagnostic code Description Description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"dataset containing version ICD-9 codes effective October 1, 2014.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"","code":"icd9_2015"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"data frame 14,567 rows 3 variables: Code ICD-9 diagnostic code Long_description Long description code Short_description Short description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"CMS.gov Website: https://www.cms.gov/Medicare/Coding/ICD9ProviderDiagnosticCodes/codes.html","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"R code used download process dataset CMS.gov website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":null,"dir":"Reference","previous_headings":"","what":"Adult same-day discharges, 2010 — nhds2010","title":"Adult same-day discharges, 2010 — nhds2010","text":"dataset containing adult -day discharges 2010, obtained Stata 17.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adult same-day discharges, 2010 — nhds2010","text":"","code":"nhds2010"},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Adult same-day discharges, 2010 — nhds2010","text":"data frame 2,210 rows 15 variables: ageu Units age age Age sex Sex race Race month Discharge month status Discharge status region Region atype Type admission dx1 Diagnosis 1, ICD9-CM dx2 Diagnosis 2, ICD9-CM dx3 Diagnosis 3, ICD9-CM, imported incorrectly dx3corr Diagnosis 3, ICD9-CM, corrected pr1 Procedure 1 wgt Frequency weight recid Order record (raw data)","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Adult same-day discharges, 2010 — nhds2010","text":"R code used download process dataset Stata available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"simple function simulate ICD-10 ICD-9 diagnostic codes random.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"","code":"sample_diag(n = 1, version = \"ICD10_2011\")"},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"n Number ICD codes simulate. version version ICD coding scheme use. Possible choices ICD10_2009, ICD10_2011, ICD9_2015; defaults ICD10_2011. See icd10_2009, icd10_2011, icd9_2015 information different schemes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"vector n ICD diagnostic codes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"","code":"# Simulate 10 ICD-10 codes sample_diag(10) #> [1] \"D682\" \"R454\" \"G308\" \"R90\" \"N350\" \"S064\" \"V435\" \"V795\" \"M356\" \"R073\" # Simulate a tidy dataset with 15 individuals and 200 rows set.seed(1) x <- data.frame( id = sample(1:15, size = 200, replace = TRUE), code = sample_diag(n = 200), stringsAsFactors = FALSE ) head(x) #> id code #> 1 9 P23 #> 2 4 B942 #> 3 7 K764 #> 4 1 I950 #> 5 2 V549 #> 6 13 N90"},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute (weighted) comorbidity scores — score","title":"Compute (weighted) comorbidity scores — score","text":"Compute (weighted) comorbidity scores","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute (weighted) comorbidity scores — score","text":"","code":"score(x, weights = NULL, assign0)"},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute (weighted) comorbidity scores — score","text":"x object class comorbidty returned call comorbidity() function. weights string denoting weighting system used, depend mapping algorithm. Possible values Charlson index : charlson, original weights Charlson et al. (1987); quan, revised weights Quan et al. (2011). Possible values Elixhauser score : vw, weights van Walraven et al. (2009); swiss, Swiss Elixhauser weights Sharma et al. (2021). Defaults NULL, case unweighted score used. assign0 logical value denoting whether apply hierarchy comorbidities: comorbidity present patient different degrees severity, milder form assigned value 0 calculating score. , type comorbidity counted patient. assign0 = TRUE, comorbidities affected argument : \"Mild liver disease\" (mld) \"Moderate/severe liver disease\" (msld) Charlson score; \"Diabetes\" (diab) \"Diabetes complications\" (diabwc) Charlson score; \"Cancer\" (canc) \"Metastatic solid tumour\" (metacanc) Charlson score; \"Hypertension, uncomplicated\" (hypunc) \"Hypertension, complicated\" (hypc) Elixhauser score; \"Diabetes, uncomplicated\" (diabunc) \"Diabetes, complicated\" (diabc) Elixhauser score; \"Solid tumour\" (solidtum) \"Metastatic cancer\" (metacanc) Elixhauser score.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute (weighted) comorbidity scores — score","text":"numeric vector (possibly weighted) comorbidity score subject input dataset.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute (weighted) comorbidity scores — score","text":"Charlson , Pompei P, Ales KL, et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. Quan H, Li B, Couris CM, et al. Updating validating Charlson Comorbidity Index Score risk adjustment hospital discharge abstracts using data 6 countries. American Journal Epidemiology 2011; 173(6):676-682. van Walraven C, Austin PC, Jennings , Quan H Forster AJ. modification Elixhauser comorbidity measures point system hospital death using administrative data. Medical Care 2009; 47(6):626-633. Sharma N, Schwendimann R, Endrich O, et al. Comparing Charlson Elixhauser comorbidity indices different weightings predict -hospital mortality: analysis national inpatient data. BMC Health Services Research 2021; 21(13).","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute (weighted) comorbidity scores — score","text":"","code":"set.seed(1) x <- data.frame( id = sample(1:15, size = 200, replace = TRUE), code = sample_diag(200), stringsAsFactors = FALSE ) # Charlson score based on ICD-10 diagnostic codes: x1 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) score(x = x1, weights = \"charlson\", assign0 = FALSE) #> [1] 2 6 0 2 0 0 4 0 3 2 0 0 3 0 2 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" #> attr(,\"weights\") #> [1] \"charlson\" # Elixhauser score based on ICD-10 diagnostic codes: x2 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd10_quan\", assign0 = FALSE) score(x = x2, weights = \"vw\", assign0 = FALSE) #> [1] 4 -1 0 0 0 0 22 0 4 4 0 2 4 0 4 #> attr(,\"map\") #> [1] \"elixhauser_icd10_quan\" #> attr(,\"weights\") #> [1] \"vw\" # Checking the `assign0` argument. # Please make sure to check the example in the documentation of the # `comorbidity()` function first, with ?comorbidity(). # We use the same dataset for a single subject with two codes, for # complicated and uncomplicated diabetes: x3 <- data.frame( id = 1, code = c(\"E100\", \"E102\"), stringsAsFactors = FALSE ) # Then, we calculate the Quan-ICD10 Charlson score: ccF <- comorbidity(x = x3, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) ccF[, c(\"diab\", \"diabwc\")] #> diab diabwc #> 1 1 1 # If we calculate the unweighted score with `assign0 = FALSE`, both diabetes # conditions are counted: score(x = ccF, assign0 = FALSE) #> [1] 2 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" # Conversely, with `assign0 = TRUE`, only the most severe is considered: score(x = ccF, assign0 = TRUE) #> [1] 1 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-development-version","dir":"Changelog","previous_headings":"","what":"comorbidity (development version)","title":"comorbidity (development version)","text":"Added second version ICD10-score including U codes “increases capture chronic conditions 15-fold”, according Australian Institute Health Welfare (#72, thanks @DesiQuintans contributing ); Updated Swedish version Charlson comorbidity score according corrigendum published online : https://doi.org/10.2147/CLEP.S425901; Removed startup message highlighting changes package API introduced {comorbidity} 1.0.0; Updated hex sticker.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-107","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.7","title":"comorbidity 1.0.7","text":"CRAN release: 2023-05-01 Identified (adjusted) tests spuriously fail.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-106","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.6","title":"comorbidity 1.0.6","text":"Adjusted name weights (leftover #53, thanks @sciatro reporting ). bug seem affect calculation. Updated CITATION file use new interface. internal housekeeping (removed old documentation, updated GitHub actions new version, etc.).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-105","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.5","title":"comorbidity 1.0.5","text":"CRAN release: 2022-09-26 Adjusted tests spuriously failing CRAN.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-104","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.4","title":"comorbidity 1.0.4","text":"Updated maintainer e-mail. Updated hex sticker. Improved documentation arguments comorbidity() score() functions (#61, thanks @dsjoho). Fixed broken references old vignettes’ names (#61, thanks @dsjoho). Overall, package documentation tidied bunch. startup message pointing changes API now appears less often (10% probability).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-103","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.3","title":"comorbidity 1.0.3","text":"CRAN release: 2022-07-12 Fixed bug allowed ID columns numeric (#55, thanks @norihikorihiko reporting ).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-102","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.2","title":"comorbidity 1.0.2","text":"CRAN release: 2022-04-06 copd ami comorbidities Charlson index renamed cpd mi, respectively (#53, thanks @DrYan1102). Please aware might break old code selecting comorbidities name. New dataset: ICD10-CM, 2022 version, named icd10cm_2022.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-101","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.1","title":"comorbidity 1.0.1","text":"startup message pointing changes API now appears less often (40% probability). Fixed bug causing comorbidities assigned value one missing data code column (#50), thanks @Chris-M-P reporting .","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-100","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.0","title":"comorbidity 1.0.0","text":"CRAN release: 2022-01-17 comorbidity version 1.0.0 release substantially modifies updates package API. lot improvements terms performance, supported algorithms, user-facing functions; see e.g. thread GitHub. Specific user-facing changes, including examples new API, discussed detail : https://ellessenne.github.io/comorbidity/articles/C-changes.html required, can revert previous release installing GitHub: remotes::install_github(\"ellessenne/comorbidity@0.5.3\"). startup message pointing changes API now displayed 50% probability attaching package removed future releases. New contributors: Sing Yi Chia Edmund Teo.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-053","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.3","title":"comorbidity 0.5.3","text":"CRAN release: 2020-01-09 comorbidity now accepts data.table objects input (#23); comorbidity can deal non-syntactically valid names (#25); Fixed coding typo vignette (#10, #26); Reduced number random tests, R CMD check taking long platforms getting killed CRAN (reported Kurt Hornik).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-052","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.2","title":"comorbidity 0.5.2","text":"CRAN release: 2019-10-20 Fixed another bug introduced switch data.table occurred input dataset extra columns id code.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-051","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.1","title":"comorbidity 0.5.1","text":"CRAN release: 2019-10-16 melt generic data.table deprecated; dependency reshape2 now removed; Fixed bugs introduced switching data.table comorbidity 0.5.0: column names id code expecting specific names, now fixed behaves expected.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-050","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.0","title":"comorbidity 0.5.0","text":"CRAN release: 2019-08-20 comorbidity now 10+ times faster, thanks Jonathan Williman contributing code based data.table package; Fixed typo vignette regarding weighting algorithm AHRQ Elixhauser comorbidity score (#14, thanks @cornflakegrl); Added pkgdown website: https://ellessenne.github.io/comorbidity.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-041","dir":"Changelog","previous_headings":"","what":"comorbidity 0.4.1","title":"comorbidity 0.4.1","text":"CRAN release: 2019-06-27 Fixed bug regex patterns (#10, thanks @francisco003 reporting @salmasian pull request).","code":""},{"path":[]},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"BREAKING CHANGES","title":"comorbidity 0.4.0","text":"Modified behaviour assign0 argument discussion Anders Alexandersson Issue #9: now default, forcing user decide whether apply hierarchy comorbidity codes . make algorithm transparent end user, allowing informed choice. See ?comorbidity::comorbidity vignette(\"comorbidityscores\", package = \"comorbidity\") details hierarchy applied.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-030","dir":"Changelog","previous_headings":"","what":"comorbidity 0.3.0","title":"comorbidity 0.3.0","text":"CRAN release: 2019-03-22","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"breaking-changes-0-3-0","dir":"Changelog","previous_headings":"","what":"BREAKING CHANGES","title":"comorbidity 0.3.0","text":"comorbidity now returns two Elixhauser scores, one computed using algorithm van Walraven et al. (2009) second one computed using AHRQ algorithm (Moore et al., 2017). Thanks Yumiko Abe-Jones feedback discussion regarding weighted Elixhauser scores. information can found package vignette: vignette(\"comorbidityscores\", package = \"comorbidity\").","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-021","dir":"Changelog","previous_headings":"","what":"comorbidity 0.2.1","title":"comorbidity 0.2.1","text":"Fixed bug weighting algorithm Elixhauser comorbidity score; assign0 argument comorbidity now defaults FALSE; assign0 now explains details hierarchy comorbidities applied; added reference package vignette comorbidity scores weighting algorithms explained detail.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-020","dir":"Changelog","previous_headings":"","what":"comorbidity 0.2.0","title":"comorbidity 0.2.0","text":"CRAN release: 2018-10-08 comorbidity faster, conservative estimated speed->60%; Lots internal housekeeping; Fixed broken GitHub links R script used generate datasets bundled comorbidity.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"breaking-changes-0-2-0","dir":"Changelog","previous_headings":"","what":"BREAKING CHANGES","title":"comorbidity 0.2.0","text":"score argument comorbidity split score icd. instance, command comorbidity(x = x, id = \"id\", code = \"code\", score = \"charlson_icd10\") modified r comorbidity(x = x, id = \"id\", code = \"code\", score = \"charlson\", icd = \"icd10\"). default value icd icd10, ICD-10 codes, possible values icd10 icd9.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-013","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.3","title":"comorbidity 0.1.3","text":"Added nhds2010 australia10 datasets, imported Stata version 15. Bug fix: * Fixed bug regex ICD10 Charlson score; * Fixed bug regex ICD10 Elixhauser score.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-012","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.2","title":"comorbidity 0.1.2","text":"Added ICD10-CM data (version 2017 2018).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-011","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.1","title":"comorbidity 0.1.1","text":"CRAN release: 2018-03-30 Documented variables missing among returned comorbidity() (@corinne-riddell, #5); Added CITATION file: citation(\"comorbidity\") now returns properly formatted entry.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-010","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.0","title":"comorbidity 0.1.0","text":"CRAN release: 2018-03-07 Added support ICD-9-CM version Charlson Elixhauser scores Added vignette information scores computed comorbidity sample_diag_icd10() function renamed back sample_diag(), now can simulate ICD-9-CM codes ","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-003","dir":"Changelog","previous_headings":"","what":"comorbidity 0.0.3","title":"comorbidity 0.0.3","text":"CRAN release: 2018-01-08 Added datasets icd10_2009 icd10_2011 ICD-10 codes, 2009 2011 versions (respectively) sample_diag now sample_diag_icd10 simulates proper ICD-10 codes Added Elixhauser comorbidity score Renamed package comorbidity now can compute just Charlson score Added formal testing: codes Charlson score properly identified Added formal testing: codes Elixhauser score properly identified","code":""}]
+[{"path":[]},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting project team [INSERT EMAIL ADDRESS]. complaints reviewed investigated result response deemed necessary appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately. Project maintainers follow enforce Code Conduct good faith may face temporary permanent repercussions determined members project’s leadership.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing","title":"Contributing","text":"want contribute project make better, help welcome. small, simple changes fixing typos can edit file directly GitHub clicking Edit button opening . complicated changes, manually create pull request (PR) forking repository. See next section information. submit non-trivial pull request (e.g. just fixing typo), may add name Authors@R field contributor (ctb) R package DESCRIPTION file wish.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONTRIBUTING.html","id":"pull-request-workflow","dir":"","previous_headings":"","what":"Pull Request Workflow","title":"Contributing","text":"Create personal fork project Github, clone fork local machine; Create new branch work ; Implement/fix feature, comment code; Follow code style project, including indentation; Run tests using devtools: devtools::test(); Write adapt tests needed; Add change documentation needed. Please run roxygen2, include changes .Rd files pull request - re-roxygenise documentation ; Push branch fork Github; fork open pull request correct branch. step--step workflow adapted https://github.com/MarcDiethelm/contributing. Working first Pull Request? can learn free series Contribute Open Source Project GitHub.","code":""},{"path":"https://ellessenne.github.io/comorbidity/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing","text":"contributing project agree adhere Contributors Code Conduct: please read CONDUCT.md proposing change.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/A-introduction.html","id":"mapping-comorbidities","dir":"Articles","previous_headings":"","what":"Mapping Comorbidities","title":"Introduction","text":"comorbidity() function can used apply mapping algorithms dataset. , instance, use Quan et al. (2005) version Charlson Comorbidity Index: resulting data frame row per subject, column IDs, column condition included given score (e.g. 17 conditions Charlson score). different columns also labelled compatibility RStudio viewer, see e.g. View(charlson_df) running code computer. see supported mapping algorithms, please see vignette:","code":"charlson_df <- comorbidity( x = df, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE ) str(charlson_df) #> Classes 'comorbidity' and 'data.frame': 100 obs. of 18 variables: #> $ id : int 1 2 3 4 5 6 7 8 9 10 ... #> $ mi : int 0 0 0 0 0 0 0 0 0 0 ... #> $ chf : int 0 1 1 0 0 1 1 0 1 1 ... #> $ pvd : int 0 0 0 0 0 0 0 0 0 0 ... #> $ cevd : int 0 0 0 0 0 0 0 0 0 0 ... #> $ dementia: int 0 0 0 0 0 0 0 0 0 0 ... #> $ cpd : int 1 1 1 1 0 0 1 1 1 1 ... #> $ rheumd : int 0 0 0 0 0 0 0 0 0 0 ... #> $ pud : int 0 0 0 0 0 0 0 0 0 0 ... #> $ mld : int 0 0 0 0 0 0 0 0 0 0 ... #> $ diab : int 0 0 0 0 0 0 0 0 0 0 ... #> $ diabwc : int 1 0 1 1 1 1 1 1 1 1 ... #> $ hp : int 0 0 0 0 0 0 0 0 0 0 ... #> $ rend : int 0 0 0 0 0 0 0 0 0 0 ... #> $ canc : int 1 1 1 1 1 1 1 1 1 1 ... #> $ msld : int 0 0 0 0 0 0 0 0 0 0 ... #> $ metacanc: int 0 0 0 0 0 0 0 0 0 0 ... #> $ aids : int 0 0 0 0 0 0 0 0 0 0 ... #> - attr(*, \"variable.labels\")= chr [1:18] \"ID\" \"Myocardial infarction\" \"Congestive heart failure\" \"Peripheral vascular disease\" ... #> - attr(*, \"map\")= chr \"charlson_icd10_quan\" length(unique(df$id)) == nrow(charlson_df) #> [1] TRUE vignette(\"B-comorbidity-scores\", package = \"comorbidity\")"},{"path":"https://ellessenne.github.io/comorbidity/articles/A-introduction.html","id":"comorbidity-scores","dir":"Articles","previous_headings":"","what":"Comorbidity Scores","title":"Introduction","text":"calculating data frame comorbid conditions, can used calculate comorbidity scores using score() function. Say want calculate Charlson comorbidity score, weighted using Quan et al. (2011) weights: returns single value per subject: pure combination conditions required (e.g. unweighted score), pass NULL value weights argument score() function: , available weighting systems/algorithms described vignette mentioned .","code":"quan_cci <- score(x = charlson_df, weights = \"quan\", assign0 = FALSE) table(quan_cci) #> quan_cci #> 2 3 4 5 6 #> 7 18 20 30 25 length(quan_cci) == nrow(charlson_df) #> [1] TRUE unw_cci <- score(x = charlson_df, weights = NULL, assign0 = FALSE) table(unw_cci) #> unw_cci #> 1 2 3 4 #> 7 25 43 25"},{"path":"https://ellessenne.github.io/comorbidity/articles/A-introduction.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Introduction","text":"Charlson et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. DOI: 10.1016/0021-9681(87)90171-8 Quan H et al. Coding algorithms defining comorbidities ICD-9-CM ICD-10 administrative data. Medical Care 2005; 43(11):1130-1139. DOI: 10.1097/01.mlr.0000182534.19832.83 Quan H et al. Updating validating Charlson Comorbidity Index score risk adjustment hospital discharge abstracts using data 6 countries. American Journal Epidemiology 2011;173(6):676-82. DOI: 10.1093/aje/kwq433","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/B-comorbidity-scores.html","id":"supported-mapping-algorithms","dir":"Articles","previous_headings":"","what":"Supported Mapping Algorithms","title":"Supported Comorbidity Mappings and Scores","text":"{comorbidity} package can apply comorbidity mappings corresponding Charlson Elixhauser comorbidity scores. ICD-9 ICD-10 coding systems supported, algorithms described paper Quan et al. (2005). resulting mapping algorithms denoted charlson_icd9_quan charlson_icd10_quan Charlson score (based ICD-9 ICD-10 systems, respectively), elixhauser_icd9_quan elixhauser_icd10_quan Elixhauser score. Furthermore, Swedish (Ludvigsson et al., 2021) Australian (Sundararajan et al., 2004) modifications Charlson score implemented well, identified charlson_icd10_se charlson_icd10_am respectively.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/B-comorbidity-scores.html","id":"supported-weighting-algorithms","dir":"Articles","previous_headings":"","what":"Supported Weighting Algorithms","title":"Supported Comorbidity Mappings and Scores","text":"Different weighting algorithms proposed combine different conditions single measure, Charlson Elixhauser index. Currently, following weighting algorithms supported Charlson score: original weights Charlson et al. (1987), denoted charlson; Updated weights Quan et al. (2011), denoted quan. , Elixhauser score: Weights proposed van Walraven et al. (2009), denoted vw; Swiss weights modification Sharma et al. (2021), denoted swiss.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/B-comorbidity-scores.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Supported Comorbidity Mappings and Scores","text":"Charlson et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. DOI: 10.1016/0021-9681(87)90171-8 Elixhauser et al. Comorbidity measures use administrative data. Medical Care 1998; 36(1):8-27. DOI: 10.1097/00005650-199801000-00004 Ludvigsson JF et al. Adaptation Charlson Comorbidity Index register-based research Sweden. Clinical Epidemiology 2021; 13:21–41. DOI: 10.2147/clep.s282475 Quan H et al. Coding algorithms defining comorbidities ICD-9-CM ICD-10 administrative data. Medical Care 2005; 43(11):1130-1139. DOI: 10.1097/01.mlr.0000182534.19832.83 Quan H et al. Updating validating Charlson Comorbidity Index score risk adjustment hospital discharge abstracts using data 6 countries. American Journal Epidemiology 2011;173(6):676-82. DOI: 10.1093/aje/kwq433 Sharma N et al. Comparing Charlson Elixhauser comorbidity indices different weightings predict -hospital mortality: analysis national inpatient data. BMC Health Services Research 2021; 21(1). DOI: 10.1186/s12913-020-05999-5 Sundararajan V et al. New ICD-10 version Charlson comorbidity index predicted -hospital mortality. Journal Clinical Epidemiology 2004; 57(12):1288-1294. DOI: 10.1016/j.jclinepi.2004.03.012 van Walraven C, Austin PC, Jennings , Quan H Forster AJ. modification Elixhauser comorbidity measures point system hospital death using administrative data. Medical Care 2009; 47(6):626-633. DOI: 10.1097/MLR.0b013e31819432e5","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"comorbidity-mapping-and-scoring-are-now-distinct-functions","dir":"Articles","previous_headings":"","what":"Comorbidity Mapping and Scoring are Now Distinct Functions","title":"Updating to {comorbidity} 1.0.0","text":"previous release {comorbidity}, comorbidity mapping scoring algorithms applied jointly single function call: Note , {comorbidity} version 1.0.4, ami condition renamed mi. See #53 GitHub details. Now, first need apply mapping algorithm: …yields results shown . , need calculate comorbidity scores, can use score() function: yields unweighted scores (e.g. equivalent score column ). need weighted scores (e.g. wscore column , assumes old Charlson score weights 1987), can pass name supported scoring algorithm: , results score() function equivalent obtained using previously-released version.","code":"comorbidity(x = sim_data, id = \"id\", code = \"code\", score = \"charlson\", icd = \"icd10\", assign0 = FALSE) #> id ami chf pvd cevd dementia copd rheumd pud mld diab diabwc hp rend canc #> 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 #> 2 2 0 0 0 0 0 0 0 0 0 1 1 0 0 1 #> 3 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 #> 4 4 0 0 0 1 0 0 0 0 0 0 0 0 0 1 #> 5 5 0 0 0 0 0 0 0 0 0 1 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 0 0 0 0 0 0 0 0 0 0 0 0 1 1 #> 8 8 0 0 0 1 0 0 1 0 0 1 1 0 0 1 #> 9 9 0 0 0 0 0 0 0 0 0 0 0 0 0 1 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 #> msld metacanc aids score index wscore windex #> 1 0 0 0 2 1-2 4 3-4 #> 2 0 0 0 3 3-4 5 >=5 #> 3 0 0 0 1 1-2 1 1-2 #> 4 0 0 0 2 1-2 3 3-4 #> 5 0 0 0 1 1-2 1 1-2 #> 6 0 0 0 0 0 0 0 #> 7 0 0 0 2 1-2 4 3-4 #> 8 0 0 0 5 >=5 7 >=5 #> 9 0 0 0 1 1-2 2 1-2 #> 10 0 0 0 1 1-2 2 1-2 com <- comorbidity(x = sim_data, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) com #> id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld #> 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 #> 2 2 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 #> 3 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 #> 4 4 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 #> 5 5 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 #> 8 8 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 #> 9 9 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> metacanc aids #> 1 0 0 #> 2 0 0 #> 3 0 0 #> 4 0 0 #> 5 0 0 #> 6 0 0 #> 7 0 0 #> 8 0 0 #> 9 0 0 #> 10 0 0 score(com, assign0 = FALSE, weights = NULL) #> [1] 2 3 1 2 1 0 2 5 1 1 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" score(com, assign0 = FALSE, weights = \"charlson\") #> [1] 4 5 1 3 1 0 4 7 2 2 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" #> attr(,\"weights\") #> [1] \"charlson\""},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"supported-mapping-and-scoring-algorithms","dir":"Articles","previous_headings":"","what":"Supported Mapping and Scoring Algorithms","title":"Updating to {comorbidity} 1.0.0","text":"new version includes updated comorbidity mapping scoring algorithms. Furthermore, designed way simplify addition new scores future. currently supported comorbidity mapping algorithms described following vignette: Alternatively, new function provided display supported algorithms R console: picked auto-magically internal data structures, always --date.","code":"vignette(\"02-comorbidityscores\", package = \"comorbidity\") available_algorithms() #> Supported comorbidity mapping algorithms: #> * charlson_icd9_quan #> * charlson_icd10_quan #> * charlson_icd10_se #> * charlson_icd10_am #> * charlson_icd10_am_ucodes #> * elixhauser_icd9_quan #> * elixhauser_icd10_quan #> #> Supported scoring weights algorithms: #> * For charlson_icd9_quan: charlson, quan #> * For charlson_icd10_quan: charlson, quan #> * For charlson_icd10_se: charlson, quan #> * For charlson_icd10_am: charlson, quan #> * For charlson_icd10_am_ucodes: charlson, quan #> * For elixhauser_icd9_quan: vw, swiss #> * For elixhauser_icd10_quan: vw, swiss"},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"computational-speed","dir":"Articles","previous_headings":"","what":"Computational Speed","title":"Updating to {comorbidity} 1.0.0","text":"internal re-writing package API allowed optimising code speed efficiency. managed estimate, using simulated data, main comorbidity mapping function (e.g. comorbidity()) approximately twice fast version 0.5.3, across variety sample sizes: main computational bottleneck, applying scoring algorithm fast general.","code":""},{"path":"https://ellessenne.github.io/comorbidity/articles/C-changes.html","id":"reverting-to-previous-release","dir":"Articles","previous_headings":"","what":"Reverting to previous release","title":"Updating to {comorbidity} 1.0.0","text":"understand new release might break workflows, apologies . feedback, please feel free e-mail maintainer package open issue GitHub, latter strongly suggested. Finally, required, can revert previous release installing GitHub:","code":"library(remotes) remotes::install_github(\"ellessenne/comorbidity@0.5.3\")"},{"path":"https://ellessenne.github.io/comorbidity/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Alessandro Gasparini. Author, maintainer. Hojjat Salmasian. Contributor. ICD-9-CM scores Jonathan Williman. Contributor. Sing Yi Chia. Contributor. Edmund Teo. Contributor.","code":""},{"path":"https://ellessenne.github.io/comorbidity/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Gasparini, (2018). comorbidity: R package computing comorbidity scores. Journal Open Source Software, 3(23), 648, https://doi.org/10.21105/joss.00648","code":"@Article{, author = {Alessandro Gasparini}, title = {comorbidity: An R package for computing comorbidity scores}, journal = {Journal of Open Source Software}, year = {2018}, volume = {3}, issue = {23}, pages = {648}, doi = {10.21105/joss.00648}, url = {https://doi.org/10.21105/joss.00648}, }"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"the-comorbidity-package-computing-comorbidity-scores-in-r-","dir":"","previous_headings":"","what":"Computing Comorbidity Scores in R","title":"Computing Comorbidity Scores in R","text":"Last updated: 2024-05-25 16:48:18.589081 comorbidity R package computing comorbidity scores weighted Charlson score Elixhauser comorbidity score; ICD-10 ICD-9 coding systems supported.","code":""},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Computing Comorbidity Scores in R","text":"comorbidity CRAN. can install usual : Alternatively, can install development version GitHub :","code":"install.packages(\"comorbidity\") # install.packages(\"remotes\") remotes::install_github(\"ellessenne/comorbidity\")"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"simulating-icd-10-codes","dir":"","previous_headings":"","what":"Simulating ICD-10 codes","title":"Computing Comorbidity Scores in R","text":"comorbidity packages includes function named sample_diag() allows simulating ICD diagnostic codes straightforward way. instance, simulate ICD-10 codes: also possible simulate two different versions ICD-10 coding system. default simulate ICD-10 codes 2011 version: Alternatively, use 2009 version:","code":"# load the comorbidity package library(comorbidity) # set a seed for reproducibility set.seed(1) # simulate 50 ICD-10 codes for 5 individuals x <- data.frame( id = sample(1:5, size = 50, replace = TRUE), code = sample_diag(n = 50) ) x <- x[order(x$id, x$code), ] print(head(x, n = 15), row.names = FALSE) ## id code ## 1 B02 ## 1 B582 ## 1 I749 ## 1 J450 ## 1 L893 ## 1 Q113 ## 1 Q26 ## 1 Q978 ## 1 T224 ## 1 V101 ## 1 V244 ## 1 V46 ## 2 A665 ## 2 C843 ## 2 D838 set.seed(1) x1 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30) ) set.seed(1) x2 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD10_2011\") ) # should return TRUE all.equal(x1, x2) ## [1] TRUE set.seed(1) x1 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD10_2009\") ) set.seed(1) x2 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD10_2011\") ) # should not return TRUE all.equal(x1, x2) ## [1] \"Component \\\"code\\\": 30 string mismatches\""},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"simulating-icd-9-codes","dir":"","previous_headings":"","what":"Simulating ICD-9 codes","title":"Computing Comorbidity Scores in R","text":"ICD-9 codes can easily simulated :","code":"set.seed(2) x9 <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30, version = \"ICD9_2015\") ) x9 <- x9[order(x9$id, x9$code), ] print(head(x9, n = 15), row.names = FALSE) ## id code ## 1 01130 ## 1 01780 ## 1 30151 ## 1 3073 ## 1 36907 ## 1 37845 ## 1 64212 ## 1 66704 ## 1 72633 ## 1 9689 ## 1 V289 ## 2 0502 ## 2 09169 ## 2 20046 ## 2 25082"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"computing-comorbidity-scores","dir":"","previous_headings":"","what":"Computing comorbidity scores","title":"Computing Comorbidity Scores in R","text":"main function comorbidity package named comorbidity(), can used compute supported comorbidity score; scores can specified setting score argument, required. Say 3 individuals total 30 ICD-10 diagnostic codes: compute Charlson comorbidity domains: set assign0 argument FALSE apply hierarchy comorbidity codes, described ?comorbidity::comorbidity. Alternatively, compute Elixhauser score: Weighted unweighted comorbidity scores can obtained using score() function: Code Elixhauser score omitted, works analogously. Conversely, say 5 individuals total 100 ICD-9 diagnostic codes: Charlson Elixhauser comorbidity codes can easily computed : Scores:","code":"set.seed(1) x <- data.frame( id = sample(1:3, size = 30, replace = TRUE), code = sample_diag(n = 30) ) charlson <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) charlson ## id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld metacanc aids ## 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 ## 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ## 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 elixhauser <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd10_quan\", assign0 = FALSE) elixhauser ## id chf carit valv pcd pvd hypunc hypc para ond cpd diabunc diabc hypothy rf ld pud aids lymph ## 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 ## 2 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 3 3 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ## metacanc solidtum rheumd coag obes wloss fed blane dane alcohol drug psycho depre ## 1 0 1 0 0 0 0 0 0 0 0 0 0 0 ## 2 0 1 0 0 0 0 0 0 0 0 0 0 0 ## 3 0 0 0 0 0 0 0 0 0 0 0 0 0 unw_cci <- score(charlson, weights = NULL, assign0 = FALSE) unw_cci ## [1] 2 1 0 ## attr(,\"map\") ## [1] \"charlson_icd10_quan\" quan_cci <- score(charlson, weights = \"quan\", assign0 = FALSE) quan_cci ## [1] 6 2 0 ## attr(,\"map\") ## [1] \"charlson_icd10_quan\" ## attr(,\"weights\") ## [1] \"quan\" all.equal(unw_cci, quan_cci) ## [1] \"Attributes: < Length mismatch: comparison on first 1 components >\" ## [2] \"Mean relative difference: 1.666667\" set.seed(3) x <- data.frame( id = sample(1:5, size = 100, replace = TRUE), code = sample_diag(n = 100, version = \"ICD9_2015\") ) charlson9 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd9_quan\", assign0 = FALSE) charlson9 ## id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld metacanc aids ## 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ## 2 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 3 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ## 4 4 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 ## 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 elixhauser9 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd9_quan\", assign0 = FALSE) elixhauser9 ## id chf carit valv pcd pvd hypunc hypc para ond cpd diabunc diabc hypothy rf ld pud aids lymph ## 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 2 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 ## 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 4 4 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ## metacanc solidtum rheumd coag obes wloss fed blane dane alcohol drug psycho depre ## 1 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 2 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 3 0 0 0 0 0 0 0 0 0 0 0 1 0 ## 4 0 0 0 0 0 0 0 0 0 0 0 0 0 ## 5 0 0 1 0 0 0 0 0 0 0 0 0 0 unw_eci <- score(elixhauser9, weights = NULL, assign0 = FALSE) vw_eci <- score(elixhauser9, weights = \"vw\", assign0 = FALSE) all.equal(unw_eci, vw_eci) ## [1] \"Attributes: < Length mismatch: comparison on first 1 components >\" ## [2] \"Mean relative difference: 2\""},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Computing Comorbidity Scores in R","text":"find comorbidity useful, please cite publications:","code":"citation(\"comorbidity\") ## To cite package 'comorbidity' in publications use: ## ## Gasparini, (2018). comorbidity: An R package for computing comorbidity scores. Journal ## of Open Source Software, 3(23), 648, https://doi.org/10.21105/joss.00648 ## ## A BibTeX entry for LaTeX users is ## ## @Article{, ## author = {Alessandro Gasparini}, ## title = {comorbidity: An R package for computing comorbidity scores}, ## journal = {Journal of Open Source Software}, ## year = {2018}, ## volume = {3}, ## issue = {23}, ## pages = {648}, ## doi = {10.21105/joss.00648}, ## url = {https://doi.org/10.21105/joss.00648}, ## }"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"references","dir":"","previous_headings":"","what":"References","title":"Computing Comorbidity Scores in R","text":"details comorbidity mapping scoring algorithm available within package can found two accompanying vignettes, can accessed CRAN directly R session: list available algorithms can printed interactively using available_algorithms() function:","code":"vignette(\"A-introduction\", package = \"comorbidity\") vignette(\"B-comorbidity-scores\", package = \"comorbidity\") available_algorithms() ## Supported comorbidity mapping algorithms: ## * charlson_icd9_quan ## * charlson_icd10_quan ## * charlson_icd10_se ## * charlson_icd10_am ## * charlson_icd10_am_ucodes ## * elixhauser_icd9_quan ## * elixhauser_icd10_quan ## ## Supported scoring weights algorithms: ## * For charlson_icd9_quan: charlson, quan ## * For charlson_icd10_quan: charlson, quan ## * For charlson_icd10_se: charlson, quan ## * For charlson_icd10_am: charlson, quan ## * For charlson_icd10_am_ucodes: charlson, quan ## * For elixhauser_icd9_quan: vw, swiss ## * For elixhauser_icd10_quan: vw, swiss"},{"path":"https://ellessenne.github.io/comorbidity/index.html","id":"copyright","dir":"","previous_headings":"","what":"Copyright","title":"Computing Comorbidity Scores in R","text":"icon hex sticker made Freepik .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":null,"dir":"Reference","previous_headings":"","what":"Australian mortality data, 2010 — australia10","title":"Australian mortality data, 2010 — australia10","text":"dataset containing Australian mortality data, obtained Stata 17.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Australian mortality data, 2010 — australia10","text":"","code":"australia10"},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Australian mortality data, 2010 — australia10","text":"data frame 3,322 rows 3 variables: cause ICD-10 code representing cause death sex Gender deaths Number deaths","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/australia10.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Australian mortality data, 2010 — australia10","text":"R code used download process dataset Stata available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/available_algorithms.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Currently Supported Algorithms — available_algorithms","title":"Display Currently Supported Algorithms — available_algorithms","text":"function prints (currently) supported implemented comorbidity mapping, one , supported scoring weighting algorithm.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/available_algorithms.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Currently Supported Algorithms — available_algorithms","text":"","code":"available_algorithms()"},{"path":"https://ellessenne.github.io/comorbidity/reference/available_algorithms.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Currently Supported Algorithms — available_algorithms","text":"","code":"available_algorithms() #> Supported comorbidity mapping algorithms: #> \t* charlson_icd9_quan #> \t* charlson_icd10_quan #> \t* charlson_icd10_se #> \t* charlson_icd10_am #> \t* charlson_icd10_am_ucodes #> \t* elixhauser_icd9_quan #> \t* elixhauser_icd10_quan #> #> Supported scoring weights algorithms: #> \t* For charlson_icd9_quan: charlson, quan #> \t* For charlson_icd10_quan: charlson, quan #> \t* For charlson_icd10_se: charlson, quan #> \t* For charlson_icd10_am: charlson, quan #> \t* For charlson_icd10_am_ucodes: charlson, quan #> \t* For elixhauser_icd9_quan: vw, swiss #> \t* For elixhauser_icd10_quan: vw, swiss"},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity-package.html","id":null,"dir":"Reference","previous_headings":"","what":"comorbidity: Computing Comorbidity Scores — comorbidity-package","title":"comorbidity: Computing Comorbidity Scores — comorbidity-package","text":"Computing comorbidity indices scores weighted Charlson score (Charlson, 1987 doi:10.1016/0021-9681(87)90171-8 ) Elixhauser comorbidity score (Elixhauser, 1998 doi:10.1097/00005650-199801000-00004 ) using ICD-9-CM ICD-10 codes (Quan, 2005 doi:10.1097/01.mlr.0000182534.19832.83 ). Australian Swedish modifications Charlson Comorbidity Index available well (Sundararajan, 2004 doi:10.1016/j.jclinepi.2004.03.012 Ludvigsson, 2021 doi:10.2147/CLEP.S282475 ), together different weighting algorithms Charlson Elixhauser comorbidity scores.","code":""},{"path":[]},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"comorbidity: Computing Comorbidity Scores — comorbidity-package","text":"Maintainer: Alessandro Gasparini alessandro@ellessenne.xyz (ORCID) contributors: Hojjat Salmasian hsalmasian@bwh.harvard.edu (ICD-9-CM scores) [contributor] Jonathan Williman jonathan.williman@otago.ac.nz (ORCID) [contributor] Sing Yi Chia cxycsy@hotmail.com (ORCID) [contributor] Edmund Teo ed_teo8@yahoo.com.sg (ORCID) [contributor]","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":null,"dir":"Reference","previous_headings":"","what":"Comorbidity mapping. — comorbidity","title":"Comorbidity mapping. — comorbidity","text":"Maps comorbidity conditions using algorithms Charlson Elixhauser comorbidity scores.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Comorbidity mapping. — comorbidity","text":"","code":"comorbidity(x, id, code, map, assign0, labelled = TRUE, tidy.codes = TRUE)"},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Comorbidity mapping. — comorbidity","text":"x tidy data.frame (data.table; tibbles supported ) one column containing individual ID column containing diagnostic codes. Extra columns ID codes discarded. Column names must syntactically valid names, otherwise forced calling make.names() function. id String denoting name column x containing individual ID. code String denoting name column x containing diagnostic codes. Codes must upper case punctuation order properly recognised. map String denoting mapping algorithm used (values case-insensitive). Possible values Charlson score either ICD-10 ICD-9-CM codes (charlson_icd10_quan, charlson_icd9_quan) Elixhauser score, using either ICD-10 ICD-9-CM (elixhauser_icd10_quan, elixhauser_icd9_quan). mapping based paper Quan et al. (2011). also possible obtain Swedish (charlson_icd10_se) Australian (charlson_icd10_am) modification Charlson score using ICD-10 codes. assign0 Logical value denoting whether apply hierarchy comorbidities: comorbidity present patient different degrees severity, milder form assigned value 0. , type comorbidity counted patient. assign0 = TRUE, comorbidities affected argument : \"Mild liver disease\" (mld) \"Moderate/severe liver disease\" (msld) Charlson score; \"Diabetes\" (diab) \"Diabetes complications\" (diabwc) Charlson score; \"Cancer\" (canc) \"Metastatic solid tumour\" (metacanc) Charlson score; \"Hypertension, uncomplicated\" (hypunc) \"Hypertension, complicated\" (hypc) Elixhauser score; \"Diabetes, uncomplicated\" (diabunc) \"Diabetes, complicated\" (diabc) Elixhauser score; \"Solid tumour\" (solidtum) \"Metastatic cancer\" (metacanc) Elixhauser score. labelled Logical value denoting whether attach labels comorbidity, compatible RStudio viewer via utils::View() function. Defaults TRUE. tidy.codes Logical value, defaulting TRUE, denoting whether ICD codes tidied. TRUE, codes converted upper case non-alphanumeric characters removed using regular expression [^[:alnum:]]. can set FALSE speed computations, please aware case codes assumed formatted . codes incorrectly formatted, may lead wrong results: use risk!","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Comorbidity mapping. — comorbidity","text":"data frame id columns relative comorbidity domain, one row per individual. Charlson score, following variables included dataset: id variable defined user; mi, myocardial infarction; chf, congestive heart failure; pvd, peripheral vascular disease; cevd, cerebrovascular disease; dementia, dementia; cpd, chronic pulmonary disease; rheumd, rheumatoid disease; pud, peptic ulcer disease; mld, mild liver disease; diab, diabetes without complications; diabwc, diabetes complications; hp, hemiplegia paraplegia; rend, renal disease; canc, cancer (malignancy); msld, moderate severe liver disease; metacanc, metastatic solid tumour; aids, AIDS/HIV. Please note combine \"chronic obstructive pulmonary disease\" \"chronic pulmonary disease\" Swedish version Charlson index, comparability (compatibility) definitions/implementations. Conversely, Elixhauser score dataset contains following variables: id variable defined user; chf, congestive heart failure; carit, cardiac arrhythmias; valv, valvular disease; pcd, pulmonary circulation disorders; pvd, peripheral vascular disorders; hypunc, hypertension, uncomplicated; hypc, hypertension, complicated; para, paralysis; ond, neurological disorders; cpd, chronic pulmonary disease; diabunc, diabetes, uncomplicated; diabc, diabetes, complicated; hypothy, hypothyroidism; rf, renal failure; ld, liver disease; pud, peptic ulcer disease, excluding bleeding; aids, AIDS/HIV; lymph, lymphoma; metacanc, metastatic cancer; solidtum, solid tumour, without metastasis; rheumd, rheumatoid arthritis/collaged vascular disease; coag, coagulopathy; obes, obesity; wloss, weight loss; fed, fluid electrolyte disorders; blane, blood loss anaemia; dane, deficiency anaemia; alcohol, alcohol abuse; drug, drug abuse; psycho, psychoses; depre, depression; Labels presented user using RStudio viewer (e.g. via utils::View() function) convenience, labelled = TRUE.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Comorbidity mapping. — comorbidity","text":"ICD-10 ICD-9-CM coding Charlson Elixhauser scores based work Quan et al. (2005). ICD-10 ICD-9 codes must upper case alphanumeric characters order properly recognised; set tidy.codes = TRUE properly tidy codes automatically (default behaviour). message printed R console non-alphanumeric characters found.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Comorbidity mapping. — comorbidity","text":"Quan H, Sundararajan V, Halfon P, Fong , Burnand B, Luthi JC, et al. Coding algorithms defining comorbidities ICD-9-CM ICD-10 administrative data. Medical Care 2005; 43(11):1130-1139. Charlson , Pompei P, Ales KL, et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. Ludvigsson JF, Appelros P, Askling J et al. Adaptation Charlson Comorbidity Index register-based research Sweden. Clinical Epidemiology 2021; 13:21-41. Sundararajan V, Henderson T, Perry C, Muggivan , Quan H, Ghali WA. New ICD-10 version Charlson comorbidity index predicted -hospital mortality. Journal Clinical Epidemiology 2004; 57(12):1288-1294.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/comorbidity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Comorbidity mapping. — comorbidity","text":"","code":"set.seed(1) x <- data.frame( id = sample(1:15, size = 200, replace = TRUE), code = sample_diag(200), stringsAsFactors = FALSE ) # Charlson score based on ICD-10 diagnostic codes: comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) #> id mi chf pvd cevd dementia cpd rheumd pud mld diab diabwc hp rend canc msld #> 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 #> 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 9 9 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 11 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 12 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 13 13 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 #> 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> metacanc aids #> 1 0 0 #> 2 0 1 #> 3 0 0 #> 4 0 0 #> 5 0 0 #> 6 0 0 #> 7 0 0 #> 8 0 0 #> 9 0 0 #> 10 0 0 #> 11 0 0 #> 12 0 0 #> 13 0 0 #> 14 0 0 #> 15 0 0 # Elixhauser score based on ICD-10 diagnostic codes: comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd10_quan\", assign0 = FALSE) #> id chf carit valv pcd pvd hypunc hypc para ond cpd diabunc diabc hypothy rf #> 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 #> 2 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 #> 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 4 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 6 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 7 1 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 9 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 10 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 11 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 12 12 0 0 0 0 0 0 0 0 1 0 0 0 0 0 #> 13 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 14 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 15 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #> ld pud aids lymph metacanc solidtum rheumd coag obes wloss fed blane dane #> 1 0 0 0 0 0 1 0 0 0 0 0 0 0 #> 2 0 0 1 0 0 0 0 0 0 0 0 0 0 #> 3 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 4 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 5 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 6 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 7 1 0 0 0 0 1 0 0 0 0 0 0 0 #> 8 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 9 0 0 0 0 0 1 1 0 0 0 0 0 0 #> 10 0 0 0 0 0 1 0 0 0 0 0 0 0 #> 11 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 12 0 0 0 0 0 0 0 1 0 0 0 0 0 #> 13 0 1 0 0 0 1 0 0 0 0 0 0 0 #> 14 0 0 0 0 0 0 0 0 0 0 0 0 0 #> 15 0 0 0 0 0 1 0 0 0 0 0 0 0 #> alcohol drug psycho depre #> 1 0 0 0 0 #> 2 0 0 0 0 #> 3 0 0 0 0 #> 4 0 0 0 0 #> 5 0 0 0 0 #> 6 0 0 0 0 #> 7 1 0 0 0 #> 8 0 0 0 0 #> 9 0 0 0 0 #> 10 0 0 0 0 #> 11 0 0 0 0 #> 12 0 1 1 0 #> 13 0 0 0 0 #> 14 0 0 0 0 #> 15 0 0 0 0 # The following example describes how the `assign0` argument works. # We create a dataset for a single patient with two codes, one for # uncomplicated diabetes (\"E100\") and one for complicated diabetes # (\"E102\"): x2 <- data.frame( id = 1, code = c(\"E100\", \"E102\"), stringsAsFactors = FALSE ) # Then, we calculate the Quan-ICD10 Charlson score: ccF <- comorbidity(x = x2, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) # With `assign0 = FALSE`, both diabetes comorbidities are counted: ccF[, c(\"diab\", \"diabwc\")] #> diab diabwc #> 1 1 1 # Conversely, with `assign0 = TRUE`, only the more severe diabetes with # complications is counted: ccT <- comorbidity(x = x2, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = TRUE) ccT[, c(\"diab\", \"diabwc\")] #> diab diabwc #> 1 0 1"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"dataset containing 2009 version ICD-10 codes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"","code":"icd10_2009"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"data frame 10,817 rows 4 variables: Code ICD-10 diagnostic code Code.clean ICD-10 diagnostic code, removing punctuation ICD.title Code description, plain English. Status Additional information, available.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"CDC Website: https://goo.gl/6e2mvb","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2009.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10 Diagnostic Codes, 2009 Version — icd10_2009","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"dataset containing 2011 version ICD-10 codes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"","code":"icd10_2011"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"data frame 10,856 rows 4 variables: Code ICD-10 diagnostic code Code.clean ICD-10 diagnostic code, removing punctuation ICD.title Code description, plain English. Status Additional information, available.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"CDC Website: https://goo.gl/rcTJJ2","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10_2011.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10 Diagnostic Codes, 2011 Version — icd10_2011","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"dataset containing 2017 version ICD10-CM coding system.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"","code":"icd10cm_2017"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"data frame 71,486 rows 2 variables: Code ICD-10-CM diagnostic code Description Description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2017.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10-CM Diagnostic Codes, 2017 Version — icd10cm_2017","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"dataset containing 2018 version ICD10-CM coding system.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"","code":"icd10cm_2018"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"data frame 71,704 rows 2 variables: Code ICD-10-CM diagnostic code Description Description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2018.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10-CM Diagnostic Codes, 2018 Version — icd10cm_2018","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"dataset containing 2022 version ICD10-CM coding system.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"","code":"icd10cm_2022"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"data frame 72,750 rows 2 variables: Code ICD-10-CM diagnostic code Description Description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd10cm_2022.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-10-CM Diagnostic Codes, 2022 Version — icd10cm_2022","text":"R code used download process dataset CDC website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":null,"dir":"Reference","previous_headings":"","what":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"dataset containing version ICD-9 codes effective October 1, 2014.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"","code":"icd9_2015"},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"data frame 14,567 rows 3 variables: Code ICD-9 diagnostic code Long_description Long description code Short_description Short description code","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"CMS.gov Website: https://www.cms.gov/Medicare/Coding/ICD9ProviderDiagnosticCodes/codes.html","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/icd9_2015.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"ICD-9 Diagnostic Codes, 2015 Version (v32) — icd9_2015","text":"R code used download process dataset CMS.gov website available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":null,"dir":"Reference","previous_headings":"","what":"Adult same-day discharges, 2010 — nhds2010","title":"Adult same-day discharges, 2010 — nhds2010","text":"dataset containing adult -day discharges 2010, obtained Stata 17.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adult same-day discharges, 2010 — nhds2010","text":"","code":"nhds2010"},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Adult same-day discharges, 2010 — nhds2010","text":"data frame 2,210 rows 15 variables: ageu Units age age Age sex Sex race Race month Discharge month status Discharge status region Region atype Type admission dx1 Diagnosis 1, ICD9-CM dx2 Diagnosis 2, ICD9-CM dx3 Diagnosis 3, ICD9-CM, imported incorrectly dx3corr Diagnosis 3, ICD9-CM, corrected pr1 Procedure 1 wgt Frequency weight recid Order record (raw data)","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/nhds2010.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Adult same-day discharges, 2010 — nhds2010","text":"R code used download process dataset Stata available .","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"simple function simulate ICD-10 ICD-9 diagnostic codes random.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"","code":"sample_diag(n = 1, version = \"ICD10_2011\")"},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"n Number ICD codes simulate. version version ICD coding scheme use. Possible choices ICD10_2009, ICD10_2011, ICD9_2015; defaults ICD10_2011. See icd10_2009, icd10_2011, icd9_2015 information different schemes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"vector n ICD diagnostic codes.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/sample_diag.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate ICD-10 and ICD-9 diagnostic codes — sample_diag","text":"","code":"# Simulate 10 ICD-10 codes sample_diag(10) #> [1] \"D682\" \"R454\" \"G308\" \"R90\" \"N350\" \"S064\" \"V435\" \"V795\" \"M356\" \"R073\" # Simulate a tidy dataset with 15 individuals and 200 rows set.seed(1) x <- data.frame( id = sample(1:15, size = 200, replace = TRUE), code = sample_diag(n = 200), stringsAsFactors = FALSE ) head(x) #> id code #> 1 9 P23 #> 2 4 B942 #> 3 7 K764 #> 4 1 I950 #> 5 2 V549 #> 6 13 N90"},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute (weighted) comorbidity scores — score","title":"Compute (weighted) comorbidity scores — score","text":"Compute (weighted) comorbidity scores","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute (weighted) comorbidity scores — score","text":"","code":"score(x, weights = NULL, assign0)"},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute (weighted) comorbidity scores — score","text":"x object class comorbidty returned call comorbidity() function. weights string denoting weighting system used, depend mapping algorithm. Possible values Charlson index : charlson, original weights Charlson et al. (1987); quan, revised weights Quan et al. (2011). Possible values Elixhauser score : vw, weights van Walraven et al. (2009); swiss, Swiss Elixhauser weights Sharma et al. (2021). Defaults NULL, case unweighted score used. assign0 logical value denoting whether apply hierarchy comorbidities: comorbidity present patient different degrees severity, milder form assigned value 0 calculating score. , type comorbidity counted patient. assign0 = TRUE, comorbidities affected argument : \"Mild liver disease\" (mld) \"Moderate/severe liver disease\" (msld) Charlson score; \"Diabetes\" (diab) \"Diabetes complications\" (diabwc) Charlson score; \"Cancer\" (canc) \"Metastatic solid tumour\" (metacanc) Charlson score; \"Hypertension, uncomplicated\" (hypunc) \"Hypertension, complicated\" (hypc) Elixhauser score; \"Diabetes, uncomplicated\" (diabunc) \"Diabetes, complicated\" (diabc) Elixhauser score; \"Solid tumour\" (solidtum) \"Metastatic cancer\" (metacanc) Elixhauser score.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute (weighted) comorbidity scores — score","text":"numeric vector (possibly weighted) comorbidity score subject input dataset.","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute (weighted) comorbidity scores — score","text":"Charlson , Pompei P, Ales KL, et al. new method classifying prognostic comorbidity longitudinal studies: development validation. Journal Chronic Diseases 1987; 40:373-383. Quan H, Li B, Couris CM, et al. Updating validating Charlson Comorbidity Index Score risk adjustment hospital discharge abstracts using data 6 countries. American Journal Epidemiology 2011; 173(6):676-682. van Walraven C, Austin PC, Jennings , Quan H Forster AJ. modification Elixhauser comorbidity measures point system hospital death using administrative data. Medical Care 2009; 47(6):626-633. Sharma N, Schwendimann R, Endrich O, et al. Comparing Charlson Elixhauser comorbidity indices different weightings predict -hospital mortality: analysis national inpatient data. BMC Health Services Research 2021; 21(13).","code":""},{"path":"https://ellessenne.github.io/comorbidity/reference/score.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute (weighted) comorbidity scores — score","text":"","code":"set.seed(1) x <- data.frame( id = sample(1:15, size = 200, replace = TRUE), code = sample_diag(200), stringsAsFactors = FALSE ) # Charlson score based on ICD-10 diagnostic codes: x1 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) score(x = x1, weights = \"charlson\", assign0 = FALSE) #> [1] 2 6 0 2 0 0 4 0 3 2 0 0 3 0 2 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" #> attr(,\"weights\") #> [1] \"charlson\" # Elixhauser score based on ICD-10 diagnostic codes: x2 <- comorbidity(x = x, id = \"id\", code = \"code\", map = \"elixhauser_icd10_quan\", assign0 = FALSE) score(x = x2, weights = \"vw\", assign0 = FALSE) #> [1] 4 -1 0 0 0 0 22 0 4 4 0 2 4 0 4 #> attr(,\"map\") #> [1] \"elixhauser_icd10_quan\" #> attr(,\"weights\") #> [1] \"vw\" # Checking the `assign0` argument. # Please make sure to check the example in the documentation of the # `comorbidity()` function first, with ?comorbidity(). # We use the same dataset for a single subject with two codes, for # complicated and uncomplicated diabetes: x3 <- data.frame( id = 1, code = c(\"E100\", \"E102\"), stringsAsFactors = FALSE ) # Then, we calculate the Quan-ICD10 Charlson score: ccF <- comorbidity(x = x3, id = \"id\", code = \"code\", map = \"charlson_icd10_quan\", assign0 = FALSE) ccF[, c(\"diab\", \"diabwc\")] #> diab diabwc #> 1 1 1 # If we calculate the unweighted score with `assign0 = FALSE`, both diabetes # conditions are counted: score(x = ccF, assign0 = FALSE) #> [1] 2 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\" # Conversely, with `assign0 = TRUE`, only the most severe is considered: score(x = ccF, assign0 = TRUE) #> [1] 1 #> attr(,\"map\") #> [1] \"charlson_icd10_quan\""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-development-version","dir":"Changelog","previous_headings":"","what":"comorbidity (development version)","title":"comorbidity (development version)","text":"Added second version ICD10-score including U codes “increases capture chronic conditions 15-fold”, according Australian Institute Health Welfare (#72, thanks @DesiQuintans contributing ); Updated Swedish version Charlson comorbidity score according corrigendum published online : https://doi.org/10.2147/CLEP.S425901; Removed startup message highlighting changes package API introduced {comorbidity} 1.0.0; Updated hex sticker.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-107","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.7","title":"comorbidity 1.0.7","text":"CRAN release: 2023-05-01 Identified (adjusted) tests spuriously fail.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-106","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.6","title":"comorbidity 1.0.6","text":"Adjusted name weights (leftover #53, thanks @sciatro reporting ). bug seem affect calculation. Updated CITATION file use new interface. internal housekeeping (removed old documentation, updated GitHub actions new version, etc.).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-105","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.5","title":"comorbidity 1.0.5","text":"CRAN release: 2022-09-26 Adjusted tests spuriously failing CRAN.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-104","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.4","title":"comorbidity 1.0.4","text":"Updated maintainer e-mail. Updated hex sticker. Improved documentation arguments comorbidity() score() functions (#61, thanks @dsjoho). Fixed broken references old vignettes’ names (#61, thanks @dsjoho). Overall, package documentation tidied bunch. startup message pointing changes API now appears less often (10% probability).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-103","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.3","title":"comorbidity 1.0.3","text":"CRAN release: 2022-07-12 Fixed bug allowed ID columns numeric (#55, thanks @norihikorihiko reporting ).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-102","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.2","title":"comorbidity 1.0.2","text":"CRAN release: 2022-04-06 copd ami comorbidities Charlson index renamed cpd mi, respectively (#53, thanks @DrYan1102). Please aware might break old code selecting comorbidities name. New dataset: ICD10-CM, 2022 version, named icd10cm_2022.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-101","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.1","title":"comorbidity 1.0.1","text":"startup message pointing changes API now appears less often (40% probability). Fixed bug causing comorbidities assigned value one missing data code column (#50), thanks @Chris-M-P reporting .","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-100","dir":"Changelog","previous_headings":"","what":"comorbidity 1.0.0","title":"comorbidity 1.0.0","text":"CRAN release: 2022-01-17 comorbidity version 1.0.0 release substantially modifies updates package API. lot improvements terms performance, supported algorithms, user-facing functions; see e.g. thread GitHub. Specific user-facing changes, including examples new API, discussed detail : https://ellessenne.github.io/comorbidity/articles/C-changes.html required, can revert previous release installing GitHub: remotes::install_github(\"ellessenne/comorbidity@0.5.3\"). startup message pointing changes API now displayed 50% probability attaching package removed future releases. New contributors: Sing Yi Chia Edmund Teo.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-053","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.3","title":"comorbidity 0.5.3","text":"CRAN release: 2020-01-09 comorbidity now accepts data.table objects input (#23); comorbidity can deal non-syntactically valid names (#25); Fixed coding typo vignette (#10, #26); Reduced number random tests, R CMD check taking long platforms getting killed CRAN (reported Kurt Hornik).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-052","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.2","title":"comorbidity 0.5.2","text":"CRAN release: 2019-10-20 Fixed another bug introduced switch data.table occurred input dataset extra columns id code.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-051","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.1","title":"comorbidity 0.5.1","text":"CRAN release: 2019-10-16 melt generic data.table deprecated; dependency reshape2 now removed; Fixed bugs introduced switching data.table comorbidity 0.5.0: column names id code expecting specific names, now fixed behaves expected.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-050","dir":"Changelog","previous_headings":"","what":"comorbidity 0.5.0","title":"comorbidity 0.5.0","text":"CRAN release: 2019-08-20 comorbidity now 10+ times faster, thanks Jonathan Williman contributing code based data.table package; Fixed typo vignette regarding weighting algorithm AHRQ Elixhauser comorbidity score (#14, thanks @cornflakegrl); Added pkgdown website: https://ellessenne.github.io/comorbidity.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-041","dir":"Changelog","previous_headings":"","what":"comorbidity 0.4.1","title":"comorbidity 0.4.1","text":"CRAN release: 2019-06-27 Fixed bug regex patterns (#10, thanks @francisco003 reporting @salmasian pull request).","code":""},{"path":[]},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"BREAKING CHANGES","title":"comorbidity 0.4.0","text":"Modified behaviour assign0 argument discussion Anders Alexandersson Issue #9: now default, forcing user decide whether apply hierarchy comorbidity codes . make algorithm transparent end user, allowing informed choice. See ?comorbidity::comorbidity vignette(\"comorbidityscores\", package = \"comorbidity\") details hierarchy applied.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-030","dir":"Changelog","previous_headings":"","what":"comorbidity 0.3.0","title":"comorbidity 0.3.0","text":"CRAN release: 2019-03-22","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"breaking-changes-0-3-0","dir":"Changelog","previous_headings":"","what":"BREAKING CHANGES","title":"comorbidity 0.3.0","text":"comorbidity now returns two Elixhauser scores, one computed using algorithm van Walraven et al. (2009) second one computed using AHRQ algorithm (Moore et al., 2017). Thanks Yumiko Abe-Jones feedback discussion regarding weighted Elixhauser scores. information can found package vignette: vignette(\"comorbidityscores\", package = \"comorbidity\").","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-021","dir":"Changelog","previous_headings":"","what":"comorbidity 0.2.1","title":"comorbidity 0.2.1","text":"Fixed bug weighting algorithm Elixhauser comorbidity score; assign0 argument comorbidity now defaults FALSE; assign0 now explains details hierarchy comorbidities applied; added reference package vignette comorbidity scores weighting algorithms explained detail.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-020","dir":"Changelog","previous_headings":"","what":"comorbidity 0.2.0","title":"comorbidity 0.2.0","text":"CRAN release: 2018-10-08 comorbidity faster, conservative estimated speed->60%; Lots internal housekeeping; Fixed broken GitHub links R script used generate datasets bundled comorbidity.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"breaking-changes-0-2-0","dir":"Changelog","previous_headings":"","what":"BREAKING CHANGES","title":"comorbidity 0.2.0","text":"score argument comorbidity split score icd. instance, command comorbidity(x = x, id = \"id\", code = \"code\", score = \"charlson_icd10\") modified r comorbidity(x = x, id = \"id\", code = \"code\", score = \"charlson\", icd = \"icd10\"). default value icd icd10, ICD-10 codes, possible values icd10 icd9.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-013","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.3","title":"comorbidity 0.1.3","text":"Added nhds2010 australia10 datasets, imported Stata version 15. Bug fix: * Fixed bug regex ICD10 Charlson score; * Fixed bug regex ICD10 Elixhauser score.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-012","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.2","title":"comorbidity 0.1.2","text":"Added ICD10-CM data (version 2017 2018).","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-011","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.1","title":"comorbidity 0.1.1","text":"CRAN release: 2018-03-30 Documented variables missing among returned comorbidity() (@corinne-riddell, #5); Added CITATION file: citation(\"comorbidity\") now returns properly formatted entry.","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-010","dir":"Changelog","previous_headings":"","what":"comorbidity 0.1.0","title":"comorbidity 0.1.0","text":"CRAN release: 2018-03-07 Added support ICD-9-CM version Charlson Elixhauser scores Added vignette information scores computed comorbidity sample_diag_icd10() function renamed back sample_diag(), now can simulate ICD-9-CM codes ","code":""},{"path":"https://ellessenne.github.io/comorbidity/news/index.html","id":"comorbidity-003","dir":"Changelog","previous_headings":"","what":"comorbidity 0.0.3","title":"comorbidity 0.0.3","text":"CRAN release: 2018-01-08 Added datasets icd10_2009 icd10_2011 ICD-10 codes, 2009 2011 versions (respectively) sample_diag now sample_diag_icd10 simulates proper ICD-10 codes Added Elixhauser comorbidity score Renamed package comorbidity now can compute just Charlson score Added formal testing: codes Charlson score properly identified Added formal testing: codes Elixhauser score properly identified","code":""}]