Skip to content

Model helper operations

Provide in-memory model helper behavior: child id sequencing, financial-transaction validation, subpoena classification, cost-category lookup, and show-only enum conversion.

Field Value
Operation ID OP-SD-23
Trigger Callers construct or classify in-memory domain model instances.
Inputs Model instances/fields
Outputs Mutated model state, classification results
Primary components CbpBill, FinancialTransaction, Subpoena, ClaimCostCategoryCode, Enums
Entry point Data/SAIF.Data/Model/Claims/Bills/CbpBill.cs

Steps

  1. CbpBill.AddProcedure / AddService auto-increment child ids (SD-BR-100).
  2. FinancialTransaction.AddDetail calls Enforce.ArgumentNotNull and increments the id; InsertAddressLine1 shifts address lines down (SD-BR-101).

    Origin: The null-check step delegates to Enforce.ArgumentNotNull (Data/SAIF.Data/Model/Claims/Payments/FinancialTransaction.cs:173), implemented in the SAIF.Common assembly, which is outside this documentation run and has no navigable operation page here.*

  3. Subpoena classification helpers (SD-BR-102): IsWitnessType (Nonparties, OtherMedical, Parties), IsProviderType (Claims, MedicalRecords), IsZeroPayNoMail ("NOML" and a paid sum of 0).
  4. ClaimCostCategoryCode lookups: MED, TD, PPD, PTD, FTL, CHE, VSV, VTD, OTH; the descriptions "burial expenses" and "death benefits" map to FTL (SD-BR-103).
  5. Enums.ConvertShowOnlyStringToEnum defaults to Unread (SD-BR-104).

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start(["Callers construct or classify in-memory domain model<br>instances."]) --> S1["`CbpBill`"]
    S1 --> S2{"Rules satisfied?"}
    S2 -->|Yes| EndOk([Result returned])
    S2 -->|No| EndErr([Exception / empty result])

Failure and edge-case behavior

  • Null financial transaction detail: Enforce.ArgumentNotNull throws ArgumentNullException.
  • Unrecognized show-only string: defaults to Unread rather than throwing.

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

  • Data/SAIF.Data/Model/Claims/Bills/CbpBill.cs