Skip to content

clsCaseNotesManager

clsCaseNotesManager performs CRUD on case notes for the current legal case and enforces role-based restrictions on who may edit or delete a note. Bill notes (DOCCO) and system-generated notes are treated differently from ordinary notes: deletion is blocked for non-privileged users and is always blocked for notes created by "SYSTEM" (Business rules). It inherits LegalManagerBase (this library) → ClaimAppManager (SAIF.Application.Claim).

Purpose

  • Create, read, update, and delete case notes for the current legal case.
  • Restrict note deletion to users in the case-update/admin group, with a narrower allowance for bill-note updaters on bill notes, and an absolute block on system-created notes (Business rules).
  • Gate note view/update capability by security role, computing CanUpdate/CanUpdateText flags per note when notes are loaded or created (Business rules).

Context

  • Namespace: SAIF.Application.Claim.Legal
  • Assembly/package: SAIF.Application.Claim.Legal.dll (embedded library, referenced by the Legal web front end)

Public members

Member Signature Purpose
New(inDatabase, inSecurityPrincipal) Public Sub New(inDatabase As String, inSecurityPrincipal As clsSecurityPrincipal) Constructs the manager for the given database context and authenticated principal, calling into LegalManagerBase.New.
CaseNotes Public ReadOnly Property CaseNotes As clsCaseNoteCollection* Exposes the case-note collection for the current legal case.
DeleteNote() Public Sub DeleteNote() Deletes the selected case note, blocking the operation with an error message when the caller lacks the required role or the note was created by "SYSTEM" (Business rules).
IsInNoteView Public ReadOnly Property IsInNoteView As Boolean Indicates whether the current user holds the LNNoteView security key, gating note-viewing capability (Business rules).
CanUpdateBillNotes Public ReadOnly Property CanUpdateBillNotes As Boolean Indicates whether the current user holds the LNUpdate security key, gating bill-note (DOCCO) edit/delete capability (Business rules).
CanUpdateAnyNote Public ReadOnly Property CanUpdateAnyNote As Boolean Indicates whether the current user is in the admin or case-update security group, granting edit/delete on any note regardless of category (Business rules).
Save() Public Overrides Function Save() As Boolean* Persists pending case-note inserts/edits/deletes via the inherited clsBusinessBase.Save() dispatch path.

Behavioral notes

  • DeleteNote() combines three checks — general update role, bill-note-specific role, and system-authorship — such that a "SYSTEM"-created note can never be deleted regardless of caller role (Business rules).
  • CanUpdate/CanUpdateText flags are computed per note at load/create time based on IsInNoteView/CanUpdateBillNotes/CanUpdateAnyNote, so the UI can render edit controls consistently with server-side enforcement (Business rules).

Constraints and usage notes

  • Callers must not assume client-side note edit controls reflect authorization on their own — DeleteNote() re-checks role/authorship server-side before deleting*.

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\LegalNet\clsCaseNotesManager.vb