Manage recovery participants¶
Recovery participants are the third parties (clsThrdparty), their associated firms (clsThrdPartyFirm), and any companion claims (clsThrdpartyCompanionClaim) attached to a case. Each type is an independent BOF entity keyed by CaseSeqNum, but clsThrdparty owns and cascades saves to its own firm collection, and clsThrdpartyCompanionClaim can pull claim/worker information from another claim before it is saved.
| Field | Value |
|---|---|
| Operation ID | OP-TP-02 |
| Trigger | Retrieval or creation of a clsThrdparty, clsThrdPartyFirm, or clsThrdpartyCompanionClaim instance, followed by property edits and Save() |
| Inputs | CaseSeqNum, person name/birth date/phone/fax/address fields, firm company name/type/phone/fax/address fields, companion claim number |
| Outputs | Persisted THRDPARTY_CASE-scoped person, firm, and companion-claim rows; resolved carrier/attorney/plaintiff/co-counsel firm sequence numbers; populated companion-claim worker name and confidentiality flag |
| Primary components | clsThrdparty.Save, clsThrdparty.SaveFirms, clsThrdPartyFirm.AddBusinessRules, clsThrdpartyCompanionClaim.GetNewClaimInfo |
| Entry point | Business\SAIF.Business.Claim.ThirdParty\clsThrdparty.vb |
Steps¶
- Retrieve or create the third party.
clsThrdpartyis keyed byCaseSeqNum; retrieval reads the person row and any nested firm collection (SQL-060, SQL-061, THRDPARTY_CASE). - Validate the third party (
IsValid). - Birth date, if entered, must fall between January 1, 1900 and today (BR-014).
- A last name is required unless the third party is itself a firm with a company name, or is linked to a firm in the firm collection that has a company name (BR-014).
- Phone and fax numbers, when the address is domestic (
ForeignAddressFlag = "N"), must be at least twelve characters if entered at all (BR-015). - If a nested firm collection has been loaded, its broken rules are propagated to the third party.
- Save the firm collection (
SaveFirms/Save). Before the base save,clsThrdpartyrecords whether the carrier or attorney firm sequence number was cleared, then delegates toSaveChildObject(m_FirmCollection)(SQL-025, SQL-080, THRDPARTY_FIRM): - On a successful child save, the code re-derives
ThrdpartyFirmSeqNum,CarrierFirmSeqNum, andAttorneyFirmSeqNumby scanning the saved collection forFirmTypeequal toclsThirdPartyConstants.THIRDPARTY_FIRM,CARRIER_FIRM, orATTORNEY_FIRM. - Persist the third-party row through
MyBase.Save()(insert or update) — the update path binds all editable person, address, and phone/fax fields (THRDPARTY_CASE). - Clean up transient firm removals. After the base save, if the carrier or attorney firm sequence number was cleared during this call, the removed firm is taken out of the in-memory collection and the firm collection is re-saved to reflect the removal — mirroring the plaintiff/co-counsel cleanup in the case-header save.
- Validate and save the standalone firm (
clsThrdPartyFirm). Independently of the third-party aggregate, a firm row can be created or edited directly: - Company name is required (BR-017).
- Phone and fax numbers must be at least twelve characters if entered (BR-017).
- Save inserts (SQL-025) or updates (SQL-080) the
THRDPARTY_FIRM-scoped row, categorized byFirmType(clsThirdPartyConstants.PLAINTIFF_FIRM,COCOUNSEL_FIRM,THIRDPARTY_FIRM,CARRIER_FIRM,ATTORNEY_FIRM) (BR-007). - On a rows-affected value other than
1: anInsertError/UpdateError/DeleteErrormessage is added. - Validate and save a companion claim (
clsThrdpartyCompanionClaim). - The companion claim number must resolve to a valid claim via
GetNewClaimInfo, which issues a reader-based lookup by claim number (SQL-039, THRDPARTY_COMPANION_CLAIM) and populates the worker name and claim security info from the returned reader (BR-016).- If the caller lacks conflict access and the resolved claim is marked confidential/conflict, the worker name is cleared rather than exposed.
- If the resolved claim is a conflict claim, a warning is raised rather than a hard error, so the record can still be saved (BR-016).
- Save inserts (SQL-019) or updates (SQL-073) the
THRDPARTY_COMPANION_CLAIMrow keyed byCaseSeqNum/CompanionSeqNum, and deletes (SQL-088) it when removed. - On a rows-affected value other than
1for any of insert, update, or delete: the corresponding error message is added.
Process flow¶
The following diagram visualizes how the third-party person, its firm collection, and companion claims are validated and saved.
flowchart TD
Start([Caller retrieves or creates<br>third party / firm / companion claim]) --> Which{Which participant type?}
Which -->|Third party| TPRules[Validate name, birth date,<br>phone, fax]
TPRules --> TPOk{Valid?}
TPOk -->|No| Fail([Broken rules returned])
TPOk -->|Yes| TPFirms[Save nested firm collection;<br>re-derive carrier/attorney seq nums]
TPFirms --> TPSave[Persist third-party row]
Which -->|Standalone firm| FRules[Validate company name,<br>phone, fax]
FRules --> FOk{Valid?}
FOk -->|No| Fail
FOk -->|Yes| FSave[Insert or update THRDPARTY_FIRM]
Which -->|Companion claim| CLoad[GetNewClaimInfo resolves<br>claim by number]
CLoad --> CRules{Claim found?}
CRules -->|No| Fail
CRules -->|Conflict claim| CWarn[Warning: confidential claim;<br>worker name withheld unless access granted]
CRules -->|Yes| CSave[Insert, update, or delete<br>THRDPARTY_COMPANION_CLAIM]
CWarn --> CSave
TPSave --> Rows{RowsAffected = 1?}
FSave --> Rows
CSave --> Rows
Rows -->|No| Contention([Insert/Update/Delete error added])
Rows -->|Yes| Done([Changes persisted])
Failure and edge-case behavior¶
- The third-party name rule accepts a firm's company name as a substitute for a personal last name, so a third party with no personal name can still validate if it is linked to a named firm (BR-014).
- Companion-claim conflict handling clears the worker name in memory but still allows the save to proceed with a warning, relying on the caller to respect confidentiality when displaying the record.*
- The carrier/attorney and plaintiff/co-counsel firm-sequence-number cleanup logic in
clsThrdparty.SaveandclsThirdPartyCase.Saveis duplicated across the two classes rather than shared.* - A rows-affected value other than
1on any insert, update, or delete is treated as a DB contention failure rather than an exception (BR-005).
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Related documentation¶
Sources¶
Business\SAIF.Business.Claim.ThirdParty\clsThrdparty.vbBusiness\SAIF.Business.Claim.ThirdParty\clsThrdPartyFirm.vbBusiness\SAIF.Business.Claim.ThirdParty\clsThrdpartyCompanionClaim.vbBusiness\SAIF.Business.Claim.ThirdParty\clsThirdPartyConstants.vb