KafkaTopic
type: Class
has property: topicName
has property: eventSchema
layer: contracts
comment: A Kafka topic carrying domain events between Olly services.

topicName
type: DatatypeProperty
range: xsd:string

eventSchema
type: DatatypeProperty
range: xsd:string

McpTool
type: Class
has property: toolName
has property: inputSchema
layer: contracts
comment: An MCP tool exposed by olly-mcp; consumed by AI agents.

toolName
type: DatatypeProperty
range: xsd:string

inputSchema
type: DatatypeProperty
range: xsd:string

Service
type: Class
has property: servicePort
has property: serviceContainer
layer: contracts
comment: A deployable Olly microservice (e.g. claims, billing).

servicePort
type: DatatypeProperty
range: xsd:integer

serviceContainer
type: DatatypeProperty
range: xsd:string

OpenSearchIndex
type: Class
has property: indexName
layer: data
comment: An OpenSearch index used for full-text or analytics queries.

indexName
type: DatatypeProperty
range: xsd:string

PostgresTable
type: Class
has property: tableName
has property: primaryKey
layer: data
comment: A Postgres table owned by an Olly service, holding domain data.

tableName
type: DatatypeProperty
range: xsd:string

primaryKey
type: DatatypeProperty
range: xsd:string

SnowflakeTable
type: Class
has property: warehouseLayer
layer: data
comment: A Snowflake warehouse table for BI / actuarial reporting.

warehouseLayer
type: DatatypeProperty
range: xsd:string

Account
type: Class
alignments:
  api: socotra:Account
has property: locator
has property: name
has property: billingLevel
has property: currency
has property: displayNumber
layer: domain
owner service: policy-admin
referenced in:
  docs: docs/site/domain/members.md § Account — The Billing Entity
  docs: docs/site/domain/billing.md § Premium Billing Cycle
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  openapi:
    schema.org: Account
    service: policy-admin
  openapi:
    method: POST
    path: /accounts
    service: policy-admin
  openapi:
    method: GET
    path: /accounts/{locator}
    service: policy-admin
  openapi:
    method: PATCH
    path: /accounts/{locator}
    service: policy-admin
  openapi:
    method: GET
    path: /accounts/list
    service: policy-admin
  openapi:
    method: PATCH
    path: /accounts/{locator}/billingLevel
    service: policy-admin
  openapi:
    method: POST
    path: /accounts/{locator}/number/generate
    service: policy-admin
  openapi:
    method: POST
    path: /accounts/{locator}/number/set
    service: policy-admin
  openapi:
    method: GET
    path: /accounts/{locator}/quotes/list
    service: policy-admin
  openapi:
    method: POST
    path: /clients/accounts
    service: broker-api
  openapi:
    method: GET
    path: /accounts/{locator}/contacts/list
    service: policy-admin
  openapi:
    method: POST
    path: /accounts/{locator}/contacts
    service: policy-admin
  openapi:
    method: PATCH
    path: /accounts/{locator}/contacts/{contactLocator}
    service: policy-admin
  openapi:
    method: DELETE
    path: /accounts/{locator}/contacts/{contactLocator}
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.accounts
  api:
    schema.org: AccountListResponse
    spec ref: components/schemas/AccountListResponse
  api:
    schema.org: AccountUpdateReplaceDataRequest
    spec ref: components/schemas/AccountUpdateReplaceDataRequest
comment: The financial container that owns policies and receives invoices. An Account may bill at the ACCOUNT level (all policies consolidated, typical for employer groups) or at the POLICY level (each policy billed independently). All Charges, Invoices, Payments, and LedgerEntries roll up to the Account. Aligned to Socotra's Account resource, which also represents a billing entity holding policies and financial balances.

locator
type: DatatypeProperty
range: xsd:string

name
type: DatatypeProperty
range: xsd:string

billingLevel
type: DatatypeProperty
range: xsd:string

currency
type: DatatypeProperty
range: xsd:string

displayNumber
type: DatatypeProperty
range: xsd:string

Accumulator Bucket
type: Class
layer: domain
owner service: member-portal-api
referenced in:
  docs: socotra/featureGuide/billing/installmentsAndInstallmentLattices.md (charges and billing concepts)
  openapi:
    schema.org: AccumulatorBucket
    spec: api/openapi/member-portal-api.yaml
    spec ref: components/schemas/AccumulatorBucket
status: aspirational
comment: A named counter that tracks a member's year-to-date spending against a specific benefit limit — for example, the amount applied toward a deductible, out-of-pocket maximum, or visit cap. AccumulatorBuckets reset on the plan anniversary or calendar year boundary and are updated whenever a claim line is adjudicated. They feed eligibility checks during real-time prior-auth and claim decisions, ensuring that benefit caps are correctly enforced across all submitted claims within a coverage period.

Adjustment
type: Class
has property: locator
has property: accountId
has property: policyId
has property: type
has property: amount
has property: currency
has property: reason
has property: status
has property: appliedAt
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Ledger Entries (Double-Entry)
  postgres:
    pk: id
    service: billing
    table: billing.adjustments
comment: A manual debit or credit applied to an Account outside of the regular invoice cycle, such as a pro-rata refund on mid-term cancellation or a goodwill credit. Adjustments generate corresponding LedgerEntry records that maintain double-entry balance.

accountId
type: ObjectProperty
range: xsd:string

policyId
type: ObjectProperty
range: xsd:string

type
type: DatatypeProperty
range: xsd:string

amount
type: DatatypeProperty
range: xsd:decimal

reason
type: DatatypeProperty
range: xsd:string

status
type: DatatypeProperty
range: xsd:string

appliedAt
type: DatatypeProperty
range: xsd:dateTime

Appointment
type: Class
has property: locator
has property: episodeLocator
has property: providerLocator
has property: type
has property: status
has property: slotLocator
has property: linkOutUrl
has property: scheduledAt
has property: notes
layer: domain
owner service: care
referenced in:
  docs: docs/site/domain/providers.md § Credentialing Lifecycle
  openapi:
    schema.org: Appointment
    service: care
  openapi:
    method: GET
    path: /episodes/{locator}/appointments
    service: care
  openapi:
    method: POST
    path: /episodes/{locator}/appointments
    service: care
  openapi:
    method: PATCH
    path: /appointments/{locator}/confirm
    service: care
  openapi:
    method: PATCH
    path: /appointments/{locator}/attend
    service: care
  openapi:
    method: PATCH
    path: /appointments/{locator}/cancel
    service: care
  openapi:
    method: PATCH
    path: /appointments/{locator}/no-show
    service: care
  postgres:
    pk: id
    service: care
    table: appointments
comment: A scheduled encounter between a Member and a healthcare Provider, booked through the care service. Appointments are linked to a care Episode and a specific ProviderSlot, and carry status (BOOKED, ATTENDED, CANCELLED) plus a telehealth link-out URL where applicable.

episodeLocator
type: DatatypeProperty
range: xsd:string

providerLocator
type: DatatypeProperty
range: xsd:string

slotLocator
type: DatatypeProperty
range: xsd:string

linkOutUrl
type: DatatypeProperty
range: xsd:string

scheduledAt
type: DatatypeProperty
range: xsd:dateTime

notes
type: DatatypeProperty
range: xsd:string

Audit Item
type: Class
layer: domain
owner service: consent
referenced in:
  docs: socotra/featureGuide/workManagement/diaries.md (audit trail and diary concepts)
  openapi:
    schema.org: AuditItem
    spec: api/openapi/consent.yaml
    spec ref: components/schemas/AuditItem
status: aspirational
comment: An immutable log record capturing who did what to which entity and when, supporting regulatory compliance and internal governance. Audit items are created automatically whenever a sensitive consent, data-sharing, or policy action is performed, linking the acting user, the affected party, and the operation performed. They are append-only: no audit item can be modified or deleted, ensuring a tamper-evident trail for GDPR and clinical data governance purposes.

Auth Token
type: Class
alignments:
  api: socotra:AuthToken
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: AuthTokenCreateRequest
    spec ref: components/schemas/AuthTokenCreateRequest
  api:
    schema.org: AuthTokenResponse
    spec ref: components/schemas/AuthTokenResponse
status: aspirational
comment: A short-lived API credential issued to a service or external integration to authenticate against the insurance platform API. AuthTokens are scoped to a tenant, carry an expiry timestamp, and are stored hashed. In Olly, API authentication is handled by Keycloak JWT tokens and OpenBao dynamic secrets; AuthToken as a platform-managed credential type is aspirational. Concept sourced from Socotra; not yet modeled in Olly code.

Autopay Preference
type: Class
has property: policyId
has property: enabled
has property: method
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Autopay
  postgres:
    pk: id
    service: billing
    table: billing.autopay_preferences
comment: A per-policy flag indicating whether direct debit should be initiated automatically on the invoice due date. When Enabled is true, the billing service triggers payment collection without manual intervention, reducing late-payment risk.

enabled
type: DatatypeProperty
range: xsd:boolean

method
type: DatatypeProperty
range: xsd:string

Aux Data
type: Class
alignments:
  api: socotra:AuxData
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: AuxDataResponse
    spec ref: components/schemas/AuxDataResponse
status: aspirational
comment: Extensible key-value metadata that can be attached to any Socotra entity (policy, account, claim, etc.) without requiring a schema change. AuxData entries are schematised via AuxDataKeySet definitions that specify allowed keys, data types, and validation rules. In Olly, auxiliary data is currently stored as JSONB columns (e.g. Policy.Document, PolicyElement.Data); AuxData would provide a more structured, queryable alternative. Concept sourced from Socotra; not yet modeled in Olly code.

Benefit
type: Class
has property: benefitCode
has property: annualLimit
layer: domain
owner service: tbd
referenced in:
  snapshot:
    file: docs/superpowers/snapshots/2026-04-30-pre-code-evolution/ontology/concepts/domain/benefit.yaml
    reason: hand-curated v0 — alignments and lifecycle ported forward
status: aspirational
comment: A categorised allowance under a Coverage (e.g. "annual physiotherapy visits", "outpatient pharmacy"). Aspirational: not currently backed by an Olly service or Postgres table.

benefitCode
type: DatatypeProperty
range: xsd:string

annualLimit
type: DatatypeProperty
range: xsd:decimal

Billing Aggregate
type: Class
layer: domain
owner service: group-scheme-service
referenced in:
  docs: socotra/featureGuide/billing/invoicing.md (invoice aggregation at account level)
  docs: socotra/featureGuide/financials/accountingPrimer.md (account balance concepts)
  openapi:
    schema.org: BillingAggregate
    spec: api/openapi/group-scheme-service.yaml
    spec ref: components/schemas/BillingAggregate
status: aspirational
comment: An aggregated billing view that summarises the financial position of all active policies within a Group Scheme, giving employers and brokers a consolidated picture of outstanding invoices, total premiums due, and payment status across their entire member cohort. BillingAggregate is computed from the billing service's account and invoice data rather than stored as a persisted entity; it is assembled on-demand when the employer portal requests the scheme billing dashboard. The concept parallels account-level balance reporting in the Socotra platform, where invoice and payment totals roll up to the account.

Billing Plan
type: Class
alignments:
  api: socotra:BillingPlan
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/billing.md § Invoice Lifecycle
  api:
    schema.org: BillingPlanRef
    spec ref: components/schemas/BillingPlanRef
status: aspirational
comment: A product-level billing configuration that governs invoicing frequency, payment due dates, grace period length, and retry strategy for a policy or account. BillingPlans abstract the billing rules away from individual policies, enabling consistent billing across all policies on a product. Concept sourced from Socotra; not yet modeled as a separate entity in Olly code.

Broker Config
type: Class
has property: locator
has property: brokerId
has property: delegatedAuthorityLimit
layer: domain
owner service: broker-api
referenced in:
  openapi:
    method: GET
    path: /authority
    service: broker-api
  openapi:
    method: PUT
    path: /authority
    service: broker-api
  postgres:
    pk: id
    service: broker-api
    table: broker_api.broker_configs
comment: Configuration for a broker integration, recording the broker's Party reference and their delegated authority limit — the maximum policy size the broker may bind without insurer countersignature.

brokerId
type: ObjectProperty
range: xsd:string

delegatedAuthorityLimit
type: DatatypeProperty
range: xsd:decimal

