prescriptions table

The prescriptions table in the Hospital Management System Database Schema schema has 6 columns, keyed by id, with 3 foreign keys to encounters, patients and staff. 1 column in prescription_items references it.

The order document. The drugs themselves are the line items.

Columns (6)

Columns of the prescriptions table
ColumnTypeConstraintsDescription
iduuidprimary key
encounter_iduuidnot null, references encounters.id
patient_iduuidnot null, references patients.id
prescriber_staff_iduuidnot null, references staff.id
statusprescription_statusnot null
written_attimestamptznot null

Indexes (2)

  • (patient_id, written_at)
  • (status)

Relationships