Open FairyEvilMoon opened 2 months ago
use diagram, class diagram, sequence diagram. if anyone is making a better one do post
PS. they are svg file, and because they are svg file that it displayed like trash so instead click on it or download it to have a better look at it
Component Diagram
Design a predictive model to analyze patient health data and predict potential health risks.
Previous Diagnoses
The model will predict the probability of the patient developing the following conditions within the next 5 years:
We'll use an ensemble method combining multiple machine learning algorithms:
sqlCopyCREATE TABLE Users (
UserID INT PRIMARY KEY,
Email VARCHAR(255) UNIQUE NOT NULL,
PasswordHash VARCHAR(255) NOT NULL,
FirstName VARCHAR(50) NOT NULL,
LastName VARCHAR(50) NOT NULL,
DateOfBirth DATE NOT NULL,
Gender ENUM('Male', 'Female', 'Other') NOT NULL,
PhoneNumber VARCHAR(20),
UserType ENUM('Patient', 'Doctor', 'Admin') NOT NULL,
CreatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UpdatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
sqlCopyCREATE TABLE Patients (
PatientID INT PRIMARY KEY,
UserID INT UNIQUE,
EmergencyContact VARCHAR(255),
InsuranceInfo TEXT,
FOREIGN KEY (UserID) REFERENCES Users(UserID)
);
sqlCopyCREATE TABLE Doctors (
DoctorID INT PRIMARY KEY,
UserID INT UNIQUE,
Specialization VARCHAR(100),
LicenseNumber VARCHAR(50) UNIQUE,
FOREIGN KEY (UserID) REFERENCES Users(UserID)
);
sqlCopyCREATE TABLE Appointments (
AppointmentID INT PRIMARY KEY,
PatientID INT,
DoctorID INT,
AppointmentDateTime DATETIME,
Status ENUM('Scheduled', 'Completed', 'Cancelled') DEFAULT 'Scheduled',
Notes TEXT,
CreatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UpdatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (PatientID) REFERENCES Patients(PatientID),
FOREIGN KEY (DoctorID) REFERENCES Doctors(DoctorID)
);
sqlCopyCREATE TABLE MedicalRecords (
RecordID INT PRIMARY KEY,
PatientID INT,
DoctorID INT,
Date DATE,
Diagnosis TEXT,
Treatment TEXT,
Medications TEXT,
Notes TEXT,
FOREIGN KEY (PatientID) REFERENCES Patients(PatientID),
FOREIGN KEY (DoctorID) REFERENCES Doctors(DoctorID)
);
sqlCopyCREATE TABLE HealthMetrics (
MetricID INT PRIMARY KEY,
PatientID INT,
RecordedAt TIMESTAMP,
HeartRate INT,
BloodPressureSystolic INT,
BloodPressureDiastolic INT,
Temperature DECIMAL(3,1),
OxygenSaturation INT,
BloodGlucose INT,
Weight DECIMAL(5,2),
Steps INT,
SleepHours DECIMAL(3,1),
FOREIGN KEY (PatientID) REFERENCES Patients(PatientID)
);
sqlCopyCREATE TABLE Prescriptions (
PrescriptionID INT PRIMARY KEY,
PatientID INT,
DoctorID INT,
MedicationName VARCHAR(100),
Dosage VARCHAR(50),
Frequency VARCHAR(50),
StartDate DATE,
EndDate DATE,
Notes TEXT,
FOREIGN KEY (PatientID) REFERENCES Patients(PatientID),
FOREIGN KEY (DoctorID) REFERENCES Doctors(DoctorID)
);
sqlCopyCREATE TABLE HealthRiskPredictions (
PredictionID INT PRIMARY KEY,
PatientID INT,
PredictionDate DATE,
CardiovascularDiseaseRisk DECIMAL(5,2),
DiabetesRisk DECIMAL(5,2),
HypertensionRisk DECIMAL(5,2),
ModelVersion VARCHAR(20),
FOREIGN KEY (PatientID) REFERENCES Patients(PatientID)
);
these data schemes might be modified in the future
- [ ] THE UML diagrams need to be looked at and reformated if needed
ok ignore everything at the top of this comment the work has to be restarted since the Dr. lowered the requirements therefore it should look much simpler then whatever gibberish was written before
Design complex UML Diagrams:
Define the Database Schema for patient records, appointments, and health data.
Deliverables:
- [x] UML Diagrams.- [x] Predictive Model Design.- [x] Database Schema