This project implements a hospital queue management system with a graphical user interface using Python and Tkinter.
main.py
: Contains the GUI implementation using Tkinter.queue_functions.py
: Implements the core functionality of the queue management system.
To run the application, execute the main.py
file:
python main.py
The application will open a login window. Use the staff ID "12345" to log in.
This file contains two main classes:
Represents a patient in the hospital queue.
Attributes:
name
: Patient's nameid
: Unique identifier for the patientsymptoms
: Patient's symptomsseverity
: Severity level of the patient's condition (1-10)timestamp
: Time when the patient was added to the queue
Manages the priority queue of patients.
Methods:
__init__()
: Initializes the queue and loads existing data.generate_id()
: Generates a unique ID for new patients.add_patient(name, symptoms, severity)
: Adds a new patient to the queue.admit_patient()
: Admits the patient with the highest priority.delete_patient(id)
: Removes a patient from the queue.delete_admitted_patient(id)
: Removes a patient from the admitted list.search_patient(id)
: Searches for a patient by ID.update_patient(id, symptoms, severity)
: Updates a patient's information.get_queue()
: Returns the current queue of patients.save_data()
: Saves the current queue and admitted patients to files.load_data()
: Loads queue and admitted patients data from files.
This file implements the GUI for the hospital queue management system. It provides the following functionalities:
- Staff Login
- Add New Patient
- View Patient Queue
- Admit Patient
- Search Patient
- Update Patient Information
- Delete Patient Record
The GUI is designed with a modern, color-coded interface for ease of use.
This system uses file-based storage (hospital_queue.txt
and admitted_patients.txt
) to persist data between sessions. Ensure that the application has write permissions in its directory.
- Login Frame
- New Student Frame
- View Queue Frame
- Admit Patient Frame
- Search Patient Frame
- Update Patient Frame
- Delete Patient Frame