ellessenne / comorbidity

An R package for computing comorbidity scores.
https://ellessenne.github.io/comorbidity/
GNU General Public License v3.0
80 stars 21 forks source link

ICD-10-AM codes for Charlson Score #36

Closed torema-ed closed 3 years ago

torema-ed commented 3 years ago

Hi @ellessenne, my colleague @SY-CHIA found your package when she was looking for a package to calculate Charlson score with ICD diagnosis codes. As our institution is currently using ICD-10-AM and we aren't too sure how different it is from ICD-10 and ICD-10-CM so she took snippets from this package and modified them using the codes from Sundararajan et al, 2004 for an urgent task.

We thought it would be useful to add the mappings into comorbidity as there is an increasing demand for it in our institution so I integrated her revised snippets here.

There was a small issue with C80 appearing in both cancer and metastatic cancer in the manuscript but it caused the tests to fail. I conservatively included it only in metastatic cancer since it has a higher importance and weights over cancer.

This is my very first PR so please do let me know if any changes are required or if commits should have been squashed to make things neater.

ellessenne commented 3 years ago

Hi @torema-ed, thanks for the PR, I very much appreciate it. I am in the process of re-factoring the API of the package, so I am gonna keep this on hold for a little longer while I finish working on the internals, if that's ok for you. Would you mind adding yourself (and/or your colleague @SY-CHIA) to the contributors list (in the DESCRIPTION file) to acknowledge your contribution? If so, could you please push another commit to this PR? Thanks!

torema-ed commented 3 years ago

Sure, I'll add in one more test (missed out testing a line) and add ourselves to the contributors list.

Thank you!

ellessenne commented 3 years ago

Hi @torema-ed, could you please update this PR to the new API that was just merged? In order to do so, all you need to do is update/add the mapping to data-raw/make-mapping.R; I would suggest charlson_icd10_am for the name, if that's ok with you? Then, could you please add extra tests, e.g. following the structure in tests/testthat/test-charlson-icd10-quan.R? Many thanks in advance,

Alessandro

torema-ed commented 3 years ago

Ok, I'll see if i can try to pull the changes from #38 into my fork and make the changes.

I'll try to get it done by this weekend.

ellessenne commented 3 years ago

Thanks! You should be able to fork again from master to have an up-to-date version (#38 was merged). Also, just a heads up: be aware that I am working on #40 at the moment, which I will merge when ready.

torema-ed commented 3 years ago

Ok, it is probably a whole lot easier to start from scratch than to try and resolve the conflict.

torema-ed commented 3 years ago

41 is the PR created for the revised API.

Closing this as it is no longer relevant.