Note
API for hospital management using Entity Framework and C#, to manage departments, patients, doctors, laboratories, employees, treatments, medications, appointments, invoices, hospitalizations, surgeries, lab results, prescriptions, and payments.
- Comprehensive management of hospitals and medical staff.
- Detailed registration and tracking of patients.
- Efficient administration of appointments and treatments.
- Integration with laboratory systems and medical results.
- Automated billing and payment management.
- C#
- .NET
- Entity Framework Core
- SQL Server
- ASP.NET Core
The database includes the following tables:
- Departments
- Patients
- Doctors
- Laboratories
- Employees
- Treatments
- Medications
- Appointments
- Invoices
- Hospitalizations
- Surgeries
- LabResults
- Prescriptions
- Payments
To install and run this project on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/hospital-api.git
-
Navigate to the project directory:
cd hospital-api -
Restore NuGet packages:
dotnet restore
-
Configure the connection string to your database in the
appsettings.jsonfile. -
Apply migrations to create the database:
dotnet ef database update
-
Run the application:
dotnet run
Once the application is running, you can access the API via http://localhost:5000 (or the port configured in your project).
Below are some of the available endpoints:
-
Departments
GET /api/departmentsPOST /api/departmentsGET /api/departments/{id}PUT /api/departments/{id}DELETE /api/departments/{id}
-
Patients
GET /api/patientsPOST /api/patientsGET /api/patients/{id}PUT /api/patients/{id}DELETE /api/patients/{id}
-
Doctors
GET /api/doctorsPOST /api/doctorsGET /api/doctors/{id}PUT /api/doctors/{id}DELETE /api/doctors/{id}
Contributions are welcome. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature). - Make your changes and commit them (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/new-feature). - Open a pull request.
This project is licensed under the [MIT] License - see the LICENSE.md file for details.