Skip to content

Policy and unit-stat support

This operation combines the policy-facing SQL helpers in PolicyServices with the date-calculation logic in UnitStatServices. The policy branch delegates complex address and expiration rules to stored procedures, while the unit-stat branch performs most of its business logic directly in .NET after a small amount of policy data is loaded.

Field Value
Operation ID OP-SB-10
Trigger Caller invokes policy or unit-stat service helpers.
Inputs Policy number, effective date, process date, cancel date, correspondence type, max-expiration flag
Outputs Address, validity boolean, expiration date, NCCI policy number, unit split date, policy-period units, valuation data
Primary components PolicyServices.getPolicyAddress, PolicyServices.CoverageExists, PolicyServices.IsValidPolicy, PolicyServices.GetDefaultExpirationDate, UnitStatServices.GetNCCIPolicyNumber, UnitStatServices.GetPolicyPeriodUnits, UnitStatServices.GetReportValuationPeriods
Entry point Business\SAIF.Business\PolicyServices.vb

Steps

  1. Policy-address retrieval delegates to sp62087_get_policy_address, passing the policy number, effective date, process date, and correspondence type so Oracle can choose the correct location row and formatted address output (SQL-042, PROC-RULE-022, PROC-RULE-023, PROC-RULE-024, PROC-RULE-025, PROC-RULE-026, PROC-RULE-027, PROC-RULE-028, POLICY, POLICY_PERIOD_ALL, POLICY_PERIOD_MASTER).
  2. Coverage checks query POLICY_PERIOD_ALL to confirm that the policy has a period covering the supplied date (SQL-042, POLICY_PERIOD_ALL).
  3. Policy validation routes low-number policies to NON_EMPR_ACCT instead of the standard policy tables, while higher-number policies validate against the normal policy source (SQL-042, NON_EMPR_ACCT, BR-SB-005).
  4. Default expiration-date calculation delegates to SP72232_Calc_Policy_Exp_Date, which chooses between standard and max-horizon modes and applies the AR quarter-snapping rules when appropriate (SQL-042, PROC-RULE-029, PROC-RULE-030, PROC-RULE-031, PROC-RULE-032).
  5. GetNCCIPolicyNumber loads the qualifying policy row and prefixes the number with A for voluntary coverage and C otherwise (SQL-043, US_POLICY_UNIT, BR-SB-012).
  6. GetPolicyUnitEffectiveDate reads the policy-unit date needed for valuation calculations (SQL-043, US_POLICY_UNIT).
  7. GetUnitSplitDate and GetPolicyPeriodUnits calculate whether one or two unit ranges are needed, splitting only when the period is more than one year plus sixteen days long (BR-SB-003).
  8. GetReportValuationPeriods, GetValuationNumber, GetFirstValuationDate, and GetLastValuationDate derive the reporting schedule from the unit effective date and switch from five valuation periods to ten starting in 2002 (BR-SB-004).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Policy or unit-stat request]) --> Kind{Policy helper or unit-stat helper?}
    Kind -->|Policy| Policy[Run policy SQL or stored procedure]
    Kind -->|Unit stat| Unit[Load policy-unit data]
    Policy --> Branch{Validation, address, or expiration?}
    Branch -->|Validation| Return1([Return validity or coverage])
    Branch -->|Address| Return2([Return policy address])
    Branch -->|Expiration| Return3([Return expiration date])
    Unit --> Calc[Calculate NCCI, units, and valuation dates]
    Calc --> Return4([Return unit-stat data])

Failure and edge-case behavior

  • Low-number policies are intentionally validated against NON_EMPR_ACCT, so callers can get a negative result even when the number does not exist in the standard policy tables (BR-SB-005).
  • Policy-address resolution can surface an application error when no qualifying location row exists (PROC-RULE-028).
  • Long policy periods do not split into two unit ranges unless they exceed one year plus sixteen days (BR-SB-003).

Sources

  • Business\SAIF.Business\PolicyServices.vb
  • Business\SAIF.Business\UnitStatServices.vb