Skip to content

SAIF.Business.View.Policy operations and processes

This page is the operation catalog and cross-operation hub for this library. Each operation's step-by-step logic is documented in the tables below.

Operation catalog

Operation Intent Trigger Inputs Outputs Rules Tables SQL
Retrieve policy data Load the core policy view aggregate Consumer calls GetPolicyData Policy number, optional period date/user context/detail flag Populated clsPolicyData BR-VP-001, BR-VP-016 N/A — Stored procedure SQL-010
Lazy retrieval of policy detail and indicators Fetch detail-backed fields on demand Consumer reads a detail-backed property Policy number Detail fields, flags BR-VP-026 N/A — Stored procedure SQL-011, SQL-012, SQL-015, SQL-016, SQL-017, SQL-018
Retrieve policy periods and select the current/renewal period Load policy terms and identify current/renewal period Consumer reads PolicyPeriods Policy number clsPolicyPeriodCollection BR-VP-018, BR-VP-019 N/A — Stored procedure SQL-021, SQL-022
Retrieve policy associations Build the policy-to-policy association list Consumer reads Associations Policy number, optional dates List of PolicyAssociation BR-VP-014, BR-VP-015, BR-VP-020, BR-VP-021, BR-VP-024 POLICY_RELATIONSHIP, POLICY, COMBO_POLICY_PERIOD, POLICY_PERIOD, ER_COMBINATION_POLICY, ASSOCIATION_TYPE_CODE SQL-003, SQL-004, SQL-005, SQL-034, SQL-035
Retrieve the service team and derive email addresses Load the assigned service team and resolve emails Consumer reads TeamAssignmentCollection Policy number clsTeamAssignmentCollection BR-VP-010, BR-VP-022 N/A — Stored procedure SQL-029, SQL-030, SQL-031
Retrieve addresses Load mailing/location/claim address and officer-of-notice GetPolicyAddress / GetPolicyClaimAddress Policy number, address/contact type clsPolicyAddress BR-VP-010 BUSINESS_AFFILIATE, AFFILIATE SQL-007, SQL-008, SQL-009
Authorize a user for a policy Decide whether the current user may view a policy Caller invokes IsPolicyValidForUser Policy data, user context Boolean BR-VP-003, BR-VP-004, BR-VP-005, BR-VP-006, BR-VP-007, BR-VP-008, BR-VP-009 PA_AUDIT, PA_AUDITOR, PA_POLICY_PERIOD SQL-013, SQL-023, SQL-024
Retrieve the accessible policy list for a user Build the set of policies a user may select Caller reads PolicySecurity.PolicyList User context strPolicyList entries BR-VP-005 N/A — Stored procedure SQL-025, SQL-026, SQL-027, SQL-028
Retrieve affiliated policies (legacy) Load the legacy affiliate-policy list Consumer reads obsolete affiliate members Policy number, user context clsAffiliatedPolicyCollection BR-VP-011, BR-VP-012, BR-VP-013 N/A — Stored procedure SQL-001, SQL-014

Process flow diagram

The following diagram visualizes the primary operational flow for retrieving and authorizing policy data.

flowchart TD
    Start([Consumer requests policy]) --> GetPolicy[GetPolicyData]
    GetPolicy --> Valid{Valid policy number?}
    Valid -->|No| Deny([Retrieve rejected])
    Valid -->|Yes| Retrieve["Execute<br>pk73094_policy_data.getpolicy"]
    Retrieve --> Populate[Populate clsPolicyData]
    Populate --> Authorize[IsPolicyValidForUser]
    Authorize -->|Secure policy, not authorized| DenyAccess([Access denied])
    Authorize -->|User-type matrix passes| Grant([Policy view returned])
    Authorize -->|Fails directly| ParentCheck[IsPolicyValidForParentPolicy]
    ParentCheck -->|Parent match| Grant
    ParentCheck -->|No match| DenyAccess

Database interactions

The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.

Operation SQL Tables Type
Retrieve policy data SQL-010 N/A — Stored procedure Read
Lazy retrieval of policy detail and indicators SQL-011, SQL-012, SQL-015, SQL-016, SQL-017, SQL-018 N/A — Stored procedure Read
Retrieve policy periods SQL-021, SQL-022 N/A — Stored procedure Read
Retrieve policy associations SQL-003, SQL-004, SQL-005, SQL-034, SQL-035 ASSOCIATION_TYPE_CODE, POLICY, POLICY_PERIOD, POLICY_RELATIONSHIP, COMBO_POLICY_PERIOD, ER_COMBINATION_POLICY Read
Retrieve the service team and derive email addresses SQL-029, SQL-030, SQL-031 N/A — Stored procedure Read
Retrieve addresses SQL-007, SQL-008, SQL-009 BUSINESS_AFFILIATE, AFFILIATE Read
Authorize a user for a policy SQL-013, SQL-023, SQL-024 PA_AUDIT, PA_AUDITOR, PA_POLICY_PERIOD Read
Retrieve the accessible policy list for a user SQL-025, SQL-026, SQL-027, SQL-028 N/A — Stored procedure Read
Retrieve affiliated policies (legacy) SQL-001, SQL-014 N/A — Stored procedure Read

