Product EngineeringFeaturesOrder SplitFrontend

State and Keys

Local state, Redux dependencies, and API payload mapping used by the Order Split UI flow.

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

Component-local state

State keyComponentPurpose
splitBillBillUpdateFooterControls split modal visibility
selectedTestIdsSplitOrderModalStores selected test row ids for split
selectedSourceSplitOrderModalStores optional destination source
disabledSplitOrderModalPrevents duplicate submit during API request

Redux keys used

Redux keyUsage
userIdPatient context for reading and writing bill data
labBillIdActive bill identifier in Order Update context
existingTestsCandidate rows shown for split selection
GENERICAccess to orgSourceInfo, and source billing flags, driving dynamic display of columns.
FORMSAccess to billSettingInput config, used to calculate allowed columns in the grid.
billingData[userId][labBillId].billingData.IdBill id used in API path parameter
allBillsDataRefreshed after successful split

API payload mapping from frontend

  • bill_id path parameter comes from active billingData.Id.
  • test_ids comes from selected checkbox rows (selectedTestIds).
  • new_source comes from selectedSource.value when selected.

State transition summary

  • Footer state controls modal open and close.
  • Modal state tracks selection and request lifecycle.
  • Success path refreshes Redux with latest billed-user data.

On this page