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¶
CbpBill.AddProcedure/AddServiceauto-increment child ids (SD-BR-100).FinancialTransaction.AddDetailcallsEnforce.ArgumentNotNulland increments the id;InsertAddressLine1shifts 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 theSAIF.Commonassembly, which is outside this documentation run and has no navigable operation page here.*Subpoenaclassification helpers (SD-BR-102):IsWitnessType(Nonparties, OtherMedical, Parties),IsProviderType(Claims, MedicalRecords),IsZeroPayNoMail("NOML" and a paid sum of 0).ClaimCostCategoryCodelookups: MED, TD, PPD, PTD, FTL, CHE, VSV, VTD, OTH; the descriptions "burial expenses" and "death benefits" map to FTL (SD-BR-103).Enums.ConvertShowOnlyStringToEnumdefaults toUnread(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.ArgumentNotNullthrowsArgumentNullException. - Unrecognized show-only string: defaults to
Unreadrather than throwing.
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¶
Data/SAIF.Data/Model/Claims/Bills/CbpBill.cs