This is a simple API for a hospital management system deployed on Railway. It is built using Go and Gin. The database used is PlanetScale/MySQL. The API is deployed on Railway and can be accessed here.
The documentation for this API can be found here.
The database schema for this API can be found here.
GET
- Used to retrieve data from the server.POST
- Used to send data to the server to create a resource.PUT
- Used to send data to the server to update a resource.DELETE
- Used to delete a resource from the server.
200
- OK. The request has succeeded.400
- Bad Request. The server could not understand the request due to invalid syntax.404
- Not Found. The server can not find the requested resource.
GET /patients
- Get all patientsGET /patients/:id
- Get a patient by idPOST /patients
- Create a new patientPUT /patients/:id
- Update a patient by idDELETE /patients/:id
- Delete a patient by id
GET /doctors
- Get all doctorsGET /doctors/:id
- Get a doctor by idPOST /doctors
- Create a new doctorPUT /doctors/:id
- Update a doctor by idDELETE /doctors/:id
- Delete a doctor by id
GET /nurses
- Get all nursesGET /nurses/:id
- Get a nurse by idPOST /nurses
- Create a new nursePUT /nurses/:id
- Update a nurse by idDELETE /nurses/:id
- Delete a nurse by id
GET /wardboys
- Get all wardboysGET /wardboys/:id
- Get a wardboy by idPOST /wardboys
- Create a new wardboyPUT /wardboys/:id
- Update a wardboy by idDELETE /wardboys/:id
- Delete a wardboy by id
GET /rooms
- Get all roomsGET /rooms/:id
- Get a room by idPOST /rooms
- Create a new roomPUT /rooms/:id
- Update a room by idDELETE /rooms/:id
- Delete a room by id
GET /treatments
- Get all treatmentsGET /treatments/:id
- Get a treatment by idPOST /treatments
- Create a new treatmentPUT /treatments/:id
- Update a treatment by idDELETE /treatments/:id
- Delete a treatment by id
GET /numbers
- Get all numbersGET /numbers/:id
- Get a number by idPOST /numbers
- Create a new numberPUT /numbers/:id
- Update a number by idDELETE /numbers/:id
- Delete a number by id
GET /bills
- Get all billsGET /bills/:id
- Get a bill by idPOST /bills
- Create a new billPUT /bills/:id
- Update a bill by idDELETE /bills/:id
- Delete a bill by id