Skip to content

Injured body-part maintenance

Maintains the set of injured body parts recorded against a claim, enforces that exactly one body part is marked primary, and propagates the primary body part to the parent injury-claim record.

Field Value
Operation ID injured-body-part
Trigger Caller creates, updates, or deletes a clsWorkerInjuredBodyPart, or clears fields via UpdateClaimBodyPart
Inputs ClaimID, BodyPartCode, BodyPartSideCode, PrimaryIndicator, InjuryNatureCode
Outputs Injured body-part rows; propagated CL_INJURY_CLAIM columns
Primary components clsWorkerInjuredBodyPart.UpdateClaimBodyPart, clsWorkerInjuredBodyPartCollection
Entry point SAIF.Business.Claim/clsWorkerInjuredBodyPart.vb

Steps

  1. Retrieve injured body parts for the claim into the collection (SQL-036, CL_WORKER_INJURED_BODY_PART).
  2. Collection-level rule checks run over all rows:
  3. When Validate is True: exactly one primary body part is required (BR-006).
  4. Always evaluated (not gated by Validate): only one primary body part is allowed (BR-007).
  5. Insert or update the injured body-part row (SQL-008 insert, SQL-050 update, CL_WORKER_INJURED_BODY_PART).
  6. UpdateClaimBodyPart([inClearFields]):
  7. When the object is dirty and IsPrimary is True: propagate the primary body part, side, and injury nature to CL_INJURY_CLAIM (SQL-051, CL_INJURY_CLAIM).
  8. When inClearFields = True: reset those injury-claim fields to zero/space instead of propagating values.
  9. Delete an injured body-part row when requested (SQL-062, CL_WORKER_INJURED_BODY_PART).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Retrieve injured body parts]) --> Validate{Validate collection rules}
    Validate --> Primary{Primary required and unique?}
    Primary -->|Fails| ErrRule([Broken rule: save blocked])
    Primary -->|Passes| Save[Insert/Update body part row]
    Save --> IsPrimary{IsDirty AND IsPrimary?}
    IsPrimary -->|Yes| Propagate[Update CL_INJURY_CLAIM<br>primary body part/side]
    IsPrimary -->|No| Skip([No propagation])
    Propagate --> ClearCheck{inClearFields = True?}
    ClearCheck -->|Yes| Clear["Reset injury-claim fields to<br>zero/space"]
    ClearCheck -->|No| Keep([Propagated values retained])

Failure and edge-case behavior

  • A missing or duplicate primary body part blocks save via BR-006 / BR-007.
  • clsWorkerInjuredBodyPart.Criteria.CreateSQL and .RetrieveSQL return String.Empty rather than throwing, unlike other unsupported criteria properties in this library.*

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Business.Claim/clsWorkerInjuredBodyPart.vb
  • SAIF.Business.Claim/clsWorkerInjuredBodyPartCollection.vb