Skip to main content

Focus Policies


Use the Focus Policies behavior to control how the SDK resolves and maintains the active policy when multiple policies exist under the same company. The SDK determines the active policy based on the selected patient and returns the corresponding state.


This screen includes:

  • Coverage list displaying all available policies for the selected company.
  • Policy cards with provider name, coverage dates, and optional description.
  • Scrollable container when multiple policies exist.
  • Selection state that determines the active policy in focus.
  • Add a new coverage action to create an additional policy.
  • Close control (X) to dismiss the modal and return to the previous screen.
This behavior includes
  • Automatic policy resolution based on selected patient.
  • Disambiguation support for duplicate patient names using policy identifiers.
  • Persistent focus state that updates with each selection.
  • Active policy filtering based on booking eligibility.

Workflow

  1. Filter user policies under the same company to include only active policies.
    Active policy definition:
    • Valid on the current date.
    • Valid on the next day.
    • Valid on the following day.
  2. Aggregate patients from the filtered policies and return a unified patient list.
  3. Render the patient list in the patient selector.
  4. If duplicate patient names exist, append the last four characters of the policy number in parentheses.
    Example:
    John Doe (1234)
  5. Capture patient selection.
  6. Resolve the selected patient to the corresponding policy and set it as active.
  7. Return the updated state with the selected patient and active policy.

Validations

These scenarios define when the SDK restricts selection or returns validation state.

ScenarioApp behaviorSDK output
Multiple active policies under the same company.The patient selector displays patients from all active policies.Page model with aggregated patient list.
No active policies available.The patient selector remains empty or disabled.Empty state with no selectable patients.
Duplicate patient names exist.Each duplicate name includes the last four characters of the policy number.Patient list with disambiguated labels.
Selected patient does not match any active policy.Selection remains blocked.Validation state indicating no matching policy.
Only one active policy exists.The selector displays only patients from that policy.Page model with single-policy patient list.

Actions

These scenarios define how the SDK updates focus and returns state.

ScenarioApp behaviorSDK output
Load patient selector.The selector renders with aggregated patients from active policies.Page model with patient list and policy mapping.
Select a patient.The app switches to the corresponding policy and updates focus.Update set with selected patient and active policy.
Select a duplicate patient entry.The app resolves selection using policy identifier.Update set with correct policy association.
Change selection.The focus updates to the new patient and policy.Update set reflecting new selection state.
Active policy set changes due to date rules.The selector refreshes to reflect valid policies.Updated page model with filtered policies.

Endpoint Resources

Focus policies

PATCH 

v3/about-us

Focuses the last policies button and triggers the Terms & policies action.