Clinic appointments

Practitioners offer services of a set length; availability says when each one takes appointments. An appointment books a patient with a practitioner for a service at a time and carries its status through to completion. Visit notes are written per appointment and only the practitioner who wrote them may read them back.

Comienza un proyecto con este esquema
$ npx vela create my-app --schema clinic-appointments
users auth
  • id* text
  • password* password
  • tokenKey* text
  • email* email
  • emailVisibility bool
  • verified bool
  • name text
  • avatar file
  • created autodate
  • updated autodate
practitioners
  • id* text
  • user* users
  • title text
  • specialty text
  • bio text
  • photo file
  • accepting_patients bool
  • created autodate
  • updated autodate
services
  • id* text
  • name* text
  • description text
  • duration_minutes* number
  • price number
  • practitioners practitioners[]
  • created autodate
  • updated autodate
availability
  • id* text
  • practitioner* practitioners
  • day* select
  • from* text
  • to* text
  • created autodate
  • updated autodate
patients
  • id* text
  • first_name* text
  • last_name* text
  • date_of_birth date
  • email email
  • phone* text
  • address text
  • insurance_number text
  • allergies text
  • user users
  • created autodate
  • updated autodate
appointments
  • id* text
  • patient* patients
  • practitioner* practitioners
  • service* services
  • starts_at* date
  • ends_at* date
  • status* select
  • reason text
  • reminder_sent bool
  • created autodate
  • updated autodate
visit_notes
  • id* text
  • appointment* appointments
  • author* users
  • notes editor
  • diagnosis text
  • follow_up text
  • created autodate
  • updated autodate

Cada colección, campo y relación de arriba se convierte en una migración de PocketBase en el nuevo proyecto. Cambia lo que quieras después con vela generate migration --ai, que abre este mismo diagrama como editor.