Skip to content

Determine maximum policy effective date

Determines the maximum (most recent) policy-period effective date for a policy by correlating each row against a self-joined subquery on POLICY_PERIOD.

Field Value
Operation ID OP-POL-002
Trigger Caller reads the shared property PolicyInformation.MaxPolicyEffectiveDate(inDPI, inPolicyNumber)
Inputs Data portal info (inDPI), policy number (inPolicyNumber)
Outputs Date
Primary components PolicyInformation.MaxPolicyEffectiveDate
Entry point SAIF.Business.Policy\PolicyInformation.vb

Steps

  1. Caller reads the shared property PolicyInformation.MaxPolicyEffectiveDate(inDPI, inPolicyNumber).
  2. A new IPortalRequest/IDataRequest is built directly from inDPI.DataAccessLayer; SQLStatement is set to SQL.PolicyEffectiveDate (SQL-008, scalar, against POLICY_PERIOD).
  3. Parameter in_policy_num is bound; DAL.ProcessPortalRequest(PortalRequest) executes it.
  4. Result is cast to Date and returned.
  5. On failure/no match: no error handling for Nothing/DBNull is present — would raise a cast exception.**

Process flow

flowchart TD
    Start([MaxPolicyEffectiveDate read]) --> S1[Build IDataRequest with SQL-008]
    S1 --> S2[Bind in_policy_num]
    S2 --> S3[DAL.ProcessPortalRequest executes]
    S3 --> D{Result is DBNull/Nothing?}
    D -->|Yes| EndErr([Cast exception - unconfirmed behavior])
    D -->|No| EndOk([Return Date])

Failure and edge-case behavior

  • No null/DBNull guard on the cast result — behavior when no matching row exists is unconfirmed.**

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.Policy\PolicyInformation.vb