-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLab_Data.sql
123 lines (114 loc) · 2.83 KB
/
Lab_Data.sql
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
create database Lab_Data;
use Lab_Data;
create table blood_test(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
WBC DECIMAL(5,2),
RBC DECIMAL(5,2),
HAEMOGLOBIN DECIMAL(5,2),
HEMATOCRIT DECIMAL(5,2),
MCV DECIMAL(5,2),
MCH DECIMAL(5,2),
MCHC DECIMAL(5,2),
RDW_CV DECIMAL(5,2),
PLATELET_COUNT DECIMAL(5,2),
MPV DECIMAL(5,2)
);
create table Urinalysis(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
COLOR_URINE VARCHAR(10),
PROTEIN_URINE VARCHAR(10),
GLUCOSE_URINE_IRIS VARCHAR(10),
KETONE_URINE VARCHAR(10),
BILIRUBIN_URINE VARCHAR(10),
NITRITE_URINE VARCHAR(10),
LEUKOCYTE_ESTERASE_URINE VARCHAR(10),
UROBILINOGEN_URINE DECIMAL(5,2),
PH_URINE DECIMAL(5,2)
);
create table thyroid(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
T4 DECIMAL(5,2),
T3 DECIMAL(5,2),
TSH DECIMAL(5,2)
);
create table diabetes(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
Fasting_Blood_Sugar DECIMAL(5,2),
Post_Prandial_Blood_Sugar DECIMAL(5,2),
HAEMOGLOBIN_A1c DECIMAL(5,2)
);
create table Sexual_Disease(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
Herpes_Simplex_1 VARCHAR(9) default "NEGATIVE",
Herpes_Simplex_2 VARCHAR(9) default "NEGATIVE",
HIV VARCHAR(9) default "NEGATIVE",
Chlamydia VARCHAR(9) default "NEGATIVE",
Gonorrhea VARCHAR(9) default "NEGATIVE",
Syphilis VARCHAR(9) default "NEGATIVE",
Hepatitis_A VARCHAR(9) default "NEGATIVE",
Hepatitis_B VARCHAR(9) default "NEGATIVE",
Hepatitis_C VARCHAR(9) default "NEGATIVE"
);
CREATE TABLE Cholesterol(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
Total_Cholesterol DECIMAL(5,2),
LDL_Cholesterol DECIMAL(5,2),
HDL_Cholesterol DECIMAL(5,2),
Triglycerides DECIMAL(5,2),
Non_HDL_Cholesterol DECIMAL(5,2),
TG_To_HDL_Ratio DECIMAL(5,2)
);
CREATE TABLE Drug(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
AMPHETAMINES INT,
BARBITURATES INT,
BENZODIAZEPINES INT,
COCAINE_METABOLITES INT,
MARIJUANA_METABOLITES INT,
MATHADONE INT,
METHAQUALONE INT,
OPIATES INT,
PHENCYCLIDINE INT,
PROPOXYPHENE INT
);
CREATE TABLE Allergy(
patient_id int primary key,
name varchar(40),
age INT,
sex varchar(7),
Scallop DECIMAL(5,2),
Cashew_Nut DECIMAL(5,2),
Egg_White DECIMAL(5,2),
Cow_Milk DECIMAL(5,2),
CodFish DECIMAL(5,2),
Wheat DECIMAL(5,2),
Sesame_Seed DECIMAL(5,2),
Peanut DECIMAL(5,2),
Soybean DECIMAL(5,2),
Almond DECIMAL(5,2),
Shrimp DECIMAL(5,2),
Tuna DECIMAL(5,2),
Salmon DECIMAL(5,2),
Walnut DECIMAL(5,2)
);