Skip to content

Filter interested parties active on a date

This operation documents how InterestdParyExtensions.Active fulfills the policy-affiliate behavior described for SAIF.Business.Policy.Affiliate.

Field Value
Operation ID OP-005
Trigger A caller narrows an interested-party sequence to those active on a given date.
Inputs Interested-party sequence, as-of date
Outputs Filtered IEnumerable(Of clsInterestedParty)
Primary components InterestdParyExtensions.Active
Entry point Business\SAIF.Business.Policy.Affiliate\clsInterestedPartyCollection.vb

Steps

  1. Iterate the supplied interested-party sequence with a LINQ Where filter.
  2. Keep an item only when EffectiveDate is on or before the as-of date and CancelDate is either null/open-ended or later than the as-of date (BR-AFF-008).
  3. Return the filtered sequence without mutating the source collection.

Process flow

The following diagram shows the in-memory LINQ filter and its effective/cancel-date test.

flowchart TD
  Start(["Caller supplies sequence + as-of date"]) --> Iterate["LINQ Where over sequence"]
  Iterate --> Check{"EffectiveDate <= asOf AND<br>(CancelDate is null OR CancelDate > asOf)?"}
  Check -->|Yes| Keep["Keep item in result"]
  Check -->|No| Drop["Exclude item"]
  Keep --> More{"More items?"}
  Drop --> More
  More -->|Yes| Iterate
  More -->|No| Result(["Return filtered sequence; source unchanged"])

Failure and edge-case behavior

  • The extension operates in memory; it does not re-query the database.

Sources

  • Business\SAIF.Business.Policy.Affiliate\clsInterestedPartyCollection.vb