A lightweight and efficient Hospital Management System implemented in C. This project demonstrates the power of structured data and binary file handling to manage patient records with persistence.
- β Add Patient: Register new patients with a unique ID and medical history.
- π View All Patients: Display a formatted list of all records stored in the system.
- π Search Patient: Quickly find specific patient details using their unique ID.
- ποΈ Delete Patient: Remove records from the system permanently.
- πΎ Persistent Storage: Data is saved in a binary file (
patients.dat), so your information isn't lost when you close the program.
The system uses a custom struct to ensure data integrity for every entry:
| Field | Type | Description |
|---|---|---|
id |
int |
Unique Patient ID |
name |
string |
Full name of the patient |
age |
int |
Age of the patient |
gender |
string |
Patient's gender |
disease |
string |
Diagnosed condition |
- A C compiler (e.g., GCC, Clang, or MinGW)
- Basic knowledge of the command line
-
Clone the repository:
git clone [https://github.com/your-username/hospital-management-system.git](https://github.com/your-username/hospital-management-system.git) cd hospital-management-system -
Compile the source code:
gcc HSY.c -o HospitalManagementSystem
-
Run the application:
./HospitalManagementSystem
HSY.c: The core source code containing the logic and file operations.patients.dat: The binary database file (automatically generated).README.md: Documentation for the project.
Contributions make the open-source community an amazing place! If you have suggestions for improvements (like adding an Update or Sort feature), feel free to:
- Fork the project.
- Create your Feature Branch (
git checkout -b feature/NewFeature). - Commit your changes (
git commit -m 'Add some NewFeature'). - Push to the branch (
git push origin feature/NewFeature). - Open a Pull Request.