Prison code retrieval¶
This operation exposes prison-code lookup values used for claim-related prison association fields, either as a single row by code or as the full selection list (with a synthetic blank option prepended).
| Field | Value |
|---|---|
| Operation ID | OP-VC-08 |
| Trigger | Caller retrieves clsPrisonCode (single row) or clsPrisonCodeCollection (selection list) |
| Inputs | Optional prison code |
| Outputs | One prison row, or the full prison-code list with a synthetic blank option |
| Primary components | clsPrisonCodeCollection.Criteria.RetrieveSQL, clsPrisonCode.Criteria.RetrieveSQL |
| Entry point | Business\SAIF.Business.View.Claim\clsPrisonCodeCollection.vb, Business\SAIF.Business.View.Claim\clsPrisonCode.vb |
Steps¶
- Collection retrieval — union a synthetic blank row.
clsPrisonCodeCollection.Criteria.RetrieveSQLperforms aUNIONbetween a hard-coded blank row and persistedCL_PRISON_CODErows (BR-003, SQL-010, CL_PRISON_CODE). - Single-record retrieval — filter by code.
clsPrisonCoderetrieval filtersCL_PRISON_CODEbyCODE(SQL-011, CL_PRISON_CODE). - Populate lookup objects. The returned rows populate prison-code lookup objects for the caller.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Caller requests prison codes]) --> Which{Single code or full list?}
Which -->|Single code| Filter[Filter CL_PRISON_CODE by CODE]
Which -->|Full list| Union[Union synthetic blank row<br>with CL_PRISON_CODE rows]
Filter --> Done([Return prison-code lookup object(s)])
Union --> Done
Failure and edge-case behavior¶
- The prison-code collection injects a synthetic blank row (code
00, display<blank>) that does not correspond to a persisted database record, so consumers that treat all rows as real prisons must account for it.
Related documentation¶
Sources¶
Business\SAIF.Business.View.Claim\clsPrisonCode.vbBusiness\SAIF.Business.View.Claim\clsPrisonCodeCollection.vb