Skip to content

URS-043 · Link shipments to orders with LOT numbers

Title: Link shipments to orders with LOT numbers Date: 2026-04-23T03:42:21.536Z Duration: 45.2s Overall Status: ✅ PASS

The system shall maintain traceability of a product’s LOT through orders and shipments.

Source: User_Requirement_Specifications_ZuriMED_DeviceFlow.xlsx — the run below proves the system meets this requirement.

Status: ✅ PASS

Each step below corresponds to one Playwright test that ran sequentially. Screenshots and video recordings provide visual evidence of the UI behaviour.

1. Step 1: Orders list shows ZBO-2025-001 — ✅ PASS

Section titled “1. Step 1: Orders list shows ZBO-2025-001 — ✅ PASS”

What this step proves:

Logs in as alex.admin@zurimed.com and navigates to /billing with the “All Orders” filter. Confirms ZBO-2025-001 (the Bill-Only Order that carries the seeded LOT numbers) is visible in the table. This is the entry point of the traceability chain.

Screenshots:

step 01 orders list

Video recording:


2. Step 2: BO detail shows both LOT numbers — ✅ PASS

Section titled “2. Step 2: BO detail shows both LOT numbers — ✅ PASS”

What this step proves:

Opens the ZBO-2025-001 detail page and verifies a “LOT/Serial” column header is rendered. Both seeded LOT numbers (LOT-SP-2024-0891 on line 1 and LOT-FL-2024-0334 on line 2) must appear on separate rows. This proves the order-to-LOT link in the chain.

Screenshots:

step 02 bo detail lots

Video recording:


What this step proves:

Navigates to /packages and confirms both seeded Shipping Packages are visible: MAN-2025-0156 (the “linked” package whose items reference ZBO-2025-001) and MAN-2025-0147 (the “tracking” package used to validate carrier/tracking evidence).

Screenshots:

step 03 packages list

Video recording:


4. Step 4: Package items reference source BO — ✅ PASS

Section titled “4. Step 4: Package items reference source BO — ✅ PASS”

What this step proves:

Opens MAN-2025-0156 detail page and confirms the items table includes “Order Number” and “Line Number” columns. Both rows must show ZBO-2025-001 as the order number and line numbers 1 and 2 respectively. This proves the shipment-to-order linkage required by URS-043.

Screenshots:

step 04 package detail order linkage

Video recording:


5. Step 5: Tracking + carrier visible on shipment — ✅ PASS

Section titled “5. Step 5: Tracking + carrier visible on shipment — ✅ PASS”

What this step proves:

Opens MAN-2025-0147 detail page and confirms that both the carrier (FedEx) and the tracking number (775899342290) are rendered on the shipment entity. This validates the URS requirement that shipments surface tracking metadata.

Screenshots:

step 05 tracking visible

Video recording:


6. Step 6a: Package → Order reference — ✅ PASS

Section titled “6. Step 6a: Package → Order reference — ✅ PASS”

What this step proves:

Starting from the MAN-2025-0156 package detail page, reads the ZBO-2025-001 order number from the items table. This is Part A of the end-to-end traceability walk: confirming the text reference exists so the user can look up the originating order.

Screenshots:

step 06a package shows order number

Video recording:


7. Step 6b: BO detail LOTs re-confirmed — ✅ PASS

Section titled “7. Step 6b: BO detail LOTs re-confirmed — ✅ PASS”

What this step proves:

Follows the order number reference from the package detail back to the ZBO-2025-001 Bill-Only Order and re-confirms both LOT numbers are still present. This closes the full chain: Package → Order Number → LOT numbers, completing the traceability walk.

Screenshots:

step 06b bo detail lots reconfirmed


The following SQL queries ran against the application database after the Playwright scenarios completed. Each query asserts a specific condition that proves the feature under test persisted its data correctly.

Bill-Only Order carries the expected LOT numbers — ✅ PASS

Section titled “Bill-Only Order carries the expected LOT numbers — ✅ PASS”

Assertion: ZBO-2025-001 should own 2 line items with LOTs LOT-FL-2024-0334, LOT-SP-2024-0891, owned by the ZuriMED manufacturer org.

