Skip to content

SAIF.Data.NHibernate 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 Rules Tables SQL
Claim bill queue — next bill Pass hasConflictAccess to ICCClaimApiService.GetNextClaimBillFromQueue SDN-BR-001 N/A SQL-050
Claim bill queue — restore Delegate to ICCClaimApiService.RestoreClaimBillToQueue(taskId) N/A N/A SQL-051
Collections case lookups GetCasesByReferenceNumber(referenceId) N/A ADDRESS, AFFILIATE, CLM_DBA.TEMP_DATA_PERSON_ADDRESS, COMPANY, COMPANY_ADDRESS, LC_TRAN_CATEGORY_CODE, LEGAL_COLLECTION, LEGAL_COLLECTION_CODE, LEGAL_COLLECTION_DEBTOR, LEGAL_COLLECTION_TRANSACTION, LEGAL_COLLECTION_TRAN_CODE, LOCATION, LOCATION_VIEW, MARKET_TYPE_CODE, PERSON, PERSON_ADDRESS, PERSON_PHONE, PHONE, POLICY, POLICY_SEARCH, THRDPARTY, THRDPARTY_FIRM SQL-004, SQL-005, SQL-006, SQL-007, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-021
Collections payment application CreateSqlQuery("call WCIS_DBA.PK80010_LEGAL_COLLECTIONS.APPLYPAYMENTS( SDN-BR-010 LC_TRAN_CATEGORY_CODE, LEGAL_COLLECTION_PAYMENT_REF, LEGAL_COLLECTION_TRANSACTION, LEGAL_COLLECTION_TRAN_CODE SQL-052, SQL-053
Collections interest and payment selection GetInterest(caseId, runDate) N/A LEGAL_COLLECTION, LEGAL_COLLECTION_DEBTOR, LEGAL_COLLECTION_TRANSACTION, LOCATION, POLICY_FINANCIAL_TRANS, THRDPARTY, THRDPARTY_DISTRIBUTION SQL-013, SQL-014, SQL-015, SQL-016, SQL-017, SQL-018
SOIL (State of Oregon Intercept) processing GetWorkerIdForDebtors() SDN-BR-011, SDN-BR-012 AFFILIATE, CLM_DBA.TEMP_DATA_PERSON_ADDRESS, DEPT_REVENUE_SOIL_ADJUSTMENT, DEPT_REVENUE_SOIL_BALANCE, LEGAL_COLLECTION, LEGAL_COLLECTION_DEBTOR, PERSON, SOIL_DEBTOR_REFERENCE, THRDPARTY SQL-002, SQL-003, SQL-019, SQL-020
Policy standard premium Named query Policies_GetPolicyStandardPremium N/A N/A SQL-035
Payroll audit report tracking call WCIS_DBA.PK73101_IMAGE.TRACK_IN_REPORT( N/A N/A SQL-055
Claim score category Named query ClaimsAnalytics_GetClaimScoreCategory SDN-BR-020 ANALYTICS_DB.dbo.CSG_CLM_SGMNTN_REQUEST_CLAIM, EIS_PROD.dbo.WCS_POLICY, EIS_STAGING.dbo.BDS_CTL_MESSAGES SQL-001
Missing time-loss payments Named query MissingTimeLoss_GetMissingTimeLossPayments N/A N/A SQL-034
Provider address retrieval The constructor validates the unit of work with Enforce.ArgumentNotNull SDN-BR-030, SDN-BR-031 N/A N/A
Group image soft delete Load the ImageGroup (Image_Group) and its Image SDN-BR-040 N/A N/A
Group image filtered search Query ImageGroup by group id or parent group SDN-BR-041, SDN-BR-042, SDN-BR-043 N/A N/A
Group and category lookups GroupFound, GetGroup, GetGroupOrDefault query GroupAssociation (group_association) SDN-BR-044 N/A N/A
Investigation subject and claim GetSubjectName(caseNumber) SDN-BR-050 COMPANY, INVESTIGATION, PERSON, POLICY, PROVIDER_LOCATION, SUBJECT SQL-032, SQL-033
Policy output documents Queries on PolicyOutputDocument (policy_output_document) eager-fetch related entities SDN-BR-060, SDN-BR-061, SDN-BR-062, SDN-BR-063 N/A N/A
Custom type conversions YesNoNullUserType SDN-BR-070, SDN-BR-071, SDN-BR-072, SDN-BR-073, SDN-BR-074, SDN-BR-075 N/A N/A

Process flow diagram

The following diagram visualizes the primary operational flow for collections case processing, the most cross-referenced business process in this library.

flowchart TD
    Start([Collections request]) --> Lookup[Collections case lookups]
    Lookup --> Interest[Interest and payment selection]
    Interest --> Apply[Apply payments]
    Apply --> Soil{SOIL eligible?}
    Soil -->|Yes| SoilProc[SOIL processing]
    Soil -->|No| EndOk([Case updated])
    SoilProc --> EndOk

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
Claim bill queue — next bill SQL-050 N/A Write
Claim bill queue — restore SQL-051 N/A Write
Collections case lookups SQL-004, SQL-005, SQL-006, SQL-007, SQL-008, SQL-009, SQL-010, SQL-011, SQL-012, SQL-021 ADDRESS, AFFILIATE, CLM_DBA.TEMP_DATA_PERSON_ADDRESS, COMPANY, COMPANY_ADDRESS, LC_TRAN_CATEGORY_CODE, LEGAL_COLLECTION, LEGAL_COLLECTION_CODE, LEGAL_COLLECTION_DEBTOR, LEGAL_COLLECTION_TRANSACTION, LEGAL_COLLECTION_TRAN_CODE, LOCATION, LOCATION_VIEW, MARKET_TYPE_CODE, PERSON, PERSON_ADDRESS, PERSON_PHONE, PHONE, POLICY, POLICY_SEARCH, THRDPARTY, THRDPARTY_FIRM Read
Collections payment application SQL-052, SQL-053 LC_TRAN_CATEGORY_CODE, LEGAL_COLLECTION_PAYMENT_REF, LEGAL_COLLECTION_TRANSACTION, LEGAL_COLLECTION_TRAN_CODE Write
Collections interest and payment selection SQL-013, SQL-014, SQL-015, SQL-016, SQL-017, SQL-018 LEGAL_COLLECTION, LEGAL_COLLECTION_DEBTOR, LEGAL_COLLECTION_TRANSACTION, LOCATION, POLICY_FINANCIAL_TRANS, THRDPARTY, THRDPARTY_DISTRIBUTION Read
SOIL (State of Oregon Intercept) processing SQL-002, SQL-003, SQL-019, SQL-020 AFFILIATE, CLM_DBA.TEMP_DATA_PERSON_ADDRESS, DEPT_REVENUE_SOIL_ADJUSTMENT, DEPT_REVENUE_SOIL_BALANCE, LEGAL_COLLECTION, LEGAL_COLLECTION_DEBTOR, PERSON, SOIL_DEBTOR_REFERENCE, THRDPARTY Read / Write
Policy standard premium SQL-035 N/A Read
Payroll audit report tracking SQL-055 N/A Write
Claim score category SQL-001 ANALYTICS_DB.dbo.CSG_CLM_SGMNTN_REQUEST_CLAIM, EIS_PROD.dbo.WCS_POLICY, EIS_STAGING.dbo.BDS_CTL_MESSAGES Write
Missing time-loss payments SQL-034 N/A Read
Investigation subject and claim SQL-032, SQL-033 COMPANY, INVESTIGATION, PERSON, POLICY, PROVIDER_LOCATION, SUBJECT Read

Failure and edge-case behavior

  • Claim bill queue operations (OP-SDN-01/02) delegate entirely to ICCClaimApiService; the legacy named queries (SQL-050, SQL-051) are unused and their backing package (PK82039_BILLENTRY_TASK_PROCESS) could not be retrieved (not-found-by-cli) — see Procedures.
  • SOIL processing (OP-SDN-06): the acronym expansion is inferred from the package name and is not independently verified*.
  • Group image filtered search (OP-SDN-13): the deleted-image visibility filter's boolean logic is anomalous (inverted) — see the HIGH-severity finding in Security and authorization.
  • Missing time-loss payments (OP-SDN-10): the named query invokes PK82001_CLAIM.getMissingTLPayments, which is absent from the retrieved package; the call would fail at runtime if ever invoked — see procedures/pk82001-claim.md.

Stored procedure operations

Operations implemented in Oracle and SQL Server stored procedures referenced by this library.

Operation Description Source Link
Look up collection cases by reference Returns case headers for a case, policy or claim reference PK80010_LEGAL_COLLECTIONS.get_cases_by_reference Details
Summarise case category totals Category totals, subtotal and current balance for a case PK80010_LEGAL_COLLECTIONS.get_category_totals Details
Resolve debtor name / SSN Resolve display name or SSN across debtor types PK80010_LEGAL_COLLECTIONS.getDebtorName, getPrimaryDebtorName, getDebtorSSN Details
Get debtor addresses Contact info for fraud-other, policy and third-party debtors PK80010_LEGAL_COLLECTIONS.get_fraud_other_address, get_policy_address, get_thirdparty_address Details
Search collections Multi-branch debtor/case search PK80010_LEGAL_COLLECTIONS.search_collections Details
Apply payments to costs Allocates unapplied payments across cost transactions by pay-down order PK80010_LEGAL_COLLECTIONS.applyPayments → applyIt → legalcol_payment_ref_insert Details
Calculate interest Monthly or daily interest per interest-bearing transaction PK80010_LEGAL_COLLECTIONS.interest_calc_select → get_interest_start_date Details
Select payments and debtors for statements Batch selections for payment posting and statements PK80010_LEGAL_COLLECTIONS.getPolicyPayments, getThirdPartyPayments, getDebtorsWithoutPayments, getDebtorsWithExpiredLocs, getBalanceBroughtToMinAmount, get_last_statement_balance Details
Create SOIL reference records Snapshot SOIL-eligible debtors for the run PK80011_LEGALCOL_SOIL.create_reference_records Details
Create SOIL adjustment transactions Adds/changes/deletes DOR intercept balances PK80011_LEGALCOL_SOIL.create_SOIL_transactions → find_DOR_balance, insert_soil_tran, remove_soil_flag Details
Get WCIS standard premium Returns standard premium for a policy period PK72846_VIEW_POLICY.SP73111_GET_WCIS_STD_PREMIUM Details
Track payroll report in Records report receipt on the remote policy database PK73101_IMAGE.track_in_report (procedure) Details
Score claim complexity Persist request and run segmentation models bp_clm_segmntn_complexity_score Details

Sources

  • Data/SAIF.Data.NHibernate/Repositories/**