Bug #544
closed"Referral Must Be Approved" Blocks Triage of the Second Test on an Order
0%
Description
On a 2-test order, after the first test has already been fully reported, trying to triage the second (still-Waiting) test throws "Error: Referral must be approved before triage." and blocks it, even though the order's first test already went all the way through triage, scheduling, acquisition, and reporting under the same referral.
Impact
High. This completely blocks the second test on the order from ever being triaged/scheduled through the normal flow, since the Referral field shows "ProvisionalWalkIn · Pending" and there's no visible way from this modal to approve it. Since the order's own first test already completed its full lifecycle under the same referral, this looks like a data/state inconsistency rather than a real pending-approval case — staff have no clear next step to unblock it.
Environment
Clinq HMS, NSS Hospital demo, Radiology Orders worklist, logged in as admin@clinq.local. Order RAD-ORD-1-24 (mamta, NSSH-MAIN-000085, 34F), Urgent priority, Referral type ProvisionalWalkIn.
Steps to Reproduce
- On the Radiology Orders Kanban, open order RAD-ORD-1-24 (mamta), which has two tests: Barium Swallow Study and Dating Scan (Obstetric Ultrasound).
- Note that Barium Swallow Study already shows as Reported — it has completed the full workflow (triage, scheduling, acquisition, reporting).
- Dating Scan (Obstetric Ultrasound) is still Waiting, with its row highlighted in the order modal.
- In that modal, the Referral field reads "ProvisionalWalkIn · Pending."
- Try to triage the order by selecting a priority (Use Order Priority / Stat / Urgent / Routine).
- A toast appears: "Error: Referral must be approved before triage." The second test cannot be triaged.
Expected vs Actual
Expected: once an order's referral has been accepted far enough for one of its tests to complete its full workflow (including reporting), the remaining test(s) on that same order/referral should be triage-able without hitting a referral-approval gate again.
Actual: the second test is blocked by "Referral must be approved before triage," with the Referral field still reading Pending, even though a sibling test on the exact same order/referral already went all the way to Reported.
Files