Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for latest AHRQ Elixhauser comorbidity calculation #28

Open
salmasian opened this issue Apr 27, 2020 · 4 comments
Open

Add support for latest AHRQ Elixhauser comorbidity calculation #28

salmasian opened this issue Apr 27, 2020 · 4 comments

Comments

@salmasian
Copy link
Contributor

The way the package calculates the Elixhauser comorbidity is based on previously published literature (Quan et al. and Moore et al.) which is dated. AHRQ continues to update the algorithm every year. While one could use the SAS program from HCUP, it would be ideal to make comorbidity the R equivalent of it and keep it up to date.

Other related issues are:

  • The score (wscore) calculated by comorbidity is only one of the two scores from Moore et al. (it is the mortality score; there also exists a readmission score). We should allow users to choose which score they want. Alternatively, we should return both, and name the output more accurately (e.g. wscore_ahrq_moratlity)
  • To name the output ahrq is a bit of a stretch, because current AHRQ algorithm is not what the R code returns. Perhaps we should name it more accurate, e.g. wscore_moore and then have an additional choice in the comorbidity() function's method argument to return the 2019 or 2020 versions which returns wscore_ahrq.
  • The newer AHRQ algorithms don't just rely on ICD codes, but also look at DRG codes to capture certain commodities. We should add an optional drg argument which names the column that stores the DRG value, and would only be required if the choice of method is elixhauser_ahrq.
  • The carit comorbidity has been dropped by AHRQ's latest code altogether.

Of note, my colleague has already created a fork at https://github.com/fiksdala/comorbidity and is working on it. The fork includes a script that can parse the SAS code and automatically generate the corresponding R code. It might be a good idea to use this Issue here to decide on the naming conventions, etc.

@ellessenne
Copy link
Owner

Hi @salmasian, thanks for the heads-up.
I have been discussing with @jackwasey about merging comorbidity and icd to drive development together and we have several ideas on how to go forward with this.
I agree that keeping scores as up-to-date as possible would be great, definitely something we should aim for.
I hope to be able to start working on this with @jackwasey soon!

@salmasian
Copy link
Contributor Author

@ellessenne just so you know, my colleague @fiksdala has already created a fork and addressed this issue. He recently updated his fork to improve documentation. The PR may not be 100% ready, but is close. I will ask him to submit the PR and hopefully we can get it merged soon.

Of note, his PR also includes a script that can take the SAS code from AHRQ, whenever it is updated (annually), and rebuild the corresponding R code. So maintaining a current version is going to be easy.

@salmasian
Copy link
Contributor Author

@ellessenne another update on this: AHRQ's 2021 definitions are substantially different from the prior years. Alex is restructuring the code to make it amenable to such changes. This PR should not be merged for now, and will be updated later.

@ellessenne
Copy link
Owner

Thanks, I might release a new version soon with minor (albeit breaking) changes, see #32.
I have been thinking about how to implement the PR from @fiksdala without creating a vastly different API, and I have some ideas. I think it would be better implemented by re-factoring the codebase and including some of the under-the-hood changes I've been talking about previously.
Let's keep talking. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants