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

Van Walraven returns different scores #184

Open
bhbrantley opened this issue Sep 10, 2019 · 1 comment
Open

Van Walraven returns different scores #184

bhbrantley opened this issue Sep 10, 2019 · 1 comment

Comments

@bhbrantley
Copy link

Was going through testing Van Walraven scoring for ICD 10 code set and came about two different scores for same patient. Here is a test example to illustrate the problem.

I was operating under assumption that van_walraven() and van_walraven_from_comorbid() should both be producing the score, just using different input sets. The former would convert ICD codes to the comorbidities and then calculate the score; latter would take the comorbidities and then output the score. Am I misunderstanding the functions here? Using p64 in docs

dat <- data.frame(id = c(1,1,1,1,1), icd10 = c('F10.10', 'F13.10', 'F41.9', 'F11.10', 'J45.998'))

dat_codes <- icd10_comorbid_quan_elix(dat)

head(dat_codes)
   CHF Arrhythmia Valvular  PHTN   PVD   HTN Paralysis NeuroOther Pulmonary    DM  DMcx
1 FALSE      FALSE    FALSE FALSE FALSE FALSE     FALSE      FALSE      TRUE FALSE FALSE
  Hypothyroid Renal Liver   PUD   HIV Lymphoma  Mets Tumor Rheumatic Coagulopathy Obesity
1       FALSE FALSE FALSE FALSE FALSE    FALSE FALSE FALSE     FALSE        FALSE   FALSE
  WeightLoss FluidsLytes BloodLoss Anemia Alcohol Drugs Psychoses Depression
1      FALSE       FALSE     FALSE  FALSE    TRUE  TRUE     FALSE      FALSE
 
(dat_scores_1 <- van_walraven(dat))
1 
0 

(dat_scores_2 <- van_walraven_from_comorbid(dat_codes))
 1 
-4
@patrickmdnet
Copy link
Collaborator

The van_walraven function works for ICD-9 codes, as it uses icd9_comorbid_quan_elix() internally. See score.R#L347.

If you are using ICD-10 codes you cannot use van_walraven, you have to do the mapping and then use van_walraven_from_comorbid.

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