The MRI Queue Management System is a C-based console application designed to manage patient appointments for MRI scans using queue data structures.
The system prioritizes patients based on appointment time and medical urgency, stores records using files, and supports full CRUD operations through a menu-driven interface.
This project demonstrates practical use of queues, structures, file handling, and input validation in C.
MRI machines are limited and expensive medical resources.
Manual scheduling can lead to:
- Long waiting times
- Scheduling conflicts
- Poor prioritization of critical patients
This project provides an automated queue-based solution to:
- Schedule patients efficiently
- Prioritize urgent cases
- Persist patient data across program runs
- Queue-based patient management
- Priority handling (Normal / Moderate / Severe)
- Appointment scheduling with date & time validation
- Time-slot restrictions based on availability
- Automatic removal of past appointments
- CSV file-based data persistence
- Menu-driven user interface
- Full CRUD operations (Add, View, Search, Edit, Delete)
- Validates:
- Unique patient ID
- Valid appointment date (
YYYY-MM-DD) - Valid appointment time (
HH:MM)
- Assigns token number automatically
- Inserts patient based on appointment time + priority
Displays all scheduled patients in order with:
- Token number
- Name
- ID
- Contact
- Appointment date & time
- Priority level
- Searches and displays complete patient details using patient ID
Allows modification of:
- Name
- ID (ensures uniqueness)
- Contact
- Appointment date
- Appointment time
- Priority level
- Removes patient from queue
- Maintains queue order after deletion
- Saves all patient records to
patients.csv - Data is automatically loaded when the program starts next time
- Patient ID must be unique
- Appointment date must follow
YYYY-MM-DDformat - Appointment time must follow
HH:MMformat - Allowed MRI time slots:
- 07:00 – 11:59
- 14:00 – 15:59
- 18:00 – 19:59
- Priority values:
0→ Normal1→ Moderate2→ Severe
- Circular Queue
- Structures (
struct Patient) - Arrays
- File Handling (CSV)
patients.csv– Persistent patient storage.gitignore– Excludes compiled executables and data files
├── patient.c // Core queue logic & operations
├── patient.h // Structure definitions & function declarations
├── patients.csv // Patient data storage
├── .gitignore // Ignored files configuration
└── README.md // Project documentation ```