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.61k stars 1.53k forks source link

Overview on MIMIC-III #679

Closed JohannesWiesner closed 4 years ago

JohannesWiesner commented 4 years ago

I am interested in working with EHR data from psychiatric patients (specifically patients with schizophrenia). The MIMIC-III database seems very promising to me, however, it is not clear to me how to get a rough overview of this dataset and if it fits my needs. Is there an 'overview' feature that does this for me? I miss something like a frequency chart for psychiatric ICD-10 diagnoses to give me intuition about the number of psychiatric patients.

tompollard commented 4 years ago

There is no publicly available frequency chart for psychiatric ICD (-9) diagnoses in MIMIC, as far as I'm aware. You could explore the MIMIC-III demo to see whether you can find the information that you're interested in (https://physionet.org/content/mimiciii-demo/1.4/), but the small patient number might limit your insights. If you list some ICD-9 codes here, someone reading the issue may find the time to take a look.

JohannesWiesner commented 4 years ago

The demo dataset contains only data for "all intensive care unit (ICU) stays for 100 patients". So it is not useful in my case (i.e. get an overview about the number of psychiatric patients and their ICD-9 Codes: 290-319). For me, it would be very helpful to get an overview of ICD-diagnoses so that I can decide in advance if it makes sense for me to take the registration course.

For example, the signature databank offers such an overview.

tompollard commented 4 years ago

As a start, here is a quick query to pull out patients with this range of ICD-9 codes (ordered by number of distinct patients):

SELECT a.icd9_code, b.long_title, count(distinct a.subject_id) as n_patient, 
FROM `physionet-data.mimiciii_clinical.diagnoses_icd` a
LEFT JOIN `physionet-data.mimiciii_clinical.d_icd_diagnoses` b
ON a.icd9_code = b.icd9_code
WHERE a.ICD9_CODE BETWEEN '290%' and '319%'
GROUP BY a.icd9_code, b.long_title
ORDER BY count(distinct a.subject_id) DESC
LIMIT 40;
icd9_code long_title n_patient
3051 Tobacco use disorder 3001
311 Depressive disorder, not elsewhere classified 2926
30000 Anxiety state, unspecified 1452
2930 Delirium due to conditions classified elsewhere 1398
2948 Other persistent mental disorders due to conditions classified elsewhere 1026
30500 Alcohol abuse, unspecified 954
3004 Dysthymic disorder 928
29181 Alcohol withdrawal 675
30391 Other and unspecified alcohol dependence, continuous 653
30390 Other and unspecified alcohol dependence, unspecified 568
29410 Dementia in conditions classified elsewhere without behavioral disturbance 551
29680 Bipolar disorder, unspecified 507
30501 Alcohol abuse, continuous 388
30560 Cocaine abuse, unspecified 368
29281 Drug-induced delirium 361
30301 Acute alcoholic intoxication in alcoholism, continuous 301
2910 Alcohol withdrawal delirium 292
30393 Other and unspecified alcohol dependence, in remission 281
30401 Opioid type dependence, continuous 251
30981 Posttraumatic stress disorder 229
2967 Bipolar I disorder, most recent episode (or current) unspecified 187
29590 Unspecified schizophrenia, unspecified 182
30590 Other, mixed, or unspecified drug abuse, unspecified 177
30550 Opioid abuse, unspecified 174
2920 Drug withdrawal 167
29570 Schizoaffective disorder, unspecified 163
29620 Major depressive affective disorder, single episode, unspecified 158
29420 Dementia, unspecified, without behavioral disturbance 158
3079 Other and unspecified special symptoms or syndromes, not elsewhere classified 153
29040 Vascular dementia, uncomplicated 136
2939 Unspecified transient mental disorder in conditions classified elsewhere 130
319 Unspecified intellectual disabilities 129
31401 Attention deficit disorder with hyperactivity 121
30503 Alcohol abuse, in remission 112
2989 Unspecified psychosis 107
30001 Panic disorder without agoraphobia 104
30400 Opioid type dependence, unspecified 102
30520 Cannabis abuse, unspecified 95
29650 Bipolar I disorder, most recent episode (or current) depressed, unspecified 77
30300 Acute alcoholic intoxication in alcoholism, unspecified 77
JohannesWiesner commented 4 years ago

Thanks, that's a good start and in exactly what I wanted. Of course, it would still be practical, if this overview could be implemented as a feature in the future.