Claim-person audit history¶
Claim-person audit history records a before/after text snapshot whenever a tracked claim-person field changes — home address, mailing address, home phone, message phone, preferred contact method, language preference, or email address, as enumerated by CodeMap.AuditTypeCodes. Each entry is inserted once and is not updated or deleted; the object also exposes a shared code-table lookup that maps audit-type codes to their descriptions.
| Field | Value |
|---|---|
| Operation ID | OP-PER-09 |
| Trigger | Caller creates a clsClaimPersonAuditHistory entry (typically alongside a tracked field edit) and saves it, or calls GetIWAuditHistorys to list a person's history |
| Inputs | PersonID, ClaimID, AuditType/AuditTypeCode, BeforeText, AfterText |
| Outputs | A persisted CL_IW_AUDIT_HISTORY row with a generated sequence number; a clsClaimPersonAuditHistoryCollection of history entries for a person; a shared AuditTypeCodes code-table map |
| Primary components | clsClaimPersonAuditHistory.Create, clsClaimPersonAuditHistory.BeforeInsert, clsClaimPersonAuditHistory.AfterInsert, clsClaimPersonAuditHistoryCollection.GetIWAuditHistorys, CodeMap.GetAuditTypeCodes |
| Entry point | Business\SAIF.Business.Claim.Person\clsClaimPersonAuditHistory.vb |
Steps¶
- Create a new audit-history entry.
Create()assigns the next sequence number from theCL_IW_AUDIT_HISTORY_SEQOracle sequence throughDataPortalInfo.GetNextSeqNum.** - Set the audit type. The
AuditTypeproperty setter translates anAuditTypeCodesenum value into its stored code by looking it up in the sharedCodeMap.GetAuditTypeCodesmap, which is itself populated by a query againstCL_IW_AUDIT_TYPE_CODEordered by description.** - Insert the entry.
BeforeInsertbuilds an insert request binding the audit-history sequence number, audit-type code, person ID, before/after text (truncated to 500 characters each), a zeroed update number, the current date, the acting user's upper-cased ID, and the claim ID.** - Confirm the insert.
AfterInsertchecks the rows-affected result; if it is not1, it adds an"Insert Failed"error message, otherwise it marks the entry old.** - Retrieve a single entry by sequence number.
BeforeRetrieve/AfterRetrieveselect the row matchingIWAuditHistorySeqNumand fill the object from the returned result set.** - Retrieve all entries for a person.
clsClaimPersonAuditHistoryCollection.GetIWAuditHistorysappends aWHERE CL_IW_AUDIT_HISTORY.PERSON_ID = :PersonIDfilter to the shared retrieve statement and loads each row into aclsClaimPersonAuditHistoryin the collection.**
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Tracked field changes or history requested]) --> Which{Create entry or list history?}
Which -->|Create| Seq[Assign next audit-history sequence number]
Seq --> SetType[Resolve audit type code]
SetType --> Insert[Insert audit-history row]
Insert --> Rows{Insert affected 1 row?}
Rows -->|No| Fail([Add Insert Failed error])
Rows -->|Yes| Done([Entry marked old])
Which -->|List| Query[Query rows for PersonID]
Query --> Return([Return audit-history collection])
Failure and edge-case behavior¶
AddBusinessRules()onclsClaimPersonAuditHistoryis an empty override (aTODOremains in source), so this object enforces no rule validation of its own beyond the insert row-count check.- Only create/insert and retrieve paths are implemented;
UpdateSQLandDeleteSQLboth throwNotImplementedException, so audit-history rows cannot be edited or removed once written. - The underlying tables (
CL_IW_AUDIT_HISTORY,CL_IW_AUDIT_TYPE_CODE) are not part of this library's cataloged database-tables documentation set, so no table or SQL-ID cross-reference is available for this operation.**
Note: Statements marked with
**could not be confirmed against the library's existing SQL and database-tables catalog; treat as unknown until those catalogs are extended to cover this table.
Related documentation¶
Sources¶
Business\SAIF.Business.Claim.Person\clsClaimPersonAuditHistory.vb