This is the second project of the fourth module in the Microverse program.
Check the below contents for further details about this project.
This repository includes a file called schema_based_on_diagram
with plain SQL
that can be used to recreate a database
📌 Tech Stack:
- Database built with
PostgreSQL
- Queries uses
SQL
📌 Key Features:
- Table for patients information which include (name / birth date)
- Each patient is linked with the medical history table through foreign key patient_id
- Table for medical histories information which include (admission / status)
- Table for invoices information which include (amount / creation / payment)
- Each invoice is linked with the medical history table through foreign key invoice_id
- Table for invoice items information which include (price / quantity / total)
- Each invoice item is linked with the (medical history / treatment) tables through foreign keys (invoice_id / treatment_id)
- Table for treatments information which include (type / name)
- Join table named histories treatments for bridging between dical histories & treatments tables
- All foriegn keys are indexed for optimizing queries performance
You can easily download or fork this repository and work on it immadiately!
📌 Prerequisites:
PostgreSQL
or any otherSQL
database
📌 Installation:
- Create a new database called
patient_clinic
- Run queries in schema_based_on_diagram.sql for creating all tables
📌 Mahammad:
📌 Carlos:
📌 Austin:
Some additional features I may implement in the project:
- Using
Binary
data types in tables - Implement stored procedures like
SQL Trigger
Wish to contribute to this project?
Contributions, issues, and feature requests are more than welcome!
Feel free to check the issues page too.
Like this project? Show your support by starring!
I thank everyone at Microverse for guiding me through this project.
This project is MIT licensed.