ServiceCodeMappingHelper¶
Configures AutoMapper (Mapper.CreateMap) mappings between billing service-code data-model entities and their corresponding contract types, so that ServiceCodeService can map query results to contract objects at runtime. It registers mappings from CbpServiceCode to CbpBillServiceCode, CbpServiceDescription to ServiceDescription, CbpServiceFee to FeeSchedule, and CbpCptService to ServiceAttributeCpt.
Purpose¶
- Wires up the AutoMapper configuration needed to translate service-code, service-description, fee-schedule, and CPT-attribute data-model entities into their contract representations.
- Centralizes service-code-related mapping registration so it can be invoked once from a consuming service's static constructor.
Context¶
- Namespace:
SAIF.Services.Claims.Bills - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| MapServiceCodeService | static void MapServiceCodeService() |
Registers all AutoMapper mappings for service-code-related entities by invoking the internal code-table and entity-table mapping registration routines. |
Behavioral notes¶
- The internal
MapCodeTablesroutine is currently a no-op; its singleMapper.CreateMap<CbpBillStatusCode, BillStatusCode>()call is commented out.* - The internal
MapTablesroutine registers four entity-pair mappings:CbpServiceCode→CbpBillServiceCode,CbpServiceDescription→ServiceDescription,CbpServiceFee→FeeSchedule, andCbpCptService→ServiceAttributeCpt. - Mappings are registered via AutoMapper's static
Mapper.CreateMapAPI, meaning they take effect globally for the process onceMapServiceCodeServicehas been called.*
Constraints and usage notes¶
- Must be called (typically once, from a static constructor such as
ServiceCodeService's) before any code attempts toMapper.Mapbetween the registered type pairs, otherwise AutoMapper will throw a mapping-not-found exception.*
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¶
Services/SAIF.Services/Claims/Bills/ServiceCodeMappingHelper.cs