base_price
double precision
total_amount
double precision
tax_amount
double precision
payment method
payment_method
Documentation for project Clinic Management System
Project
Name
Clinic Management System
Report
Generated
4/8/2026 | 8:36:12 PM
tables
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
name
varchar
Yes
description
text
Yes
Keys
SPECIALITY_pkey
Column in SPECIALITY_pkey
id
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
first_name
varchar
last_name
varchar
email
varchar
phone
varchar
date_of_birth
date
gender
registered_at
timestamp
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
name
varchar
category
varchar
description
text
base_price
double precision
Keys
DIAGNOSTIC_TEST_pkey
Column in DIAGNOSTIC_TEST_pkey
id
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
speciality_id
uuid
first_name
varchar
last_name
varchar
email
varchar
license_number
varchar
status
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
patient_id
uuid
doctor_id
uuid
scheduled_at
timestamp
duration_mins
integer
status
notes
text
created_at
timestamp
payment_id
integer
Keys
APPOINTMENT_pkey
Column in APPOINTMENT_pkey
id
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
appointment_id
uuid
total_amount
double precision
tax_amount
double precision
payment method
status
paid_at
timestamp
transaction_ref
varchar
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
appointment_id
uuid
started_at
timestamp
ended_at
timestamp
cheif_complaint
text
diagnosis
text
prescription
text
followup_req
Keys
CONSULTATION_pkey
Column in CONSULTATION_pkey
id
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
consultation_id
uuid
diagnostic_test_id
uuid
reason
text
status
ordered_at
timestamp
Keys
PRESCRIBED TEST_pkey
Column in PRESCRIBED TEST_pkey
id
Columns
Name
Data type
Param
Key
Not Null
id
uuid
Yes
Yes
prescribed_test_id
uuid
report_url
varchar
findings
text
remarks
text
reported_at
timestamp
reported_by
varchar
Keys
DIAGNOSTIC_REPORT_pkey
Column in DIAGNOSTIC_REPORT_pkey
id
relationships
Name
DOCTOR_speciality_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in SPECIALITY
Column in DOCTOR
SPECIALITY_pkey
id
speciality_id
Name
PRESCRIBED TEST_diagnostic_test_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in DIAGNOSTIC_TEST
Column in PRESCRIBED TEST
DIAGNOSTIC_TEST_pkey
id
diagnostic_test_id
Name
PRESCRIBED TEST_consultation_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in CONSULTATION
Column in PRESCRIBED TEST
CONSULTATION_pkey
id
consultation_id
Name
PAYMENT_appointment_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in APPOINTMENT
Column in PAYMENT
APPOINTMENT_pkey
id
appointment_id
Name
DIAGNOSTIC_REPORT_prescribed_test_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in PRESCRIBED TEST
Column in DIAGNOSTIC_REPORT
PRESCRIBED TEST_pkey
id
prescribed_test_id
Name
APPOINTMENT_patient_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in PATIENT
Column in APPOINTMENT
PATIENT_pkey
id
patient_id
Name
APPOINTMENT_doctor_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in DOCTOR
Column in APPOINTMENT
DOCTOR_pkey
id
doctor_id
Name
APPOINTMENT_payment_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in PAYMENT
Column in APPOINTMENT
PAYMENT_pkey
id
payment_id
Lines
Line name
followup_req-followup
Line name
payment method-payment_method