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" (
"Diagnosis" TEXT
);

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

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



INSERT INTO "Examination" VALUES ("DVT");
INSERT INTO "Examination" VALUES ("PE");
INSERT INTO "Examination" VALUES ("No thrombosis");
INSERT INTO "Laboratory" VALUES ("1", "1997-01-15");
INSERT INTO "Laboratory" VALUES ("2", "1997-06-20");
INSERT INTO "Laboratory" VALUES ("3", "1998-03-10");
INSERT INTO "Laboratory" VALUES ("4", "1997-12-05");
INSERT INTO "Laboratory" VALUES ("5", "1996-11-30");
INSERT INTO "Patient" VALUES ("1", "F", "1997-02-10", "1997-02-10", "-");
INSERT INTO "Patient" VALUES ("2", "F", "1997-07-22", "1997-07-22", "-");
INSERT INTO "Patient" VALUES ("3", "M", "1997-03-15", "1997-03-15", "-");
INSERT INTO "Patient" VALUES ("4", "F", "1997-05-05", "1997-05-05", "inpatient");
INSERT INTO "Patient" VALUES ("5", "F", "1996-12-31", "1996-12-31", "-");
INSERT INTO "Patient" VALUES ("6", "F", "1997-11-11", "1997-11-11", "-");
INSERT INTO "Patient" VALUES ("7", "M", "1997-08-08", "1997-08-08", "-");
INSERT INTO "Patient" VALUES ("8", "F", "1998-01-01", "1998-01-01", "-");
INSERT INTO "Patient" VALUES ("9", "F", "1997-04-04", "1997-04-04", "inpatient");
INSERT INTO "Patient" VALUES ("10", "F", "1997-09-09", "1997-09-09", "-");