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,
FOREIGN KEY ("ID") REFERENCES "Patient"("ID")
);

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



INSERT INTO "Patient" VALUES ("1", "+", "SLE");
INSERT INTO "Patient" VALUES ("2", "-", "SLE");
INSERT INTO "Patient" VALUES ("3", "+", "SLE");
INSERT INTO "Patient" VALUES ("4", "-", "SLE");
INSERT INTO "Patient" VALUES ("5", "+", "Lupus");
INSERT INTO "Patient" VALUES ("6", "-", "SLE");
INSERT INTO "Patient" VALUES ("7", "+", "SLE");
INSERT INTO "Patient" VALUES ("8", "-", "Arthritis");
INSERT INTO "Patient" VALUES ("9", "+", "SLE");
INSERT INTO "Patient" VALUES ("10", "-", "SLE");
INSERT INTO "Patient" VALUES ("11", "+", "SLE");
INSERT INTO "Patient" VALUES ("12", "-", "SLE");
INSERT INTO "Patient" VALUES ("13", "+", "SLE");
INSERT INTO "Patient" VALUES ("14", "-", "SLE");
INSERT INTO "Patient" VALUES ("15", "+", "SLE");
INSERT INTO "Patient" VALUES ("16", "-", "SLE");
INSERT INTO "Patient" VALUES ("17", "+", "SLE");
INSERT INTO "Patient" VALUES ("18", "-", "SLE");
INSERT INTO "Patient" VALUES ("19", "+", "SLE");
INSERT INTO "Patient" VALUES ("20", "-", "SLE");
INSERT INTO "Examination" VALUES ("1", "2023-01-15", "SLE");
INSERT INTO "Examination" VALUES ("2", "2023-01-16", "SLE");
INSERT INTO "Examination" VALUES ("3", "2023-01-17", "SLE");
INSERT INTO "Examination" VALUES ("4", "2023-01-18", "SLE");
INSERT INTO "Examination" VALUES ("5", "2023-01-19", "Lupus");
INSERT INTO "Examination" VALUES ("6", "2023-01-20", "SLE");
INSERT INTO "Examination" VALUES ("7", "2023-01-21", "SLE");
INSERT INTO "Examination" VALUES ("8", "2023-01-22", "Arthritis");
INSERT INTO "Examination" VALUES ("9", "2023-01-23", "SLE");
INSERT INTO "Examination" VALUES ("10", "2023-01-24", "SLE");
INSERT INTO "Examination" VALUES ("11", "2023-01-25", "SLE");
INSERT INTO "Examination" VALUES ("12", "2023-01-26", "SLE");
INSERT INTO "Examination" VALUES ("13", "2023-01-27", "SLE");
INSERT INTO "Examination" VALUES ("14", "2023-01-28", "SLE");
INSERT INTO "Examination" VALUES ("15", "2023-01-29", "SLE");
INSERT INTO "Examination" VALUES ("16", "2023-01-30", "SLE");
INSERT INTO "Examination" VALUES ("17", "2023-01-31", "SLE");
INSERT INTO "Examination" VALUES ("18", "2023-02-01", "SLE");
INSERT INTO "Examination" VALUES ("19", "2023-02-02", "SLE");
INSERT INTO "Examination" VALUES ("20", "2023-02-03", "SLE");