SAIF.Business.Policy.Audit.Premium operations and processes¶
This page is the operation catalog and cross-operation hub for the premium-audit library. Detailed step-by-step behavior lives in operations/ detail pages.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Select policies for premium audit (batch/expiring) | Premium-audit workflow | Monthly batch selection run | IDataPortalInfo, expiration date, maximum cyclical count, optional policy filter | Candidate periods, selected audits, overrides, and counters | BR-020, BR-021, BR-030, BR-031, BR-070, BR-071 | — | SQL-014, SQL-015, SQL-027, SQL-028, SQL-029, SQL-051, SQL-059, SQL-060, SQL-061, SQL-085, SQL-086, SQL-093 |
| Run audit selection tests | Premium-audit workflow | Selection manager has candidate audits for a category | Selection category, candidate audits, tester rules and values | Audits marked selected or deselected with test-result evidence | BR-001, BR-002, BR-003, BR-054, BR-072 | — | SQL-016, SQL-055, SQL-056, SQL-057, SQL-062, SQL-063, SQL-064, SQL-065, SQL-066, SQL-073, SQL-094 |
| Select policies for premium audit (off-cycle/daily) | Premium-audit workflow | Daily off-cycle selection run | IDataPortalInfo, last run date, current run date, optional policy filter | Off-cycle candidate periods and selected audits | BR-020, BR-021 | — | SQL-027, SQL-028, SQL-029, SQL-060, SQL-061 |
| Drop excess cyclical audits | Premium-audit workflow | Batch selection quota enforcement | End date and maximum cyclical count | Trimmed cyclical audit collection and dropped counter | — | — | — |
| Assign renewal (batch) audits to auditors | Premium-audit workflow | Monthly renewal assignment batch | IDataPortalInfo and assignment date | Assigned audits, staff tasks, policy notes, and counters | BR-012, BR-014, BR-015, BR-018, BR-019, BR-020, BR-021, BR-055, BR-064, BR-065, BR-066, BR-068 | — | SQL-003, SQL-005, SQL-008, SQL-009, SQL-026, SQL-027, SQL-028, SQL-029, SQL-032, SQL-033, SQL-034, SQL-058, SQL-074, SQL-075, SQL-077, SQL-079, SQL-080, SQL-090 |
| Assign off-cycle audits to auditors | Premium-audit workflow | Off-cycle assignment batch | IDataPortalInfo and assignment date | Assigned off-cycle audits, tasks, and counters | BR-012, BR-014, BR-015, BR-018, BR-019, BR-020, BR-021, BR-055, BR-064, BR-065, BR-066, BR-068 | — | SQL-003, SQL-005, SQL-008, SQL-009, SQL-026, SQL-027, SQL-028, SQL-029, SQL-032, SQL-033, SQL-034, SQL-058, SQL-074, SQL-075, SQL-077, SQL-079, SQL-080, SQL-090 |
| Assign an audit to an auditor | Premium-audit workflow | Assignment manager or caller chooses a specific auditor | Audit, auditor, optional explicit assignment date | Audit updated with auditor, office, assignment date, and assignment weight | BR-014, BR-015, BR-018, BR-019, BR-020, BR-021, BR-032, BR-035, BR-036, BR-037, BR-055, BR-057, BR-064, BR-065, BR-066 | — | SQL-001, SQL-003, SQL-004, SQL-005, SQL-008, SQL-018, SQL-019, SQL-020, SQL-021, SQL-022, SQL-023, SQL-024, SQL-026, SQL-032, SQL-076, SQL-077, SQL-079, SQL-088 |
| Synchronize an audit with WCIS policy-period changes | Premium-audit workflow | WCIS synchronization batch inspects an existing audit | Audit and synchronization task accumulator | Mutated audit plus follow-up tasks for staff | BR-017, BR-020, BR-021, BR-024, BR-026, BR-027, BR-028, BR-029, BR-032, BR-034, BR-035, BR-036, BR-037, BR-057 | — | SQL-001, SQL-004, SQL-010, SQL-011, SQL-018, SQL-019, SQL-020, SQL-021, SQL-022, SQL-023, SQL-024, SQL-025, SQL-035, SQL-036, SQL-037, SQL-038, SQL-039, SQL-040, SQL-041, SQL-042, SQL-043, SQL-076, SQL-081, SQL-082, SQL-088, SQL-091 |
| Save a premium audit | Premium-audit workflow | Caller invokes clsAudit.Save() or SaveChild() |
Dirty audit aggregate, child collections, optional WCIS result payload | Persisted audit aggregate or failed save with broken rules | BR-020, BR-021, BR-027, BR-028, BR-029, BR-031, BR-032, BR-035, BR-036, BR-037, BR-041, BR-051, BR-057, BR-058, BR-067, BR-069, BR-070, BR-072 | — | SQL-001, SQL-002, SQL-004, SQL-006, SQL-007, SQL-010, SQL-011, SQL-012, SQL-013, SQL-014, SQL-016, SQL-017, SQL-018, SQL-019, SQL-020, SQL-021, SQL-022, SQL-023, SQL-024, SQL-030, SQL-031, SQL-038, SQL-039, SQL-040, SQL-041, SQL-042, SQL-043, SQL-044, SQL-045, SQL-046, SQL-047, SQL-048, SQL-049, SQL-050, SQL-051, SQL-052, SQL-053, SQL-054, SQL-066, SQL-067, SQL-068, SQL-069, SQL-070, SQL-071, SQL-076, SQL-078, SQL-081, SQL-082, SQL-083, SQL-084, SQL-085, SQL-087, SQL-088, SQL-089, SQL-091, SQL-092, SQL-093, SQL-094, SQL-095 |
| Audit lifecycle status transitions | Premium-audit workflow | Callers cancel, revise, complete, or derive audit status | Audit state, result payloads, cancel reasons, and prior-audit context | Updated status, result state, and duplicate-audit checks | BR-020, BR-021, BR-032, BR-035, BR-036, BR-037, BR-057, BR-058, BR-067 | — | SQL-001, SQL-002, SQL-004, SQL-006, SQL-007, SQL-018, SQL-019, SQL-020, SQL-021, SQL-022, SQL-023, SQL-024, SQL-030, SQL-031, SQL-070, SQL-071, SQL-072, SQL-076, SQL-078, SQL-088, SQL-089 |
Process flow diagram¶
The following diagram visualizes the main operational flow across selection, assignment, synchronization, and save operations.
flowchart TD
Start([Selection trigger]) --> Select[Select policy periods]
Select --> Test[Run selection tests]
Test --> Assign[Assign audits]
Assign --> Sync[Synchronize coverage changes]
Sync --> Save[Save premium audit]
Save --> Status[Derive lifecycle status]
Inherited operations and processes¶
From clsBusinessBase (SAIF.Framework.Core)¶
| Operation | Intent | Provided by | Origin | Embedded in |
|---|---|---|---|---|
| Evaluate business object rules | Execute registered rules and refresh broken-rule state.* | clsRulesManager |
SAIF.Framework.Core |
Save a premium audit |
| Save business object graph | Validate and persist the root or child object through the BOF data portal.* | clsBusinessBase |
SAIF.Framework.Core |
Save a premium audit |
| Save managed collection | Persist child collections in sequence and stop on the first failure.* | clsBusinessCollectionBase |
SAIF.Framework.Core |
Save a premium audit |
Origin: These operations are provided by framework base classes and are embedded where the local library invokes BOF lifecycle behavior.*
Database interactions¶
- See the operation catalog and the linked SQL documents for database touchpoints.
Failure and edge-case behavior¶
- The dynamic audit-collection retrieval SQL contains an unclosed
JOIN BUSINESSparenthesis defect and two direct-interpolation risk points (PolicyNumberList,RowLimit). - Three Oracle references are unresolved from repository evidence and are documented as not found instead of reverse-engineered from .NET callers.**
- SQL IDs
SQL-047,SQL-048, andSQL-073come from uncompiled source files and therefore represent dead code, not runtime behavior. - Remote-wrapper Oracle calls forward critical payroll-audit and document-generation work to
@POLDB, outside the code shipped in this repository.
Related documentation¶
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¶
Business\SAIF.Business.Policy.Audit.Premium\clsAuditSelectionManager.vbBusiness\SAIF.Business.Policy.Audit.Premium\clsAuditAssignmentManager.vbBusiness\SAIF.Business.Policy.Audit.Premium\clsAudit.vbBusiness\SAIF.Business.Policy.Audit.Premium\clsAuditSynchronization.vbBusiness\SAIF.Business.Policy.Audit.Premium\clsAuditCollection.vb
Stored procedure operations¶
| Operation | Description | Source | Link |
|---|---|---|---|
| Retrieve expiring policy periods for audit selection | Opens a ref cursor of policy periods expiring on a given date, tagged 'EXP', excluding cancelled and pending periods |
pk73211_premium_audit.GetExpiringPolicies |
Details |
| Retrieve off-cycle policy periods for audit selection | Unions four candidate populations — new-business P401 endorsements, batch payroll audits, leasing-parent payroll audits and 15-day-delayed mid-term cancellations — into one ref cursor |
pk73211_premium_audit.GetOffCyclePolicies |
Details |
| Determine the audit address location | Picks the single best visitable location for an audit — AUD, then PAY, then POL, then primary BUS — rejecting expired locations and post-office boxes | pk73211_premium_audit.GetAuditLocationSeqNum |
Details |
| Get the ending experience-modification factor | Returns the ERP rating-plan factor in force on the last day of audited coverage, or the neutral 1.0 |
pk73211_premium_audit.get_ending_er_mod_for_pol_per |
Details |
| Get the current annual premium | Nets NEAP base amounts against DCBS difference amounts over the newest premium-history set |
pk73211_premium_audit.get_current_premium |
Details |
| Get the policy period's payroll classes | Opens a ref cursor of distinct four-digit manual class numbers and their rates from the newest premium-history set | pk73211_premium_audit.get_payroll_classes |
Details |
| Create a payroll audit on the policy system | Remote-only wrapper: forwards policy number, period effective date, last date of coverage, revision flag and due date to the policy database and returns the new payroll sequence number | pk73211_premium_audit.insert_pol_per_payroll_audit |
Details |
| Cancel a payroll audit on the policy system | Remote-only wrapper: forwards the payroll sequence number to the policy database | pk73211_premium_audit.cancel_pol_per_payroll_audit |
Details |
| Generate WCIS audit documents | Remote-only wrapper: forwards the audit sequence number and revision indicator to the policy database, which produces the audit endorsement/document set | pk73211_premium_audit.generate_wcis_audit_documents |
Details |
| Get the WCIS standard premium | Resolves the newest premium-history set for the policy period and returns its standard premium | pk72846_view_policy.sp73111_get_wcis_std_premium |
Details |
| Determine whether a policy period bills in arrears | Walks billing master → billing defaults → payment plan type and reports 'Y' unless the plan generates instalment or pre-pay billing |
pk73057_billing_master.is_on_arrears_plan |
Details |