---
# System prepended metadata

title: Medical Appointments System (First draft)

---

# Medical Appointments System (First draft)

## :memo: Project Description!
 **Medical appointments' system.**
- [x] A virtual session is represented as a recorded video that prompts patients to answer particular questions and based on the answers by yes or no, the best specialist will be selected for the case.
- [x] Using a calendar, Auto-select for the appointment from available hours for the specialist.
- [x] Payment stage is followed by an appointment confirmation email in case of payment success.
- [x] Reminder email one hour earlier from the session beginning.
- [x] Email message that informs that the session is starting.

##  Working Stack

### BackEnd  ⚙️🛠 

| Service          | Options               |
| ----------------- |:----------------------- |
| Server       |[AWS Lambda(Serverless)], [Expressjs]
| Database | [MySql], [Amazon Aurora], [PostgreSQL], [MongoDb]     |
| Mailing system         | [Nodemailer], [AWS SNS]     |
| Storage        | [AWS S3]    | 
| Authentication   | [auth0], [AWS Cognito], [Passport], [Firebase], [JWT Token] |
| Payment        | [PayPal], [Stripe],  *cryptocurrency*  | 

[Expressjs]:https://expressjs.com/
[AWS Lambda(Serverless)]:https://aws.amazon.com/lambda/
[MySql]:https://www.mysql.com/
[MongoDb]:https://www.mongodb.com/
[Amazon Aurora]:https://aws.amazon.com/rds/aurora/?aurora-whats-new.sort-by=item.additionalFields.postDateTime&aurora-whats-new.sort-order=desc
[PostgreSQL]:https://www.postgresql.org/
[Nodemailer]:https://nodemailer.com/about/
[AWS SNS]:https://aws.amazon.com/sns/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc
[AWS S3]:https://aws.amazon.com/s3/
[auth0]:https://auth0.com/
[AWS Cognito]:https://aws.amazon.com/cognito/
[Passport]:https://www.passportjs.org/
[Firebase]:https://firebase.google.com/docs/auth/web/custom-auth
[JWT Token]:https://jwt.io/
[PayPal]:https://developer.paypal.com/home
[Stripe]:https://stripe.com/docs/development

### FrontEnd 👓🖥
  [ReactJS..](https://ar.reactjs.org/)
  
---
##  Database 💾 🗄

### Tables
#### Users
| column          | datatype               |required|
| ----------------- |:----------------------- |-----|
| user_id       | varchar(50)   |true|
| user_name | varchar(50)     |false|
| email         | varchar(50)     |true|
| pass        | varchar(50)    |true|
| type   | varchar(50) |true|
| created_at   | datetime |true|

#### appointments
| column          | datatype               |required|
| ----------------- |:----------------------- |-----|
| id       | varchar(50)   |true|
| patient_id | varchar(50)     |false|
| doctor_id         | varchar(50)     |true|
| patient_name        | varchar(50)    |fasle|
| date   | datetime |true|
| description   | text |true|
| first_appointment   | boolean |true|
| email   | varchar(50) |true|
| in_session   | boolean |true|
| created_at   | datetime |true|

#### working_schedules
| column          | datatype               |required|
| ----------------- |:----------------------- |-----|
| id       | varchar(50)   |true|
| doctor_id         | varchar(50)     |true|
| from_date   | datetime |true|
| hours   | varchar(50) |true|
| created_at   | datetime |true|

#### holidays
| column          | datatype               |required|
| ----------------- |:----------------------- |-----|
| id       | varchar(50)   |true|
| fromDay   | datetime |true|
| toDay   | datetime |true|
| reason   | varchar(255) |true|
| created_at   | datetime |true|

#### noattendance
| column          | datatype               |required|
| ----------------- |:----------------------- |-----|
| id       | varchar(50)   |true|
| doctor_id          | varchar(50)     |true|
| from_date   | datetime |true|
| to_date   | datetime |true|
| reason   | varchar(255) |true|
| created_at   | datetime |true|

#### posts
| column          | datatype               |required|
| ----------------- |:----------------------- |-----|
| id       | varchar(50)   |true|
| author_id | varchar(50)     |false|
| post_quote        | varchar(50)    |true|
| post_date   | datetime |true|
| post_content   | text |true|
| post_title   | text |false|
| comments_count   |int |true|
| comments_list   | varchar(50) |true|
| post_type   | varchar(50) |false|
| modify_date   | datetime |false|
| created_at   | datetime |true|

#### comments
| column          | datatype               |required|
| ----------------- |:----------------------- |-----|
| id       | varchar(50)   |true|
| author_id | varchar(50)     |false|
| post_id | varchar(50)     |true|
| author_alias        | varchar(50)    |true|
| comment_date   | datetime |true|
| comment_content   | text |true|
| author_email   | varchar(50) |true|
| comment_type   | varchar(50) |false|
| modify_date   | datetime |false|
| created_at   | datetime |true|

### Schema
![](https://i.imgur.com/sJ68APm.png)

[ToC]
