arturhayne / bookApp

A system tos scheduling medical appointments over the internet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

The system is responsible for scheduling medical appointments over the internet. In order to do so it exposes a RESTful API that allows you to get a list of available slots for a given day, request a slot to be reserved and cancel a reserved slot. All calls are made with a valid token id given previously to the client by other part of the system not relevant to this piece.

  • Laravel 5.6

Requirements

Development

  • composer install
  • cp .env.example .env
  • php artisan key:generate
  • php artisan migrate ok
  • php artisan db:seed ok

Run

  • php artisan serve --port=5000

Test

  • ./vendor/bin/phpunit tests/AppointmentsTest.php

Services:

  • Get a list of free slots for a given date
GET /api/appointments/<token-id>/<date>/free 

Answer:

{slots: [“10:00”, “10:30”,…]} Or {slots: []}

  • Request a slot to be reserved on the date and time for the patient name
POST /api/appointments/<token-id>/<date>/<time>/<patient name>

Answer:

{appointmentId: xxx} or { error: “Unable to reserve the appointment”}

  • Deletes an appointment
DELETE /api/appointments/<token-id>/<appointment-id>

Answer:

{“success”} or {error: “Unable to cancel the appointment”}

About

A system tos scheduling medical appointments over the internet


Languages

Language:PHP 96.3%Language:HTML 3.1%Language:Vue 0.6%