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" (
"Thrombosis" INT
);

CREATE TABLE "Laboratory" (
"ID" INT,
"Date" DATE,
"HGB" FLOAT,
"PLT" INT,
PRIMARY KEY ("ID", "Date"),
FOREIGN KEY ("ID") REFERENCES "Patient"("ID")
);

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



INSERT INTO "Patient" VALUES ("1", "M", "1934-06-15");
INSERT INTO "Patient" VALUES ("2", "F", "1935-12-01");
INSERT INTO "Patient" VALUES ("3", "M", "1936-01-20");
INSERT INTO "Patient" VALUES ("4", "F", "1937-11-30");
INSERT INTO "Patient" VALUES ("5", "M", "1933-05-05");
INSERT INTO "Patient" VALUES ("6", "F", "1939-07-22");
INSERT INTO "Patient" VALUES ("7", "M", "1935-12-31");
INSERT INTO "Patient" VALUES ("8", "F", "1940-02-28");
INSERT INTO "Patient" VALUES ("9", "M", "1920-03-15");
INSERT INTO "Patient" VALUES ("10", "F", "1950-08-10");
INSERT INTO "Laboratory" VALUES ("1", "1984-03-10", "13.5", "100");
INSERT INTO "Laboratory" VALUES ("2", "1984-07-15", "14.2", "400");
INSERT INTO "Laboratory" VALUES ("3", "1984-05-20", "12.8", "250");
INSERT INTO "Laboratory" VALUES ("4", "1984-12-01", "13.0", "99");
INSERT INTO "Laboratory" VALUES ("5", "1984-01-25", "15.1", "401");
INSERT INTO "Laboratory" VALUES ("6", "1984-06-30", "14.0", "150");
INSERT INTO "Laboratory" VALUES ("7", "1984-11-11", "13.7", "100");
INSERT INTO "Laboratory" VALUES ("8", "1984-04-05", "12.9", "399");
INSERT INTO "Laboratory" VALUES ("9", "1984-09-09", "13.3", "200");
INSERT INTO "Laboratory" VALUES ("10", "1984-10-10", "14.5", "350");
INSERT INTO "Examination" VALUES ("0");
INSERT INTO "Examination" VALUES ("1");
INSERT INTO "Examination" VALUES ("0");
INSERT INTO "Examination" VALUES ("1");
INSERT INTO "Examination" VALUES ("0");
INSERT INTO "Examination" VALUES ("1");
INSERT INTO "Examination" VALUES ("0");
INSERT INTO "Examination" VALUES ("1");
INSERT INTO "Examination" VALUES ("0");
INSERT INTO "Examination" VALUES ("1");