Determine agency eligibility for an office¶
This operation inspects the active agency contracts for a requested date and rejects regional-office use when the leading active contract is service-center-only.
| Field | Value |
|---|---|
| Operation ID | OP-012 |
| Trigger | A caller invokes clsAgency.IsValidForOffice(inEffectiveDate, inIsRegionalOffice). |
| Inputs | Agency state, effective date, regional-office flag |
| Outputs | Boolean result |
| Primary components | clsAgency.IsValidForOffice, clsAgency.Contracts, clsAgencyContractCollection.Active |
| Entry point | Business\SAIF.Business.Policy.Agency\clsAgency.vb |
Steps¶
- If the caller is not evaluating a regional office, return
Trueimmediately. - Ensure the agency's
Contractscollection is available, lazily loading it through SQL-004 against AGENCY_CONTRACT when necessary. - Filter the contract collection to rows active on the requested date (BR-008).
- Inspect the first active contract and reject the office when its contract type is
ServiceCenterOnlyAppointment(BR-021). - Otherwise return
True.
Process flow¶
The following diagram visualizes office-eligibility evaluation.
flowchart TD
Start([IsValidForOffice]) --> Regional{Regional office?}
Regional -->|No| Yes[Return True]
Regional -->|Yes| Load[Load active contracts]
Load --> Serv{First active contract is service-center-only?}
Serv -->|Yes| No[Return False]
Serv -->|No| Yes
Failure and edge-case behavior¶
- The method's result depends on the first active contract in the loaded collection.
Related documentation¶
Sources¶
Business\SAIF.Business.Policy.Agency\clsAgency.vbBusiness\SAIF.Business.Policy.Agency\clsAgencyContractCollection.vb