ErrorConditionHandler¶
ErrorConditionHandler implements IErrorConditionHandler and is the single recording point for OP-DOM-07: every indexing and generation step in this library (PatientIndexer, ProviderIndexer/ProviderIndexerV2, BillServiceIndexer, GenerateCbpBills) that hits a data problem records it here as an EbillErrorCondition row, with the pended and provider-error flags set according to which error-kind method was called (DOM-BR-070).
Purpose¶
- Creates a new
EbillErrorConditionrow for every recorded error, stamping the update date/user and adding it to the repository before any error-kind-specific fields are set. - Sets the pended-bill and provider-error flags differently depending on which error-kind method is called — provider errors and bill-service-provider errors are always pended and flagged as provider errors, patient errors are pended but not provider errors, and bill-service errors take an explicit
isPendingflag — implementing DOM-BR-070.
Context¶
- Namespace:
SAIF.Domain.Model.Claims.Ebilling - Assembly/package:
SAIF.Domain(packaged inSAIF.SAIFCode.Core)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| ErrorConditionHandler (constructor) | public ErrorConditionHandler(IRepositoryFactory factory, IUserProfileService prof) |
Initializes the handler with the repository factory and user-profile service used to stamp new error rows; requires prof to be non-null. |
| AddProviderError | public void AddProviderError(EbillProvider provider, string errorText) |
Records a pended, provider-flagged error against provider (DOM-BR-070). |
| AddPatientError | public void AddPatientError(EbillPatient patient, string errorText) |
Records a pended, non-provider-flagged error against patient and its provider (DOM-BR-070). |
| AddBillServiceError | public void AddBillServiceError(Ebill bill, string errorText, bool isPending = true) |
Records an error against bill, with the pended flag controlled by the isPending parameter rather than a fixed value (DOM-BR-070). |
| AddBillServiceProviderError | public void AddBillServiceProviderError(EbillService service, string errorText) |
Records a pended, provider-flagged error against service's bill, patient, and provider, and its sub-service number (DOM-BR-070). |
Inherited public members¶
Members in this section are inherited from DomainBase<TItem> in SAIF.Domain. They are available on this type through inheritance (via the intermediate DomainRepositoryBase<TItem> base).
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| HasData | public virtual bool HasData { get; } |
Reports whether the wrapped EbillErrorCondition entity is present, evaluated as !DataItem.IsNull(). |
SAIF.Domain — DomainBase<TItem> |
Behavioral notes¶
- Each
Add*Errormethod creates and adds a brand-newEbillErrorConditionrow per call via the privateNewErrorhelper; the type's ownDataItem/HasDatastate (inherited from its base classes) is not used to track the error it just created*. AddBillServiceError'sisPendingparameter defaults totrue, so callers that omit it get the same pended behaviour as the provider/patient error methods.
Constraints and usage notes¶
- Each public method issues its own
Factory.GetRepository<EbillErrorCondition>().Addcall, so callers do not need to persist the error row themselves after calling one of these methods.
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
Domain/SAIF.Domain/Model/Claims/Ebilling/ErrorConditionHandler.csDomain/SAIF.Domain/Model/Claims/Ebilling/IErrorConditionHandler.csDomain/SAIF.Domain/DomainBase.csDomain/SAIF.Domain/DomainRepositoryBase.cs