Hi everyone
I have a data set with approximately 30 000 observations and need to search through diagnoses and procedure codes to identify and count diseases from these observation. When I do my first check to see if all the icd10 codes are valid since my data was coded in icd10, I get some which are invalid or too long. All codes with 5 or more characters are retuned as too long even though such codes exist in the icd coding system. I have installed mycd10 which should contain the latest update of the quotes. Although when I try to use mycd10 I get an error that "mycd10_cod.dta" not found
Does anyone know of the right way of trimming the 5 character codes into 4 but still get the correct diagnoses associated with the codes, as I'm assuming that could solve the problem. At this stage I can not continue with any of the other commands because of the error " diag1 contains invalid codes".
Once I drop all invalid codes and try to generate loops for all codes using range i do get the correct results.
Example of commands I used
icd10 check diag1, generate (invalid)
tab invalid [ results - Defined code, code too long, code not define]
icd10 generate cancer = diag1, range (C*D*)
icd10 generate diabetes = diag 1, range (E10*)
Thank you,
Momo Pule
I have a data set with approximately 30 000 observations and need to search through diagnoses and procedure codes to identify and count diseases from these observation. When I do my first check to see if all the icd10 codes are valid since my data was coded in icd10, I get some which are invalid or too long. All codes with 5 or more characters are retuned as too long even though such codes exist in the icd coding system. I have installed mycd10 which should contain the latest update of the quotes. Although when I try to use mycd10 I get an error that "mycd10_cod.dta" not found
Does anyone know of the right way of trimming the 5 character codes into 4 but still get the correct diagnoses associated with the codes, as I'm assuming that could solve the problem. At this stage I can not continue with any of the other commands because of the error " diag1 contains invalid codes".
Once I drop all invalid codes and try to generate loops for all codes using range i do get the correct results.
Example of commands I used
icd10 check diag1, generate (invalid)
tab invalid [ results - Defined code, code too long, code not define]
icd10 generate cancer = diag1, range (C*D*)
icd10 generate diabetes = diag 1, range (E10*)
Thank you,
Momo Pule