Skip to content

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

  1. Create a new auditor identifier before insert. clsAuditor uses a scalar create request that reads the next PA_AUDITOR_ID surrogate as MAX(PA_AUDITOR_ID) + 1 (SQL-001, PA_AUDITOR).
  2. 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_AUDITOR CRUD statements (SQL-003, SQL-011, SQL-043, PA_AUDITOR).
  3. Load filtered auditor collections for assignment scenarios. clsAuditorCollection retrieves all auditors or narrows the list by vendor number plus assignable, filterable, schedulable, or reviewer flags (SQL-012, PA_AUDITOR).
  4. Load or create a policy override row. clsAuditAssignmentOverride retrieves PA_ASSIGN_OVERRIDE by policy number, or creates a new in-memory row seeded with the target policy number (SQL-010, PA_ASSIGN_OVERRIDE).
  5. Validate whether the policy can carry an override. ValidAuditablePolicy rejects leasing-member, state-agency, or HCW policies by inspecting the loaded policy data before save.
  6. Validate the chosen auditors for the override row.
  7. ValidDefaultAuditorId requires the default auditor to exist and be assignable.
  8. ValidDoNotAssignAuditorId requires the excluded auditor to exist and be assignable.
  9. ValidAuditors rejects the same auditor ID in both fields (BR-EU-03).
  10. 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).
  11. Maintain the auditor zip-code map. clsAuditorZipCode inserts, retrieves, updates, and deletes PA_AUDITOR_ZIP_CODE rows keyed by auditor ID and zip code (SQL-004, SQL-013, SQL-044, SQL-052, PA_AUDITOR_ZIP_CODE).
  12. Update uses the original auditor ID and zip code as the key so the row can be moved to a new pairing.
  13. 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.
  14. Resolve the default auditor for a policy. GetDefaultAuditorForPolicy uses a special NCCI path when the audit type is NCCITEST; 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.
  15. Return the resolved auditor object. The final lookup reloads the chosen PA_AUDITOR row 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_OVERRIDE write 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.

Sources

  • Business\SAIF.Business.External.Users\clsAuditAssignmentOverride.vb
  • Business\SAIF.Business.External.Users\clsAuditor.vb
  • Business\SAIF.Business.External.Users\clsAuditorCollection.vb
  • Business\SAIF.Business.External.Users\clsAuditorZipCode.vb
  • Business\SAIF.Business.External.Users\clsAuditorZipCodeCollection.vb
  • Business\SAIF.Business.External.Users\clsZipCode.vb