RctPolicySelectedService¶
Implements IRctPolicySelectedService, managing the RctPolicySelected records that track which policies have been selected for RCT (Retrospective/Claims Transmission-related) processing and when they were transmitted. It depends on IUnitOfWork for repository access and IUserProfileService for stamping the current user on updates; its static constructor registers bidirectional AutoMapper maps between the data model and contract.
Purpose¶
- Retrieves all selected RCT policies, or a single one by policy number.
- Inserts new RCT-policy-selected records.
- Updates an existing record's period, status, and transmitted date (stamping the update user/date), or inserts it if no matching record exists yet.
Context¶
- Namespace:
SAIF.Services.Rct - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| RctPolicySelectedService(...) | public RctPolicySelectedService(IUnitOfWork unitOfWork, IUserProfileService userProfileService) |
Validates both collaborators are non-null via Enforce.ArgumentNotNull and wires them in. |
| GetRctPolicySelected() | public IEnumerable<RctPolicySelected> GetRctPolicySelected() |
Returns every RCT-policy-selected record mapped to contracts. |
| GetRctPolicySelected(policyNumber) | public RctPolicySelected GetRctPolicySelected(long policyNumber) |
Returns the RCT-policy-selected record for a specific policy number, or null if none exists. |
| InsertRctPolicySelected | public void InsertRctPolicySelected(RctPolicySelected policySelected) |
Maps the contract to a data entity and adds it to the repository as a new row. |
| ModifyRctPolicySelected | public void ModifyRctPolicySelected(RctPolicySelected policySelected) |
Updates the period-effective date, status code, and transmitted date on the matching existing record (stamping update user/date), or inserts a new record via InsertRctPolicySelected when no matching row exists. |
Behavioral notes¶
ModifyRctPolicySelectedperforms an upsert: it looks up by policy number and either updates in place or falls back to insert, rather than requiring the caller to know whether the record already exists.- Update timestamps and the update user are always taken from
DateTime.Nowand the current profile'sUserId, not from caller-supplied values.
Sources¶
- Services/SAIF.Services/Rct/RctPolicySelectedService.cs