Data model
TLC normalizes telehealth backends into four core entities per brand.
Profile
A person or lead. Holds encrypted PII, consent fields, lifecycle stage, and custom attributes. Identified internally by UUID; URLs never carry profile ids.
Treatment
Links a profile to a product program (subscription status, product key, category). Journeys and segments filter on treatment attributes.
Order
Fulfilment and payment summary tied to a profile (external id, status, total cents). Detailed line items stay in the backend when possible.
Event
Immutable fact with a standard name, occurred_at, and stripped properties. Parsed through @thl/events zod schemas.
Organization
└── Brand (tenant boundary, RLS)
├── Profile ──┬── Treatment
│ └── Order
└── Event (stream)
Imports map CSV columns to these entities using canonical targets.