Skip to content

Create select legal case context

This operation establishes the CurrentCase (clsLegalCase) and its header (clsLegalData) for a SAIF.Application.Claim.Legal manager instance, either by finding an existing legal case for the active claim or by creating a new one, and then gates exposure of that data behind claim-level authorization checks.

Field Value
Operation ID OP-LGL-001
Trigger Web tier sets a context/claim number, or requests a new case
Inputs ContextNumber/claim ID, SecurityPrincipal
Outputs CurrentCase (clsLegalCase), case header (clsLegalData), m_CanViewClaim/Message
Primary components LegalManagerBase.CreateCase / LegalManagerBase.SetCurrentCase / LegalManagerBase.OnContextChanged
Entry point SAIF.Application.Claim.Legal\LegalManagerBase.vb

Steps

  1. Web tier sets a claim/case context number (ContextNumber) or claim ID.
  2. OnContextChanged() looks up matching cases for the current claim.
  3. clsFindCase.GetCases(DPI, criteria) retrieves the candidate case list.

    Origin: delegates to SAIF.Business.Claim.Legal (see operations and processes) — the internal step sequence of clsFindCase.GetCases was not traced in this run's Stage 1 analysis; this callout is inferred/best-effort pointing to the expected sibling library operation page.* - If a matching case is found: call SetClaimContext.

    Origin: delegates to SAIF.Application.Claim (see operations and processes) — ClaimAppManager.SetClaimContext's own step sequence was not traced in this run's Stage 1 analysis; this callout is inferred/best-effort.* - Then call SetCurrentCase(caseID) (step 3). 3. SetCurrentCase(caseID) loads the case data: - clsLegalCase.GetLegalCase(DPI, caseID) retrieves the full legal-case business object.

    Origin: delegates to SAIF.Business.Claim.Legal (see operations and processes) — inferred/best-effort pointer; step sequence not traced in this run.* - A clsLegalData header object is loaded via the stored procedure pk80001_legalNet.getHeader (SQL-012), executed through SqlHelper.ResultSetQuery with a REF CURSOR output parameter. 4. On the new-case path, CreateCase() instead: - Creates clsLegalCase.NewLegalCase(DPI).

    Origin: delegates to SAIF.Business.Claim.Legal (see operations and processes) — inferred/best-effort pointer; step sequence not traced in this run.* - Copies the claim-level attorney-firm assignment (ClaimData.LegalRepProviderLocSeqNum/LegalRepParentProvLocSeqNum) onto the new case. - Loads the same clsLegalData header (SQL-012). 5. LegalManagerBase.OnRetrieve() enforces claim-visibility authorization before the case data is exposed to the caller: - Admin-group bypass: users in the Legal admin group may view any claim (BR-LGL-001). - If not admin: a worker-conflict claim requires both conflict and exposure access, unless a security override is present (BR-LGL-002). - If not admin: an exposure-flagged claim requires exposure access, unless a security override is present (BR-LGL-003). - On failure of either check: m_CanViewClaim = False and Message = ClaimAppConstants.ERRORCONFIDENTIALCLAIM. - On success: m_CanViewClaim = True and any prior message is cleared.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Context/claim number set]) --> Changed[OnContextChanged]
    Changed --> Found{Matching case found?}
    Found -->|Yes| SetCtx[SetClaimContext + SetCurrentCase]
    Found -->|No, new case| Create[CreateCase: NewLegalCase]
    SetCtx --> LoadHeader[Load clsLegalData header<br>via getHeader stored procedure]
    Create --> CopyAtty[Copy claim attorney-firm assignment]
    CopyAtty --> LoadHeader
    LoadHeader --> Retrieve[OnRetrieve authorization gate]
    Retrieve --> Admin{Admin group?}
    Admin -->|Yes| Allowed([m_CanViewClaim = True])
    Admin -->|No| Checks{Conflict/exposure<br>access satisfied?}
    Checks -->|Yes| Allowed
    Checks -->|No| Denied([m_CanViewClaim = False<br>ERRORCONFIDENTIALCLAIM])

Failure and edge-case behavior

  • No matching case found and no new-case request: the manager has no CurrentCase, and dependent screen operations are unavailable until a context is established.
  • Claim-visibility check fails: m_CanViewClaim = False, Message = ClaimAppConstants.ERRORCONFIDENTIALCLAIM, and the case data remains loaded internally but is not exposed to the caller.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • SAIF.Application.Claim.Legal\LegalManagerBase.vb
  • SAIF.Application.Claim.Legal\clsLegalData.vb