bed_assignments table

The bed_assignments table in the Hospital Management System Database Schema schema has 5 columns, keyed by id, with 2 foreign keys to admissions and beds.

A patient can be moved between beds. released_at null means currently occupying.

Columns (5)

Columns of the bed_assignments table
ColumnTypeConstraintsDescription
iduuidprimary key
admission_iduuidnot null, references admissions.id
bed_iduuidnot null, references beds.id
assigned_attimestamptznot null
released_attimestamptz

Indexes (2)

  • (admission_id, assigned_at)
  • (bed_id, released_at)

Relationships