Bulk Enrollment Job
type: Class
has property: locator
has property: schemeId
has property: status
has property: total
has property: processed
has property: failedCount
has property: errors
layer: domain
owner service: group-scheme-service
referenced in:
  openapi:
    method: POST
    path: /schemes/{locator}/bulk-enrollments
    service: group-scheme-service
  openapi:
    method: GET
    path: /bulk-enrollments/{jobLocator}/status
    service: group-scheme-service
  postgres:
    pk: id
    service: group-scheme-service
    table: group_scheme.bulk_enrollment_jobs
comment: An asynchronous batch job that processes a CSV or API upload of employee enrollments for a Group Scheme. Tracks total records, processed count, failure count, and per-row error messages to enable partial recovery and audit.

schemeId
type: ObjectProperty
range: xsd:string

total
type: DatatypeProperty
range: xsd:integer

processed
type: DatatypeProperty
range: xsd:integer

failedCount
type: DatatypeProperty
range: xsd:integer

errors
type: DatatypeProperty
range: xsd:string

Bulk Enrollment Job Error
type: Class
layer: domain
owner service: group-scheme-service
referenced in:
  docs: socotra/featureGuide/policyManagement/policyTransactions.md (transaction validation errors)
  openapi:
    schema.org: BulkEnrollmentJobError
    spec: api/openapi/group-scheme-service.yaml
    spec ref: components/schemas/BulkEnrollmentJobError
status: aspirational
comment: A structured error record produced when a single row within a BulkEnrollmentJob fails to process — for example, because a member's identifier is missing, coverage dates are invalid, or a product rule rejects the application. Each error captures the offending row reference, error code, and human-readable message so that HR administrators can correct and resubmit without re-processing the entire batch. Errors are aggregated on the parent BulkEnrollmentJob and surfaced in the employer portal's batch report view.

Bulk Member
type: Class
layer: domain
owner service: group-scheme-service
referenced in:
  docs: socotra/featureGuide/policyManagement/policyTransactions.md (batch policy issuance context)
  openapi:
    schema.org: BulkMember
    spec: api/openapi/group-scheme-service.yaml
    spec ref: components/schemas/BulkMember
status: aspirational
comment: A single member record submitted as part of a BulkEnrollmentJob, representing one employee or dependent whose coverage is being created or amended in a batch upload. BulkMember carries enough identity and coverage data (name, date of birth, product code, effective date) for the enrollment service to validate and bind a policy without a live quote flow. Successfully processed BulkMember records result in a fully active Member and MemberCoverage; failed rows generate BulkEnrollmentJobError entries.

Charge
type: Class
alignments:
  api: socotra:Charge
has property: locator
has property: policyId
has property: termId
has property: claimId
has property: claimLocator
has property: accountId
has property: category
has property: amount
has property: currency
has property: status
has property: chargeDate
has property: description
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Premium Billing Cycle
  docs: docs/site/domain/billing.md § Ledger Entries (Double-Entry)
  postgres:
    pk: id
    service: billing
    table: billing.charges
  api:
    schema.org: ChargeRef
    spec ref: components/schemas/ChargeRef
  api:
    schema.org: ChargeCreateRequest
    spec ref: components/schemas/ChargeCreateRequest
  api:
    schema.org: ChargeResponse
    spec ref: components/schemas/ChargeResponse
comment: A discrete monetary obligation raised against an Account, categorised as PREMIUM, TAX, or FEE. Charges are the atomic unit of billing: each InvoiceLineItem references exactly one Charge, and each Charge generates a corresponding DEBIT LedgerEntry. Aligned to Socotra's Charge resource, which similarly represents a fee or premium amount applied to a policy account.

termId
type: ObjectProperty
range: xsd:string

claimId
type: ObjectProperty
range: xsd:string

claimLocator
type: DatatypeProperty
range: xsd:string

category
type: DatatypeProperty
range: xsd:string

chargeDate
type: DatatypeProperty
range: xsd:date

description
type: DatatypeProperty
range: xsd:string

Claim
type: Class
alignments:
  fhir: fhir:Claim
  fibo: fibo-fbc-pas-fpas:Claim
  api: socotra:Claim
has property: locator
has property: policyId
has property: termId
has property: claimantPartyId
has property: status
has property: incidentDate
has property: document
layer: domain
lifecycle:
  states: submitted
  states: in_review
  states: approved
  states: denied
  states: paid
  states: appealed
owner service: claims
referenced in:
  docs: docs/site/domain/claims.md § Claim State Machine
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  kafka:
    schema.org: Claim
    service: claims
  openapi:
    schema.org: Claim
    service: claims
  openapi:
    method: GET
    path: /claims
    service: claims
  openapi:
    method: POST
    path: /claims
    service: claims
  openapi:
    method: GET
    path: /claims/{claimId}
    service: claims
  openapi:
    method: GET
    path: /claims
    service: member-portal-api
  openapi:
    method: POST
    path: /claims
    service: member-portal-api
  openapi:
    method: GET
    path: /claims/{locator}
    service: member-portal-api
  postgres:
    pk: id
    service: claims
    table: claims.claims
  api:
    schema.org: ClaimRef
    spec ref: components/schemas/ClaimRef
comment: A member's request for reimbursement of covered medical services. Claims are submitted complete and progress through adjudication (SUBMITTED → UNDER_REVIEW → APPROVED/REJECTED → PAID → CLOSED). Each Claim is itemised into ClaimLine records and may carry supporting ClaimDocument attachments. Aligned to Socotra's Claim resource, which also represents an insurance loss event progressing through an adjudication lifecycle.
subclass of: fibo-fbc-pas-fpas:Claim

claimantPartyId
type: ObjectProperty
range: xsd:string

incidentDate
type: DatatypeProperty
range: xsd:date

document
type: DatatypeProperty
range: xsd:string

Claim Detail
type: Class
layer: domain
owner service: member-portal-api
referenced in:
  docs: socotra/featureGuide/claims/fnol.md (claim lifecycle and data model)
  openapi:
    schema.org: ClaimDetail
    spec: api/openapi/member-portal-api.yaml
    spec ref: components/schemas/ClaimDetail
status: aspirational
comment: A denormalised read model that aggregates a Claim together with its ClaimLines, adjudication outcome, prior-auth reference, and payment amounts into a single response payload for the member portal. ClaimDetail avoids multiple round-trips when displaying a claim receipt or EOB to a member. It is not a separately persisted entity; the claims service assembles it on the fly from the underlying relational tables and exposes it through the member-portal-api contract.

Claim Document
type: Class
has property: claimId
has property: filename
has property: contentType
has property: url
has property: uploadedAt
layer: domain
owner service: claims
referenced in:
  docs: docs/site/domain/claims.md § What Happens at Each Transition
  postgres:
    pk: id
    service: claims
    table: claims.claim_documents
comment: A supporting file attached to a Claim during adjudication, such as a medical invoice, discharge summary, or diagnostic report. ClaimDocument records store the S3 URL, content type, and upload timestamp; they are created when a claim enters PENDING_INFO status.

filename
type: DatatypeProperty
range: xsd:string

contentType
type: DatatypeProperty
range: xsd:string

url
type: DatatypeProperty
range: xsd:string

uploadedAt
type: DatatypeProperty
range: xsd:dateTime

Claim Event
type: Class
has property: claimId
has property: eventType
has property: fromStatus
has property: toStatus
has property: actor
has property: note
layer: domain
owner service: claims
referenced in:
  docs: docs/site/domain/claims.md § Appeal Process
  postgres:
    pk: id
    service: claims
    table: claims.claim_events
comment: An immutable audit record of every status change, actor action, and note on a Claim. ClaimEvents are append-only and include APPEAL_SUBMITTED and APPEAL_DENIED events alongside normal state transitions, forming a complete adjudication audit trail.

eventType
type: DatatypeProperty
range: xsd:string

fromStatus
type: DatatypeProperty
range: xsd:string

toStatus
type: DatatypeProperty
range: xsd:string

actor
type: DatatypeProperty
range: xsd:string

note
type: DatatypeProperty
range: xsd:string

Claim Line
type: Class
has property: claimId
has property: lineNumber
has property: elementId
has property: coverageTermKey
has property: description
has property: amountClaimed
has property: amountAllowed
has property: amountPaid
has property: reasonCode
has property: metadata
layer: domain
owner service: claims
referenced in:
  docs: docs/site/domain/claims.md § ClaimLine Explained
  postgres:
    pk: id
    service: claims
    table: claims.claim_lines
comment: One itemised procedure or service within a Claim, corresponding to a loop in an EDI 837 transaction. Records the billed amount (AmountClaimed), the plan-allowed amount (AmountAllowed), and the plan's payment (AmountPaid), with ANSI X12 reason codes for any contractual adjustment.

lineNumber
type: DatatypeProperty
range: xsd:integer

elementId
type: ObjectProperty
range: xsd:string

coverageTermKey
type: DatatypeProperty
range: xsd:string

amountClaimed
type: DatatypeProperty
range: xsd:decimal

amountAllowed
type: DatatypeProperty
range: xsd:decimal

amountPaid
type: DatatypeProperty
range: xsd:decimal

reasonCode
type: DatatypeProperty
range: xsd:string

metadata
type: DatatypeProperty
range: xsd:string

Claim Submission
type: Class
layer: domain
owner service: claims
referenced in:
  docs: socotra/featureGuide/claims/fnol.md (first notice of loss and claim creation)
  openapi:
    schema.org: ClaimSubmission
    spec: api/openapi/claims.yaml
    spec ref: components/schemas/ClaimSubmission
status: aspirational
comment: The intake payload a member or provider submits to initiate the claims adjudication process. A ClaimSubmission bundles the member identifier, incident date, diagnosis codes, procedure codes, provider reference, and any supporting document references into a single request. On successful ingestion the claims service creates a Claim entity and transitions it to the SUBMITTED state, from which adjudication, prior-auth checks, and payment flow proceed.

Claim Summary
type: Class
layer: domain
owner service: member-portal-api
referenced in:
  docs: socotra/featureGuide/claims/fnol.md (claim data model overview)
  openapi:
    schema.org: ClaimSummary
    spec: api/openapi/member-portal-api.yaml
    spec ref: components/schemas/ClaimSummary
status: aspirational
comment: A lightweight projection of a Claim designed for list views in the member portal and broker dashboard, returning only the fields needed for scanning — claim reference, date of service, provider name, status, and total amount — without the full line-item detail. ClaimSummary is generated by the claims service at query time and is not persisted independently; it complements ClaimDetail by giving consumers a fast, paginated overview before they drill into individual claims.

Commission
type: Class
has property: locator
has property: brokerId
has property: policyLocator
has property: rate
has property: amount
has property: status
layer: domain
owner service: broker-api
referenced in:
  openapi:
    schema.org: Commission
    service: broker-api
  openapi:
    method: GET
    path: /commissions
    service: broker-api
  openapi:
    method: POST
    path: /commissions
    service: broker-api
  openapi:
    method: GET
    path: /commissions/{locator}
    service: broker-api
  openapi:
    method: PATCH
    path: /commissions/{locator}/pay
    service: broker-api
  postgres:
    pk: id
    service: broker-api
    table: broker_api.commissions
comment: A fee payable to a broker when a policy they introduced is bound or renewed. Commission records capture the applicable rate, computed amount, and settlement status, and are reconciled against invoices generated by the billing service.

policyLocator
type: DatatypeProperty
range: xsd:string

rate
type: DatatypeProperty
range: xsd:decimal

Condition
type: Class
alignments:
  fhir: fhir:Condition
  sct: snomed:64572001
has property: conditionText
layer: domain
owner service: tbd
referenced in:
  snapshot:
    file: docs/superpowers/snapshots/2026-04-30-pre-code-evolution/ontology/concepts/domain/condition.yaml
    reason: hand-curated v0 — alignments and lifecycle ported forward
status: aspirational
comment: A clinically established diagnosis attached to a Member, sourced from Encounter outputs or self-reported history. Aspirational: not currently backed by an Olly service or Postgres table.

conditionText
type: DatatypeProperty
range: xsd:string

Config Bundle
type: Class
layer: domain
owner service: policy-admin
referenced in:
  docs: socotra/featureGuide/policyManagement/policyManagementTopicIndex.md (tenant configuration concepts)
  openapi:
    schema.org: ConfigBundle
    spec: api/openapi/policy-admin.yaml
    spec ref: components/schemas/ConfigBundle
status: aspirational
comment: A versioned, tenant-scoped package of product and billing configuration that is deployed atomically to the policy-admin service. A ConfigBundle bundles product definitions, rule sets, market profiles, document templates, and installment plan settings into a single artifact, ensuring that all configuration is consistent and auditable. Deploying a new ConfigBundle version advances the active product configuration without requiring individual resource updates, supporting zero-downtime configuration releases.

