Group Schemes
The group-scheme service runs employer group cover: the arrangement that links an employer to a cohort of member policies, and the bulk machinery to enrol them.
Field reference: full columns, types and nullability live in the catalog: glossary terms
Scheme,SchemeMember,BulkEnrollmentJob. This page is the narrative.
Scheme and members
Schemeis the employer arrangement: a uniquecode, aname, the sponsoring employer (employer_party_locator), and astatus(free text, defaultACTIVE). It scopes the employer portal to the right member population.SchemeMemberassociates a covered member with the scheme:member_party_locator, thepolicy_locatoronce enrolled, and a membershipstatus. At most one membership per(scheme, member)(aUNIQUEconstraint). The billing account for the whole scheme rolls up to the employer; see Members & Parties.
Bulk enrollment
BulkEnrollmentJob processes a CSV/API upload of employees asynchronously: it tracks total / processed / failed_count, with per-row failures stored in an errors JSONB array on the job (status defaults to PENDING). This enables partial recovery: fix the failed rows and resubmit without re-running the whole batch.
Invariants
Scheme.codeandScheme.locatorare each unique; at most oneSchemeMemberper(scheme, member).- A bulk job's
errorsarray captures every failed row; successful rows yield aSchemeMember(and policy).
Caveats
Scheme.statusandSchemeMember.statusare freeTEXT(no DB CHECK); the OpenAPI schema documents a small enum, but it is not DB- or service-enforced.- All party/policy references are locator (text), not UUID FKs.
BulkEnrollmentJobError,BulkMember,EligibilityRosterandBillingAggregateappear in the model but are aspirational: errors live in the job's JSONB array, bulk rows are transient upload input, and the roster/aggregate are computed on demand (no tables).
