SAIF.Framework.Validation operations and processes¶
This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules | Tables | SQL |
|---|---|---|---|---|---|---|---|
| Validate claim record | Apply the ClaimIntake rule set to a single claim record and report every failure it produces |
ValidationEngine.Validate called by SAIF.Claims.Intake when an operator submits the claim entry screen |
Claim record, rule set name ClaimIntake, IValidationContext |
ValidationResult with ordered failures and warnings; one validation failure audit row per blocking failure |
VAL-014, VAL-021 | ValidationFailureAudit | SQL-001 |
| Load rule set | Materialize and cache the ValidationRule collection for a named rule set from its XML definition |
First request for a rule set name that is not yet in the process cache | Rule set name, rule set file path from configuration | Cached, ordered ValidationRule collection |
None — structural operation with no business rule of its own | None | None |
| Resolve jurisdiction context | Determine the effective jurisdiction and load the active rule definitions for that state before state-scoped rules run | Invoked by Validate claim record when the active rule set contains at least one state-scoped rule |
IValidationContext.JurisdictionCode, rule set name |
Resolved JurisdictionCode and the applicable rule definition collection |
VAL-021 | ValidationRuleDefinition, Jurisdiction | SQL-004 |
| Validate provider record | Apply the ProviderIntake rule set to a medical provider record supplied by a billing application |
ValidationEngine.Validate called with rule set name ProviderIntake |
Provider record, rule set name ProviderIntake, IValidationContext |
ValidationResult for the provider record; one validation failure audit row per blocking failure |
VAL-032 | ValidationFailureAudit | SQL-001 |
| Screen pending audit queue | Revalidate queued premium audit records ahead of an overnight batch run so malformed rows are rejected before processing | SAIF.PremiumAudit.Batch calls AuditQueueScreener.Screen at the start of each batch window |
Audit period start and end dates, optional policy number | Collection of ValidationResult keyed by audit queue identifier |
VAL-037 | PremiumAuditQueue | SQL-007 |
Process flow diagram¶
The following diagram visualizes the primary operational flow across operations.
flowchart TD
Start([Caller submits a record]) --> Load[Load rule set]
Load --> Jur{Rule set contains state-scoped rules?}
Jur -->|Yes| Resolve[Resolve jurisdiction context]
Jur -->|No| Evaluate[Evaluate rules in declaration order]
Resolve --> Evaluate
Evaluate --> Audit[Write a validation failure audit row for each blocking failure]
Audit --> Blocking{Any blocking failure recorded?}
Blocking -->|Yes| Rejected([Return invalid result; caller blocks persistence])
Blocking -->|No| Accepted([Return valid result with any warnings])
Inherited operations and processes¶
Operations in this section originate from base classes or services provided by dependency framework libraries. They are inherited or delegated, not implemented in this library.
From ValidationComponentBase (SAIF.Framework.Core)¶
| Operation | Intent | Provided by | Origin | Embedded in |
|---|---|---|---|---|
| Initialize component | Complete framework startup configuration and establish trace routing before any component performs work† | ValidationComponentBase |
SAIF.Framework.Core |
Validate claim record |
| Write trace entry | Emit a component trace entry through the configured framework trace listener† | ValidationComponentBase |
SAIF.Framework.Core |
Validate claim record |
Origin: These operations are defined in
SAIF.Framework.Core/ValidationComponentBaseand inherited or delegated by this component. Their step-by-step logic is embedded inline (with> Origincallouts) in the consuming operation's detail page.
Database interactions¶
The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.
| Operation | SQL | Tables | Type |
|---|---|---|---|
| Validate claim record | SQL-001 | ValidationFailureAudit | Write |
| Resolve jurisdiction context | SQL-004 | ValidationRuleDefinition, Jurisdiction | Read |
| Validate provider record | SQL-001 | ValidationFailureAudit | Write |
| Screen pending audit queue | SQL-007 | PremiumAuditQueue, Policy | Read |
Failure and edge-case behavior¶
- A rule set name that has no matching XML definition raises
RuleSetNotFoundExceptionfromLoad rule set; no partially populated rule collection is cached, so a corrected deployment succeeds on the next call without a process restart. - A missing jurisdiction code stops evaluation before any state-scoped rule runs and is reported as a blocking failure rather than a skipped rule, so the gap is visible to the operator.
- The jurisdiction rule definition read is treated as advisory: if
SQL-004times out, the base rule severities from the XML definition are used and a warning is added to the result rather than failing the whole submission. - The failure audit insert never blocks validation. When
SQL-001fails, the failure is traced throughValidationComponentBase.WriteTraceand theValidationResultis still returned to the caller. Screen pending audit queueskips queue rows already locked by another process, so two overlapping batch windows cannot revalidate the same audit.- Validation is not transactional. Callers that persist a record after a valid result are responsible for their own transaction scope; this library opens no transaction of its own.
Stored procedure operations¶
Operations implemented in SQL Server stored procedures referenced by this library.
| Operation | Description | Source | Link |
|---|---|---|---|
| Retrieve pending audits | Returns queued premium audits due within a processing window, ordered oldest due date first | dbo.usp_GetPendingAudits |
Details |
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Configuration
- Business rules
- Database tables
- SQL catalog
- Procedures
- API reference
Sources¶
- src/SAIF.Framework.Validation/ValidationEngine.vb
- src/SAIF.Framework.Validation/RuleSetLoader.vb
- src/SAIF.Framework.Validation/Rules/ValidationRule.vb
- src/SAIF.Framework.Validation/Jurisdiction/JurisdictionResolver.vb
- src/SAIF.Framework.Validation/Data/RuleDefinitionRepository.vb
- src/SAIF.Framework.Validation/Data/ValidationAuditRepository.vb
- src/SAIF.Framework.Validation/Data/PendingAuditRepository.vb
- src/SAIF.Framework.Validation/Batch/AuditQueueScreener.vb
- src/SAIF.Framework.Validation/RuleSets/ClaimIntake.rules.xml
- src/SAIF.Framework.Validation/RuleSets/ProviderIntake.rules.xml