Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eHospital 🏥

A Java-based Hospital Management System developed as a university project for the CSE2320 module.
Designed to digitalise and streamline core hospital operations — patient records, doctor assignments, and administrative workflows — replacing slow, error-prone paper-based systems.


Overview

eHospital is a console-driven Java application that models the core operations of a hospital environment. It manages patient registrations, doctor records, and appointment data using a relational MySQL database, demonstrating object-oriented design principles, JDBC connectivity, and multi-entity data management in a real-world domain.


Features

  • Patient Management — register, update, and retrieve patient records
  • Doctor Management — maintain doctor profiles and specialisations
  • Appointment / Assignment System — link patients to doctors and track treatment history
  • MySQL Persistence — all data stored and queried via JDBC with mysql-connector
  • Modular Java Architecture — clean separation of concerns across packages
  • IntelliJ IDEA Project — ready to import and run from the IDE with zero configuration

Tech Stack

Layer Technology
Language Java (JDK 8+)
Database MySQL
DB Connectivity JDBC (mysql-connector library)
IDE IntelliJ IDEA
Build Manual classpath (IntelliJ module)

Project Structure

eHospital/
├── src/
│   └── cse2320/           # All Java source files (models, services, main entry)
├── .idea/                 # IntelliJ IDEA project configuration
├── eHospital.iml          # IntelliJ module file (references mysql-connector)
└── .gitignore

Getting Started

Prerequisites

  • JDK 8 or later
  • MySQL Server (local instance)
  • IntelliJ IDEA (Community or Ultimate)
  • MySQL Connector/J JAR (download here)

Setup

  1. Clone the repository
   git clone https://github.com/ashafio/eHospital.git
   cd eHospital
  1. Open in IntelliJ IDEA

    Go to File → Open and select the eHospital directory. IntelliJ will detect the .iml module file automatically.

  2. Add the MySQL Connector library

    Go to File → Project Structure → Libraries → + and add the mysql-connector-java-x.x.x.jar. The module expects a project-level library named mysql-connector.

  3. Configure the database

    Create a MySQL database and update the JDBC connection string in the source (typically in a DBConnection or Config class):

   String url  = "jdbc:mysql://localhost:3306/ehospital";
   String user = "your_mysql_user";
   String pass = "your_mysql_password";

Then run the provided SQL schema (if included) or create tables based on the entity classes.

  1. Run the application

    Open the main class in src/cse2320/ and run it directly from IntelliJ, or compile and run from the terminal:

   javac -cp .:mysql-connector-java.jar src/cse2320/*.java
   java  -cp .:mysql-connector-java.jar cse2320.Main

Architecture

The application follows a layered OOP approach:

cse2320/
├── model/        # Entity classes — Patient, Doctor, Appointment
├── dao/          # Data Access Objects — JDBC CRUD operations per entity
├── service/      # Business logic layer
├── ui/           # Console menu and user interaction
└── Main.java     # Application entry point
  • Models map directly to MySQL tables with appropriate fields and constructors
  • DAOs encapsulate all SQL queries and prepared statements, keeping database logic out of business code
  • Service layer orchestrates operations (e.g. booking an appointment validates both the patient and doctor exist)
  • UI layer drives the console menu loop

Academic Context

Developed for the CSE2320 module as part of a BSc in Computer Science and Engineering. The project demonstrates applied knowledge of object-oriented programming, relational database design, JDBC, and multi-class Java application structure.


Author

Shafi (Abid Rahman Shafi) — GitHub: @ashafio

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages