Product EngineeringFeaturesOrder SplitFrontend

Entry and Flow

Split entry points, modal sequence, and response handling in the frontend workflow.

👤 Sachin Sharma, Nilesh Bhusari📅 Updated: Mar 24, 2026🏷️ feature🏷️ frontend🏷️ modal🏷️ flow

Where split starts

Order Split is launched from BillUpdateFooter:

  • Footer action button: Split Bill is displayed when the isBillSplitEnabled lab setting is enabled.
  • Button click sets local modal state (setSplitBill(true)).
  • Split modal is rendered as <SplitOrderModal ... />.

Split modal flow

  1. Read current bill context from Redux (userId, labBillId, bill id, test rows).
  2. Show optional source selector (ORG_SOURCE_OPTIONS).
  3. Render selectable test grid with row-level checkboxes:
    • Dynamic columns (Price, Copay, Deductible, Concession, ICD Code) based on lab settings, source insurance, and MOH limits.
    • Test names display layout features like "Profile" tags.
  4. Render optional "Patient Consents" card in the Data Transfer step (if consentDetails.labForm.id exists).
  5. Validate before API call:
    • at least one test selected,
    • not all tests selected.
  6. Call split API:
    • splitBill(Id, selectedTestIds, selectedSource?.value).
  7. Handle response:
    • success: show alert, refresh bill data, close modal and Order Update panel.
    • failure: show error alert and re-enable submit action.

User feedback behavior

  • Success notification confirms split completion.
  • Failure notification shows backend message when available, otherwise a generic message.
  • Submit action remains disabled during in-flight request to avoid duplicate submissions.

On this page