-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmimic_utils.py
More file actions
151 lines (151 loc) · 2.87 KB
/
mimic_utils.py
File metadata and controls
151 lines (151 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# MIMIC-III ICD9 top-50 codes
codes_50 = ['401.9',
'38.93',
'428.0',
'427.31',
'414.01',
'96.04',
'96.6',
'584.9',
'250.00',
'96.71',
'272.4',
'518.81',
'99.04',
'39.61',
'599.0',
'530.81',
'96.72',
'272.0',
'285.9',
'88.56',
'244.9',
'486',
'38.91',
'285.1',
'36.15',
'276.2',
'496',
'99.15',
'995.92',
'V58.61',
'507.0',
'038.9',
'88.72',
'585.9',
'403.90',
'311',
'305.1',
'37.22',
'412',
'33.24',
'39.95',
'287.5',
'410.71',
'276.1',
'V45.81',
'424.0',
'45.13',
'V15.82',
'511.9',
'37.23']
item_50 = ['Essential hypertension',
'Venous catheterization',
'Congestive heart failure',
'Atrial fibrillation',
'Coronary atherosclerosis of native coronary artery',
'Insertion of endotracheal tube',
'Enteral infusion of concentrated nutritional substances',
'Acute renal failure',
'type II diabetes mellitus',
'Continuous mechanical ventilation',
'hyperlipidemia',
'Acute respiratory failure',
'Transfusion of packed cells',
'Extracorporeal circulation auxiliary to open heart surgery',
'Urinary tract infection',
'Esophageal reflux',
'Continuous mechanical ventilation for 96 consecutive hours or more',
'Pure hypercholesterolemia',
'Anemia',
'Coronary arteriography using two catheters',
'Hypothyroidism',
'Pneumonia',
'Arterial catheterization',
'Acute posthemorrhagic anemia',
'Single internal mammary-coronary artery bypass',
'Acidosis',
'Chronic airway obstruction',
'Parenteral infusion of concentrated nutritional substances',
'Severe sepsis',
'Long-term (current) use of anticoagulants',
'Pneumonitis due to inhalation of food or vomitus',
'Septicemia',
'Diagnostic ultrasound of heart',
'Chronic kidney disease',
'Hypertensive renal disease',
'Depressive disorder',
'Tobacco use disorder',
'Left heart cardiac catheterization',
'Old myocardial infarction',
'Closed [endoscopic] biopsy of bronchus',
'Hemodialysis',
'Thrombocytopenia',
'Acute myocardial infarction, subendocardial infarction',
'Hyposmolality and/or hyponatremia',
'Postsurgical aortocoronary bypass status',
'Mitral valve disorders',
'Endoscopy of small intestine',
'History of tobacco use',
'Pleural effusion',
'Combined right and left heart cardiac catheterization']
code2id = {'401.9': 0,
'38.93': 1,
'428.0': 2,
'427.31': 3,
'414.01': 4,
'96.04': 5,
'96.6': 6,
'584.9': 7,
'250.00': 8,
'96.71': 9,
'272.4': 10,
'518.81': 11,
'99.04': 12,
'39.61': 13,
'599.0': 14,
'530.81': 15,
'96.72': 16,
'272.0': 17,
'285.9': 18,
'88.56': 19,
'244.9': 20,
'486': 21,
'38.91': 22,
'285.1': 23,
'36.15': 24,
'276.2': 25,
'496': 26,
'99.15': 27,
'995.92': 28,
'V58.61': 29,
'507.0': 30,
'038.9': 31,
'88.72': 32,
'585.9': 33,
'403.90': 34,
'311': 35,
'305.1': 36,
'37.22': 37,
'412': 38,
'33.24': 39,
'39.95': 40,
'287.5': 41,
'410.71': 42,
'276.1': 43,
'V45.81': 44,
'424.0': 45,
'45.13': 46,
'V15.82': 47,
'511.9': 48,
'37.23': 49}