---
title: "Collections case lookups"
summary: Operation implemented by CollectionsRepository
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.NHibernate
reference_type: package
operation_id: "OP-SDN-03"
trigger: "See steps below"
---


# Collections case lookups

Collections case lookups is implemented by `CollectionsRepository` and is documented as OP-SDN-03 in the Stage 1 analysis.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-SDN-03 |
| **Trigger** | See steps below |
| **Primary components** | `CollectionsRepository` |

## Steps

1. `GetCasesByReferenceNumber(referenceId)`: named query `Collections_GetCasesByReferenceNumber` ([SQL-004](../sql/SQL-004-collections-repository-get-cases-by-reference-number.md)).
2. `GetCategoryTotals(caseId)`: [SQL-005](../sql/SQL-005-collections-repository-get-category-totals.md).
3. `GetDebtorName(id)` ([SQL-006](../sql/SQL-006-collections-repository-get-debtor-name.md)), `GetPrimaryDebtorName(id)` ([SQL-007](../sql/SQL-007-collections-repository-get-primary-debtor-name.md)), `GetDebtorSsn(id)` ([SQL-008](../sql/SQL-008-collections-repository-get-debtor-ssn.md)).
4. Debtor address lookups: `GetFraudOtherAddress` ([SQL-009](../sql/SQL-009-collections-repository-get-fraud-other-address.md)), `GetPolicyAddress` ([SQL-010](../sql/SQL-010-collections-repository-get-policy-address.md)), `GetThirdPartyAddress` ([SQL-011](../sql/SQL-011-collections-repository-get-third-party-address.md)).
5. `SearchCollections(lastName, firstName, ssn, policyName, showClosedCases, uniqueRunId)`: [SQL-012](../sql/SQL-012-collections-repository-search-collections.md).
6. `DebtorLastStatementBalance(statementDate, debtorId)`: [SQL-021](../sql/SQL-021-collections-repository-debtor-last-statement-balance.md).

All steps are reads through the Oracle package `PK80010_LEGAL_COLLECTIONS`.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["Collections case lookups"]) --> S1["`CollectionsRepository`"]
	S1 --> S2{"Rules satisfied?"}
	S2 -->|Yes| EndOk([Result returned])
	S2 -->|No| EndErr([Exception / empty result])
```

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `Data/SAIF.Data.NHibernate/Repositories/CollectionsRepository.cs`
