Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Objective

Provide a mechanism to increase the performance to calculate the balance per insuree - currently full table scans. It will be used by both modular BE and REST API.

Solution

Create a policy_balance table with those columns per “benefit”

  • benefit detail name (visit hospital … )

  • insuree id

  • benefit id (policy)

  • date of validity (policy end date) ??

  • balance (actually approved)

  • provisional (submitted claim)

  • temporary (draft claim)

  • limits

MVP

Initial update

  • For all policy,

    • for all insuree covered by policy

      • get all claim details covered by policy (column in item and services)

      • update the common limits

      • update the individual limits

      • save all cached enquiry

Schedule task to update

  • For all claims updates since the last run

    • get all policy details covered by claims (column in item and services)

      • get all the member of the policy

        • update the common limits

        • update the individual limits

        • save all cached enquiry