Failure and edge-case behavior

  • Lazy detail read (LazyRead(PolicyDetail)) catches and swallows exceptions, leaving detail fields at defaults (BR-VP-026).
  • Authorization checks return Boolean; no exception is thrown on denial, and nothing is logged inside this library.*
  • The BDS (SQL Server) connection has no fallback: if BDS_USER, bdsDatabase, or BDS_DATABASENAME is missing or wrong, clsPolicySecurity.Initialize() still succeeds and the failure surfaces later as a connection error inside IsInGroup / GetPolicyList*.*

Stored procedure operations

Operations implemented in Oracle and SQL Server stored procedures referenced by this library.

Operation Description Source Link
Retrieve policy view detail Opens the policy view-detail cursor for a policy pk72846_view_policy.getviewdetail Details
Retrieve policy periods Returns the top-N (or all) policy periods with plan, group association and rating detail, masked per information-page status pk72846_view_policy.getpolicyperiods Details
Retrieve agency for policy Opens the agency cursor for a policy pk72846_view_policy.getagency Details
Retrieve coverage gaps Returns computed plus explicitly recorded coverage gaps pk72846_view_policy.getgaps Details
Retrieve policy address Returns the current address of the requested type with claim→policy fallback pk72846_view_policy.getpolicyaddress Details
Retrieve address by location sequence Returns a single address identified by location sequence number pk72846_view_policy.getpolicyaddressbylocseqnum Details
Classify policy affiliation Returns the affiliation classification token for a policy pk72846_view_policy.getpolicyaffiliatetype Details
Resolve parent policy Maps an affiliation classification to the governing parent policy number pk72846_view_policy.getparentpolicy Details
List affiliated policies Returns the affiliate list for a policy, optionally including totals pk72846_view_policy.getpolicyaffiliatelist Details
Retrieve policy team assignments Returns screen-ordered team members plus agent-of-record contact detail pk72846_view_policy.team_assign_query Details
Retrieve MCO list Returns managed-care organisation rows for a policy. Related tables: unknown — member absent from the retrieved package artifact pk72846_view_policy.getmco Details
Retrieve policy header Opens the policy header cursor including derived status and cancel status pk73094_policy_data.getpolicy Details
Resolve account name Returns the legal name of the best policy for an account number pk73094_policy_data.get_account_name Details
Count policy waivers Counts waiver detail rows for a policy; caller reduces to a Boolean HasWaiver Pk82033_ThirdParty.get_policy_waiver_count Details
Retrieve employer liability limits Resolves specific or standard employer-liability limits for a policy period coveragelimits_pkg.getSpecificLimitsForPolicyNum Details
Derive cancel status Derives a display cancel status from policy status group and collection/audit state sp72268_get_cancel_status Details
Check coverage bound Returns Y/N indicating whether coverage is bound for a policy period sp73089_get_policy_bound_flag Details
Check information page printed Returns Y/N indicating whether the information page has printed SP72347_INFO_PAGE_PRINTED_YN Details
Look up external client email (Oracle) Returns the external contractor email for a system user id + last name sp73341_external_client_lookup Details
Test policy group membership Returns a count indicating whether a policy belongs to a group/chapter cp_policy_in_group Details
List group policies Returns the policy list visible to a group/chapter as of a report date cp_claimprofile_get_group_policy_list Details
List safety-consultant book Returns the active policy book for a loss-control consultant cp_claimprofile_get_sc_book Details
List agent online policies Returns active and recently closed policies for an agent or agency with display flags cp_get_agent_online_policy_list Details
Look up external client (BDS) Returns the most recent active, non-test registrant matching id and last name cp_external_client_lookup Details
Retrieve policy associations (dynamic) Executes the reference-data-supplied procedure to return association rows for a policy ASSOCIATION_TYPE_CODE.SOURCE_PROCEDURE_NAME Details

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.View.Policy/clsPolicyData.vb
  • SAIF.Business.View.Policy/clsPolicySecurity.vb
  • SAIF.Business.View.Policy/clsPolicyPeriod.vb
  • SAIF.Business.View.Policy/clsTeamAssignment.vb
  • SAIF.Business.View.Policy/clsTeamAssignmentCollection.vb
  • SAIF.Business.View.Policy/Associations/clsPolicyAssociation.vb
  • SAIF.Business.View.Policy/clsPolicySecurity.vb
  • SAIF.Business.View.Policy/clsPolicyData.vb
  • SAIF.Business.View.Policy/clsTeamAssignment.vb
  • SAIF.Business.View.Policy/clsTeamAssignmentCollection.vb
  • SAIF.Business.View.Policy/app.config
  • SAIF.Business.View.Policy/Web.config