The Out-Patient Appointment System API is a Ruby on Rails application designed to facilitate the booking of appointments with doctors who practice on a weekly schedule. This README provides an overview of the API and explains how to interact with its endpoints.
Before using the API, ensure you have the following installed:
- Ruby
- Ruby on Rails
- SQLite or any other database supported by Rails
-
Clone the repository:
git clone <repository_url>
-
Navigate into the project directory:
cd Doctor-Appointment
-
Install dependencies:
bundle install
-
Set up the database:
rails db:migrate
To retrieve a list of all doctors:
GET /doctors
To retrieve details of a specific doctor:
GET /doctors/:id
Availability
To retrieve availabilities for a specific doctor on a given date:
GET /doctors/:doctor_id/availabilities?date=<date>
Appointment Booking
To book an appointment with a specific doctor:
POST /doctors/:doctor_id/appointments
Request Body: { "date": "YYYY-MM-DD", "time": "HH:MM:SS", "patient_name": "Patient Name" }