SELECT bo.order_number, bo.manufacturer_organization_id, boi.lot_number, op.sku AS product_sku
FROM billing_orders bo
JOIN billing_order_items boi ON boi.billing_order_id = bo.id
JOIN org_products op ON op.id = boi.product_id
WHERE bo.id = $1
ORDER BY boi.created_at, boi.id
order_numbermanufacturer_organization_idlot_numberproduct_sku
ZBO-2025-001a1b2c3d4-e5f6-7890-abcd-ef1234567890LOT-SP-2024-0891SP019N1A
ZBO-2025-001a1b2c3d4-e5f6-7890-abcd-ef1234567890LOT-FL-2024-0334FL516SNA

Shipping Package items reference the Bill-Only Order by text linkage — ✅ PASS

Section titled “Shipping Package items reference the Bill-Only Order by text linkage — ✅ PASS”

Assertion: MAN-2025-0156 should have 2 items with order_number=ZBO-2025-001 and order_line_number ∈ (1, 2).

SELECT sp.manifest_id, spi.order_number, spi.order_line_number, spi.quantity
FROM shipping_packages sp
JOIN shipping_package_items spi ON spi.package_id = sp.id
WHERE sp.id = $1
ORDER BY spi.order_line_number
manifest_idorder_numberorder_line_numberquantity
MAN-2025-0156ZBO-2025-00115
MAN-2025-0156ZBO-2025-00123

Shipping Package surfaces carrier + tracking number — ✅ PASS

Section titled “Shipping Package surfaces carrier + tracking number — ✅ PASS”

Assertion: MAN-2025-0147 should report tracking_number=775899342290, carrier=FedEx, status=in_transit.

SELECT manifest_id, tracking_number, carrier, status
FROM shipping_packages
WHERE id = $1
manifest_idtracking_numbercarrierstatus
MAN-2025-0147775899342290FedExin_transit
Section titled “Traceability join: BO ↔ Shipping Package links resolve to LOT-bearing rows — ✅ PASS”

Assertion: Joining billing_order_items ↔ shipping_package_items on order_number should yield 4 rows (2 BO lines × 2 package lines for ZBO-2025-001), every row carrying a LOT, covering LOT-SP-2024-0891, LOT-FL-2024-0334.

SELECT bo.order_number,
boi.lot_number,
sp.manifest_id,
spi.order_line_number,
spi.quantity
FROM billing_orders bo
JOIN billing_order_items boi
ON boi.billing_order_id = bo.id
JOIN shipping_package_items spi
ON spi.order_number = bo.order_number
JOIN shipping_packages sp
ON sp.id = spi.package_id
WHERE bo.id = $1
AND sp.id = $2
ORDER BY spi.order_line_number, boi.created_at, boi.id
order_numberlot_numbermanifest_idorder_line_numberquantity
ZBO-2025-001LOT-SP-2024-0891MAN-2025-015615
ZBO-2025-001LOT-FL-2024-0334MAN-2025-015615
ZBO-2025-001LOT-SP-2024-0891MAN-2025-015623
ZBO-2025-001LOT-FL-2024-0334MAN-2025-015623

Every row written to audit_events while this test was running (scoped to the demo organizations). Provides compliance evidence that user actions are traced end-to-end (URS-003).

Capture window start: 2026-04-23T03:42:19.640Z

SELECT
ae.created_at,
ae.event_type,
ae.action,
ae.user_id,
u.email AS user_email,
ae.organization_id,
o.name AS organization_name,
ae.object_id,
ae.secondary_object_id,
ae.payload,
ae.route,
ae.trace_id
FROM audit_events ae
LEFT JOIN users u ON u.id = ae.user_id
LEFT JOIN organizations o ON o.id = ae.organization_id
WHERE ae.created_at >= $1
AND ae.organization_id = ANY($2::uuid[])
ORDER BY ae.created_at ASC

6 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-04-23 03:42:23Zuser_loguser:loginalex.admin@zurimed.comZuriMED
2026-04-23 03:42:30Zuser_loguser:loginalex.admin@zurimed.comZuriMED
2026-04-23 03:42:39Zuser_loguser:loginalex.admin@zurimed.comZuriMED
2026-04-23 03:42:45Zuser_loguser:loginalex.admin@zurimed.comZuriMED
2026-04-23 03:42:52Zuser_loguser:loginalex.admin@zurimed.comZuriMED
2026-04-23 03:42:59Zuser_loguser:loginalex.admin@zurimed.comZuriMED