app.medical_encounters
TablaSeguridad a nivel de fila activa
Medical encounters at an incident. Treatment notes are Restricted (data.restricted.read.medical) and field-encrypted: written only through app.record_medical_encounter and app.update_medical_encounter, read only through app.medical_encounters_masked.
Clave primaria: id
| Columna | Tipo | Admite nulos | Descripción |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.incidents on insert; never accepted from the caller and never changed.Hace referencia a app.organizations.id |
| incident_id | uuid | No | Incident.Hace referencia a app.incidents.id |
| patient_description | text | No | Who was treated, without identifying medical detail. |
| treatment_notes | bytea | Sí | Treatment given, encrypted with pgp_sym_encrypt under the Vault key xos_medical_notes_key. Restricted (data.restricted.read.medical): never selectable or writable by signed-in callers; written through app.record_medical_encounter and app.update_medical_encounter and read decrypted through app.medical_encounters_masked. |
| disposition | text | Sí | Outcome, such as released or transported. |
| deleted_at | timestamp with time zone | Sí | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Sí | Person who inserted the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Sí | Person who last changed the row, or null for a platform process. Set by the database.Hace referencia a app.people.id |