Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hospital Appointment Priority System

A JavaFX-based desktop application that manages hospital patient appointments by automatically prioritizing Emergency patients over Normal patients, built using core Object-Oriented Programming (OOP) principles.

About

In many hospitals, appointments are handled on a first-come-first-served basis, which means emergency patients can end up waiting behind routine cases. This project solves that problem by classifying every patient as Emergency or Normal at registration and automatically placing Emergency patients at the top of the appointment list, so they're treated first.

The system also replaces error-prone manual/paper record-keeping with a structured, file-based storage system, and validates all user input to prevent invalid or duplicate records.

This was developed as my final Open-Ended Lab project for the Object-Oriented Programming course.

Features

  • Register patients as Emergency or Normal, with separate detail fields for each type
  • Automatic priority assignment — Emergency patients are placed above Normal patients in the queue
  • Add, view, update, and delete patient records through the GUI
  • Persistent data storage using file handling (records aren't lost when the app closes)
  • Input validation for empty fields, invalid age, invalid contact number, and duplicate patient IDs, handled through exception handling
  • Multi-screen JavaFX interface: Login Screen → Dashboard → Add Patient Form → Patient TableView

OOP Concepts Applied

Concept How it's used
Encapsulation Patient data (name, age, contact, etc.) is kept private and accessed only through public getter/setter methods
Inheritance EmergencyPatient and NormalPatient both inherit from a common Patient base class
Polymorphism Each patient type overrides a getPriority() method — Emergency returns a higher priority than Normal, so sorting behaves differently per type
Abstraction Users only interact through GUI forms and buttons; internal logic like priority sorting, file storage, and validation stays hidden

Tech Stack

  • Language: Java
  • GUI Framework: JavaFX
  • Build Tool: Maven
  • Data Storage: File handling (text files)
  • Concepts: Object-Oriented Programming, Exception Handling

Screenshots

Login Screen Dashboard Add Patient Form Patient TableView

How to Run

  1. Clone this repository:
    git clone https://github.com/jaideep-kumar-dev/HospitalAppointmentPrioritySystem.git
    
  2. Open the project in IntelliJ, Eclipse, or VS Code — it's a Maven project, so dependencies will resolve automatically via pom.xml.
  3. Run Main.java to launch the application.
  4. Register a patient as Emergency or Normal and see how the appointment list is automatically prioritized.

What I Learned

This project gave me hands-on experience applying core OOP principles — encapsulation, inheritance, polymorphism, and abstraction — in a real, GUI-based Java application. Working through priority-based logic, file handling, and input validation helped me understand how these concepts fit together in a practical system, rather than just in theory. It's the foundation I'm building on as I move into Data Structures and Algorithms next semester.

Note

This was assigned as a group project for my OOP course. I developed the full application (design, logic, and code) independently.

Author

Jaideep Kumar CS Student | Learning Java, JavaFX & DSA

About

JavaFX-based hospital appointment system with Emergency/Normal patient prioritization

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages