A C++ hospital management system with three user roles, file-based record storage, and an appointment routing workflow.
The system stores patient records in a binary file and gives each role its own console menu. Patients request appointments, admins review and forward them, and doctors confirm or reject them. Each role authenticates with its own password. The whole thing is a single C++ file with no external dependencies beyond the standard library, which makes it easy to read end to end and a useful reference for file-based record management and role-based access in C++.
Released as open source under the MIT license. See LICENSE.
- Patient views their profile and upcoming appointments, requests new appointments, and changes their password.
- Doctor reviews appointment requests forwarded by the admin, lists patients for a given date, estimates the daily collection, edits patient diagnosis and medication, and changes their password.
- Admin reviews incoming appointment requests (confirm, forward to doctor, or reject), adds, edits, removes, and searches patient records, and changes their password.
- A patient requests an appointment for a chosen date.
- The admin sees the request and can confirm it, forward it to the assigned doctor, or reject it.
- If forwarded, the doctor sees the request and can confirm or reject it.
- A confirmed appointment is written back to the patient's record as their next visit date.
Each patient record stores: patient ID, name, age, date of birth, gender, blood group, number of visits, next visit date, identified disorder, prescribed medication, and assigned doctor. Records are kept sorted by patient ID in a binary file (Hospital.dat).
This project uses legacy C++ headers (fstream.h, conio.h, stdio.h) and compiles with a DOS-era compiler such as Turbo C++. On a modern toolchain it is a reading reference rather than something that builds directly, because the Borland-specific headers are not part of standard C++.
To build in Turbo C++:
- Open
Hospital Management System.CPPin the Turbo C++ IDE. - Compile and run.
Generated data files (Hospital.dat, password files, temp files) are written to the working directory at runtime.
MIT. See LICENSE. The source is open and free to read, fork, and adapt.