Clients
3 min
Client demographic data and clinic relationship data live in two separate views — see Database Overview for why that matters before you start joining. Short version: use users for contact info, clients for clinic-specific financial state.
users — person record
- Basic contact info: name, email, phone, home_phone, work_phone, address, region, street, country_id
- created_date — when the person record was created (not clinic-specific)
- One row per person, regardless of how many clinics they're associated with.
clients — clinic relationship record
- owner_id → users.id
- clinic_id → clinics.id
- credit_balance, outstanding_balance — clinic-specific financial state, each with a companion _is_outdated flag
- loyalty_points
- last_visit_date
- referral_source_type, referral_source_details — marketing attribution fields, not previously documented here
- pending — flags a client record still awaiting confirmation/merge
userpetmapping — client-to-patient relationship
- user_id → users.id
- pet_id → pet.id
uservetmapping — client-to-clinic/vet relationship
- user_id → users.id
- vet_id → vets.id
- clinic_id → clinics.id
countries — reference table
Global reference table (not client-prefixed): id, name, code, iso_code, language_id. Joins from users.country_id.
user_clinic_observations
Not previously documented here. Free-text observations per user_id + clinic_id — internal notes a clinic keeps about a specific client, separate from the client's own demographic data.