The Doctor Service is a component of the hospital management system, responsible for managing information related to doctors.
The Doctor Service provides functionalities for creating, updating, listing, deleting, and retrieving information about doctors.
- Go (version 1.16 or higher)
- MySQL
-
Clone the repository:
git clone https://github.com/iamrosada/hospital-management.git
-
Navigate to the
doctor-service
directory:cd hospital-management/doctor-service
-
Install dependencies:
go get -u ./...
-
Build and run the application:
go run main.go
-
Create Doctor:
POST /doctors
Example request body:
{ "name": "Dr. John Doe", "bi": "123456789", "specialty": "Cardiology", "experience": 10, "email": "john.doe@example.com", "phone_number": "+1234567890" }
-
List Doctors:
GET /doctors
-
Get Doctor by ID:
GET /doctors/{id}
-
Update Doctor by ID:
PUT /doctors/{id}
Example request body:
{ "name": "Dr. Jane Smith", "bi": "987654321", "specialty": "Orthopedics", "experience": 15, "email": "jane.smith@example.com", "phone_number": "+9876543210" }
-
Delete Doctor by ID:
DELETE /doctors/{id}
Contributions are welcome! If you have any suggestions, improvements, or find any issues, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.