Consent Item
type: Class
layer: domain
owner service: consent
referenced in:
  docs: socotra/featureGuide/workManagement/userAssociations.md (user data governance context)
  openapi:
    schema.org: ConsentItem
    spec: api/openapi/consent.yaml
    spec ref: components/schemas/ConsentItem
status: aspirational
comment: A single discrete consent decision within a ConsentRecord, capturing the consent type (e.g. NHS_DATA_SHARING, MARKETING_EMAIL, THIRD_PARTY_ACCESS), the decision value (granted or withdrawn), and the timestamp at which the decision was recorded. ConsentItems provide the granular audit trail required under GDPR Article 7 and NHS data governance standards, allowing each consent category to be independently granted or withdrawn without affecting the member's other consent preferences.

Consent Record
type: Class
has property: partyLocator
has property: consentType
has property: granted
layer: domain
owner service: consent
referenced in:
  docs: docs/site/domain/members.md § Consent Types and Why They Matter
  openapi:
    method: GET
    path: /consent/{partyLocator}
    service: consent
  openapi:
    method: PUT
    path: /consent/{partyLocator}
    service: consent
  openapi:
    method: GET
    path: /consent/{partyLocator}/audit
    service: consent
  openapi:
    method: GET
    path: /consent
    service: member-portal-api
  openapi:
    method: PUT
    path: /consent
    service: member-portal-api
  postgres:
    pk: id
    service: consent
    table: consent.consent_records
comment: A member's preference for a specific consent type (e.g. NHS_DATA_SHARING, WEARABLE_SYNC, MARKETING_COMMUNICATIONS), keyed by (PartyLocator, ConsentType). At most one record per combination exists; the Granted boolean captures the current preference.

partyLocator
type: DatatypeProperty
range: xsd:string

consentType
type: DatatypeProperty
range: xsd:string

granted
type: DatatypeProperty
range: xsd:boolean

Contact
type: Class
alignments:
  api: socotra:Contact
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: ContactRef
    spec ref: components/schemas/ContactRef
  api:
    schema.org: ContactCreateRequest
    spec ref: components/schemas/ContactCreateRequest
status: aspirational
comment: A named contact point associated with an Account or Policy — distinct from the Account holder Party. Contacts carry a name, role (e.g. BILLING_CONTACT, BENEFITS_ADMINISTRATOR), email, and phone, enabling multiple communication targets per account. In Olly, contact information is currently embedded in the Party record; Contact as a separate entity is aspirational. Concept sourced from Socotra; not yet modeled in Olly code.

Conversation
type: Class
has property: orgLocator
has property: userSub
has property: title
has property: persona
layer: domain
owner service: ai-chat
referenced in:
  postgres:
    pk: id
    service: ai-chat
    table: conversations
comment: An AI chat session between a user and the Olly AI assistant, scoped to an organisation (org_locator). Conversations contain an ordered sequence of Messages and carry a persona identifier that controls the assistant's behaviour.

orgLocator
type: DatatypeProperty
range: xsd:string

userSub
type: DatatypeProperty
range: xsd:string

title
type: DatatypeProperty
range: xsd:string

persona
type: DatatypeProperty
range: xsd:string

Coverage
type: Class
alignments:
  fhir: fhir:Coverage
  fibo: fibo-fbc-pas-fpas:InsuranceCoverage
layer: domain
owner service: eligibility
referenced in:
  docs: docs/site/domain/policies.md § PolicyElement
  openapi:
    method: GET
    path: /check
    service: eligibility
  openapi:
    method: GET
    path: /members/{memberId}/coverage
    service: eligibility
  openapi:
    method: GET
    path: /coverage
    service: member-portal-api
  postgres:
    pk: id
    service: eligibility
    table: eligibility.member_coverage
comment: The abstract insurance entitlement a Member holds under a Policy at a given point in time. Coverage is the eligibility service's read model: it denormalises PolicyElement and MemberCoverage data into a queryable form for fast eligibility checks during claim adjudication.

Coverage Accumulator
type: Class
has property: partyId
has property: termId
has property: accumulatorType
has property: coverageTermKey
has property: limitAmount
has property: consumedAmount
has property: currency
has property: lastClaimLocator
layer: domain
owner service: eligibility
referenced in:
  docs: docs/architecture/overview.md § Data Flow
  openapi:
    method: GET
    path: /members/{memberId}/deductible
    service: eligibility
  openapi:
    method: GET
    path: /accumulators
    service: member-portal-api
  postgres:
    pk: id
    service: eligibility
    table: eligibility.coverage_accumulators
comment: A running balance tracking how much of a benefit limit a Member has consumed in a PolicyTerm — deductible, out-of-pocket maximum, or benefit-category cap. Accumulators are loaded and updated during adjudication to determine how much the plan pays on each ClaimLine.

partyId
type: ObjectProperty
range: xsd:string

accumulatorType
type: DatatypeProperty
range: xsd:string

limitAmount
type: DatatypeProperty
range: xsd:decimal

consumedAmount
type: DatatypeProperty
range: xsd:decimal

lastClaimLocator
type: DatatypeProperty
range: xsd:string

Coverage Term
type: Class
alignments:
  api: socotra:CoverageTerm
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/policies.md § PolicyTerm and PolicyElement
  api:
    schema.org: CoverageTermRef
    spec ref: components/schemas/CoverageTermRef
status: aspirational
comment: A discrete benefit category within a product definition, specifying the type of coverage (e.g. INPATIENT_HOSPITAL, OUTPATIENT_SPECIALIST, MENTAL_HEALTH) and its associated benefit parameters such as copay, coinsurance percentage, deductible, and annual limit. In Olly, CoverageTerms are currently embedded as a JSONB blob on PolicyElement; Socotra models them as a first-class configurable resource. Concept sourced from Socotra; not yet modeled as a separate entity in Olly code.

Credentialing Request
type: Class
has property: locator
has property: providerId
has property: status
has property: submittedAt
has property: reviewedAt
has property: reviewerNotes
layer: domain
owner service: provider
referenced in:
  docs: docs/site/domain/providers.md § Credentialing Lifecycle
  openapi:
    method: POST
    path: /credentialing
    service: provider
  openapi:
    method: GET
    path: /credentialing/{npi}/status
    service: provider
  postgres:
    pk: id
    service: provider
    table: provider.credentialing_requests
comment: A provider's application to join the Olly network, implemented as a Temporal workflow to handle the multi-week human review process. Records submission timestamp, reviewer decision (APPROVED/REJECTED), and reviewer notes; on approval, Provider.NetworkStatus is set to ACTIVE.

providerId
type: ObjectProperty
range: xsd:string

submittedAt
type: DatatypeProperty
range: xsd:dateTime

reviewedAt
type: DatatypeProperty
range: xsd:dateTime

reviewerNotes
type: DatatypeProperty
range: xsd:string

Credentialing Status
type: Class
layer: domain
owner service: provider
referenced in:
  docs: socotra/featureGuide/policyManagement/policyStatus.md (status lifecycle patterns)
  openapi:
    schema.org: CredentialingStatus
    spec: api/openapi/provider.yaml
    spec ref: components/schemas/CredentialingStatus
status: aspirational
comment: A read-model snapshot of where a CredentialingRequest currently stands in the provider verification lifecycle. CredentialingStatus exposes the stage (e.g. DOCUMENTS_RECEIVED, VERIFICATION_IN_PROGRESS, APPROVED, SUSPENDED), the date the last status change occurred, and any blocking reason notes. Brokers and network managers query it to track which providers are cleared for service without reading the full credentialing workflow history; it is updated whenever the underlying CredentialingRequest transitions state.

Credit
type: Class
alignments:
  api: socotra:Credit
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/billing.md § Ledger Entries (Double-Entry)
  api:
    schema.org: CreditResponse
    spec ref: components/schemas/CreditResponse
  api:
    schema.org: CreditListResponse
    spec ref: components/schemas/CreditListResponse
status: aspirational
comment: An unapplied balance on an Account that can be applied against future invoices — arising from overpayments, mid-term cancellation refunds, or goodwill adjustments. Credits are distributed (CreditDistribution) to specific invoices to reduce the amount due. In Olly, credits are currently handled as CREDIT-direction LedgerEntries and Adjustment records; Socotra models them as a distinct distributable entity. Concept sourced from Socotra; not yet a separate entity in Olly code.

Deductible Status
type: Class
layer: domain
owner service: eligibility
referenced in:
  docs: socotra/featureGuide/policyManagement/coverageTerms.md (deductible and limit coverage term types)
  openapi:
    schema.org: DeductibleStatus
    spec: api/openapi/eligibility.yaml
    spec ref: components/schemas/DeductibleStatus
status: aspirational
comment: A real-time snapshot of a member's progress toward satisfying the deductible threshold on their active coverage for the current benefit period. DeductibleStatus combines the configured deductible limit from the coverage terms with the year-to-date amounts applied from adjudicated claims, exposing the remaining balance a member must pay before the insurer begins covering costs. It is computed by the eligibility service from AccumulatorBucket values and coverage term data, and is surfaced during eligibility checks and in the member portal.

Deletion Request
type: Class
has property: partyLocator
has property: deleteType
has property: status
has property: requestedByType
has property: reason
has property: requestedAt
has property: completedAt
has property: attemptCount
layer: domain
owner service: consent
referenced in:
  docs: docs/site/domain/members.md § GDPR Deletion Workflow
  openapi:
    method: POST
    path: /consent/{partyLocator}/deletion
    service: consent
  openapi:
    method: GET
    path: /consent/{partyLocator}/deletion/{id}
    service: consent
  postgres:
    pk: id
    service: consent
    table: consent.deletion_requests
comment: A GDPR Article 17 right-to-erasure request for a Party. SOFT deletion anonymises PHI fields while preserving referential integrity; HARD deletion purges all party data with tombstones. A Temporal workflow fans out the request to every service holding PHI for that PartyLocator.

deleteType
type: DatatypeProperty
range: xsd:string

requestedByType
type: DatatypeProperty
range: xsd:string

requestedAt
type: DatatypeProperty
range: xsd:dateTime

completedAt
type: DatatypeProperty
range: xsd:dateTime

attemptCount
type: DatatypeProperty
range: xsd:integer

Delinquency
type: Class
alignments:
  api: socotra:Delinquency
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/billing.md § Grace Period and Delinquency Handling
  api:
    schema.org: DelinquencyResponse
    spec ref: components/schemas/DelinquencyResponse
status: aspirational
comment: A formal delinquency record created when an Invoice remains unpaid past its grace period. Delinquency tracks the escalation timeline from missed payment through lapse notification to cancellation, and may be subject to a moratorium (suspension of delinquency processing). In Olly, delinquency state is currently embedded in Invoice and Policy fields; Socotra models it as a standalone lifecycle entity. Concept sourced from Socotra; not yet a separate entity in Olly code.

Diagnostics Referral
type: Class
has property: locator
has property: episodeLocator
has property: referralType
has property: clinicLocator
has property: status
has property: appointmentLocator
layer: domain
owner service: care
referenced in:
  openapi:
    method: GET
    path: /episodes/{locator}/referrals
    service: care
  openapi:
    method: POST
    path: /episodes/{locator}/referrals
    service: care
  openapi:
    method: PATCH
    path: /referrals/{locator}/book
    service: care
  openapi:
    method: PATCH
    path: /referrals/{locator}/complete
    service: care
  openapi:
    method: PATCH
    path: /referrals/{locator}/cancel
    service: care
  postgres:
    pk: id
    service: care
    table: diagnostics_referrals
comment: A care-pathway instruction for a Member to undergo diagnostic tests (imaging, blood work, etc.), generated within a clinical Episode. Records the referring provider, target clinic, referral type, and the resulting Appointment locator once booked.

referralType
type: DatatypeProperty
range: xsd:string

clinicLocator
type: DatatypeProperty
range: xsd:string

appointmentLocator
type: DatatypeProperty
range: xsd:string

Diary Entry
type: Class
alignments:
  api: socotra:DiaryEntry
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: DiaryEntryResponse
    spec ref: components/schemas/DiaryEntryResponse
  api:
    schema.org: DiaryEntryCreateRequest
    spec ref: components/schemas/DiaryEntryCreateRequest
