Workflow Guide

Step-by-step guide covering how lab staff open, edit, and submit a bill update — including locked bill handling, payment management, and adding tests.

👤 Mohammad Ashfaque Alam📅 Updated: Mar 16, 2026🏷️ feature🏷️ finance🏷️ billing

Workflow Guide

This page walks through the end-to-end workflow for Order Update — from opening the modal to submitting changes.


Opening Order Update

Order Update opens as a full-screen modal. It is triggered from various parts of the product — the same component is reused in all contexts.

Where it appearsHow it's triggered
Waiting ListAction menu on a patient/bill row
Accession (Sample-wise & Bill-wise grids)Action menu or row click
Accession — Sample Info tabOrder Update button
Bill Settlements / Bill ApprovalRow click or "View Bill Details" action
Registration / Missing Details"Update Bill" or "Resolve missing fields"
Billing Confirmation FooterAfter billing, update the just-created bill
Patient's Test ListAction menu on a specific bill
Doctor Login (Archives)Action menu in the archive view
Organization LoginPatient-wise test list view
Insurance ManagementPending Submission / Submitted Claims grids
Device Results ValidationResults or Tox Results screens
Bill List (Finance)Action menu in the general bill list grid

[!NOTE] The component has a built-in mode prop that supports "modal" (default) and "page" rendering. However, mode="page" is not yet used anywhere — all current call sites rely on the default modal mode.

  1. Loads all bills for the patient into the left sidebar (BillDetailsSidebar)
  2. Auto-selects the bill that was clicked (scrolls the sidebar to the active row)
  3. Fetches bill details from Redux (billing data, payment list, lab report list, ICD codes, modifiers)

Selecting a Bill

The Past Bills sidebar on the left shows all bills for the patient, grouped by date.

  • Use the Search Bill input to filter by bill number
  • Click any bill card to load it in the main editing area
  • Keyboard navigation: use Enter to select the highlighted bill
  • The active bill is highlighted with a distinct background

Viewing Bill Status Banners

When a bill is in a restricted state, a yellow alert banner appears at the top of the editing area with the reason and an action button:

ConditionBanner MessageAction Button
Bill is lockedBill is lockedUnlock Bill
Bill linked to an active insurance claimClaim is active
Bill linked to an invoiceBill is invoicedView Invoice Details
Bill time restriction exceededEdit window expired
Bill is cancelledBill is cancelledReset Bill

[!NOTE] Collection Center (CC) logins do not see the action buttons — they can view the banner but cannot unlock or reset bills.


Editing the Bill

The main edit area is divided into logical sections rendered in sequence:

1. Basic Bill Details

Fields available here:

FieldNotes
Bill SourceOnly shown if showBillSource setting is enabled or US layout
Bill DateEditable date + time picker; requires allowBackDatedSettlement permission
Sample DateUpdates sample date across all tests; shows a warning if different sample dates exist
Critical / Emergency ReportCheckbox toggle; only shown if showEmergencyReportCheckbox is enabled
Bill ICD CodeShown if enabledIcdCodeFlag is on; supports single or matrix selection mode
Billing ModifiersShown if showModifiers setting is enabled
Existing TestsRead-only list of tests including amounts and concessions
Add New Test to BillAvailable when userAddTestBillFlag and registration permissions are set

2. Additional Details

FieldNotes
OrganisationDropdown; triggers price-list check and org ledger reconciliation
Referral DoctorDropdown; triggers doctor revenue recalculation
Order NumberText input; shown if orderNumberCompulsoryFlag is set or US layout
Additional CategoryDropdown of BILL_SERVICES options
Agent Name / Code / Reference NoInsurance agent fields; shown based on lab settings
Proposal NumberInsurance proposal; shown if proposalNumberFlag is enabled
BranchBranch selector; disabled for Collection Centers
Report Collection TypeShown if reportCollectionFlag is enabled
Order CommentsMulti-line text area; supports timestamps if showTimestamps is enabled; supports instant comment templates

