A console-based Hospital Management System (HMS) built with .NET and Entity Framework Core using the Code-First approach. This application manages essential hospital operations, including patient registration, doctor management, appointment scheduling, prescription and medication management, and automatic billing.
- Add, view, update, and delete patient records.
- Add, view, update, and delete doctor records.
- Schedule appointments between patients and doctors.
- View and cancel appointments.
- Issue prescriptions linking patients, doctors, and medications.
- Supports many-to-many relationships between prescriptions and medications (including dosage details).
- Add, view, and update medication details.
- Manage medication inventory.
- Automatically generate bills when a prescription is issued.
- View and update bill statuses (e.g., mark as Paid).
- .NET Core / .NET 5/6/7 - Console Application
- Entity Framework Core - ORM with Code-First approach
- Microsoft SQL Server / LocalDB - Database
git clone https://github.com/saeedmosaffer/Hospital_Management_System_Phase1.git
cd Hospital_Management_System_Phase1
Ensure you have the required .NET SDK installed, then run:
dotnet restore
Check that your connection string in HospitalContext.cs is correct, then apply migrations:
dotnet ef database update
dotnet build
dotnet run
Once the application is running, a console menu will appear with the following options:
- Add, view, update, or delete patient records.
- Add, view, update, or delete doctor records.
- Schedule new appointments.
- View existing appointments (by patient or doctor).
- Cancel appointments.
- Issue prescriptions (link medications with dosage details).
- Automatically generate bills.
- Add, view, or update medication details.
- View all bills.
- Update bill statuses (e.g., mark as Paid).
Simply enter the corresponding number for the option you want to execute and follow the prompts.
Hospital Management System (Phase 1)
β
βββ Data
β βββ HospitalContext.cs # EF Core database context
β
βββ Models
β βββ Patient.cs # Patient entity
β βββ Doctor.cs # Doctor entity
β βββ Appointment.cs # Appointment entity and status enum
β βββ Prescription.cs # Prescription entity
β βββ Medication.cs # Medication entity
β βββ PrescriptionMedication.cs # Join entity for Prescription-Medication (includes dosage)
β βββ Bill.cs # Bill entity and status enum
β
βββ Services # Service layer for business logic
β βββ PatientService.cs
β βββ DoctorService.cs
β βββ AppointmentService.cs
β βββ PrescriptionService.cs
β βββ MedicationService.cs
β βββ BillingService.cs
β
βββ Program.cs # Console user interface and entry point
β
βββ README.md # Project documentation
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.
If you find this project useful, consider giving it a β on GitHub!