Skip to content
Updated Jun 9, 2026

Documents

The document-service renders member-facing documents (policy schedules, EOBs, welcome and renewal letters) from market-keyed templates.

Field reference: full columns, types and nullability live in the catalog: glossary terms Document, Template. This page is the narrative.

Template → Document

  • Template is a reusable HTML layout keyed by (market_code, template_type) (UNIQUE per market + type), holding the content_html. market_code ties a template to a market profile.
  • Document is a rendered instance for a member: a locator, the party_locator it is for, the template_type and market_code it was rendered from, and the rendered bytes.

Document bytes are stored inline, not in object storage

Document.content is a BYTEA column; the rendered bytes live in the database row, not behind an S3/SSE-KMS URL. There is no object-store reference today.

Invariants

  • A Template is unique per (market_code, template_type).
  • A Document is rendered from the template selected by its (market_code, template_type); its locator is unique.

Caveats

  • party_locator / market_code are text references, not UUID FKs.
  • The member-portal DocumentSummary (a metadata-only list view, no bytes) is aspirational, a BFF projection, not a table.

Olly Health Insurance Platform