status: aspirational
comment: A time-stamped note or task record attached to an insurance entity (policy, claim, account), used by operations teams to track action items, follow-ups, and adjudicator notes. DiaryEntries differ from audit events in that they are authored by humans for human consumption and can be updated. Concept sourced from Socotra; in Olly, notes are currently embedded in claim and credentialing event records.

Disbursement
type: Class
alignments:
  api: socotra:Disbursement
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/claims.md § What Happens at Each Transition
  api:
    schema.org: DisbursementRef
    spec ref: components/schemas/DisbursementRef
status: aspirational
comment: An outbound payment from the insurer to a payee — such as a claims payment to a provider or a refund to a policyholder. Disbursements are distinct from Payments (inbound premium receipts) and are tracked separately for cash management and regulatory reporting. Concept sourced from Socotra; in Olly, provider claim payments are currently modelled as outbound Payment records rather than a distinct Disbursement entity.

Document
type: Class
alignments:
  api: socotra:Document
has property: locator
has property: partyLocator
has property: templateType
has property: marketCode
has property: content
layer: domain
owner service: document-service
referenced in:
  docs: docs/site/domain/claims.md § EDI 837 / 835 Context
  docs: docs/architecture/overview.md § Data Flow
  openapi:
    schema.org: Document
    service: document-service
  openapi:
    method: GET
    path: /documents/{locator}
    service: document-service
  openapi:
    method: GET
    path: /eob/{claimId}
    service: billing
  openapi:
    method: GET
    path: /documents
    service: member-portal-api
  openapi:
    method: GET
    path: /documents/{locator}
    service: member-portal-api
  postgres:
    pk: id
    service: document-service
    table: documents.documents
  api:
    schema.org: DocumentListResponse
    spec ref: components/schemas/DocumentListResponse
  api:
    schema.org: DocumentEventData
    spec ref: components/schemas/DocumentEventData
comment: A generated or uploaded file associated with a policy, claim, or member record. Documents include policy schedules, Explanations of Benefit (EOBs), EDI-generated PDFs, and consent forms. Files are stored in S3 with SSE-KMS encryption and referenced by URL. Aligned to Socotra's Document resource, which similarly represents persisted document instances attached to insurance entities.

templateType
type: DatatypeProperty
range: xsd:string

marketCode
type: DatatypeProperty
range: xsd:string

content
type: DatatypeProperty
range: xsd:string

Document Summary
type: Class
layer: domain
owner service: member-portal-api
referenced in:
  docs: socotra/featureGuide/documents/documentManagement.md (document retrieval and association)
  openapi:
    schema.org: DocumentSummary
    spec: api/openapi/member-portal-api.yaml
    spec ref: components/schemas/DocumentSummary
status: aspirational
comment: A lightweight projection of a Document containing only the metadata fields needed for list and browse views — document reference, type, associated entity (policy or claim), creation date, and download URL — without the full binary payload. DocumentSummary allows the member portal to display a document inbox and let members choose which files to download, deferring retrieval of the actual content until explicitly requested. It mirrors the document management pattern described in the Socotra platform, where documents are associated with policies, transactions, quotes, and claims and retrieved by reference.

Eligibility Roster
type: Class
layer: domain
owner service: group-scheme-service
referenced in:
  docs: socotra/featureGuide/policyManagement/policyStatus.md (coverage and policy status)
  openapi:
    schema.org: EligibilityRoster
    spec: api/openapi/group-scheme-service.yaml
    spec ref: components/schemas/EligibilityRoster
status: aspirational
comment: A consolidated snapshot of eligibility status for every active member in a Group Scheme, used by HR administrators and brokers to verify that all employees have valid, in-force coverage. The EligibilityRoster aggregates MemberCoverage records across the scheme's policies and returns a structured list showing each member's coverage tier, effective date, and eligibility status. It is assembled on demand from eligibility service data rather than persisted independently, and serves as the primary audit artefact for group scheme compliance checks.

Encounter
type: Class
alignments:
  fhir: fhir:Encounter
has property: encounterType
has property: performedBy
layer: domain
owner service: tbd
referenced in:
  snapshot:
    file: docs/superpowers/snapshots/2026-04-30-pre-code-evolution/ontology/concepts/domain/encounter.yaml
    reason: hand-curated v0 — alignments and lifecycle ported forward
status: aspirational
comment: A clinical interaction between a Member and a Provider — appointment, hospital admission, telehealth call, etc. Aspirational: not currently backed by an Olly service or Postgres table.

encounterType
type: DatatypeProperty
range: xsd:string

performedBy
type: ObjectProperty
range: olly:Provider

Enrollment
type: Class
layer: domain
owner service: enrollment
referenced in:
  docs: socotra/featureGuide/policyQuotation/quotes.md (quote issuance creating the policy)
  openapi:
    schema.org: Enrollment
    spec: api/openapi/enrollment.yaml
    spec ref: components/schemas/Enrollment
status: aspirational
comment: The act and record of a member being admitted into a coverage product, tying a Party to a Policy with a defined effective date and coverage tier. An Enrollment is initiated either through the quote-and-bind flow (for individual members) or via a BulkEnrollmentJob (for group schemes). Once complete, it results in an active MemberCoverage record that gates eligibility checks and claim adjudication. The enrollment service orchestrates the transition from a bound quote to an in-force policy, including triggering billing setup and notification dispatch.

EOB Reference
type: Class
layer: domain
owner service: billing
referenced in:
  docs: socotra/featureGuide/documents/documentManagement.md (document association with financial entities)
  docs: socotra/featureGuide/billing/invoicing.md (invoice document rendering)
  openapi:
    schema.org: EOBReference
    spec: api/openapi/billing.yaml
    spec ref: components/schemas/EOBReference
status: aspirational
comment: A pointer to an Explanation of Benefits document generated after a claim is adjudicated, linking the claim to the rendered EOB file that details what was billed, what the insurer allowed, what was applied to the deductible, and what the member owes. EOBReference stores the document locator and metadata so the billing and member-portal services can surface the EOB alongside the invoice without re-fetching the full claim payload. It is analogous to the document reference pattern used throughout the Socotra platform where documents are associated with financial transactions.

Episode
type: Class
has property: locator
has property: partyLocator
has property: triageSessionLocator
has property: careType
has property: status
has property: summary
has property: closedAt
layer: domain
owner service: care
referenced in:
  openapi:
    schema.org: Episode
    service: care
  openapi:
    method: GET
    path: /episodes
    service: care
  openapi:
    method: POST
    path: /episodes
    service: care
  openapi:
    method: GET
    path: /episodes/{locator}
    service: care
  openapi:
    method: PATCH
    path: /episodes/{locator}/cancel
    service: care
  openapi:
    method: PATCH
    path: /episodes/{locator}/close
    service: care
  openapi:
    method: GET
    path: /internal/episodes/{locator}
    service: care
  openapi:
    method: GET
    path: /internal/members/{partyLocator}/episodes
    service: care
  postgres:
    pk: id
    service: care
    table: episodes
comment: A bounded care episode — a single clinical interaction or course of treatment — linking a triage Session to one or more Appointments, Prescriptions, and DiagnosticsReferrals. Episodes carry a care type (GP, SPECIALIST, MENTAL_HEALTH) and close when the clinical need is resolved.

triageSessionLocator
type: DatatypeProperty
range: xsd:string

careType
type: DatatypeProperty
range: xsd:string

summary
type: DatatypeProperty
range: xsd:string

closedAt
type: DatatypeProperty
range: xsd:dateTime

Field Definition
type: Class
has property: locator
has property: productVersionId
has property: name
has property: fieldType
has property: required
has property: defaultValue
has property: allowedValues
has property: displayOrder
layer: domain
owner service: policy-admin
referenced in:
  openapi:
    method: GET
    path: /products/{productLocator}/versions/{version}/fields
    service: policy-admin
  openapi:
    method: POST
    path: /products/{productLocator}/versions/{version}/fields
    service: policy-admin
  openapi:
    method: DELETE
    path: /products/{productLocator}/versions/{version}/fields/{fieldLocator}
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.field_definitions
comment: A product-level metadata schema entry that defines a custom field (name, type, required flag, allowed values) collectible on policies, quotes, or transactions of a given ProductVersion. Field definitions drive dynamic form rendering in the employer and member portals.

productVersionId
type: ObjectProperty
range: xsd:string

fieldType
type: DatatypeProperty
range: xsd:string

required
type: DatatypeProperty
range: xsd:boolean

defaultValue
type: DatatypeProperty
range: xsd:string

allowedValues
type: DatatypeProperty
range: xsd:string

displayOrder
type: DatatypeProperty
range: xsd:integer

Financial Instrument
type: Class
alignments:
  api: socotra:FinancialInstrument
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/billing.md § Payment Methods
  api:
    schema.org: FinancialInstrumentResponse
    spec ref: components/schemas/FinancialInstrumentResponse
status: aspirational
comment: A stored payment method on file for an Account — such as a bank account (for direct debit), credit card token (for card payments), or ACH routing details. FinancialInstruments are used by the autopay and billing services to initiate payment collection without requiring the account holder to re-enter payment details. Concept sourced from Socotra; Olly stores payment method details in payment gateway tokens but has no explicit FinancialInstrument entity yet.

FNOL
type: Class
alignments:
  api: socotra:Fnol
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/claims.md § Claim State Machine
  api:
    schema.org: FnolResponse
    spec ref: components/schemas/FnolResponse
  api:
    schema.org: FnolCreateRequest
    spec ref: components/schemas/FnolCreateRequest
status: aspirational
comment: First Notice of Loss — the initial report filed by a policyholder or claimant to notify the insurer of an insured event before a full claim is submitted. An FNOL captures the date, nature, and location of the loss and creates a claim shell that the adjudication team can enrich. In Olly's current model, claims are submitted complete; FNOL as a pre-claim stage is not yet implemented. Concept sourced from Socotra; not yet modeled in Olly code.

Installment Plan
type: Class
alignments:
  api: socotra:InstallmentPlan
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/billing.md § Installment Schedules
  api:
    schema.org: InstallmentPlanRef
    spec ref: components/schemas/InstallmentPlanRef
status: aspirational
comment: A configuration template that defines the frequency, number of installments, and billing rules for splitting a premium into periodic payments. InstallmentPlans are assigned to products or accounts and drive the generation of InstallmentSchedule instances. Concept sourced from Socotra; not yet modeled as a separate entity in Olly code (currently embedded in InstallmentSchedule).

Installment Schedule
type: Class
has property: locator
has property: accountId
has property: policyId
has property: totalAmount
has property: currency
has property: frequency
has property: installments
has property: startDate
has property: status
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Installment Schedules
  postgres:
    pk: id
    service: billing
    table: billing.installment_schedules
comment: A plan for splitting an annual premium into periodic invoices. The billing scheduler reads active InstallmentSchedules and generates the next Invoice on each due date until all installments are exhausted, supporting MONTHLY, QUARTERLY, and ANNUAL frequencies.

totalAmount
type: DatatypeProperty
range: xsd:decimal

frequency
type: DatatypeProperty
range: xsd:string

installments
type: DatatypeProperty
range: xsd:integer

startDate
type: DatatypeProperty
range: xsd:date

Invoice
type: Class
alignments:
  api: socotra:Invoice
has property: locator
has property: accountId
has property: status
has property: totalAmount
has property: currency
has property: dueDate
has property: finalisedAt
has property: paidAt
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Invoice Lifecycle
  docs: docs/site/domain/billing.md § Grace Period and Delinquency Handling
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  kafka:
    schema.org: Invoice
    service: billing
  openapi:
    schema.org: Invoice
    service: billing
  openapi:
    method: GET
    path: /invoices
    service: billing
  openapi:
    method: GET
    path: /invoices/{invoiceId}
    service: billing
  postgres:
    pk: id
    service: billing
    table: billing.invoices
  api:
    schema.org: InvoiceResponse
    spec ref: components/schemas/InvoiceResponse
  api:
    schema.org: InvoiceListResponse
    spec ref: components/schemas/InvoiceListResponse
comment: A demand for premium payment issued to an Account for one billing period. Invoices progress through DRAFT → FINALISED → PAID (or VOID). Each Invoice contains one or more InvoiceLineItem rows and carries grace period and delinquency timestamps used to trigger policy lapse. Aligned to Socotra's Invoice resource, which also models a billing statement with lifecycle states and settlement tracking.

dueDate
type: DatatypeProperty
range: xsd:date

finalisedAt
type: DatatypeProperty
range: xsd:dateTime

