---
title: Reference code retrieval
summary: Exposes read-only claim reference code lookups (closure, order, MCO status, work status/release, vocational responsibility, cost category, activity type) used across claim workflows.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-30
library: SAIF.Business.View.Claim
reference_type: package
operation_id: OP-VC-09
trigger: Caller retrieves any of the closure/order/MCO/work-status/activity reference-code lookup objects
---

# Reference code retrieval

This operation covers the library's set of simple, structurally near-identical reference-code lookups: closure location type, closure type-of-order, MCO status reason, order type, work status, work release, vocational responsibility, claim cost category, and claim activity type/category codes. Each lookup follows the same shape — a single-record class filtered by code and a companion collection class that returns the full code list — with inline Oracle `SELECT` statements and no business-rule branching beyond code filtering. They are documented together because they share one governing pattern rather than distinct rule sets.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-VC-09 |
| **Trigger** | Caller retrieves a specific lookup object or its collection (e.g. `clsClosureLocationTypeCode(Collection)`, `clsClosureTypeofOrderCode(Collection)`, `clsMcoStatusReasonCode(Table)`, `clsOrderTypeCode(Collection)`, `clsWorkStatusCode(Table)`, `clsWorkReleaseCode(Table)`, `clsVocResponsibilityData`, `clsClaimCostCategoryCode(Collection)`, `clsClaimActivityTypeCode(Collection)`) |
| **Inputs** | Optional code filters depending on the lookup object |
| **Outputs** | Reference code rows (code, description, and lookup-specific metadata) |
| **Primary components** | `clsClosureLocationTypeCode(Collection)`, `clsClosureTypeofOrderCode(Collection)`, `clsMcoStatusReasonCode(Table)`, `clsOrderTypeCode(Collection)`, `clsWorkStatusCode(Table)`, `clsWorkReleaseCode(Table)`, `clsVocResponsibilityData`, `clsClaimCostCategoryCode(Collection)`, `clsClaimActivityTypeCode(Collection)` |
| **Entry point** | `Business\SAIF.Business.View.Claim\clsClosureLocationTypeCode.vb`, `Business\SAIF.Business.View.Claim\clsClosureTypeofOrderCode.vb`, `Business\SAIF.Business.View.Claim\clsMcoStatusReasonCode.vb`, `Business\SAIF.Business.View.Claim\clsOrderTypeCode.vb`, `Business\SAIF.Business.View.Claim\clsWorkStatusCode.vb`, `Business\SAIF.Business.View.Claim\clsWorkReleaseCode.vb`, `Business\SAIF.Business.View.Claim\clsVocResponsibilityData.vb`, `Business\SAIF.Business.View.Claim\clsClaimCostCategoryCode.vb`, `Business\SAIF.Business.View.Claim\clsClaimActivityTypeCode.vb` |

## Steps

1. **Invoke a specific lookup object or its collection.** A caller invokes either the single-record class (filtered by code) or the collection class (full list) for the reference domain it needs.
2. **Execute inline Oracle SQL.** Each object issues its own inline `SELECT` against its reference table:
   - Closure location type: [SQL-014](../sql/SQL-014.md), [SQL-015](../sql/SQL-015.md) ([CL_CLOSURE_LOCATION_TYPE_CODE](../database-tables.md#cl-closure-location-type-code))
   - Closure type-of-order: [SQL-016](../sql/SQL-016.md), [SQL-017](../sql/SQL-017.md) ([CL_CLOSURE_TYPE_OF_ORDER_CODE](../database-tables.md#cl-closure-type-of-order-code))
   - MCO status reason: [SQL-018](../sql/SQL-018.md), [SQL-019](../sql/SQL-019.md) ([CL_MCO_STATUS_REASON_CODE](../database-tables.md#cl-mco-status-reason-code))
   - Order type: [SQL-020](../sql/SQL-020.md), [SQL-021](../sql/SQL-021.md) ([CL_ORDER_TYPE_CODE](../database-tables.md#cl-order-type-code))
   - Work status: [SQL-023](../sql/SQL-023.md), [SQL-024](../sql/SQL-024.md) ([CL_WORK_STATUS_CODE](../database-tables.md#cl-work-status-code))
   - Work release: [SQL-025](../sql/SQL-025.md), [SQL-026](../sql/SQL-026.md) ([CL_WORK_RELEASE_CODE](../database-tables.md#cl-work-release-code))
   - Vocational responsibility: [SQL-027](../sql/SQL-027.md) ([VOCATIONAL_RESP_CODE](../database-tables.md#vocational-resp-code))
   - Claim cost category: [SQL-012](../sql/SQL-012.md) ([CL_CLAIM_COST_CATEGORY_CODE](../database-tables.md#cl-claim-cost-category-code))
   - Claim activity category/type: [SQL-028](../sql/SQL-028.md) ([CLAIM_ACTIVITY_CAT_TYPE_CODE](../database-tables.md#claim-activity-cat-type-code))
3. **Return the read-only row(s).** Returned rows populate read-only business objects consumed by higher-layer claim workflows and lookups.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Caller invokes a reference lookup or its collection]) --> Domain{Which reference domain?}
	Domain -->|Closure location/order type| Closure[Query closure/order code table]
	Domain -->|MCO status reason| Mco[Query MCO status reason table]
	Domain -->|Order type| Order[Query order type table]
	Domain -->|Work status or release| Work[Query work status/release table]
	Domain -->|Vocational responsibility| Voc[Query vocational responsibility table]
	Domain -->|Cost category or activity type| Cost[Query cost category/activity type table]
	Closure --> Done([Populate read-only lookup object])
	Mco --> Done
	Order --> Done
	Work --> Done
	Voc --> Done
	Cost --> Done
```

## Failure and edge-case behavior

- Many reference-data queries use unqualified table names, so schema ownership is unknown from source alone.**
- Each lookup is independently implemented with no shared base retrieval helper found in this library, so a bug in one lookup's SQL would not necessarily affect the others.*

## Related documentation

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

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources

- `Business\SAIF.Business.View.Claim\clsClaimActivityTypeCodeCollection.vb`
- `Business\SAIF.Business.View.Claim\clsClaimCostCategoryCodeCollection.vb`
- `Business\SAIF.Business.View.Claim\clsClosureLocationTypeCode.vb`
- `Business\SAIF.Business.View.Claim\clsClosureLocationTypeCodeCollection.vb`
- `Business\SAIF.Business.View.Claim\clsClosureTypeOfOrderCodeCollection.vb`
- `Business\SAIF.Business.View.Claim\clsClosureTypeofOrderCode.vb`
- `Business\SAIF.Business.View.Claim\clsMcoStatusReasonCode.vb`
- `Business\SAIF.Business.View.Claim\clsMcoStatusReasonCodeTable.vb`
- `Business\SAIF.Business.View.Claim\clsOrderTypeCode.vb`
- `Business\SAIF.Business.View.Claim\clsOrderTypeCodeCollection.vb`
- `Business\SAIF.Business.View.Claim\clsVocResponsibilityData.vb`
- `Business\SAIF.Business.View.Claim\clsWorkReleaseCode.vb`
- `Business\SAIF.Business.View.Claim\clsWorkReleaseCodeTable.vb`
- `Business\SAIF.Business.View.Claim\clsWorkStatusCode.vb`
- `Business\SAIF.Business.View.Claim\clsWorkStatusCodeTable.vb`
