I have a dataset that contains 3-digit ICD-9 codes and I want to create a ICD9 description variable based on the 3 digit codes. Here is a code to replicate my dataset:
id=c(1:5);icdcode=c("786","401","780","300","V30");df=data.frame(id,icdcode)
I used the following code to create a new var "icd9.explain":
df$icd.explain=icd9ExplainShort(as.character(df$icdcode))
My resulting dataset looks like this:
> df
id icdcode icd.explain
1 1 786 Anxiety, dissociative and somatoform disorders
2 2 401 Anxiety, dissociative and somatoform disorders
3 3 780 Anxiety, dissociative and somatoform disorders
4 4 300 Anxiety, dissociative and somatoform disorders
5 5 V30 Anxiety, dissociative and somatoform disorders
Does anyone have an idea about how I can get the correct code explanations?
Thanks!!