A database project for managing hospital records using SQL.
Hospital-SQL
is a structured database designed to manage hospital operations, including patient records, staff, medical procedures, and equipment. It uses a relational database model, offering efficient data organization and querying capabilities.
Here's the corrected version with PostgreSQL:
- SQL: For creating and managing relational database tables.
- PostgreSQL: As the database management system.
- DBeaver: For visualizing and managing the database.
- Postman: For API testing and interacting with the database.
Hospital-SQL
├───patients # Patient information and records
├───staff # Doctors, nurses, and other staff
├───procedures # Medical procedures and surgeries
├───equipment # Medical equipment and its usage
└───appointments # Appointments and schedule management
Here’s an updated Database Structure section with the structure of each table in your Hospital-SQL
project:
Column | Data Type | Description |
---|---|---|
patient_id |
INT | Primary key, auto-increment |
first_name |
VARCHAR(255) | Patient's first name |
last_name |
VARCHAR(255) | Patient's last name |
dob |
DATE | Date of birth |
gender |
VARCHAR(10) | Gender |
address |
VARCHAR(255) | Patient's address |
phone_number |
VARCHAR(15) | Contact number |
Column | Data Type | Description |
---|---|---|
staff_id |
INT | Primary key, auto-increment |
first_name |
VARCHAR(255) | Staff member's first name |
last_name |
VARCHAR(255) | Staff member's last name |
role |
VARCHAR(50) | Doctor, Nurse, Admin, etc. |
department |
VARCHAR(100) | Department they belong to |
salary |
DECIMAL(10,2) | Monthly salary |
Column | Data Type | Description |
---|---|---|
procedure_id |
INT | Primary key, auto-increment |
name |
VARCHAR(255) | Name of the procedure |
description |
TEXT | Procedure description |
cost |
DECIMAL(10,2) | Cost of the procedure |
duration |
INT | Duration in minutes |
Column | Data Type | Description |
---|---|---|
equipment_id |
INT | Primary key, auto-increment |
name |
VARCHAR(255) | Name of the equipment |
quantity |
INT | Available quantity |
cost_per_use |
DECIMAL(10,2) | Cost per use |
total_cost |
DECIMAL(10,2) | Total cost |
Column | Data Type | Description |
---|---|---|
appointment_id |
INT | Primary key, auto-increment |
patient_id |
INT | Foreign key referencing patients |
staff_id |
INT | Foreign key referencing staff |
procedure_id |
INT | Foreign key referencing procedures |
appointment_date |
DATE | Date of the appointment |
status |
VARCHAR(50) | Scheduled, Completed, Canceled |