Coverage combination management¶
A coverage combination connects two claims — one with coverage code A and one with coverage code B — that occur to the same worker on the same injury date. clsCoverageCombination maintains a single combination row, while clsCoverageCombinationCollection retrieves every combination row in the table for lookup or bulk-processing scenarios. Other library operations (loss-summary maintenance, in particular) use the Part-A/Part-B lookups to decide how to summarize Part-B-only claims.
| Field | Value |
|---|---|
| Operation ID | OP-USC-01 |
| Trigger | Caller calls NewCoverageCombination(dataportal, partAClaimID, partBClaimID) to create, GetCoverageCombination(dataportal, claimID) or GetCoverageCombination(dataportal, partAClaimID, partBClaimID) to retrieve a single row, or clsCoverageCombinationCollection.GetCoverageCombinationCollection(dataportal) to retrieve all rows, then calls Save() or Delete() |
| Inputs | PartAClaimID, PartBClaimID, ClaimID (alternate retrieval key) |
| Outputs | Persisted or retrieved US_COVERAGE_COMBINATION row(s); boolean part-A/part-B membership results from the shared IsCoverageCombinationPartA / IsNotCoverageCombinationPartA / IsCoverageCombinationPartB / IsNotCoverageCombinationPartB properties |
| Primary components | clsCoverageCombination, clsCoverageCombinationCollection |
| Entry point | Business\SAIF.Business.UnitStat.Claim\Coverage Combination\clsCoverageCombination.vb, Business\SAIF.Business.UnitStat.Claim\Coverage Combination\clsCoverageCombinationCollection.vb |
Steps¶
- Create.
NewCoverageCombination(inDataportal, inPartAClaimID, inPartBClaimID)builds aCriteriaobject carrying the two claim IDs and marks itRetrieveType = NaturalKey;clsCoverageCombination.Createthen requests the next Oracle sequence value viaMyCriteria.DataPortalInfo.GetNextSeqNum("COVERAGE_COMBINATION_SEQ")(SQL-001,DUAL) and copiesPartAClaimID/PartBClaimIDfrom the criteria into the new object. - Insert.
BeforeInsertbinds the generatedCoverageCombinationSeqNum,PartAClaimID,PartBClaimID, and a freshly-setUpdateNum = 0,UpdateUser, andUpdateDate, then executes (SQL-002, US_COVERAGE_COMBINATION) (BR-004): AfterInsert: if rows affected<> 1, addsInsertError("Insert Failed"); otherwise callsMarkOld().- Retrieve a single combination.
BeforeRetrievebuilds the base select and appends one of two WHERE clauses depending onRetrieveType(SQL-017, US_COVERAGE_COMBINATION): - by claim ID:
Where PartA_Claim_ID = :ClaimID Or PartB_Claim_ID = :ClaimID - by natural key:
Where PartA_Claim_ID = :PartAClaimID And PartB_Claim_ID = :PartBClaimID AfterRetrieve: loads the first returned row into the object, if any, and callsMarkOld().- Delete.
BeforeDeletebindsPartAClaimIDandPartBClaimIDand executes: AfterDelete: if rows affected<> 1, adds a DB contention error message; otherwise callsMarkNew().- Retrieve all combinations (collection).
clsCoverageCombinationCollection.BeforeRetrieveselects every row with no WHERE clause (SQL-017, US_COVERAGE_COMBINATION):Select US_COVERAGE_COMBINATION.COVERAGE_COMBINATION_SEQ_NUM as CoverageCombinationSeqNum, US_COVERAGE_COMBINATION.PARTA_CLAIM_ID as PartaClaimID, US_COVERAGE_COMBINATION.PARTB_CLAIM_ID as PartbClaimID, US_COVERAGE_COMBINATION.UPDATE_NUM as UpdateNum, US_COVERAGE_COMBINATION.UPDATE_DATE as UpdateDate, US_COVERAGE_COMBINATION.UPDATE_USER as UpdateUser From US_COVERAGE_COMBINATION AfterRetrieve: instantiates aclsCoverageCombinationper row, callsLoad(...), and adds it to the collection.- Part-A / Part-B membership lookups.
IsCoverageCombinationPartA(dpi, claimId)retrieves the combination byclaimIdand compares itsPartAClaimIDto the input;IsNotCoverageCombinationPartAnegates the result.IsCoverageCombinationPartB/IsNotCoverageCombinationPartBdo the equivalent comparison againstPartBClaimID. These are used elsewhere in the library (loss-summary maintenance) to detect a Part-B claim that is not part of any combination. - On failure: if no combination row exists for the claim, the underlying
GetCoverageCombination(dpi, claimId)call surfaces whatever the framework retrieval returns for a missing row.**
Process flow¶
flowchart TD
Start([Caller requests coverage-combination operation]) --> Which{Create, retrieve,<br>or delete?}
Which -->|Create| Seq[Get next Oracle sequence value]
Seq --> Insert[Insert US_COVERAGE_COMBINATION row]
Insert --> InsRows{RowsAffected = 1?}
InsRows -->|No| InsErr([InsertError added])
InsRows -->|Yes| InsOk([Marked old; combination persisted])
Which -->|Retrieve single| RetKey{RetrieveType?}
RetKey -->|ClaimID| RetByClaim[Select by PartA or PartB = ClaimID]
RetKey -->|NaturalKey| RetByKey[Select by PartA and PartB]
RetByClaim --> Loaded([Object loaded; marked old])
RetByKey --> Loaded
Which -->|Retrieve all| RetAll[Select all rows, no WHERE]
RetAll --> Collection([Collection populated])
Which -->|Delete| Del[Delete by PartA and PartB]
Del --> DelRows{RowsAffected = 1?}
DelRows -->|No| DelErr([DB contention error added])
DelRows -->|Yes| DelOk([Marked new; row removed])
Failure and edge-case behavior¶
- A rows-affected value of
0on insert addsInsertError; on delete it adds a DB contention error — neither raises an exception, so callers must inspect the broken-rule/error collection afterSave(). clsCoverageCombinationhas no update path: only create, delete, and retrieve are implemented.AddBusinessRules()is empty, so no property-level validation runs on this object.*clsCoverageCombinationCollection.Criteriacarries its own template copies of the create, insert, update, and delete SQL properties (SQL-001 sequence select, SQL-003 insert, SQL-018 update, SQL-023 delete) — but the collection'sBeforeCreate,Create,AfterCreate,BeforeInsert,BeforeUpdate, andBeforeDeleteoverrides are all commented out, so none of these four statements ever executes; they are dead code left over from the CodeGen2 template.*- Only
clsCoverageCombination's own delete path executes an active delete (SQL-022); the collection cannot delete rows itself.* - The collection's
Create/BeforeCreate/AfterCreateoverrides are also commented out, so the collection itself cannot be used to create new combination rows; only the single-objectclsCoverageCombination.Createpath does that.*
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¶
Business\SAIF.Business.UnitStat.Claim\Coverage Combination\clsCoverageCombination.vbBusiness\SAIF.Business.UnitStat.Claim\Coverage Combination\clsCoverageCombinationCollection.vb