encounters table

The encounters table in the Hospital Management System Database Schema schema has 9 columns, keyed by id, with 4 foreign keys to patients, appointments, staff and departments. 10 columns in admissions, vital_signs, clinical_notes, referrals and 6 more reference it.

The spine of the clinical record. appointment_id is null for walk-ins and emergencies.

Columns (9)

Columns of the encounters table
ColumnTypeConstraintsDescription
iduuidprimary key
patient_iduuidnot null, references patients.id
appointment_iduuidreferences appointments.id
attending_staff_iduuidnot null, references staff.id
department_iduuidreferences departments.id
typeencounter_typenot null
started_attimestamptznot null
ended_attimestamptz
chief_complaintvarchar(255)

Indexes (2)

  • (patient_id, started_at)
  • (attending_staff_id, started_at)

Relationships