Auditor assignment override management¶
This operation merges the premium-auditor maintenance classes into one domain view. It covers auditor master rows, the zip-code-to-auditor map, and policy-level override rows that can force or prohibit specific auditor assignments during premium-audit routing.
| Field | Value |
|---|---|
| Operation ID | OP-EU-04 |
| Trigger | Auditor maintenance, override maintenance, or default-auditor resolution for a policy |
| Inputs | Auditor ID or user ID, vendor number, assign/filter/schedule/reviewer flags, policy number, zip code, default auditor ID, do-not-assign auditor ID, audit type |
| Outputs | Persisted auditor-domain rows and resolved default auditor object |
| Primary components | clsAuditor, clsAuditorCollection, clsAuditAssignmentOverride, clsAuditorZipCode, clsAuditorZipCodeCollection |
| Entry point | Business\SAIF.Business.External.Users\clsAuditor.vb |
Steps¶
- Create a new auditor identifier before insert.
clsAuditoruses a scalar create request that reads the nextPA_AUDITOR_IDsurrogate asMAX(PA_AUDITOR_ID) + 1(SQL-001, PA_AUDITOR). - Insert, retrieve, or update the auditor master row. The auditor object persists its assign/filter/schedule/reviewer flags, contact fields, user ID, and vendor number through the
PA_AUDITORCRUD statements (SQL-003, SQL-011, SQL-043, PA_AUDITOR). - Load filtered auditor collections for assignment scenarios.
clsAuditorCollectionretrieves all auditors or narrows the list by vendor number plus assignable, filterable, schedulable, or reviewer flags (SQL-012, PA_AUDITOR). - Load or create a policy override row.
clsAuditAssignmentOverrideretrievesPA_ASSIGN_OVERRIDEby policy number, or creates a new in-memory row seeded with the target policy number (SQL-010, PA_ASSIGN_OVERRIDE). - Validate whether the policy can carry an override.
ValidAuditablePolicyrejects leasing-member, state-agency, or HCW policies by inspecting the loaded policy data before save. - Validate the chosen auditors for the override row.
ValidDefaultAuditorIdrequires the default auditor to exist and be assignable.ValidDoNotAssignAuditorIdrequires the excluded auditor to exist and be assignable.ValidAuditorsrejects the same auditor ID in both fields (BR-EU-03).- Insert or update the override row. The override object persists the selected default and do-not-assign auditor IDs, keyed by policy number (SQL-002, SQL-042, PA_ASSIGN_OVERRIDE).
- Maintain the auditor zip-code map.
clsAuditorZipCodeinserts, retrieves, updates, and deletesPA_AUDITOR_ZIP_CODErows keyed by auditor ID and zip code (SQL-004, SQL-013, SQL-044, SQL-052, PA_AUDITOR_ZIP_CODE). - Update uses the original auditor ID and zip code as the key so the row can be moved to a new pairing.
- Validate zip-code assignments before save. The zip-code object requires the referenced auditor to exist, requires that auditor to be assignable, and requires the zip code to resolve through
clsZipCode. - Resolve the default auditor for a policy.
GetDefaultAuditorForPolicyuses a special NCCI path when the audit type isNCCITEST; otherwise it loads the policy override and either returns the override auditor or falls back to the first auditor mapped to the policy zip code. - Return the resolved auditor object. The final lookup reloads the chosen
PA_AUDITORrow by ID so callers receive the full auditor object (SQL-011, PA_AUDITOR).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Auditor-domain request]) --> Kind{What is being managed?}
Kind -->|Auditor master| Auditor[Create or load auditor]
Kind -->|Policy override| Override[Load policy override]
Kind -->|Zip assignment| Zip[Load or create auditor zip assignment]
Auditor --> SaveAuditor[Save auditor row]
Override --> ValidateOverride[Validate policy and auditors]
ValidateOverride --> SaveOverride[Save override row]
Zip --> ValidateZip[Validate auditor and zip code]
ValidateZip --> SaveZip[Save zip assignment row]
SaveAuditor --> Done([Return saved or resolved auditor data])
SaveOverride --> Done
SaveZip --> Done
Failure and edge-case behavior¶
- Leasing-member, state-agency, and HCW policies fail override validation before any
PA_ASSIGN_OVERRIDEwrite occurs. - The override cannot use the same auditor in both the default and do-not-assign fields (BR-EU-03).
- Zip-code updates can fail when the new auditor is not assignable or the zip code does not resolve through
clsZipCode. - Default-auditor resolution falls back to zip-code routing only when no explicit override default exists.
Related documentation¶
Sources¶
Business\SAIF.Business.External.Users\clsAuditAssignmentOverride.vbBusiness\SAIF.Business.External.Users\clsAuditor.vbBusiness\SAIF.Business.External.Users\clsAuditorCollection.vbBusiness\SAIF.Business.External.Users\clsAuditorZipCode.vbBusiness\SAIF.Business.External.Users\clsAuditorZipCodeCollection.vbBusiness\SAIF.Business.External.Users\clsZipCode.vb