A robust RESTful API for managing hospital operations including patients, doctors, appointments, prescriptions, medications, and billing. Built using .NET 8, Entity Framework Core, and JWT authentication.
- 🔐 JWT-based Authentication & Role-based Authorization (Admin, Doctor, Patient)
- 🧑⚕️ Manage Doctors & Patients
- 🗕 Appointment Scheduling
- 💊 Prescription & Medication Management
- 💳 Billing & Payment Information
- 🛠️ Dependency Injection
- 📦 Clean Architecture with Repository Pattern
- 📄 Swagger UI for API Testing
- .NET 8.0
- Entity Framework Core
- SQL Server
- JWT (JSON Web Tokens)
- Swagger / Swashbuckle
- AutoMapper
- ASP.NET Core Web API
- .NET 8 SDK (8.0.406 or later)
- SQL Server (LocalDB or any SQL instance)
- Visual Studio or Visual Studio Code
git clone https://github.com/your-username/HospitalManagementSystemAPI.git
cd HospitalManagementSystemAPI
Update the appsettings.json
file:
"ConnectionStrings": {
"DefaultConnection": "Server=.;Database=HospitalDB;Trusted_Connection=True;"
}
dotnet ef database update
dotnet run
Navigate to: https://localhost:5001/swagger
- Admin: Full control of the system
- Doctor: Manage appointments, prescriptions
- Patient: View own appointments, prescriptions, and bills
├── Controllers/
├── Models/
├── DTOs/
├── Services/
├── Repositories/
├── Data/
├── Mappings/
├── Middleware/
└── Program.cs / Startup.cs
(Include a diagram image or link here if available)
POST /api/auth/login
Content-Type: application/json
{
"username": "admin",
"password": "admin123"
}
GET /api/patients
Authorization: Bearer {your_token_here}
- ✅ Add Logging and Exception Handling
- 🚧 Implement Email Notifications
- 🚧 Add Unit & Integration Tests
- 🚧 Deploy to Azure/AWS
This project is licensed under the MIT License.
Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.
Author: Saeed Mosaffer 📧 Email: saeedmosaffer39@gmail.com 🌐 LinkedIn: linkedin.com/in/saeed-mosaffer