Retrieve billed-cost and payment details¶
This operation supports the financial-reconciliation side of recovery: clsBillAuditService splits a medical bill-audit service line's allowed amount between lien and non-lien portions, and clsClaimPaymentTransDetail performs the equivalent split for a claim payment transaction, adding an unknown-amount bucket. clsClaimCostCategoryCode is a read-only cost-category lookup used across lien, prediction, and expense categorization, while clsPolicyNote provides write-only policy-memo and mail-routing integration used to notify policy-side systems of recovery activity.
| Field | Value |
|---|---|
| Operation ID | OP-TP-08 |
| Trigger | clsBillAuditService.Save(); clsClaimPaymentTransDetail.Save(); direct calls to clsClaimCostCategoryCode retrieval and clsPolicyNote.InsertMemoEntry/GetTeamMailID |
| Inputs | LienAmt, NonLienAmt, AllowedAmt (bill-audit service); LienAmt, NonLienAmt, UnknownAmt, TransactionAmt (claim payment trans detail); policy number, team code, memo text |
| Outputs | Persisted THRDPARTY_BILL_SERVICE rows reconciled to the allowed amount; persisted claim payment transaction detail rows reconciled to the transaction amount; cost-category code lookups; inserted policy memo entries and resolved team mail IDs |
| Primary components | clsBillAuditService.ValidTotal, clsClaimPaymentTransDetail.ValidTotal, clsClaimCostCategoryCode, clsPolicyNote.InsertMemoEntry, clsPolicyNote.GetTeamMailID |
| Entry point | Business\SAIF.Business.Claim.ThirdParty\clsBillAuditService.vb |
Steps¶
- Create or retrieve a bill-audit service line for a lien category (fetched by its parent lien-category retrieval; see Manage liens and settlements).
- Validate the bill-audit service line (
IsValid): - Lien amount plus non-lien amount must equal the allowed amount (BR-033).
- Persist the bill-audit service line via insert (SQL-017) or update (SQL-071) against THRDPARTY_BILL_SERVICE.
- Create or retrieve a claim payment transaction detail row for a lien.
- Validate the claim payment transaction detail (
IsValid): - Lien amount plus non-lien amount plus unknown amount must equal the transaction amount (BR-033).
- Persist the claim payment transaction detail row via its own insert/update SQL (criteria-driven; catalogued generically under the parent claim-payment integration rather than as a standalone SQL entry).*
- Look up cost category codes.
clsClaimCostCategoryCoderetrieves the list of valid third-party claim cost category codes used to categorize liens, predictions, and expenses (SQL-040, TP_CLAIM_COST_CATEGORY_CODE); no business rules are registered — this is a pure reference lookup.* - Insert a policy memo entry.
clsPolicyNote.InsertMemoEntrywrites a memo record directly against the legacy policy system viasp72155_insert_memo_entry(SQL-033); this call bypasses the BOF business-object save pipeline and issues the stored procedure directly, so noRulesAffected/row-count validation is performed.* - Resolve a team mail ID.
clsPolicyNote.GetTeamMailIDcallspolicy_pkg.get_team_mailiddirectly to resolve the mailbox for a policy/team combination, used to route recovery correspondence (SQL-032); likewise bypasses the standard save pipeline.*
Process flow¶
The following diagram visualizes the two reconciliation validations that anchor this operation.
flowchart TD
Start([Caller edits a bill-audit<br>service line or payment trans detail])
Start --> Kind{Which object?}
Kind -->|BillAuditService| BillCheck{Lien + Non-lien<br>= Allowed?}
Kind -->|ClaimPaymentTransDetail| PayCheck{Lien + Non-lien<br>+ Unknown = Transaction?}
BillCheck -->|No| BillFail([Error: amounts<br>must reconcile])
BillCheck -->|Yes| BillSave[Insert or update<br>THRDPARTY_BILL_SERVICE]
PayCheck -->|No| PayFail([Error: amounts<br>must reconcile])
PayCheck -->|Yes| PaySave[Insert or update<br>payment trans detail]
BillSave --> Done([Reconciled amounts persisted])
PaySave --> Done
Failure and edge-case behavior¶
- Both reconciliation rules use an exact equality check (
<>) rather than a tolerance/rounding band, so even a one-cent rounding discrepancy between the summed components and the target amount fails validation.* clsPolicyNote's memo-insert and mail-ID lookup calls issue their stored procedures directly rather than through the standardSave()/business-rule pipeline used elsewhere in this library, so they carry noIsValid/broken-rules protection of their own.*clsClaimCostCategoryCodehas no registered business rules — it is a pure reference lookup shared by liens, predictions, and expenses.*- No length or format validation is documented for the policy memo text passed to
InsertMemoEntry; any constraint is enforced by the target stored procedure rather than the BOF layer.**
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**denote areas where the underlying behavior could not be determined from the available source and should be validated with a subject-matter expert before being treated as fact.
Related documentation¶
Sources¶
Business\SAIF.Business.Claim.ThirdParty\clsBillAuditService.vbBusiness\SAIF.Business.Claim.ThirdParty\clsBillAuditServiceCollection.vbBusiness\SAIF.Business.Claim.ThirdParty\clsClaimPaymentTransDetail.vbBusiness\SAIF.Business.Claim.ThirdParty\clsClaimPaymentTransDetailCollection.vbBusiness\SAIF.Business.Claim.ThirdParty\clsClaimCostCategoryCode.vbBusiness\SAIF.Business.Claim.ThirdParty\clsPolicyNote.vb