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" (
"Examination Date" DATE,
"Diagnosis" TEXT
);

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

CREATE TABLE "Patient" (
"ID" INT UNIQUE,
"SEX" TEXT,
"Admission" TEXT,
PRIMARY KEY ("ID")
);



INSERT INTO "Examination" VALUES ("2023-01-15", "Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-16", "No Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-17", "Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-18", "No Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-19", "Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-20", "No Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-21", "Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-22", "No Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-23", "Thrombosis");
INSERT INTO "Examination" VALUES ("2023-01-24", "No Thrombosis");
INSERT INTO "Laboratory" VALUES ("1", "2023-01-15");
INSERT INTO "Laboratory" VALUES ("2", "2023-01-16");
INSERT INTO "Laboratory" VALUES ("3", "2023-01-17");
INSERT INTO "Laboratory" VALUES ("4", "2023-01-18");
INSERT INTO "Laboratory" VALUES ("5", "2023-01-19");
INSERT INTO "Laboratory" VALUES ("6", "2023-01-20");
INSERT INTO "Laboratory" VALUES ("7", "2023-01-21");
INSERT INTO "Laboratory" VALUES ("8", "2023-01-22");
INSERT INTO "Laboratory" VALUES ("9", "2023-01-23");
INSERT INTO "Laboratory" VALUES ("10", "2023-01-24");
INSERT INTO "Patient" VALUES ("1", "M", "+");
INSERT INTO "Patient" VALUES ("2", "M", "-");
INSERT INTO "Patient" VALUES ("3", "F", "+");
INSERT INTO "Patient" VALUES ("4", "M", "+");
INSERT INTO "Patient" VALUES ("5", "F", "-");
INSERT INTO "Patient" VALUES ("6", "M", "-");
INSERT INTO "Patient" VALUES ("7", "M", "+");
INSERT INTO "Patient" VALUES ("8", "F", "+");
INSERT INTO "Patient" VALUES ("9", "M", "-");
INSERT INTO "Patient" VALUES ("10", "M", "+");
INSERT INTO "Patient" VALUES ("11", "M", "+");
INSERT INTO "Patient" VALUES ("12", "M", "-");
INSERT INTO "Patient" VALUES ("13", "M", "+");
INSERT INTO "Patient" VALUES ("14", "M", "-");
INSERT INTO "Patient" VALUES ("15", "M", "+");