paidAt
type: DatatypeProperty
range: xsd:dateTime

Invoice Line Item
type: Class
has property: invoiceId
has property: chargeId
has property: amount
has property: description
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Premium Billing Cycle
  postgres:
    pk: id
    service: billing
    table: billing.invoice_line_items
comment: One line on an Invoice, linking to a specific Charge record (PREMIUM, TAX, or FEE) and its amount. The sum of all InvoiceLineItem amounts equals Invoice.TotalAmount; this denormalisation enables efficient invoice rendering without re-summing charges.

invoiceId
type: ObjectProperty
range: xsd:string

chargeId
type: ObjectProperty
range: xsd:string

Judgement
type: Class
has property: sessionId
has property: judgeModel
has property: rubricVersion
has property: toneScore
has property: prdComplianceScore
has property: safetyScore
has property: summary
has property: judgeInputTokens
has property: judgeOutputTokens
layer: domain
owner service: triage
referenced in:
  postgres:
    pk: id
    service: triage
    table: triage.judgements
comment: An automated quality-scoring evaluation of a triage Session by a judge LLM, scoring tone, PRD compliance, and safety against a rubric. Judgements are produced by the triage evaluation harness and stored to track model regression across prompt versions.

sessionId
type: ObjectProperty
range: xsd:string

judgeModel
type: DatatypeProperty
range: xsd:string

rubricVersion
type: DatatypeProperty
range: xsd:string

toneScore
type: DatatypeProperty
range: xsd:integer

prdComplianceScore
type: DatatypeProperty
range: xsd:integer

safetyScore
type: DatatypeProperty
range: xsd:integer

judgeInputTokens
type: DatatypeProperty
range: xsd:integer

judgeOutputTokens
type: DatatypeProperty
range: xsd:integer

Ledger Account
type: Class
alignments:
  api: socotra:LedgerAccount
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/billing.md § Ledger Entries (Double-Entry)
  api:
    schema.org: LedgerAccountResponse
    spec ref: components/schemas/LedgerAccountResponse
status: aspirational
comment: A named chart-of-accounts entry in the double-entry bookkeeping system, representing a category such as PREMIUM_RECEIVABLE, TAX_PAYABLE, or CLAIMS_EXPENSE. LedgerAccounts provide the account classification dimension for regulatory financial reporting and actuarial analysis. In Olly, LedgerEntry records carry direction and type but are not yet categorised against a formal chart of accounts. Concept sourced from Socotra; not yet modeled in Olly code.

Ledger Entry
type: Class
has property: locator
has property: accountId
has property: policyId
has property: entryType
has property: referenceId
has property: referenceType
has property: direction
has property: amount
has property: currency
has property: description
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Ledger Entries (Double-Entry)
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  postgres:
    pk: id
    service: billing
    table: billing.ledger_entries
comment: A double-entry bookkeeping record for every financial movement on an Account. EntryType values are CHARGE, PAYMENT, ADJUSTMENT_DEBIT, ADJUSTMENT_CREDIT, and REVERSAL; Direction is DEBIT or CREDIT. The net sum of all LedgerEntries for an Account equals its current balance.

entryType
type: DatatypeProperty
range: xsd:string

referenceId
type: ObjectProperty
range: xsd:string

referenceType
type: DatatypeProperty
range: xsd:string

direction
type: DatatypeProperty
range: xsd:string

Market Profile
type: Class
has property: locator
has property: code
has property: currentVersion
layer: domain
owner service: policy-admin
referenced in:
  openapi:
    method: POST
    path: /market-profiles
    service: policy-admin
  openapi:
    method: GET
    path: /market-profiles/{code}
    service: policy-admin
  openapi:
    method: GET
    path: /market-profiles/list
    service: policy-admin
  openapi:
    method: GET
    path: /market-profiles/{code}/current
    service: policy-admin
  openapi:
    method: GET
    path: /internal/market-profiles/{code}/current
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.market_profiles
comment: A versioned regulatory and billing configuration bundle for a specific jurisdiction or market segment. MarketProfiles govern which product features are available, which regulatory regime applies, and which document templates are used — enabling multi-market operation from a single platform.

code
type: DatatypeProperty
range: xsd:string

currentVersion
type: DatatypeProperty
range: xsd:integer

Market Profile Version
type: Class
has property: locator
has property: marketProfileId
has property: version
has property: jurisdictionCode
has property: regulatoryRegime
has property: featureFlags
has property: billingRules
has property: mandatoryFields
has property: documentTemplates
has property: publishedAt
layer: domain
owner service: policy-admin
referenced in:
  openapi:
    method: POST
    path: /market-profiles/{code}/versions
    service: policy-admin
  openapi:
    method: GET
    path: /market-profiles/{code}/versions/list
    service: policy-admin
  openapi:
    method: GET
    path: /market-profiles/{code}/versions/{version}
    service: policy-admin
  openapi:
    method: PATCH
    path: /market-profiles/{code}/versions/{version}
    service: policy-admin
  openapi:
    method: PATCH
    path: /market-profiles/{code}/versions/{version}/publish
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.market_profile_versions
comment: A published snapshot of a MarketProfile at a point in time, capturing jurisdiction code, regulatory regime, feature flags, billing rules, mandatory fields, and document template assignments. Policies reference the MarketProfileVersion in force at their inception date.

marketProfileId
type: ObjectProperty
range: xsd:string

version
type: DatatypeProperty
range: xsd:integer

jurisdictionCode
type: DatatypeProperty
range: xsd:string

regulatoryRegime
type: DatatypeProperty
range: xsd:string

featureFlags
type: DatatypeProperty
range: xsd:string

billingRules
type: DatatypeProperty
range: xsd:string

mandatoryFields
type: DatatypeProperty
range: xsd:string

documentTemplates
type: DatatypeProperty
range: xsd:string

publishedAt
type: DatatypeProperty
range: xsd:dateTime

Medication
type: Class
layer: domain
owner service: care
referenced in:
  openapi:
    schema.org: Medication
    spec: api/openapi/care.yaml
    spec ref: components/schemas/Medication
status: aspirational
comment: A reference to a drug or therapeutic agent within Olly's clinical data model, used primarily in the context of Prescriptions issued during a care Episode. Medication records carry the drug name, formulary classification, and any relevant prior-auth requirements, enabling the platform to check whether a prescribed drug is covered under a member's benefit plan before dispensing. The concept is clinical in origin and has no direct Socotra analogue; it exists in Olly to support the triage and care pathway services.

Member
type: Class
alignments:
  fhir: fhir:Patient
  schema org: schema:Person
layer: domain
owner service: policy-admin
referenced in:
  docs: docs/site/domain/members.md § The Party Model
  docs: docs/site/domain/index.md § People Concepts
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.parties
comment: An individual insured person (primary subscriber or dependent) covered under a PolicyElement. A Member's identity is stored as a Party of type INDIVIDUAL; their coverage entitlements are in MemberCoverage. The term "member" is the business-facing umbrella for any covered person.
subclass of: schema:Person
alternative label: Insured
alternative label: Beneficiary

Member Coverage
type: Class
has property: partyId
has property: policyId
has property: policyElementId
has property: elementStaticId
has property: termId
has property: policyLocator
has property: partyLocator
has property: productCode
has property: elementType
has property: coverageTerms
has property: status
has property: effectiveFrom
has property: effectiveTo
layer: domain
owner service: eligibility
referenced in:
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  postgres:
    pk: id
    service: eligibility
    table: eligibility.member_coverage
comment: The eligibility service's denormalised read model of a Member's active coverage on a Policy and PolicyTerm. Populated by consuming enrollment.completed events, it enables fast eligibility lookups during claim adjudication without joining across enrollment tables.

policyElementId
type: ObjectProperty
range: xsd:string

elementStaticId
type: ObjectProperty
range: xsd:string

productCode
type: DatatypeProperty
range: xsd:string

elementType
type: DatatypeProperty
range: xsd:string

coverageTerms
type: DatatypeProperty
range: xsd:string

effectiveFrom
type: DatatypeProperty
range: xsd:date

effectiveTo
type: DatatypeProperty
range: xsd:date

Message
type: Class
has property: conversationId
has property: role
has property: content
has property: toolCalls
has property: tokenUsage
layer: domain
owner service: ai-chat
referenced in:
  postgres:
    pk: id
    service: ai-chat
    table: messages
comment: A single turn in an AI chat Conversation — either a user message or an assistant response. Messages store the LLM role (user/assistant/tool), content, tool call metadata, and token usage for cost tracking and prompt tracing via Langfuse.

conversationId
type: ObjectProperty
range: xsd:string

role
type: DatatypeProperty
range: xsd:string

toolCalls
type: DatatypeProperty
range: xsd:string

tokenUsage
type: DatatypeProperty
range: xsd:string

Moratorium
type: Class
alignments:
  api: socotra:Moratorium
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: MoratoriumRef
    spec ref: components/schemas/MoratoriumRef
status: aspirational
comment: A temporary suspension of billing enforcement actions (delinquency escalation, lapse, cancellation) for a defined set of policies — typically applied during regulatory-mandated relief periods or catastrophe events. Moratoriums carry match criteria to identify affected policies and a rule set governing which billing events are suppressed. Concept sourced from Socotra; not yet modeled in Olly code.

Notification Log
type: Class
has property: locator
has property: eventId
has property: partyId
has property: eventType
has property: channel
has property: status
has property: subject
has property: body
has property: failureReason
has property: attemptCount
has property: sentAt
layer: domain
owner service: notifications
referenced in:
  openapi:
    method: POST
    path: /send
    service: notifications
  postgres:
    pk: id
    service: notifications
    table: notifications.notification_log
comment: A delivery record for a single outbound notification (push, SMS, or email) sent on behalf of a domain event. Captures the channel, status (SENT/FAILED), subject, body preview, attempt count, and failure reason to support retry logic and delivery auditing.

eventId
type: ObjectProperty
range: xsd:string

channel
type: DatatypeProperty
range: xsd:string

subject
type: DatatypeProperty
range: xsd:string

body
type: DatatypeProperty
range: xsd:string

failureReason
type: DatatypeProperty
range: xsd:string

sentAt
type: DatatypeProperty
range: xsd:dateTime

Notification Preference
type: Class
has property: partyId
has property: partyLocator
has property: email
has property: phone
has property: preferredChannel
has property: optedOutEvents
layer: domain
owner service: notifications
referenced in:
  openapi:
    method: GET
    path: /preferences
    service: notifications
  openapi:
    method: PUT
    path: /preferences
    service: notifications
  openapi:
    method: GET
    path: /preferences
    service: member-portal-api
  openapi:
    method: PUT
    path: /preferences
    service: member-portal-api
  postgres:
    pk: id
    service: notifications
    table: notifications.notification_preferences
comment: A Member's channel and opt-out preferences for notifications. Records preferred delivery channel (PUSH, SMS, EMAIL), contact details, and the list of event types the member has explicitly opted out of receiving.

email
type: DatatypeProperty
range: xsd:string

phone
type: DatatypeProperty
range: xsd:string

preferredChannel
type: DatatypeProperty
range: xsd:string

optedOutEvents
type: DatatypeProperty
range: xsd:string

Notification Preferences
type: Class
layer: domain
owner service: notifications
referenced in:
  openapi:
    schema.org: NotificationPreferences
    spec: api/openapi/notifications.yaml
    spec ref: components/schemas/NotificationPreferences
status: aspirational
comment: The aggregate container of all NotificationPreference records for a given Member, representing their complete channel and opt-in/opt-out configuration across event types. The notifications service reads this container when deciding how to route an outbound notification — email, SMS, push, or in-app — checking each preference before dispatching. NotificationPreferences is returned as a single structured object by the GET preferences endpoint so that the member portal can render the full preferences screen in one call without assembling individual records client-side.

Party
type: Class
has property: locator
has property: type
has property: firstName
has property: lastName
has property: name
has property: email
has property: phone
has property: address
has property: dateOfBirth
layer: domain
owner service: policy-admin
referenced in:
  docs: docs/site/domain/members.md § The Party Model
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  openapi:
    schema.org: Party
    service: policy-admin
  openapi:
    method: POST
    path: /parties
    service: policy-admin
  openapi:
    method: GET
    path: /parties/{locator}
    service: policy-admin
  openapi:
    method: PATCH
    path: /parties/{locator}
    service: policy-admin
  openapi:
    method: GET
    path: /parties/list
    service: policy-admin
  openapi:
    method: GET
    path: /parties/{locator}/roles/list
    service: policy-admin
  openapi:
    method: GET
    path: /internal/parties/{locator}
    service: policy-admin
  openapi:
    method: POST
    path: /clients/parties
    service: broker-api
  openapi:
    method: GET
    path: /profile
    service: member-portal-api
  openapi:
    method: PATCH
    path: /profile
    service: member-portal-api
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.parties
comment: The unified identity record for any person or organisation on the platform — members, employers, brokers, and providers all share this entity, distinguished by Type (INDIVIDUAL, ORGANISATION, PROVIDER). PHI fields are application-layer encrypted before storage; the Locator is the externally shareable stable reference.

firstName
type: DatatypeProperty
range: xsd:string

lastName
type: DatatypeProperty
range: xsd:string

address
type: DatatypeProperty
range: xsd:string

dateOfBirth
type: DatatypeProperty
range: xsd:date

Party Role
type: Class
has property: partyId
has property: entityType
has property: entityId
has property: role
layer: domain
owner service: policy-admin
referenced in:
  docs: docs/site/domain/members.md § PartyRole — Roles on Policies and Accounts
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.party_roles
comment: A contextual role a Party plays on a specific entity (Account, Policy, or Quote). One Party can hold multiple roles across multiple entities — for example, ACCOUNT_HOLDER on an employer account and INSURED on individual policies.

entityType
type: DatatypeProperty
range: xsd:string

entityId
type: ObjectProperty
range: xsd:string

Pathway
type: Class
has property: pathwayCode
layer: domain
owner service: tbd
referenced in:
  snapshot:
    file: docs/superpowers/snapshots/2026-04-30-pre-code-evolution/ontology/concepts/domain/pathway.yaml
    reason: hand-curated v0 — alignments and lifecycle ported forward
status: aspirational
comment: A guided clinical decision flow (NHS 111 style) that maps a presenting Symptom set to a recommended care destination. Aspirational: not currently backed by an Olly service or Postgres table.

pathwayCode
type: DatatypeProperty
range: xsd:string

Payment
type: Class
alignments:
  api: socotra:Payment
has property: locator
has property: invoiceId
has property: accountId
has property: amount
has property: currency
has property: method
has property: reference
has property: status
has property: settledAt
layer: domain
owner service: billing
referenced in:
  docs: docs/site/domain/billing.md § Payment Methods
  docs: docs/site/domain/billing.md § Ledger Entries (Double-Entry)
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  kafka:
    schema.org: Payment
    service: billing
  openapi:
    schema.org: Payment
    service: billing
  openapi:
    method: POST
    path: /payments
    service: billing
  postgres:
    pk: id
    service: billing
    table: billing.payments
  api:
    schema.org: PaymentRef
    spec ref: components/schemas/PaymentRef
  api:
    schema.org: PaymentCreateRequest
    spec ref: components/schemas/PaymentCreateRequest
  api:
    schema.org: PaymentResponse
    spec ref: components/schemas/PaymentResponse
comment: A record of funds received against an Invoice. Payments are collected via DIRECT_DEBIT, CARD, or BANK_TRANSFER. When a Payment reaches SETTLED status and the aggregate payments equal the Invoice total, the Invoice transitions to PAID and a CREDIT LedgerEntry is posted. Aligned to Socotra's Payment resource, which also represents a financial settlement event linked to a billing account.

reference
type: DatatypeProperty
range: xsd:string

settledAt
type: DatatypeProperty
range: xsd:dateTime

Policy
type: Class
alignments:
  fhir: fhir:Coverage
  fibo: fibo-fbc-pas-fpas:InsurancePolicy
  schema org: schema:Product
  api: socotra:Policy
has property: locator
has property: accountId
has property: quoteId
has property: productVersionId
has property: status
has property: inceptionDate
has property: jurisdiction
has property: region
has property: document
layer: domain
lifecycle:
  states: draft
  states: quoted
  states: bound
  states: active
  states: lapsed
  states: cancelled
  states: expired
owner service: enrollment
referenced in:
  docs: docs/site/domain/policies.md § Policy Lifecycle
  docs: docs/site/domain/policies.md § PolicyStatus State Machine
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  openapi:
    schema.org: Policy
    service: broker-api
  openapi:
    method: GET
    path: /portfolio/policies
    service: broker-api
  openapi:
    method: GET
    path: /portfolio/policies/{locator}
    service: broker-api
  openapi:
    method: GET
    path: /accounts/{locator}/policies/list
    service: policy-admin
  openapi:
    method: POST
    path: /enroll
    service: enrollment
  openapi:
    method: PUT
    path: /enroll/{enrollmentId}
    service: enrollment
  openapi:
    method: POST
    path: /enroll/{enrollmentId}/qle
    service: enrollment
  openapi:
    method: POST
    path: /cobra/elect
    service: enrollment
  postgres:
    pk: id
    service: enrollment
    table: enrollment.policies
  api:
    schema.org: PolicyListResponse
    spec ref: components/schemas/PolicyListResponse
  api:
    schema.org: PolicyResponse
    spec ref: components/schemas/PolicyResponse
disjoint with: Quote
comment: The master insurance contract between an insurer and an Account. A Policy is created when a Quote is accepted and the first premium collected. It accumulates PolicyTerm records on annual renewal and tracks status through ACTIVE, LAPSED, CANCELLED, and EXPIRED states. Aligned to Socotra's Policy resource, which also represents a central insurance contract entity with term and transaction sub-records.
subclass of: fibo-fbc-pas-fpas:InsurancePolicy
subclass of: schema:Product
alternative label: Cover
alternative label: Plan
alternative label: Enrollment

quoteId
type: ObjectProperty
range: xsd:string

inceptionDate
type: DatatypeProperty
range: xsd:date

jurisdiction
type: DatatypeProperty
range: xsd:string

region
type: DatatypeProperty
range: xsd:string

Policy Element
type: Class
has property: locator
has property: policyId
has property: transactionId
has property: staticId
has property: elementType
has property: status
has property: partyId
has property: data
has property: coverageTerms
has property: effectiveFrom
has property: effectiveTo
layer: domain
owner service: enrollment
referenced in:
  docs: docs/site/domain/policies.md § PolicyTerm and PolicyElement
  docs: docs/site/domain/members.md § Employee vs. Dependent
  postgres:
    pk: id
    service: enrollment
    table: enrollment.policy_elements
comment: One insured unit within a PolicyTerm — either an employee (primary subscriber) or a dependent. PolicyElement carries the per-member benefit schedule (copay, coinsurance, deductibles, OOP max) as a CoverageTerms JSON blob, and a stable StaticID used to track accumulators across term versions.

transactionId
type: ObjectProperty
range: xsd:string

staticId
type: ObjectProperty
range: xsd:string

data
type: DatatypeProperty
range: xsd:string

Policy Field Value
type: Class
has property: locator
has property: policyId
has property: fieldDefinitionId
has property: value
layer: domain
owner service: enrollment
referenced in:
  postgres:
    pk: id
    service: enrollment
    table: enrollment.policy_field_values
comment: A value for a custom FieldDefinition on a specific Policy, supporting the product's dynamic data model. PolicyFieldValues allow product teams to add configurable data fields to policies without database schema migrations.

fieldDefinitionId
type: ObjectProperty
range: xsd:string

value
type: DatatypeProperty
range: xsd:string

Policy Term
type: Class
has property: locator
has property: policyId
has property: termNumber
has property: effectiveFrom
has property: effectiveTo
has property: status
layer: domain
owner service: enrollment
referenced in:
  docs: docs/site/domain/policies.md § PolicyTerm and PolicyElement
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  postgres:
    pk: id
    service: enrollment
    table: enrollment.policy_terms
comment: One bounded coverage period on a Policy, typically annual. PolicyTerms carry a sequential TermNumber, inclusive EffectiveFrom/EffectiveTo dates, and a status that mirrors the parent Policy. Accumulators, ClaimLines, and MemberCoverage records are all scoped to a specific PolicyTerm.

termNumber
type: DatatypeProperty
range: xsd:integer

Policy Transaction
type: Class
alignments:
  api: socotra:PolicyTransaction
has property: locator
has property: policyId
has property: termId
has property: category
has property: status
has property: effectiveDate
has property: document
layer: domain
owner service: enrollment
referenced in:
  docs: docs/site/domain/policies.md § Enrollment, Renewal, Endorsement, and Cancellation
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  postgres:
    pk: id
    service: enrollment
    table: enrollment.policy_transactions
  api:
    schema.org: PolicyTransactionListResponse
    spec ref: components/schemas/PolicyTransactionListResponse
  api:
    schema.org: PolicyTransactionResponse
    spec ref: components/schemas/PolicyTransactionResponse
comment: An immutable record of every post-issuance change to a Policy, including ISSUANCE, RENEWAL, ENDORSEMENT, CANCELLATION, REINSTATEMENT, and REVERSAL. Each transaction carries an EffectiveDate that may differ from the processing date, and optionally references a PolicyTerm. Aligned to Socotra's PolicyTransaction resource, which similarly records structured change events against a policy.

effectiveDate
type: DatatypeProperty
range: xsd:date

Premium
type: Class
alignments:
  fibo: fibo-fbc-pas-fpas:Premium
has property: amount
has property: cadence
layer: domain
owner service: tbd
referenced in:
  snapshot:
    file: docs/superpowers/snapshots/2026-04-30-pre-code-evolution/ontology/concepts/domain/premium.yaml
    reason: hand-curated v0 — alignments and lifecycle ported forward
status: aspirational
comment: The amount payable by the Member (or scheme) for a Policy, on a configurable cadence. Aspirational: not currently backed by an Olly service or Postgres table.

cadence
type: DatatypeProperty
range: xsd:string

Prescription
type: Class
has property: locator
has property: episodeLocator
has property: providerLocator
has property: medication
has property: status
has property: issuedAt
layer: domain
owner service: care
referenced in:
  openapi:
    schema.org: Prescription
    service: care
  openapi:
    method: GET
    path: /episodes/{locator}/prescriptions
    service: care
  openapi:
    method: POST
    path: /episodes/{locator}/prescriptions
    service: care
  openapi:
    method: PATCH
    path: /prescriptions/{locator}/fill
    service: care
  openapi:
    method: PATCH
    path: /prescriptions/{locator}/void
    service: care
  postgres:
    pk: id
    service: care
    table: prescriptions
comment: A medication prescription issued by a healthcare Provider within a care Episode, recording the medication name, prescribing provider, and issue timestamp. Prescriptions may be linked to prior auth requirements for formulary-controlled drugs.

medication
type: DatatypeProperty
range: xsd:string

issuedAt
type: DatatypeProperty
range: xsd:dateTime

Prior Auth
type: Class
has property: locator
has property: providerId
has property: policyId
has property: memberPartyId
has property: status
has property: procedureCode
has property: document
has property: submittedAt
has property: reviewedAt
layer: domain
owner service: claims
referenced in:
  docs: docs/site/domain/claims.md § Prior Authorization Flow
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  openapi:
    method: POST
    path: /prior-auth
    service: claims
  postgres:
    pk: id
    service: claims
    table: claims.prior_auths
comment: A pre-approval from the insurer required before certain procedures are performed. PriorAuth progresses from PENDING through APPROVED or DENIED. Claims for procedures requiring prior auth that lack an APPROVED record are automatically rejected with ANSI reason code CO-15.

memberPartyId
type: ObjectProperty
range: xsd:string

procedureCode
type: DatatypeProperty
range: xsd:string

Product
type: Class
alignments:
  api: socotra:Product
has property: locator
has property: code
has property: name
has property: lob
has property: status
layer: domain
owner service: policy-admin
referenced in:
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  openapi:
    schema.org: Product
    service: policy-admin
  openapi:
    method: POST
    path: /products
    service: policy-admin
  openapi:
    method: GET
    path: /products/{locator}
    service: policy-admin
  openapi:
    method: PATCH
    path: /products/{locator}
    service: policy-admin
  openapi:
    method: GET
    path: /products/list
    service: policy-admin
  openapi:
    method: PATCH
    path: /products/{locator}/activate
    service: policy-admin
  openapi:
    method: PATCH
    path: /products/{locator}/deactivate
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.products
  api:
    schema.org: ProductRef
    spec ref: components/schemas/ProductRef
comment: An insurance plan definition (e.g. "Olly Select PMI") owned by policy-admin. A Product groups one or more versioned benefit schedules (ProductVersion). It carries a Line of Business (lob) classifier and a status lifecycle from DRAFT through ACTIVE to RETIRED. Aligned to Socotra's Product configuration entity, which also defines the schema and rules governing policies written under it.

lob
type: DatatypeProperty
range: xsd:string

Product Version
type: Class
has property: locator
has property: productId
has property: version
has property: policySchema
has property: claimSchema
has property: elementSchema
has property: chargeTypes
has property: status
has property: publishedAt
layer: domain
owner service: policy-admin
referenced in:
  openapi:
    method: POST
    path: /products/{locator}/versions
    service: policy-admin
  openapi:
    method: GET
    path: /products/{locator}/versions/list
    service: policy-admin
  openapi:
    method: GET
    path: /products/{locator}/versions/{version}
    service: policy-admin
  openapi:
    method: PATCH
    path: /products/{locator}/versions/{version}
    service: policy-admin
  openapi:
    method: PATCH
    path: /products/{locator}/versions/{version}/publish
    service: policy-admin
  openapi:
    method: GET
    path: /internal/product-versions/{id}/fields
    service: policy-admin
  openapi:
    method: POST
    path: /config/validate
    service: policy-admin
  openapi:
    method: POST
    path: /config/deploy
    service: policy-admin
  openapi:
    method: GET
    path: /config/{locator}/download
    service: policy-admin
  openapi:
    method: GET
    path: /config/{locator}/download/{version}
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.product_versions
comment: A published, immutable version of an insurance Product containing the policy schema, claim schema, element schema, charge types, and status lifecycle. Quotes and Policies reference a specific ProductVersion to ensure benefit schedules remain stable after changes to the parent Product.

productId
type: ObjectProperty
range: xsd:string

policySchema
type: DatatypeProperty
range: xsd:string

claimSchema
type: DatatypeProperty
range: xsd:string

elementSchema
type: DatatypeProperty
range: xsd:string

chargeTypes
type: DatatypeProperty
range: xsd:string

Provider
type: Class
alignments:
  fhir: fhir:Practitioner
  schema org: schema:MedicalOrganization
has property: locator
has property: npi
has property: partyId
has property: partyLocator
has property: name
has property: specialty
has property: networkStatus
has property: address
has property: phone
has property: email
has property: activatedAt
layer: domain
owner service: provider
referenced in:
  docs: docs/site/domain/providers.md § Provider Entity
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  kafka:
    schema.org: Provider
    service: provider
  openapi:
    schema.org: Provider
    service: provider
  openapi:
    method: GET
    path: /providers
    service: provider
  openapi:
    method: GET
    path: /providers/{npi}
    service: provider
  openapi:
    method: GET
    path: /providers/{providerLocator}/slots
    service: care
  openapi:
    method: POST
    path: /providers/{providerLocator}/slots
    service: care
  postgres:
    pk: id
    service: provider
    table: provider.providers
comment: A credentialed healthcare organisation or individual practitioner in the Olly network. Identified by NPI (National Provider Identifier) for use in EDI 837 transactions and prior auth requests. NetworkStatus (PENDING/ACTIVE/INACTIVE) determines in-network claim adjudication rates and member cost-sharing obligations.
subclass of: schema:MedicalOrganization
alternative label: HealthcareProvider

npi
type: DatatypeProperty
range: xsd:string

specialty
type: DatatypeProperty
range: xsd:string

networkStatus
type: DatatypeProperty
range: xsd:string

activatedAt
type: DatatypeProperty
range: xsd:dateTime

Provider Slot
type: Class
has property: locator
has property: providerLocator
has property: startTime
has property: endTime
has property: status
has property: appointmentLocator
layer: domain
owner service: care
referenced in:
  openapi:
    method: PATCH
    path: /slots/{locator}/block
    service: care
  postgres:
    pk: id
    service: care
    table: provider_slots
comment: A specific bookable time window at a Provider, with start/end times and a status (AVAILABLE/BOOKED/CANCELLED). When a Member books an Appointment, the linked ProviderSlot transitions to BOOKED; cancellations restore it to AVAILABLE.

startTime
type: DatatypeProperty
range: xsd:dateTime

endTime
type: DatatypeProperty
range: xsd:dateTime

Quote
type: Class
alignments:
  fibo: fibo-fbc-pas-fpas:Quote
  api: socotra:Quote
has property: locator
has property: accountId
has property: productVersionId
has property: status
has property: document
has property: expiresAt
layer: domain
owner service: enrollment
referenced in:
  docs: docs/site/domain/policies.md § Quote → Policy Issuance Flow
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  openapi:
    schema.org: Quote
    service: broker-api
  openapi:
    method: POST
    path: /quotes
    service: broker-api
  openapi:
    method: GET
    path: /quotes/{locator}
    service: broker-api
  openapi:
    method: PATCH
    path: /quotes/{locator}/price
    service: broker-api
  openapi:
    method: PATCH
    path: /quotes/{locator}/underwrite
    service: broker-api
  openapi:
    method: PATCH
    path: /quotes/{locator}/issue
    service: broker-api
  postgres:
    pk: id
    service: enrollment
    table: enrollment.quotes
  api:
    schema.org: QuoteListResponse
    spec ref: components/schemas/QuoteListResponse
  api:
    schema.org: QuoteResponse
    spec ref: components/schemas/QuoteResponse
  api:
    schema.org: QuoteCreateRequest
    spec ref: components/schemas/QuoteCreateRequest
disjoint with: Policy
comment: A priced proposal that precedes a Policy. Quotes advance through DRAFT → PRICED → UNDERWRITTEN → ACCEPTED/DECLINED → (if accepted) converted to a Policy. A Quote holds the rated premium, benefit schedule, and applicant data as a JSONB Document blob, and expires after a configurable timestamp. Aligned to Socotra's Quote resource, which also models a priced insurance proposal that can be accepted or declined.

expiresAt
type: DatatypeProperty
range: xsd:dateTime

Quote Event
type: Class
has property: quoteId
has property: eventType
has property: payload
layer: domain
owner service: enrollment
referenced in:
  docs: docs/site/domain/policies.md § Quote → Policy Issuance Flow
  postgres:
    pk: id
    service: enrollment
    table: enrollment.quote_events
comment: An immutable audit record of every status change on a Quote — from DRAFT through pricing, underwriting, acceptance or decline, and expiry. QuoteEvents capture the event type and payload at each transition, forming the complete quote history.

payload
type: DatatypeProperty
range: xsd:string

Quote Field Value
type: Class
has property: locator
has property: quoteId
has property: fieldDefinitionId
has property: value
layer: domain
owner service: enrollment
referenced in:
  postgres:
    pk: id
    service: enrollment
    table: enrollment.quote_field_values
comment: A value for a custom FieldDefinition collected on a Quote during the application process. Analogous to PolicyFieldValue but scoped to the pre-issuance quote, supporting the same product-defined dynamic data model.

Recommendation
type: Class
layer: domain
owner service: triage
referenced in:
  openapi:
    schema.org: Recommendation
    spec: api/openapi/triage.yaml
    spec ref: components/schemas/Recommendation
status: aspirational
comment: The structured clinical disposition produced by the triage engine at the end of a member's triage Session, advising the appropriate care pathway — for example, self-care, GP consultation, urgent care, or emergency services. A Recommendation bundles the suggested action, the urgency level, and a plain-language rationale derived from the member's reported symptoms and clinical reasoning. It is the terminal output of a completed triage conversation and may trigger a DiagnosticsReferral or Appointment booking depending on the pathway selected.

Role
type: Class
alignments:
  api: socotra:Role
layer: domain
owner service: tbd
referenced in:
  docs: docs/architecture/overview.md § Security Boundaries
  api:
    schema.org: RoleListResponse
    spec ref: components/schemas/RoleListResponse
  api:
    schema.org: RoleCreateRequest
    spec ref: components/schemas/RoleCreateRequest
status: aspirational
comment: A named permission bundle that can be assigned to platform users, controlling which resources and operations they can access. Roles are evaluated by the OPA policy engine at APISIX and within each service. In Olly, roles are managed in Keycloak as realm roles; a platform-native Role entity would enable programmatic role management without Keycloak API calls. Concept sourced from Socotra; not yet modeled as a standalone entity in Olly code.

Rule
type: Class
has property: locator
has property: ruleSetId
has property: code
has property: priority
has property: condition
has property: effect
has property: message
layer: domain
owner service: policy-admin
referenced in:
  openapi:
    schema.org: Rule
    service: policy-admin
  openapi:
    method: PUT
    path: /products/{productLocator}/versions/{version}/rulesets/{name}/rules
    service: policy-admin
  openapi:
    method: PATCH
    path: /products/{productLocator}/versions/{version}/rulesets/{name}/rules/{ruleLocator}
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.rules
comment: A single executable policy rule within a RuleSet, with a condition expression, an effect (e.g. REJECT, SURCHARGE, FLAG), a human-readable message, and a priority. Rules are evaluated by the underwriting and adjudication engines against quote or claim data.

ruleSetId
type: ObjectProperty
range: xsd:string

priority
type: DatatypeProperty
range: xsd:integer

condition
type: DatatypeProperty
range: xsd:string

effect
type: DatatypeProperty
range: xsd:string

message
type: DatatypeProperty
range: xsd:string

Rule Evaluation
type: Class
has property: ruleId
has property: ruleSetId
has property: entityType
has property: entityId
has property: conditionResult
has property: effectApplied
has property: evaluatedAt
layer: domain
owner service: policy-admin
referenced in:
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.rule_evaluations
comment: An audit record of a single Rule being evaluated against a specific entity (Quote, Claim, or Policy). Captures whether the condition matched, which effect was applied, and the timestamp, providing a traceable decision log for regulatory audit.

ruleId
type: ObjectProperty
range: xsd:string

conditionResult
type: DatatypeProperty
range: xsd:boolean

effectApplied
type: DatatypeProperty
range: xsd:string

evaluatedAt
type: DatatypeProperty
range: xsd:dateTime

Rule Input
type: Class
layer: domain
owner service: policy-admin
referenced in:
  docs: socotra/featureGuide/underwriting.md (underwriting plugin and flag evaluation)
  openapi:
    schema.org: RuleInput
    spec: api/openapi/policy-admin.yaml
    spec ref: components/schemas/RuleInput
status: aspirational
comment: The structured context object passed into a RuleSet evaluation, containing the data required for the underwriting or adjudication engine to assess each Rule's condition. RuleInput bundles the entity under evaluation (quote, claim, or policy), the triggering event, and any auxiliary data fields (demographic, clinical, or financial) that rules may reference. It is constructed at evaluation time from the current state of the entity and discarded after evaluation, with the results persisted as RuleEvaluation audit records.

Rule Set
type: Class
has property: locator
has property: productVersionId
has property: name
has property: trigger
layer: domain
owner service: policy-admin
referenced in:
  openapi:
    method: POST
    path: /products/{productLocator}/versions/{version}/rulesets
    service: policy-admin
  openapi:
    method: GET
    path: /products/{productLocator}/versions/{version}/rulesets/list
    service: policy-admin
  openapi:
    method: GET
    path: /products/{productLocator}/versions/{version}/rulesets/{name}
    service: policy-admin
  openapi:
    method: GET
    path: /internal/products/{productLocator}/versions/{version}/rulesets/{name}
    service: policy-admin
  postgres:
    pk: id
    service: policy-admin
    table: policy_admin.rule_sets
comment: A named collection of Rules associated with a ProductVersion and a trigger context (e.g. QUOTE_UNDERWRITING, CLAIM_ADJUDICATION). RuleSets are the unit of rule configuration: adding or retiring rules is done by publishing a new RuleSet version.

trigger
type: DatatypeProperty
range: xsd:string

Rule Set Bundle
type: Class
layer: domain
owner service: policy-admin
referenced in:
  docs: socotra/featureGuide/underwriting.md (underwriting configuration and rule sets)
  openapi:
    schema.org: RuleSetBundle
    spec: api/openapi/policy-admin.yaml
    spec ref: components/schemas/RuleSetBundle
status: aspirational
comment: A versioned collection of RuleSets packaged together for deployment as a coherent configuration update. A RuleSetBundle groups all the rule sets that belong to a single ProductVersion and trigger context (underwriting, adjudication, billing) so they can be validated, tested, and published atomically. Publishing a new bundle replaces the prior active rule configuration for the product version without requiring individual rule set updates, mirroring the tenant configuration deployment model described in the Socotra platform where all rule and configuration artefacts are deployed together.

