Skip to Content
DocumentationBackendDynamic System ERD

Dynamic Insurance System - Entity Relationship Diagram

Overview

This ERD represents the complete dynamic insurance configuration system that allows for flexible, insurer-agnostic management of insurance providers, configurations, file uploads, and UI components.

Entity Relationship Diagram

System Architecture Overview

๐Ÿ—๏ธ Core Architecture

The dynamic system is built around 4 main pillars:

  1. Configuration Management - Dynamic insurer configurations
  2. File Upload System - Flexible Excel file processing
  3. UI Component System - Dynamic button and permission management
  4. Data Storage - Flexible member data storage

๐Ÿ”— Key Relationships

1. Insurance Provider (HowdenInsuranceProvider)

  • Central Hub: All dynamic configurations are linked to insurance providers
  • One-to-Many: Each provider can have multiple configurations, file upload configs, UI buttons, and data entries
  • Provider Name: Used as insurerId in dynamic system (e.g., โ€œmaxicareโ€, โ€œicareโ€, โ€œintellicareโ€)

2. Client Company (HowdenClientCompany)

  • Plan Management: Companies can create custom plans from available insurer configurations
  • File Upload: Companies can configure their own file upload formats
  • Data Storage: Companies store their member data in the dynamic data table

3. Configuration Flow

Insurance Provider โ†’ Insurer Configurations โ†’ Company Plans โ†’ Member Data

๐Ÿ“Š Entity Descriptions

InsurerConfiguration

  • Purpose: Stores available configuration options for each insurer
  • Types: civil_status, plan_type, member_type, level, relation, etc.
  • Flexibility: JSON metadata allows for custom configuration data

InsurerConfigurationPlan

  • Purpose: Links insurer configurations to specific company plans
  • Customization: Companies can create custom plan names and descriptions
  • Metadata: JSON field for plan-specific configuration

CompanyFileUploadConfiguration

  • Purpose: Defines file upload formats and validation rules for each company
  • Types: new_members, renewal, cancellation, account_number, etc.
  • Validation: Comprehensive validation rules including required fields, unique fields, and custom validations

CompanyFileUploadHeader

  • Purpose: Defines individual column headers for file uploads
  • Data Types: string, number, date, boolean, stringOrNumber
  • Validation: Column-specific validation rules (min/max length, patterns, allowed values)

InsurerUIButtonConfiguration

  • Purpose: Defines dynamic UI buttons for each insurer
  • Types: upload, download, action, view
  • Configuration: JSON fields for button behavior and UI settings

InsurerUIButtonPermission

  • Purpose: Role-based access control for UI buttons
  • Roles: HR, BROKER, PRINCIPAL, ADMIN, ALL
  • Conditions: JSON field for complex permission rules

InsurerDataTable

  • Purpose: Flexible storage for member data from any insurer
  • Structure: Mix of fixed columns and dynamic JSON configuration
  • Flexibility: Can store any insurer-specific fields in dynamicConfig JSON

๐Ÿš€ System Benefits

  1. Insurer Agnostic: Works with any insurance provider without code changes
  2. Company Customization: Each company can configure their own plans and file formats
  3. Role-Based Access: Granular permission control for UI components
  4. Flexible Validation: Comprehensive file upload validation system
  5. Scalable: Easy to add new insurers, configurations, and features
  6. Data Integrity: Proper foreign key relationships and constraints

๐Ÿ”„ Data Flow

  1. Setup Phase:

    • Create Insurance Provider
    • Define Insurer Configurations
    • Set up File Upload Configurations
    • Configure UI Buttons and Permissions
  2. Company Onboarding:

    • Company selects available configurations
    • Creates custom plans
    • Configures file upload formats
    • Sets up UI permissions
  3. Operational Phase:

    • Upload files with dynamic validation
    • Store member data in flexible format
    • Display role-based UI components
    • Generate reports and exports

๐Ÿ“ˆ Scalability Features

  • JSON Fields: Allow for future extensions without schema changes
  • UUID Primary Keys: Enable distributed systems and microservices
  • Soft Deletes: Maintain data integrity while allowing โ€œdeletionโ€
  • Audit Trails: Created/Updated timestamps for all entities
  • Sort Orders: Flexible ordering of configurations and UI elements

This dynamic system provides a complete, flexible solution for managing insurance configurations across multiple providers and companies! ๐ŸŽฏ

Last updated on