0% found this document useful (0 votes)
20 views11 pages

DB Schema Hospital

The document outlines the Hospital Management Database Schema for an educational course, detailing the structure and specifications for various entities including Patient, Doctor, Department, Appointment, Medical Record, Symptom, and Prescription. Each entity includes specific attributes, data types, and constraints to ensure proper data management and integrity. It emphasizes that the database is for educational use only and should not be used for real-world medical decisions.

Uploaded by

vghuy23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views11 pages

DB Schema Hospital

The document outlines the Hospital Management Database Schema for an educational course, detailing the structure and specifications for various entities including Patient, Doctor, Department, Appointment, Medical Record, Symptom, and Prescription. Each entity includes specific attributes, data types, and constraints to ensure proper data management and integrity. It emphasizes that the database is for educational use only and should not be used for real-world medical decisions.

Uploaded by

vghuy23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CS486 – Introduction to Databases

​ Lecturer: ​ Lê Thị Nhàn, PhD.


​ TA: ​ Phan Thị Phương Uyên, MSc.
​ Lab instructor:​ Nguyễn Ngọc Toàn, MSc.
​ ​ Nguyễn Ngọc Minh Châu, MSc.
​ ​
CTT102 – Introduction to Databases ​ Hospital Management Schema

The Hospital Management


Database Specification
Disclaimer on Educational Use
Please note that this database is intended solely for educational purposes within this course. The
healthcare-related information contained within should not be interpreted as real-world clinical data
or used as a basis for medical decisions without proper consultation from a licensed healthcare
professional.

2
CTT102 – Introduction to Databases ​ Hospital Management Schema

1. Database Schema

3
CTT102 – Introduction to Databases ​ Hospital Management Schema

PATIENT

Column Name Data Type Description

PatientID (PK) varchar(10) The patient identifier number.

PatientName nvarchar(100) The patient's full name.

DOB date() The patient's birthday. Should be equal or smaller than


the current date.

Contact varchar(15) The patient phone number. Should be unique and not
allow null.

Address nvarchar(255) The patient address. Should not be null.

RegistrationDate date() The registration day. Default value: current date

InsurancePlan varchar(10) The patient insurance plan. Can only contain the values
from set {‘Basic’, ‘VIP’, ‘Premium’}, default value: ‘Basic’.

DOCTOR

Column Name Data Type Description

DoctorID (PK) varchar(10) The doctor identifier number.

DoctorName nvarchar(100) The doctor’s full name. Do not allow null

Specialty varchar(100) The doctor specialty

DepartmentID (FK) varchar(10) The ID of the department to which the doctor is


assigned.

Phone varchar(15) The doctor's phone number. Unique and do not allow
null.

Email varchar(100) The doctor’s email. Unique and do not allow null.

YearsOfExperience int The doctor’s years of experience. Must equal or greater


than 1, default value: 1

Rating decimal(2,1) The doctor's average rating, ranging from 0.0 to 5.0, with
a default value of 3.0.

4
CTT102 – Introduction to Databases ​ Hospital Management Schema

DEPARTMENT

Column Name Data Type Description

DepartmentID (PK) varchar(10) The department identifier number.

DepartmentName varchar(100) The department name.

HeadDoctorID (FK) varchar(10) The id (DoctorID) of the department head.

Budget decimal(10,2) The monthly budget of the department. Not null and
must greater than 50,000

APPOINTMENT

Column Name Data Type Description

AppointmentID (PK) varchar(10) The identifier number of the appointment

PatientID (FK) varchar(10) The identifier number of the patient, do not allow null.

DoctorID (FK) varchar(10) The identifier number of the doctor, do not allow null

AppointmentDate datetime The scheduled date and time for the appointment, do
not allow null.

Status varchar(20) The current status of the appointment, with a default


value of 'Scheduled'. Possible status values include:
●​ ‘Scheduled’: The appointment has been scheduled
●​ ‘Completed’: The appointment has been completed
●​ ‘Cancelled’: The appointment has been cancelled

ConsultationFee decimal(6,2) The consulting fee.

Duration int The duration of the appointment. Not allow null and
must greater than 0

5
CTT102 – Introduction to Databases ​ Hospital Management Schema

MEDICALRECORD

Column Name Data Type Description

RecordID (PK) varchar(10) The identifier number of the medical record.

AppointmentID (FK) varchar(10) The appintment’s id, do not allow null.

Diagnosis varchar(255) The diagnosed medical condition or disease identified


based on the patient's reported symptoms.

CreatedDate datetime The date and time when the medical record is created,
with a default value set to the current date.

Cost decimal(10,2) The total amount billed for all medical services
provided, including consultations, diagnostic tests, and
treatments.

FollowUpRequired bit Indicates if the medical record requires a follow-up,


with a default value of 0 (0 = no follow-up required, 1 =
follow-up needed).

SYMPTOM

Column Name Data Type Description

SymptomID (PK) varchar(10) The identifier number of the symptom.

SymptomName nvarchar(255) The name of the symptom.

MEDICALRECORD_SYMPTOM

Column Name Data Type Description

RecordID (PK) varchar(10) The identifier number of the medical record.

SymptomID (PK) varchar(10) The identifier number of the symptom.

Severity int The severity level of the symptom, ranging from 1


(mild) to 10 (severe).

PRESCRIPTION

Column Name Data Type Description

PrescriptionID varchar(10) The identifier number of the prescription.

RecordID varchar(10) The identifier number of the medical record.

6
CTT102 – Introduction to Databases ​ Hospital Management Schema

MedicineName nvarchar(100) The name of the medicine and not allow null

Dosage decimal(6,2) The prescribed dosage must be greater than 0 and


cannot be null.

Duration int The duration of the treatment must be greater than 0


and cannot be null.

Cost decimal(10,2) The cost of the prescribed medication or treatment.

2. Data Sample
PATIENT

DOCTOR

7
CTT102 – Introduction to Databases ​ Hospital Management Schema

DEPARTMENT

APPOINTMENT

MEDICALRECORD

8
CTT102 – Introduction to Databases ​ Hospital Management Schema

SYMPTOM

9
CTT102 – Introduction to Databases ​ Hospital Management Schema

MEDICALRECORD_SYMPTOM

PRESCRIPTION

10
CTT102 – Introduction to Databases ​ Hospital Management Schema

REFERENCES
[1] https://github.com/GziXnine/Hospital_Management_System

11

You might also like