Skip to content

AnkithaK173/SQL_Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

PROJECT: Medical Appointment and Patient Management System Table of Contents

  • Project Overview
  • Problem Statement
  • Current Processes and Their Problems
  • Proposed Solution
  • Value Proposition
  • Database Structure
  • SQL Scripts
  • Sample Data
  • Querying Data
  • Frontend Integration (Optional)
  • How to Use This Project

Project Overview The Medical Appointment and Patient Management System is a database-driven application designed to simplify managing patient information, doctor details, appointment scheduling, and medical records. The system is built using MySQL to centralize data storage and support efficient healthcare management.

Problem Statement Many healthcare facilities rely on manual or fragmented systems to manage patient data, which can result in:

I) Difficulty tracking patient medical history. II) Inefficiencies in managing doctor availability and appointments. III) Challenges in ensuring timely patient care. IV) Increased administrative burden.

Current Processes and Their Problems Current Processes Manual Record-Keeping: Patient and appointment data are often stored in physical files or spreadsheets, which can lead to errors or loss of information. Inefficient Appointment Scheduling: Patients face long wait times when scheduling appointments, leading to frustration. Lack of Data Integration: Medical records may not be easily accessible to doctors during patient visits, hindering quality care.

Problems I) Higher chances of scheduling conflicts and missed appointments. II) Increased workload for healthcare providers. III) Difficulty updating and accessing patient medical histories. IV) Proposed Solution

The proposed Medical Appointment and Patient Management System offers: Centralized Database: MySQL database to store patient data, doctor details, appointments, and medical records. Patient Management: A system to manage patient information and medical histories. Doctor Management: Centralized doctor details, including specialty and availability. Appointment Scheduling: Streamlined appointment scheduling with real-time updates. Medical Records Management: Easily accessible and up-to-date medical records for doctors and staff.

Value Proposition I) Improved Efficiency: Reduce administrative overhead and streamline data management. II) Enhanced Patient Experience: Simplify appointment scheduling and provide better access to patient data. III) Data Accessibility: Facilitate real-time access to patient medical histories. IV) Scalability: The system can be expanded to support additional features like telemedicine and patient portals.

Database Structure

The system's database structure consists of four primary tables: image

  1. Patients:

    Attributes: Patient_ID, Name, Date_of_Birth, Gender, Contact_Number, Address, Medical_History Primary Key: Patient_ID

  2. Doctors:

    Attributes: Doctor_ID, Name, Specialty, Contact_Number, Availability Primary Key: Doctor_ID

  3. Appointments:

    Attributes: Appointment_ID, Patient_ID, Doctor_ID, Appointment_Date, Appointment_Time, Purpose, Status Primary Key: Appointment_ID Foreign Keys: Patient_ID, Doctor_ID (linked to Patients and Doctors)

  4. Medical Records:

    Attributes: Record_ID, Patient_ID, Doctor_ID, Visit_Date, Diagnosis, Treatment, Notes Primary Key: Record_ID Foreign Keys: Patient_ID, Doctor_ID (linked to Patients and Doctors)

SQL Scripts Here are the SQL scripts used to create the database and the necessary tables:

CREATE DATABASE medical_management; USE medical_management;

CREATE TABLE Patients ( Patient_ID INT AUTO_INCREMENT PRIMARY KEY, Name VARCHAR(100) NOT NULL, Date_of_Birth DATE, Gender CHAR(1), Contact_Number VARCHAR(15), Address VARCHAR(255), Medical_History TEXT );

CREATE TABLE Doctors ( Doctor_ID INT AUTO_INCREMENT PRIMARY KEY, Name VARCHAR(100) NOT NULL, Specialty VARCHAR(100), Contact_Number VARCHAR(15), Availability ENUM('Available', 'Unavailable') DEFAULT 'Available' );

CREATE TABLE Appointments ( Appointment_ID INT AUTO_INCREMENT PRIMARY KEY, Patient_ID INT, Doctor_ID INT, Appointment_Date DATE, Appointment_Time TIME, Purpose VARCHAR(255), Status ENUM('Scheduled', 'Completed', 'Canceled') DEFAULT 'Scheduled', FOREIGN KEY (Patient_ID) REFERENCES Patients(Patient_ID), FOREIGN KEY (Doctor_ID) REFERENCES Doctors(Doctor_ID) );

CREATE TABLE Medical_Records ( Record_ID INT AUTO_INCREMENT PRIMARY KEY, Patient_ID INT, Doctor_ID INT, Visit_Date DATE, Diagnosis TEXT, Treatment TEXT, Notes TEXT, FOREIGN KEY (Patient_ID) REFERENCES Patients(Patient_ID), FOREIGN KEY (Doctor_ID) REFERENCES Doctors(Doctor_ID) );

Sample Data into the database using the following SQL script:

  1. INSERT INTO Patients (Name, Date_of_Birth, Gender, Contact_Number, Address, Medical_History) VALUES ('Amit Sharma', '1990-05-21', 'M', '9876543210', '123 MG Road, Delhi', 'Asthma, Allergies');

  2. INSERT INTO Doctors (Name, Specialty, Contact_Number, Availability) VALUES ('Dr. Priya Singh', 'Cardiologist', '9123456789', 'Available');

  3. INSERT INTO Appointments (Patient_ID, Doctor_ID, Appointment_Date, Appointment_Time, Purpose, Status) VALUES (1, 1, '2024-10-25', '10:00:00', 'Routine Check-up', 'Scheduled');

  4. INSERT INTO Medical_Records (Patient_ID, Doctor_ID, Visit_Date, Diagnosis, Treatment, Notes) VALUES (1, 1, '2024-10-01', 'Common Cold', 'Rest, Hydration, Cold medication', 'Mild symptoms, stable');

Querying Data Here are some SQL queries you can use to retrieve data from the system:

  1. List All Scheduled Appointments

    SELECT A.Appointment_ID, P.Name AS Patient_Name, D.Name AS Doctor_Name, A.Appointment_Date, A.Appointment_Time, A.Purpose FROM Appointments A JOIN Patients P ON A.Patient_ID = P.Patient_ID JOIN Doctors D ON A.Doctor_ID = D.Doctor_ID WHERE A.Status = 'Scheduled';

  2. Check Doctor Availability

    SELECT Name, Contact_Number FROM Doctors WHERE Specialty = 'Cardiologist' AND Availability = 'Available';

Frontend Integration:

To make this project more user-friendly, you can integrate it with a web application using a frontend framework (like HTML, CSS, JavaScript, or React) or a backend language like Python, PHP, or Node.js to interact with the MySQL database. This would allow doctors, patients, and admins to manage appointments and view data through a graphical interface.

image

Example GUI: Login Screen: Appointment Dashboard: Medical Records Page:

How to Use This Project Step 1: Setup MySQL Ensure MySQL is installed. Use the provided SQL scripts to set up the database.

Step 2: Insert Sample Data Run the sample data insertion scripts to populate the tables.

Step 3: Query the Data Use the querying examples to retrieve information from the database.

Step 4: Frontend Integration (Optional) Develop a web application to interface with the backend for a seamless user experience.

Conclusion

Integrating a frontend application with the Medical Management System significantly enhances user experience by providing an intuitive interface for managing healthcare processes. This step is crucial for making the application more interactive and user-friendly, ultimately improving patient and provider satisfaction.

About

The Medical Appointment and Patient Management System is a database solution that streamlines patient, doctor, and appointment management for healthcare facilities. It automates scheduling, tracks medical records, and can be integrated with a user-friendly interface for easy use.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors