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

Many admissions do not have dx code #997

Closed
yugangjia opened this issue Sep 9, 2020 · 2 comments
Closed

Many admissions do not have dx code #997

yugangjia opened this issue Sep 9, 2020 · 2 comments

Comments

@yugangjia
Copy link

Hi, I run the following query to count the number of admissions using icd9/icd10 code but found many admissions without dx code:

select p.anchor_year_group,icd_version, count(distinct ad.hadm_id) as ad_count from `physionet-data.mimic_core.admissions`  as ad
left join `physionet-data.mimic_hosp.diagnoses_icd` as dx
on ad.hadm_id = dx.hadm_id
left join `physionet-data.mimic_core.patients` as p
on p.subject_id = ad.subject_id 
group by icd_version, p.anchor_year_group 
order by p.anchor_year_group 
Row anchor_year_group icd_version ad_count  
1 2008 - 2010 10 36000  
2 2008 - 2010 null 74496 _  
3 2008 - 2010 9 120819  
4 2011 - 2013 9 96763  
5 2011 - 2013 null 1796  
6 2011 - 2013 10 23110  
7 2014 - 2016 10 54068  
8 2014 - 2016 9 42165  
9 2014 - 2016 null 2150  
10 2017 - 2019 10 70152  
11 2017 - 2019 null 3011  
@alistairewj
Copy link
Member

Hm, odd. Nothing jumps to mind about why this would happen but I'll look into it.

@alistairewj
Copy link
Member

This was caused by an internal data issue - we've since fixed the data pull and this is no longer an issue. For full transparency this issue affected the diagnoses_icd, procedures_icd, hcpcsevents, and drgcodes tables. https://mimic-iv.mit.edu/docs/overview/changelog/#mimic-iv-v10

Row anchor_year_group icd_version ad_count  
1 2008 - 2010 9 194705  
2 2008 - 2010 10 36157  
3 2008 - 2010 null 449  
4 2011 - 2013 9 97790  
5 2011 - 2013 10 23204  
6 2011 - 2013 null 371  
7 2014 - 2016 9 42881  
8 2014 - 2016 10 54736  
9 2014 - 2016 null 470  
10 2017 - 2019 10 71645  
11 2017 - 2019 null 1340  
12 2017 - 2019 9 2  

Thanks for the report!

@briangow briangow transferred this issue from MIT-LCP/mimic-iv May 14, 2021
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

3 participants