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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| encounter_id | uuid | not null, references encounters.id | |
| patient_id | uuid | not null, references patients.id | |
| prescriber_staff_id | uuid | not null, references staff.id | |
| status | prescription_status | not null | |
| written_at | timestamptz | not null |
Indexes (2)
(patient_id, written_at)(status)
Relationships
prescriptions.encounter_idreferencesencounters.idprescriptions.patient_idreferencespatients.idprescriptions.prescriber_staff_idreferencesstaff.idprescription_items.prescription_idreferencesprescriptions