Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Open
mghassem opened this Issue Jun 3, 2016 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

mghassem commented Jun 3, 2016

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)

Owner

tompollard commented Jun 3, 2016

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.

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