PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "Examination" (
"ID" INT,
"Examination Date" DATE,
"Diagnosis" TEXT,
"Symptoms" TEXT,
FOREIGN KEY ("ID") REFERENCES "Patient"("ID")
);

CREATE TABLE "Laboratory" (
"ID" INT,
"Date" DATE,
PRIMARY KEY ("ID", "Date")
);

CREATE TABLE "Patient" (
"ID" INT UNIQUE,
"Description" DATE,
"First Date" DATE,
"Diagnosis" TEXT,
PRIMARY KEY ("ID")
);



INSERT INTO "Patient" VALUES ("1", "1996-05-10", "1996-05-10", "Hypertension");
INSERT INTO "Patient" VALUES ("2", "1997-03-15", "1997-03-15", "Behcets Disease");
INSERT INTO "Patient" VALUES ("3", "1997-09-20", "1997-09-20", "Diabetes");
INSERT INTO "Patient" VALUES ("4", "1997-11-01", "1997-11-01", "Behcets Disease");
INSERT INTO "Patient" VALUES ("5", "1998-01-05", "1998-01-05", "Asthma");
INSERT INTO "Patient" VALUES ("6", "1997-07-07", "1997-07-07", "Behcets Disease");
INSERT INTO "Patient" VALUES ("7", "1997-02-28", "1997-02-28", "Migraine");
INSERT INTO "Patient" VALUES ("8", "1997-12-25", "1997-12-25", "Behcets Disease");
INSERT INTO "Patient" VALUES ("9", "1996-11-11", "1996-11-11", "Behcets Disease");
INSERT INTO "Patient" VALUES ("10", "1998-03-01", "1998-03-01", "Behcets Disease");
INSERT INTO "Examination" VALUES ("1", "1996-05-10", "Hypertension", "Headache");
INSERT INTO "Examination" VALUES ("2", "1997-03-15", "Behcets Disease", "Oral ulcers, Genital ulcers");
INSERT INTO "Examination" VALUES ("3", "1997-09-20", "Diabetes", "Frequent urination");
INSERT INTO "Examination" VALUES ("4", "1997-11-01", "Behcets Disease", "Skin lesions, Eye inflammation");
INSERT INTO "Examination" VALUES ("5", "1998-01-05", "Asthma", "Wheezing");
INSERT INTO "Examination" VALUES ("6", "1997-07-07", "Behcets Disease", "Arthritis, Oral ulcers");
INSERT INTO "Examination" VALUES ("7", "1997-02-28", "Migraine", "Severe headache");
INSERT INTO "Examination" VALUES ("8", "1997-12-25", "Behcets Disease", "Vascular lesions");
INSERT INTO "Examination" VALUES ("9", "1996-11-11", "Behcets Disease", "Oral ulcers");
INSERT INTO "Examination" VALUES ("10", "1998-03-01", "Behcets Disease", "Neurological symptoms");
INSERT INTO "Laboratory" VALUES ("1", "1996-05-10");
INSERT INTO "Laboratory" VALUES ("2", "1997-03-15");
INSERT INTO "Laboratory" VALUES ("3", "1997-09-20");
INSERT INTO "Laboratory" VALUES ("4", "1997-11-01");
INSERT INTO "Laboratory" VALUES ("5", "1998-01-05");
INSERT INTO "Laboratory" VALUES ("6", "1997-07-07");
INSERT INTO "Laboratory" VALUES ("7", "1997-02-28");
INSERT INTO "Laboratory" VALUES ("8", "1997-12-25");
INSERT INTO "Laboratory" VALUES ("9", "1996-11-11");
INSERT INTO "Laboratory" VALUES ("10", "1998-03-01");