SQL Booking System Development

Job ID: 38750301

Budget: $30 – $250 USD

DO NOT REPLY WITH AN AUTOMATIC TEMPLATE BID. IT WILL BE IGNORED. DOING SO WASTES EVERYONE'S TIME.


Requirement is to develop an appointment booking system for doctor surgeries. Patients will be able to see what times are available from which doctors at multiple sites. Initial objective is to develop this using SQL queries, not code such as Javascript etc.
There are a number of factors which make this moderately complex. Multiple locations, multiple services, multiple doctors, different location opening times etc.


Functional Requirements
1) List all services provided at a location. (this is easy - SELECT * FROM services WHERE location_id = xxxx)
2) List all availability at a location for any employee on a given day
3) List all employees available at a location on a given day
4) List all timeslots available at a location for a given day
5) All of above must take account of staff availability (holidays, varying work hours), location opening times etc.


Your Deliverables
1) Postgres database with suitably populated table structure, column definition
2) Test data as required
3) SQL commands which meet above functional requirements


Technology
Postgres is being used. There will be a NodeJS application and set of API's that sit above the database layer. This job is only for the database work. I mention the additional architecture just to give an idea of how it will be used. I've made an architectural decision that I want to try doing the booking logic within SQL.


Is there a NodeJS booking component available?
I'm aware that an appointment booking system is a very common business requirement. There are many applications out there which do this. It may be possible that a component exists which has already done much of the work. That could be Node based or something else. I would be keen to hear of any known pre-made components.


What I can supply
I have a Postgres schema that is partially complete. It contains a starting point for the tables needed but it does not contain any data or the SQL commands required for a booking system.
I've created a draft Postgres database and included a schema in this description. It will not be final and many of the table attributes have been removed for clarity and focus.

Timescale
I'm seeing this as a few days work. We'll need time to exchange thoughts on the solution. It'll be important that you fully understand the requirement before work. Creating the SQL will be moderate complexity. There's a lot of checks to be done.
Related categories: SQL Node.js PostgreSQL PostgreSQL Programming