Scheme
type: Class
has property: locator
has property: code
has property: name
has property: employerPartyLocator
has property: status
layer: domain
owner service: group-scheme-service
referenced in:
  docs: docs/site/domain/members.md § Employer Group Scheme → Member Relationship
  openapi:
    schema.org: Scheme
    service: group-scheme-service
  openapi:
    method: GET
    path: /schemes
    service: group-scheme-service
  openapi:
    method: POST
    path: /schemes
    service: group-scheme-service
  openapi:
    method: GET
    path: /schemes/list
    service: group-scheme-service
  openapi:
    method: GET
    path: /schemes/{locator}
    service: group-scheme-service
  openapi:
    method: PATCH
    path: /schemes/{locator}
    service: group-scheme-service
  openapi:
    method: GET
    path: /schemes/{locator}/billing
    service: group-scheme-service
  openapi:
    method: GET
    path: /schemes/{locator}/eligibility
    service: group-scheme-service
  postgres:
    pk: id
    service: group-scheme-service
    table: group_scheme.schemes
comment: An employer group insurance arrangement linking an employer Party to a cohort of member policies. Schemes are administered by the group-scheme service, carry a locator code used in bulk enrollment uploads, and scope the employer portal to the correct member population.

employerPartyLocator
type: DatatypeProperty
range: xsd:string

Scheme Member
type: Class
has property: schemeId
has property: memberPartyLocator
has property: policyLocator
has property: status
layer: domain
owner service: group-scheme-service
referenced in:
  docs: docs/site/domain/members.md § Employer Group Scheme → Member Relationship
  openapi:
    method: GET
    path: /schemes/{locator}/members
    service: group-scheme-service
  openapi:
    method: POST
    path: /schemes/{locator}/members
    service: group-scheme-service
  openapi:
    method: DELETE
    path: /schemes/{locator}/members/{memberPartyLocator}
    service: group-scheme-service
  postgres:
    pk: id
    service: group-scheme-service
    table: group_scheme.scheme_members
comment: The association between a Group Scheme and an individual member's policy. SchemeMember records the member's Party locator, policy locator, and enrollment status, enabling the employer portal to list and manage all covered employees within the scheme.

memberPartyLocator
type: DatatypeProperty
range: xsd:string

Segment
type: Class
alignments:
  api: socotra:Segment
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: SegmentResponse
    spec ref: components/schemas/SegmentResponse
status: aspirational
comment: A named sub-division of a policy's insured population or coverage period used for targeted billing and reporting — for example, separating employee-only from family coverage tiers, or dividing a multi-location employer account by cost centre. Segments drive differential premium calculation and claims allocation. Concept sourced from Socotra; not yet modeled in Olly code.

Session
type: Class
has property: userId
has property: pathwayId
has property: currentStateId
has property: sex
has property: age
has property: chiefComplaint
has property: status
has property: disposition
has property: completedAt
layer: domain
owner service: triage
referenced in:
  openapi:
    schema.org: Session
    service: triage
  openapi:
    method: POST
    path: /sessions
    service: triage
  openapi:
    method: GET
    path: /sessions/{locator}
    service: triage
  openapi:
    method: PATCH
    path: /sessions/{locator}/abandon
    service: triage
  postgres:
    pk: id
    service: triage
    table: triage.sessions
  postgres:
    pk: id
    service: triage-legacy
    table: triage.sessions
comment: A single AI triage interaction in which a user works through a clinical decision tree (pathway) to receive a disposition. Sessions carry chief complaint, demographic parameters (sex, age), current pathway state, and a final disposition (e.g. SEE_GP, GO_TO_ED, SELF_CARE).

userId
type: ObjectProperty
range: xsd:string

pathwayId
type: ObjectProperty
range: xsd:string

currentStateId
type: ObjectProperty
range: xsd:string

sex
type: DatatypeProperty
range: xsd:string

age
type: DatatypeProperty
range: xsd:integer

chiefComplaint
type: DatatypeProperty
range: xsd:string

disposition
type: DatatypeProperty
range: xsd:string

Symptom
type: Class
alignments:
  sct: snomed:404684003
has property: symptomText
layer: domain
owner service: tbd
referenced in:
  snapshot:
    file: docs/superpowers/snapshots/2026-04-30-pre-code-evolution/ontology/concepts/domain/symptom.yaml
    reason: hand-curated v0 — alignments and lifecycle ported forward
status: aspirational
comment: A presenting complaint reported by a Member during triage, mapped to SNOMED-CT clinical findings where licensed. Aspirational: not currently backed by an Olly service or Postgres table.

symptomText
type: DatatypeProperty
range: xsd:string

Template
type: Class
alignments:
  api: socotra:Template
has property: marketCode
has property: templateType
has property: contentHtml
layer: domain
owner service: document-service
referenced in:
  docs: docs/site/domain/claims.md § EDI 837 / 835 Context
  postgres:
    pk: id
    service: document-service
    table: documents.templates
  api:
    schema.org: TemplateResponse
    spec ref: components/schemas/TemplateResponse
comment: A reusable HTML/text layout used by the document service to generate member-facing communications — policy schedules, welcome letters, Explanation of Benefits PDFs, and renewal notices. Templates are keyed by market code and template type. Aligned to Socotra's Template resource, which also defines document generation templates used for policy documents and correspondence.

contentHtml
type: DatatypeProperty
range: xsd:string

Term
type: Class
alignments:
  api: socotra:Term
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/policies.md § PolicyTerm and PolicyElement
  api:
    schema.org: TermListResponse
    spec ref: components/schemas/TermListResponse
  api:
    schema.org: TermResponse
    spec ref: components/schemas/TermResponse
status: aspirational
comment: In Socotra's model, a Term represents a versioned coverage period on a policy, analogous to Olly's PolicyTerm. The Term entity in Socotra carries the full effective date range, premium amount for that period, and a list of insured elements. Olly's PolicyTerm and PolicyElement together cover this concept. Concept sourced from Socotra; Olly models this as PolicyTerm + PolicyElement.

Transaction Field Value
type: Class
has property: locator
has property: transactionId
has property: fieldDefinitionId
has property: value
layer: domain
owner service: enrollment
referenced in:
  postgres:
    pk: id
    service: enrollment
    table: enrollment.transaction_field_values
comment: A value for a custom FieldDefinition collected on a PolicyTransaction (e.g. an endorsement or renewal), capturing transaction-specific dynamic data defined by the product schema.

Turn
type: Class
has property: sessionId
has property: role
has property: content
has property: stateId
has property: toolName
has property: toolArgs
has property: toolResult
layer: domain
owner service: triage
referenced in:
  openapi:
    schema.org: Turn
    service: triage
  openapi:
    method: POST
    path: /sessions/{locator}/respond
    service: triage
  openapi:
    method: GET
    path: /sessions/{locator}/recommendation
    service: triage
  postgres:
    pk: id
    service: triage
    table: triage.turns
  postgres:
    pk: id
    service: triage-legacy
    table: triage.turns
comment: A single conversational exchange within a triage Session — one user input plus the agent's response. Turns record the pathway state before and after the exchange, any tool calls made by the agent, and tool results, enabling full replay of the triage interaction.

stateId
type: ObjectProperty
range: xsd:string

toolArgs
type: DatatypeProperty
range: xsd:string

toolResult
type: DatatypeProperty
range: xsd:string

Underwriting Flag
type: Class
alignments:
  api: socotra:UnderwritingFlag
has property: locator
has property: quoteId
has property: flagType
has property: reason
has property: voidedAt
layer: domain
owner service: enrollment
referenced in:
  docs: docs/site/domain/policies.md § Quote → Policy Issuance Flow
  docs: docs/site/domain/index.md § Concept-to-Struct Mapping
  postgres:
    pk: id
    service: enrollment
    table: enrollment.underwriting_flags
  api:
    schema.org: UnderwritingFlagCreateRequest
    spec ref: components/schemas/UnderwritingFlagCreateRequest
  api:
    schema.org: UnderwritingFlagResponse
    spec ref: components/schemas/UnderwritingFlagResponse
comment: An individual underwriter decision (APPROVE, BLOCK, or DECLINE) applied to a Quote. Multiple flags can coexist on a single Quote; the strictest decision wins. Flags record the reason for the decision and can be voided if superseded. Aligned to Socotra's UnderwritingFlag resource, which similarly captures underwriting decisions during the quote review process.

flagType
type: DatatypeProperty
range: xsd:string

voidedAt
type: DatatypeProperty
range: xsd:dateTime

User
type: Class
alignments:
  api: socotra:User
has property: username
has property: apiKeyHash
has property: sex
has property: age
layer: domain
owner service: triage
referenced in:
  docs: docs/architecture/overview.md § Technology Choices
  postgres:
    pk: id
    service: triage
    table: triage.users
  api:
    schema.org: UserListResponse
    spec ref: components/schemas/UserListResponse
  api:
    schema.org: UserCreateRequest
    spec ref: components/schemas/UserCreateRequest
  api:
    schema.org: UserUpdateRequest
    spec ref: components/schemas/UserUpdateRequest
comment: An authenticated platform user — in the triage service context, a triage agent identified by username and hashed API key, with demographic attributes (sex, age) used for clinical pathway routing. Platform-wide human identity is managed in Keycloak. Aligned to Socotra's User resource, which also represents an authenticated operator with access credentials.

username
type: DatatypeProperty
range: xsd:string

apiKeyHash
type: DatatypeProperty
range: xsd:string

Webhook
type: Class
alignments:
  api: socotra:Webhook
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: WebhookListResponse
    spec ref: components/schemas/WebhookListResponse
  api:
    schema.org: WebhookResponse
    spec ref: components/schemas/WebhookResponse
status: aspirational
comment: An outbound HTTP callback registration that delivers domain events (e.g. policy.issued, claims.adjudicated) to external systems in real time. Webhooks carry an endpoint URL, subscribed event types, authentication headers, and retry strategy. Concept sourced from Socotra; Olly currently delivers events via Kafka topics rather than HTTP webhooks.

Workgroup
type: Class
alignments:
  api: socotra:Workgroup
layer: domain
owner service: tbd
referenced in:
  api:
    schema.org: WorkgroupCreateRequest
    spec ref: components/schemas/WorkgroupCreateRequest
  api:
    schema.org: WorkgroupResponse
    spec ref: components/schemas/WorkgroupResponse
status: aspirational
comment: A named team of operations staff (claims adjusters, underwriters, credentialing reviewers) to whom work items can be assigned. Workgroups enable round-robin or skill-based routing of claims, prior auth requests, and credentialing reviews. Concept sourced from Socotra; Olly currently assigns reviewers directly; a Workgroup abstraction is aspirational.

Write Off
type: Class
alignments:
  api: socotra:WriteOff
layer: domain
owner service: tbd
referenced in:
  docs: docs/site/domain/billing.md § Grace Period and Delinquency Handling
  api:
    schema.org: WriteOffResponse
    spec ref: components/schemas/WriteOffResponse
  api:
    schema.org: WriteOffRequest
    spec ref: components/schemas/WriteOffRequest
status: aspirational
comment: The formal accounting recognition that an outstanding receivable (unpaid invoice or charge) will not be collected, resulting in a credit entry to the PREMIUM_RECEIVABLE ledger account. Write-offs are typically applied after a policy has been cancelled following the lapse window. Concept sourced from Socotra; not yet modeled as a separate entity in Olly code.

ApisixRoute
type: Class
has property: routePath
has property: upstream
layer: infra
comment: An APISIX gateway route mapping a public path to a service.

routePath
type: DatatypeProperty
range: xsd:string

upstream
type: DatatypeProperty
range: xsd:string

KeycloakClient
type: Class
has property: clientId
has property: authFlow
layer: infra
comment: A Keycloak client (web-employer, web-member, etc.) used for auth.

clientId
type: DatatypeProperty
range: xsd:string

authFlow
type: DatatypeProperty
range: xsd:string

coverageOf
type: ObjectProperty
inverse of: olly:hasCoverage
domain: olly:Coverage
range: olly:Policy

coversMember
type: ObjectProperty
domain: olly:Policy
range: olly:Member

hasCoverage
type: ObjectProperty
inverse of: olly:coverageOf
domain: olly:Policy
range: olly:Coverage

ownedByService
type: ObjectProperty
domain: olly:PostgresTable
range: olly:Service

storedInTable
type: ObjectProperty
domain: olly:Policy
range: olly:PostgresTable