# Orita Eligibility Rules

Tested with: Orita API v2
Last verified: 2026-07-31

## How eligibility works

The eligibility pipeline runs before availability verification.
Hard constraints exclude providers. Preferences affect score only.

Pipeline order:
1. Organization and tenant isolation
2. Provider active/searchable status
3. Service support
4. Profession and specialty
5. Age group
6. Modality
7. Location and service region
8. License region and expiration
9. Insurance eligibility (with alias normalization)
10. Panel capacity
11. Language
12. Accepting new clients
13. Availability verification
14. Preference scoring

## Constraint evaluation states

Every constraint returns one of:
- matched — provider meets the requirement
- failed — provider does not meet the requirement (excluded)
- unknown — required data is missing; routes to manual review
- not_applicable — constraint not requested

## Availability states

- verified_available — confirmed free via calendar
- unavailable — confirmed busy
- unverifiable — calendar connected but check failed
- stale — cached result older than threshold
- calendar_disconnected — no calendar connected
- not_checked — availability not yet evaluated

allowUnverifiable defaults to false. Never treat calendar errors as free time.

## Hard constraints (exclude providers)

All constraints use anyOf syntax — provider must match at least one value.

- serviceId — provider must offer this service
- professionCodes — anyOf list
- specialtyCodes — anyOf list
- languageCodes — anyOf list
- modalityCodes — anyOf: ["virtual"] or ["in_person"]
- serviceRegionCodes — anyOf: ["US-NJ"]
- licenseRegionCodes — anyOf: ["US-NJ"] — checks active non-expired license
- insurancePlanCodes — anyOf: ["aetna", "bcbs"] — normalized aliases accepted
- ageGroupCodes — anyOf: ["adult", "adolescent", "child", "senior"]
- acceptsNewClients — boolean
- panelCapacity — excluded if panel_current_count >= panel_capacity

## Insurance normalization

Common aliases are normalized to canonical codes:
- "Blue Cross", "Anthem" → bcbs
- "United", "UnitedHealthcare", "Optum" → uhc
- "Evernorth" → cigna
- "Self pay", "cash", "out of pocket" → self_pay

## License credential rules

- Expired license → excluded (LICENSE_EXPIRED)
- License expiring within 30 days → passes with warning
- Unverified (no verifiedAt or verified > 1 year ago) → unknown
- Missing license for required region → unknown

## Unknown data policy

Providers with unknown required data are:
1. Excluded from resolution options
2. Routed to manual review queue: GET /api/v2/manual-review
3. Visible in candidates: GET /api/v2/resolutions/:id/candidates?status=unknown

## Inspect every decision

```
GET /api/v2/resolutions/{resolutionId}/candidates
  ?status=eligible|excluded|unknown
  &exclusionCode=INSURANCE_NOT_ACCEPTED
  &limit=50
```

Response includes per-provider:
- eligibilityStatus: eligible | excluded | unknown
- exclusions: [{code, field, required, actual, sourceStatus}]
- matchedConstraints: [{code, field, status}]

## Machine-readable

- Full capabilities: /capabilities.json
- OpenAPI: /openapi.json
- Full page: /developers/reference#eligibility
