FairyEvilMoon / -Smart-Healthcare-Management-System-KU

Group project for System Analysis & Software Design course in Khalifa University
0 stars 0 forks source link

Phase 2: System Design #2

Open FairyEvilMoon opened 2 months ago

FairyEvilMoon commented 2 months ago

Design complex UML Diagrams:

- [x] UML Diagrams. - [x] Predictive Model Design. - [x] Database Schema

FairyEvilMoon commented 2 months ago

shms-use-case-diagrams

shms-class-diagram

shms-appointment-booking-sequence

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

FairyEvilMoon commented 2 months ago

Component Diagram

shms-component-diagram

FairyEvilMoon commented 2 months ago

Health Risk Predictive Model Design

1. Objective

Design a predictive model to analyze patient health data and predict potential health risks.

2. Input Features

Previous Diagnoses

3. Output

The model will predict the probability of the patient developing the following conditions within the next 5 years:

4. Model Architecture

We'll use an ensemble method combining multiple machine learning algorithms:

  1. Random Forest Classifier
  1. Gradient Boosting Classifier (e.g., XGBoost)
  1. Logistic Regression

5. Training Process

  1. Data Preprocessing:
  1. Feature Selection:
  1. Model Training:
  1. Ensemble Method:
  1. Model Evaluation:

6. Deployment and Monitoring

7. Interpretability

8. Ethical Considerations

FairyEvilMoon commented 2 months ago

SHMS Database Schema

1. Users Table

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

2. Patients Table

sqlCopyCREATE TABLE Patients (
    PatientID INT PRIMARY KEY,
    UserID INT UNIQUE,
    EmergencyContact VARCHAR(255),
    InsuranceInfo TEXT,
    FOREIGN KEY (UserID) REFERENCES Users(UserID)
);

3. Doctors Table

sqlCopyCREATE TABLE Doctors (
    DoctorID INT PRIMARY KEY,
    UserID INT UNIQUE,
    Specialization VARCHAR(100),
    LicenseNumber VARCHAR(50) UNIQUE,
    FOREIGN KEY (UserID) REFERENCES Users(UserID)
);

4. Appointments Table

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

5. MedicalRecords Table

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

6. HealthMetrics Table

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

7. Prescriptions Table

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

8. HealthRiskPredictions Table

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

FairyEvilMoon commented 2 months ago

- [ ] 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

FairyEvilMoon commented 2 months ago