ERD (Paper-ready)

Entities:

1) USERS
- id (PK)
- full_name
- email (UNIQUE)
- password_hash
- role (receptionist, doctor)

2) PATIENTS
- id (PK)
- full_name
- gender
- date_of_birth
- phone_number
- address

3) APPOINTMENTS
- id (PK)
- patient_id (FK -> PATIENTS.id)
- doctor_id (FK -> USERS.id)
- appointment_date
- appointment_time
- status (scheduled, completed, cancelled)

4) MEDICAL_REPORTS
- id (PK)
- appointment_id (FK -> APPOINTMENTS.id, UNIQUE)
- doctor_id (FK -> USERS.id)
- diagnosis
- prescription
- report_date

Relationships / Cardinality:
- USERS (doctor) 1 —— N APPOINTMENTS
  (doctor_id in APPOINTMENTS references USERS.id)
- PATIENTS 1 —— N APPOINTMENTS
  (patient_id in APPOINTMENTS references PATIENTS.id)
- APPOINTMENTS 1 —— 0..1 MEDICAL_REPORTS
  (medical_reports.appointment_id is UNIQUE)
- USERS (doctor) 1 —— N MEDICAL_REPORTS
  (medical_reports.doctor_id references USERS.id)

