Transfer adjustment processing¶
A transfer moves money already paid — claim-to-claim, in full, or for another documented reason — by writing a linked pair of offsetting financial transactions rather than altering the original payment. clsTransferAdjustment is a shared base (transfer-reason metadata, remark text generation) extended by three concrete transfer classes selected at construction (BR-CP-022).
| Field | Value |
|---|---|
| Operation ID | OP-CP-06 |
| Trigger | Caller constructs clsClaimToClaimTransfer, clsFullTransfer, or clsOtherTransfer, sets FromClaim/ToClaim and TransferInfo, calls LoadPayments, marks candidate payments SelectForTransfer, and calls Save() |
| Inputs | IDataPortalInfo, source and destination clsClaimData, transfer reason (claim change, policy change, injury-date change), issue-date filter, selected payment set |
| Outputs | A paired "from" (negative) and "to" (positive) CL_FINANCIAL_TRANS row per transferred payment, linked by TransferTransID, each with mirrored detail lines; boolean save result |
| Primary components | clsTransferAdjustment, clsClaimToClaimTransfer, clsFullTransfer, clsOtherTransfer |
| Entry point | Business\SAIF.Business.Claim.Payment\Adjustments\Transfers\clsTransferAdjustment.vb |
Steps¶
- Select the concrete transfer type (BR-CP-022). The caller instantiates
clsClaimToClaimTransfer(moves payments between two claims),clsFullTransfer, orclsOtherTransfer, and recordsTransferInfo.TransferReason(ClaimChange,PolicyChange, orInjuryDateChange). - Load candidate payments.
LoadPayments(issueFromDate)reads the source claim's posted transactions (cached per claim/issue-date pair inStaticlocals on the base class) and groups their detail lines by transaction and payment category into read-onlyclsClaimPaymentcandidates. - Mark payments for transfer. The caller sets
SelectForTransfer = Trueon each candidate the adjuster chooses to move; unmarked payments are left untouched on the source claim. - Validate the request. For
clsClaimToClaimTransfer, full validation (including the base remark/amount rules) runs only when the transfer reason isClaimChange; other reasons bypassMyBase.IsValidentirely and are always considered valid at this level. - Build the paired transactions. For each selected payment,
Save()creates a "from" transaction (on the source claim, amount negated) and a "to" transaction (on the destination claim, amount positive), each pointing at the other's sequence number viaTransferTransID; both are stamped Released status, today's entry date, the configured issue date, andIgnoreBusinessRules = True. - The "from" transaction's remark is a generated string naming the destination claim; the "to" transaction's remark is reason-specific text from
GetToTransRemarkText(claim number, injury date, or policy number changed-from text depending on the reason), or blank for unrecognized reasons. - Mirror detail lines with sign flips. For every original detail line, a new detail is added to both the "from" and "to" transactions, copying category/reimbursement/cost/penalty/MCO-fee/EAIP flags unchanged, but negating
TransactionAmt,TDDayQty, andTDOffsetAmton the "from" side and keeping them positive on the "to" side. - Save both transactions per payment. Each generated transaction is saved individually through Financial transaction and remark management (
clsFinancialTrans.Save()); the loop stops and returnsFalseat the first failed save, leaving any already-saved transactions committed.
Process flow¶
flowchart TD
Start([Adjuster loads source claim's<br>posted payments]) --> Select[Mark payments SelectForTransfer]
Select --> Which{Transfer reason<br>= ClaimChange?}
Which -->|Yes| Validate{Remark/amount<br>rules pass?}
Which -->|No| Build
Validate -->|No| Blocked([Broken rule; save blocked])
Validate -->|Yes| Build[For each selected payment:<br>build From and To transactions]
Build --> Mirror[Mirror detail lines,<br>negate amounts on From side]
Mirror --> SaveFrom[Save From transaction]
SaveFrom --> FromOk{Saved?}
FromOk -->|No| Fail([Save returns False;<br>remaining payments not processed])
FromOk -->|Yes| SaveTo[Save To transaction]
SaveTo --> ToOk{Saved?}
ToOk -->|No| Fail
ToOk -->|Yes| More{More selected<br>payments?}
More -->|Yes| Build
More -->|No| Done([Transfer complete])
Failure and edge-case behavior¶
Save()iterates payments and, within each payment, both transaction halves, but does not roll back transactions from earlier payments in the same call if a later one fails — a multi-payment transfer can leave a partially-completed transfer split across claims.- For
clsClaimToClaimTransfer, any transfer reason other thanClaimChangeskips the base validation rules entirely (IsValidreturnsTrueunconditionally), so amount and remark checks only apply to claim-change transfers. - The "from"/"to" pairing depends on both
clsFinancialTrans.NewFinancialTranscalls succeeding in obtaining sequence numbers before either is saved; a sequence exhaustion or portal failure at that point would leaveTransferTransIDreferencing a transaction that was never persisted.* LoadPayments's claim/issue-date cache is process-wide (Static), not per-instance, matching the same cross-cutting caching pattern seen in refund processing.
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.
Sources¶
Business\SAIF.Business.Claim.Payment\Adjustments\clsAdjustmentBase.vbBusiness\SAIF.Business.Claim.Payment\Adjustments\Transfers\clsTransferAdjustment.vbBusiness\SAIF.Business.Claim.Payment\Adjustments\Transfers\clsClaimToClaimTransfer.vbBusiness\SAIF.Business.Claim.Payment\Adjustments\Transfers\clsFullTransfer.vbBusiness\SAIF.Business.Claim.Payment\Adjustments\Transfers\clsOtherTransfer.vb