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.

Start a project from this schema
$ 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

Every collection, field and relation above becomes a PocketBase migration in the new project. Change any of it afterwards with vela generate migration --ai, which opens this same diagram as an editor.