Skip to content

Number claim / manual claim validation

Every claim needs a SaifClaimNum before it is considered complete. Most claims are numbered automatically from a sequence; a smaller set of claims (e.g., re-keyed or corrected claims) receive a manually entered claim number that must be validated, normalized to a fixed length, and given a fresh check digit before it is accepted.

Field Value
Operation ID OP-CE-05
Trigger Caller calls NumberClaim (system-assigned) or ValidManualClaim (manual entry) prior to Save()
Inputs For NumberClaim: none required beyond the claim object itself. For ValidManualClaim: a candidate manual claim number string
Outputs Assigned/validated SaifClaimNum with a recalculated check digit, or a broken-rule entry rejecting the manual number
Primary components clsClaimEntry.NumberClaim, clsClaimEntry.ValidManualClaim
Entry point Business\SAIF.Business.Claim.Entry\clsClaimEntry.vb

Steps

  1. System numbering path (NumberClaim). The method accepts an optional inClaimNumber argument that is declared but never read inside the method body; regardless of what is passed, the method proceeds to obtain the next value from the claim-number sequence (SQL-002).*
  2. The sequence value is combined with a computed check digit to form the final SaifClaimNum.
  3. Manual numbering path (ValidManualClaim). The caller-supplied string is checked for uniqueness against existing claims and, if numeric, against the maximum allowed value of 7799999 (BR-CE-003).
  4. If the number already exists, or is numeric and exceeds 7799999: reject the input and add a broken rule; the claim's SaifClaimNum is left unchanged.
  5. If the number passes both checks: proceed to step 3.
  6. Normalize and re-check-digit the accepted manual number (BR-CE-014). The accepted string is truncated to seven characters and a fresh check digit is computed and appended, producing the final SaifClaimNum stored on the claim.
  7. Return the assigned/validated claim number to the caller for use in subsequent save operations.

Process flow

flowchart TD
    Start([Caller requests claim number]) --> Path{System or manual?}
    Path -->|System| Sequence[Fetch next value from<br>claim-number sequence]
    Sequence --> CheckDigit1[Compute check digit]
    CheckDigit1 --> Return([Return SaifClaimNum])
    Path -->|Manual| Exists{Number already exists<br>or exceeds 7799999<br>if numeric?}
    Exists -->|Yes| Reject([Reject: add broken rule])
    Exists -->|No| Truncate[Truncate to 7 characters]
    Truncate --> CheckDigit2[Recalculate check digit]
    CheckDigit2 --> Return

Failure and edge-case behavior

  • NumberClaim's inClaimNumber parameter is dead code — it is accepted but never referenced in the method body, so callers cannot influence the system-assigned number through this argument.*
  • A manual claim number that is non-numeric bypasses the 7799999 ceiling check entirely, since that check is only applied If IsNumeric(...); only the existence check applies to non-numeric input (BR-CE-003).
  • Truncating an accepted manual number to seven characters before recalculating the check digit means the persisted claim number's final digit is derived from the truncated value, not the original caller input, which could silently change the number if the caller supplied more than seven characters (BR-CE-014).

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

Sources

  • Business\SAIF.Business.Claim.Entry\clsClaimEntry.vb