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
);

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

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



INSERT INTO "Examination" VALUES ("2020-01-15");
INSERT INTO "Examination" VALUES ("2020-02-20");
INSERT INTO "Examination" VALUES ("2020-03-10");
INSERT INTO "Examination" VALUES ("2020-04-05");
INSERT INTO "Examination" VALUES ("2020-05-12");
INSERT INTO "Examination" VALUES ("2020-06-01");
INSERT INTO "Examination" VALUES ("2020-07-07");
INSERT INTO "Examination" VALUES ("2020-08-18");
INSERT INTO "Examination" VALUES ("2020-09-25");
INSERT INTO "Examination" VALUES ("2020-10-30");
INSERT INTO "Laboratory" VALUES ("1", "2020-01-16");
INSERT INTO "Laboratory" VALUES ("2", "2020-02-21");
INSERT INTO "Laboratory" VALUES ("3", "2020-03-11");
INSERT INTO "Laboratory" VALUES ("4", "2020-04-06");
INSERT INTO "Laboratory" VALUES ("5", "2020-05-13");
INSERT INTO "Laboratory" VALUES ("6", "2020-06-02");
INSERT INTO "Laboratory" VALUES ("7", "2020-07-08");
INSERT INTO "Laboratory" VALUES ("8", "2020-08-19");
INSERT INTO "Laboratory" VALUES ("9", "2020-09-26");
INSERT INTO "Laboratory" VALUES ("10", "2020-10-31");
INSERT INTO "Patient" VALUES ("1", "1935-05-10", "2019-11-01", "+");
INSERT INTO "Patient" VALUES ("2", "1932-01-20", "2020-01-05", "+");
INSERT INTO "Patient" VALUES ("3", "1938-09-15", "2019-12-10", "-");
INSERT INTO "Patient" VALUES ("4", "1945-03-25", "2020-02-15", "+");
INSERT INTO "Patient" VALUES ("5", "1930-11-01", "2020-03-01", "+");
INSERT INTO "Patient" VALUES ("6", "1939-07-07", "2020-04-10", "-");
INSERT INTO "Patient" VALUES ("7", "1950-02-14", "2020-05-01", "+");
INSERT INTO "Patient" VALUES ("8", "1933-04-04", "2020-06-01", "-");
INSERT INTO "Patient" VALUES ("9", "1937-08-22", "2020-07-01", "+");
INSERT INTO "Patient" VALUES ("10", "1940-12-31", "2020-08-01", "-");
INSERT INTO "Patient" VALUES ("11", "1929-06-01", "2020-09-01", "+");
INSERT INTO "Patient" VALUES ("12", "1941-01-01", "2020-10-01", "-");
INSERT INTO "Patient" VALUES ("13", "1936-03-10", "2020-11-01", "+");
INSERT INTO "Patient" VALUES ("14", "1931-09-20", "2020-12-01", "+");
INSERT INTO "Patient" VALUES ("15", "1934-07-12", "2021-01-01", "-");