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¶
- Retrieve injured body parts for the claim into the collection (SQL-036, CL_WORKER_INJURED_BODY_PART).
- Collection-level rule checks run over all rows:
- When
ValidateisTrue: exactly one primary body part is required (BR-006). - Always evaluated (not gated by
Validate): only one primary body part is allowed (BR-007). - Insert or update the injured body-part row (SQL-008 insert, SQL-050 update, CL_WORKER_INJURED_BODY_PART).
UpdateClaimBodyPart([inClearFields]):- When the object is dirty and
IsPrimaryisTrue: propagate the primary body part, side, and injury nature toCL_INJURY_CLAIM(SQL-051, CL_INJURY_CLAIM). - When
inClearFields = True: reset those injury-claim fields to zero/space instead of propagating values. - 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.CreateSQLand.RetrieveSQLreturnString.Emptyrather than throwing, unlike other unsupported criteria properties in this library.*
Related documentation¶
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