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

Description of icd_parse() #21

Open
DdeSordi opened this issue Dec 21, 2021 · 3 comments
Open

Description of icd_parse() #21

DdeSordi opened this issue Dec 21, 2021 · 3 comments

Comments

@DdeSordi
Copy link

Hi
I think there is an issue in the description of the icd_parse() function.
It is described that there is an output of icd_norm but in the icd_parse() function there is one called icd_spec that is the same as icd_norm. Or am i wrong here.

@edonnachie
Copy link
Owner

Thank you, the documentation is incorrect here.

To get the normcode or other attributes, you can join with ICD10gm::icd_meta_codes as follows:

ICD10gm::icd_parse(c(
  "Backpain (M54.9) is one of the most common diagnoses in primary care",
  "Codes for chronic pain include R52.1 and F45.4"
  ))%>%
  left_join(
    ICD10gm::icd_meta_codes %>% 
      filter(year == 2021) %>% 
      select(icd_sub, icd_normcode, label),
    by = c("icd_sub"))

I will correct for the next release.

@DdeSordi
Copy link
Author

Thank you, the documentation is incorrect here.

To get the normcode or other attributes, you can join with ICD10gm::icd_meta_codes as follows:

ICD10gm::icd_parse(c(
  "Backpain (M54.9) is one of the most common diagnoses in primary care",
  "Codes for chronic pain include R52.1 and F45.4"
  ))%>%
  left_join(
    ICD10gm::icd_meta_codes %>% 
      filter(year == 2021) %>% 
      select(icd_sub, icd_normcode, label),
    by = c("icd_sub"))

I will correct for the next release.

So icd_spec that is an output of icd_parse is not icd_norm?
icd_spec==icd_norm ???

@edonnachie
Copy link
Owner

Yes, icd_spec is the specification (i.e. what was provided to the function).

The icd_parse function originated separately from the rest of the package (I needed to extract ICD codes from a booklet). It was then "hardened" and used as a basis for icd_expand, for which I needed the icd_sub format (i.e. full ICD-10 code without punctuation).

It might be a good idea to include the icd_norm (the ICD-10 normcode) in the output of icd parse too. I'll consider this for the next release.

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

No branches or pull requests

2 participants