MIT-LCP / mimic-code

MIMIC Code Repository: Code shared by the research community for the MIMIC family of databases
https://mimic.mit.edu
MIT License
2.59k stars 1.52k forks source link

Missing ICD9 codes from d_icd_diagnoses (that are in diagnoses_icd) #96

Closed mghassem closed 3 years ago

mghassem commented 8 years ago

There are some icd9_codes in diagnoses_icd are not in d_icd_diagnoses (144 out of 6985) and things in procedures_icd are not in d_icd_procedures (16 out of 2032).

SELECT count(t1.icd9_code) FROM (select distinct icd9_code from diagnoses_icd) t1 LEFT JOIN d_icd_diagnoses t2 ON t2.icd9_code = t1.icd9_code WHERE t2.icd9_code IS NULL;

count

144

If you look at one of those codes from diagnoses_icd: mimic=# select * from diagnoses_icd where icd9_code = '6009'; row_id | subject_id | hadm_id | seq_num | icd9_code --------+------------+---------+---------+----------- 256059 | 22983 | 138085 | 8 | 6009 (1 row)

mimic=# select * from d_icd_diagnoses where icd9_code = '6009'; row_id | icd9_code | short_title | long_title --------+-----------+-------------+------------ (0 rows)

tompollard commented 8 years ago

Thanks for highlighting this @mghassem.

The dictionaries (d_icd_diagnoses and d_icd_procedures) were sourced from: https://www.cms.gov/Medicare/Coding/ICD9ProviderDiagnosticCodes/codes.html.

A direct link to the dictionaries is: https://www.cms.gov/Medicare/Coding/ICD9ProviderDiagnosticCodes/Downloads/ICD-9-CM-v32-master-descriptions.zip

We'll investigate why some of the codes don't appear in them.

snovaisg commented 3 years ago

Problem still persists

alistairewj commented 3 years ago

We won't be able to fix this as they're not valid codes. For example 600.9 is a non-billable code for prostate cancer. The actual billable codes are 600.90 or 600.91.

snovaisg commented 3 years ago

Some of them are valid codes. The most frequent code that is missing from the icd9 table is actually a valid code: 5185. From a google search it seems to mean "Pulmonary insufficiency following trauma and surgery"

Screenshot 2020-12-02 at 13 31 12
alistairewj commented 3 years ago

Interesting! I'll take a look but we don't plan on releasing new versions for MIMIC-III. Any fixes would be in MIMIC-IV.

snovaisg commented 3 years ago

Would it be beneficial to MIMIC-IV if I added a commit with the remaining valid codes here?

alistairewj commented 3 years ago

I think identifying if the issue exists in MIMIC-IV and highlighting it over there would be very useful: https://github.com/MIT-LCP/mimic-iv/

For this repository - this would only (potentially) impact the comorbidity scores so that's where contributions would be useful.

alistairewj commented 3 years ago

similar to https://github.com/MIT-LCP/mimic-code/issues/841

this should be fixed in the latest version of mimic-iv - if it's not please feel free to raise a new issue!