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
|
-- create.sql
-------------------------------------------
-- Create the tables and MIMIC-IV schema --
-------------------------------------------
----------------------
-- Creating schemas --
----------------------
\echo '######################'
\echo 'Creating schemas.....'
DROP SCHEMA IF EXISTS mimiciv_cxr CASCADE;
CREATE SCHEMA mimiciv_cxr;
---------------------
-- Creating tables --
---------------------
\echo 'Creating mimiciv_cxr tables.....'
DROP TABLE IF EXISTS mimiciv_cxr.chexpert;
CREATE TABLE mimiciv_cxr.chexpert
(
"subject_id" int8,
"study_id" int8,
"Atelectasis" varchar(255),
"Cardiomegaly" varchar(255),
"Consolidation" varchar(255),
"Edema" varchar(255),
"Enlarged Cardiomediastinum" varchar(255),
"Fracture" varchar(255),
"Lung Lesion" varchar(255),
"Lung Opacity" varchar(255),
"No Finding" varchar(255),
"Pleural Effusion" varchar(255),
"Pleural Other" varchar(255),
"Pneumonia" varchar(255),
"Pneumothorax" varchar(255),
"Support Devices" varchar(255)
);
DROP TABLE IF EXISTS mimiciv_cxr.metadata;
CREATE TABLE mimiciv_cxr.metadata
(
"dicom_id" varchar(255),
"subject_id" int8,
"study_id" int8,
"PerformedProcedureStepDescription" varchar(255),
"ViewPosition" varchar(255),
"Rows" varchar(255),
"Columns" varchar(255),
"StudyDate" varchar(255),
"StudyTime" varchar(255),
"ProcedureCodeSequence_CodeMeaning" varchar(255),
"ViewCodeSequence_CodeMeaning" varchar(255),
"PatientOrientationCodeSequence_CodeMeaning" varchar(255)
);
DROP TABLE IF EXISTS mimiciv_cxr.negbio;
CREATE TABLE mimiciv_cxr.negbio
(
"subject_id" int8,
"study_id" int8,
"Atelectasis" varchar(255),
"Cardiomegaly" varchar(255),
"Consolidation" varchar(255),
"Edema" varchar(255),
"Enlarged Cardiomediastinum" varchar(255),
"Fracture" varchar(255),
"Lung Lesion" varchar(255),
"Lung Opacity" varchar(255),
"No Finding" varchar(255),
"Pleural Effusion" varchar(255),
"Pleural Other" varchar(255),
"Pneumonia" varchar(255),
"Pneumothorax" varchar(255),
"Support Devices" varchar(255)
);
DROP TABLE IF EXISTS mimiciv_cxr.split;
CREATE TABLE mimiciv_cxr.split
(
"dicom_id" varchar(255),
"study_id" int8,
"subject_id" int8,
"split" varchar(255)
);
|