A complete directory of your veterinary staff, including names, contact information, and employment status (active/inactive). Essential for performance analysis and resource management.
Key Features:
Active status tracking
Contact information
Name fields
Detailed Column Reference
Core Identifiers
Column | Type | Description | Examples | Business Logic |
provet_id | STRING | Your unique practice identifier | "pcus_1" | Tenant isolation key - always filter by this for performance |
user_id | BIGINT | Unique user identifier | 101, 2567, 8934 | System-generated, immutable once created. Primary key with provet_id |
Personal Information
Column | Type | Description | Examples | Business Logic |
first_name | STRING | User's first name | "emily", "michael", "sarah" | Normalization: Converted to lowercase for consistent storage and matching |
last_name | STRING | User's last name | "watson", "chen", "johnson" | Normalization: Converted to lowercase for consistent storage and matching |
STRING | User's email address | Normalization: Converted to lowercase. Primary contact method and often used for login |
Status & Access Control
Column | Type | Description | Examples | Business Logic |
is_user_active | BOOLEAN | User account active status | true, false | Logic:CASE WHEN is_active = 1 THEN true ELSE false END. Controls system access and visibility |
Audit Information
Column | Type | Description | Examples | Business Logic |
created_date | DATE | User account creation date | 2023-01-15, 2024-03-22 | When user account was first created in the system |
Common Query Patterns
Active Staff Directory
-- Current active staff with formatted names
SELECT
user_id,
INITCAP(first_name) || ' ' || INITCAP(last_name) as display_name,
email,
created_date,
DATEDIFF(CURRENT_DATE(), created_date) as days_with_practice
FROM production.users
WHERE provet_id = 'your_practice_id'
AND is_user_active = true
ORDER BY last_name, first_name;