[!NOTE] Changing the Organisation checks whether the new org has a different price list. If it does, an Update Price List link appears below the org dropdown to apply the new pricing to existing tests.

[!NOTE] Changing the Referral Doctor checks if the doctor has an associated revenue price list. If yes, an Update Doctor Revenue link appears to apply the new revenue amounts.

3. Payment Details (Non-Insurance Bills)

Two cards are shown side by side:

Bill Summary — shows:

  • Test Amount (total of all tests)
  • Additional Amount (editable)
  • Concession (editable; capped by the user's allowedDiscountOnBill percentage)
  • TDS Concession % (if allowTDSDeductionEverytime is enabled)
  • VAT Amount (if vat_management is enabled and not disabled for the org)
  • Payable Amount (calculated total)

Payment Status — shows:

  • Payable Amount
  • Total Paid Amount
  • Due Amount (in red if > 0)

4. Payment Details (Insurance Bills)

For insurance-sourced bills, the payment section shows:

  • Test Amount total
  • Co-pay Amount
  • Deductible Amount
  • Patient Payable Amount
  • Insurance Payable Amount

5. Payment History

A table showing all past payments for the bill:

ColumnDescription
Payment TypeCASH, CARD, CHEQUE, REFUND, etc.
PayerOrg Payment or Patient Payment
Refund ForTest name (only for refund-type payments)
AmountPayment amount
DateLast update time
StaffLab user who recorded the payment

The Add Payment button opens the Payment List modal to add or edit individual payments.

[!NOTE] The Add Payment button is disabled when:

  • Bill is locked
  • Bill has an active insurance claim
  • Bill is cancelled
  • User does not have userBillSettelmentFlag permission
  • User is on referral login

Submitting the Update

The footer at the bottom of the editing area contains all action buttons.

Standard Update (No New Tests)

Click Confirm & Update to:

  1. Validate all fields (duplicate order number, ICD code, concession errors, payment due error)
  2. Check bill time restriction
  3. Verify bill comments are filled if concession changed
  4. Open the Bill Update Confirmation modal — shows a summary of changed fields for review
  5. On confirm — calls the backend API and closes the modal on success

Update with New Tests Added

When new tests have been staged in the add-test area, the footer shows:

  • Update & Add to Existing Bill — saves the update and attaches the new tests to the same bill

Cancel Bill

  • Click Cancel Bill (red button) to open the cancellation modal
  • This marks the bill as cancelled (isCancel = 1)
  • Bill can be reset later via the Reset Bill banner action
ButtonCondition
View AOEAlways shown if AOE responses exist for the bill
Complete AOEShown when AOE is required for staged new tests
View ConsentShown if consent_management is enabled and bill consent exists
Complete ConsentShown when consent is required for staged new tests
PrintDropdown with print options (Receipt, TRF, Bill, etc.)
Bill AttachmentsThumbnail strip + Add button (hidden for referral login)
Bill Approval ActionsShown on the Bill Approval page — Hold, Reject, Approve

Bill Lock & Unlock

If a bill is locked (billLocked = 1) and the user has the right permissions:

  1. Click Unlock Bill from the banner
  2. The Unlock Bill modal appears for confirmation
  3. On confirm — the bill is unlocked and all fields become editable

Unsaved Insurance Changes Guard

If the user is editing insurance details (editInsurance = true) and tries to:

  • Close the modal
  • Submit the bill update
  • Cancel the bill
  • Add a new test

…an Unsaved Message modal appears asking whether to discard the insurance changes or go back.


Error States

ErrorWhat happens
Due amount is negativeRed toast: "Due amount cannot be greater than test amount"
Concession exceeds user's allowed discountCapped at max; toast shows the allowed %
Duplicate order number"Confirm & Update" button is disabled
Bill ICD code requiredToast error; blocks submission
Test ICD code required (source-based)Toast error; blocks submission
Insurance price error"Confirm & Update" button is disabled
Org-wise duplicate MRNError text shown below org field
Bill time restriction exceededToast via showBillUpdateRestrictionAlert()

On this page