Suggested Scheduling
The Suggested Scheduling element allows doctors to propose up to three alternative appointment times. It appears as a card-based component embedded in several workflows:
This element supports authenticated users only. It loads dynamically after selecting Suggest Another Alternative.
Element Behavior
- Up to three editable Suggested Scheduling cards.
- Fields for doctor, location, date, and time.
- Dynamic fee preview: total visit fee and doctor fee.
- Validation indicators and real-time error handling.
- Trash icons for removing additional cards.
- Button logic that depends on input validity and quantity.
- Conditional auto-approval if one suggestion matches the original.
User Flow
Use this component to create structured alternatives when declining the proposed session time.
- Select Suggest Another Alternative in a parent workflow.
- The first scheduling card appears prefilled with doctor and location.
- Complete the required fields: date and time.
- The system checks:
- Required values are present.
- No conflicts or duplicates exist.
- The number of alternatives is within the allowed range.
- The Approve button becomes active after successful validation.
Validation
- All cards must include valid date and time values.
- Each card must be unique in doctor, date, time, and location.
- Rejects duplicate or overlapping alternatives.
- A maximum of three suggestions is allowed.
- Fee preview runs automatically when all fields are valid.
- Auto-approves if one card matches the original request exactly.
Actions
- Approve: Sends the alternatives to the patient and transitions the appointment to the next status.
- Delete: Removes a selected card, unless it is the only one remaining.
- Cancel: Discards all scheduling alternatives and returns to the parent screen.
SDK Reference
- SDK Reference
- API Reference
Each instance of the Suggested Scheduling card is indexed positionally using {x}
. The value of {x}
represents the order of the card (starting at 0) and must be unique across all cards in a single interaction. Most fields use the same identifier pattern with {x}
to denote repeated UI instances.
Card # | Reference ID | Type | Value | Notes |
---|---|---|---|---|
x=0 | doctor~0 | Combo | Doctor selector | Prepopulated in the first card. Editable in all cards. |
x=0 | location~0 | Combo | Location selector | Prepopulated. Required. Shared with doctor field for uniqueness. |
x=0 | prescription-info~0 | Link | Prescription warning (if applicable) | Conditional. Appears only if required for patient. |
x=0 | date~0 | Date | Date selector | Required. Input triggers validation and fee recalculation. |
x=0 | time~0 | Time | Time selector | Required. Input triggers validation and fee recalculation. |
x=0 | fee-text~0 | Section | Visit fee label | Static label. |
x=0 | doctor-fee-text~0 | Regular | Doctor fee label | Static label. |
x=0 | doctor-fee~0 | Highlight | Doctor fee amount | Calculated dynamically. Updates on valid input. |
x=0 | delete~0 | Link | Delete icon (trash) | Hidden in first card. Shown only on second and third cards. |
API details planned.