Inventory
A complete guide to the Inventory module — managing medical supplies, tracking stock levels, setting reorder alerts, expiry dates, and supplier links.
Written By Dev010
Last updated 19 days ago
The Inventory module tracks all medical supplies, medications, and equipment used by the clinic. It provides real-time stock level visibility, low stock alerts, expiry date tracking, and supplier links. Inventory items can be referenced in prescriptions and expenses for a complete picture of stock consumption.
Accessing the Module
Sidebar → Inventory
Direct URL:
https://yourdomain.com/dashboard/inventoryWho can access:
Inventory access is restricted to Admin and Nurse roles by default. Doctors and Receptionists do not see the Inventory module in the sidebar. Adjust in Dashboard → Permissions if needed.
Inventory List
The main inventory page shows a paginated, searchable list of all stock items.
Each row displays:
Item name
Category
Quantity and unit
Minimum stock level
Stock status badge
Expiry date
Supplier
Price
Action buttons (view, edit, delete)
Stock Status Badges
Low stock items are highlighted prominently in the list and trigger alerts on the Admin and Nurse dashboards.
Search and Filters
The search bar filters inventory by:
Item name
Category
Supplier name
Results update as you type.
Creating an Inventory Item
Click the Add Item button on the inventory list page.
Direct URL:
https://yourdomain.com/dashboard/inventory/newRequired Fields
Optional Fields
Classification:
Pricing:
Supplier:
Linking to a Lab Vendor creates a formal supplier relationship. This is useful when the supplier is also used as an external lab vendor and you want to manage the relationship in one place.
Expiry:
Status:
Saving the Item
Click Create Item to save. The item appears immediately in the inventory list with its stock status badge calculated automatically.
Inventory Detail Page
Each item has a dedicated detail page showing its complete information.
Direct URL:
https://yourdomain.com/dashboard/inventory/[id]The detail page shows all fields including batch number, manufacturer, supplier details, expiry date, and notes — information that may not be fully visible in the list view.
Editing an Inventory Item
Click the Edit button on any inventory row or the detail page.
Direct URL:
https://yourdomain.com/dashboard/inventory/[id]/editAll fields are editable. The most common edit operation is updating the Quantity field after restocking or consuming items.
Updating Stock After Restocking
When new stock arrives:
Sidebar → Inventory
Find the item → Edit
Update Quantity to the new total (existing + received)
Update Batch Number if the new delivery has a different batch
Update Expiry Date if the new batch expires later
Save
CareNova does not currently have an automatic stock deduction system. Quantities must be updated manually after restocking or consumption. When prescriptions reference inventory items, stock is not automatically decremented.
Deleting an Inventory Item
Click the Delete option from the inventory row action menu.
A confirmation dialog appears before deletion.
⚠️ Deleting an inventory item sets
inventory_item_idto null on any linked prescriptions and expenses (ON DELETE SET NULL). The prescription and expense records are preserved but lose the inventory reference. Deactivate instead of delete when historical records exist.
Low Stock Alerts
The minimum stock level field controls when a low stock alert is triggered.
Low stock alerts appear in two places:
Admin dashboard:
Stat card showing count of low stock items
Low stock items listed in the dashboard widget
Nurse dashboard:
Low stock alert widget listing items that need restocking with current quantity vs minimum level
Setting Effective Minimum Stock Levels
Set minimum stock levels that give you enough lead time to reorder before running out:
Expiry Date Tracking
The Expiry Date field records when an item expires. This is critical for medications, reagents, and sterile consumables.
CareNova stores the expiry date per inventory item but does not currently send automatic expiry alerts. To review items approaching expiry, query the database directly:
Items expiring in the next 30 days:
SELECT name, quantity, unit,
expiry_date, supplier
FROM inventory
WHERE expiry_date <= now() + interval '30 days'
AND expiry_date >= now()
AND status = 'active'
ORDER BY expiry_date ASC;Items already expired:
SELECT name, quantity, unit,
expiry_date, batch_number
FROM inventory
WHERE expiry_date < now()
AND status = 'active'
ORDER BY expiry_date ASC;Review expiry dates regularly — especially for medications and reagents. Expired items should be marked inactive or removed from stock immediately.
Batch Number Tracking
The Batch Number field records the production batch of each item. This supports:
Traceability — identifying which batch was used in patient care if a recall is issued
FIFO management — tracking which batch arrived first to ensure older stock is used first
Quality control — linking issues back to specific batches
When a new delivery arrives with a different batch number, update the item's batch number in the edit form alongside the new quantity.
Supplier Linking
Each inventory item has two supplier fields:
Supplier (free text): A plain text supplier name. Use this for simple reference without creating a system link.
Supplier ID (linked vendor): Link the item to a Lab Vendor record. This creates a formal relationship that allows you to:
View all inventory items from a specific vendor
Cross-reference vendor contracts with stock items
Manage the supplier relationship in one place via Lab Vendors
To link a supplier:
Edit the inventory item
In the Supplier ID field, search for the vendor name
Select from the dropdown
Save
Lab Vendor records must exist before they can be linked to inventory items. See the Lab Vendors guide.
Inventory in Prescriptions
When a doctor creates a prescription, they can optionally link it to an inventory item using the Inventory Item field.
This creates a reference between the prescription and the stock item being dispensed. It does not automatically deduct stock — quantities must be updated manually after dispensing.
To check which inventory items are most frequently prescribed:
SELECT i.name, i.quantity,
i.min_stock, i.unit,
COUNT(p.id) as prescription_count
FROM inventory i
LEFT JOIN prescriptions p
ON p.inventory_item_id = i.id
GROUP BY i.id, i.name,
i.quantity, i.min_stock, i.unit
ORDER BY prescription_count DESC;Inventory in Expenses
When recording an expense for purchasing stock, link the expense to the relevant inventory item using the Inventory Item field in the Expenses module.
This creates a traceable connection between the financial cost and the physical stock item, giving visibility into the true cost of maintaining specific inventory items over time.
Database Schema Reference
inventory
An index is set on name for fast search performance.
Relationship to Other Modules
Workflow Examples
Adding initial stock when setting up the clinic:
Sidebar → Inventory → Add Item
Enter item name, quantity, unit, and minimum stock level
Add category, manufacturer, batch number, and expiry date
Link to a supplier if applicable
Save — item appears in list with stock status badge
Restocking after delivery:
Sidebar → Inventory
Find the item in the list → Edit
Add received quantity to existing quantity
Update batch number and expiry date if new batch
Save — stock status badge updates automatically
Responding to a low stock alert:
Dashboard → Low Stock widget (Admin or Nurse dashboard)
Note which items are low
Contact the supplier to place a reorder
When stock arrives → update quantities as above
Tracking medication dispensing:
Doctor creates prescription linked to inventory item
Nurse or pharmacist dispenses the medication
Sidebar → Inventory → find the item → Edit
Reduce quantity by amount dispensed
Save — stock level updates
Checking for expired stock: Run the expiry query above in Supabase → SQL Editor to identify and remove expired items:
Note expired items from query results
Sidebar → Inventory → find item
Either set status to inactive or delete if no historical links
Troubleshooting
Inventory not visible in sidebar:
Confirm your role has
inventory.viewpermission in Dashboard → PermissionsDoctors and Receptionists do not have inventory access by default
Low stock alert not appearing on dashboard:
Confirm the item's quantity is at or below
min_stockConfirm
min_stockis set to a value greater than 0 — items withmin_stock = 0never trigger low stock alertsHard refresh the dashboard
Supplier dropdown empty when linking a vendor:
Lab Vendor records must exist before they can be linked
Go to Sidebar → Lab Vendors and create the vendor first
Item quantity not updating after prescription:
CareNova does not automatically deduct stock when a prescription is created
Update the quantity manually in the Inventory edit form after dispensing
Expiry date alert not showing:
CareNova does not send automatic expiry notifications in the current version
Review expiry dates manually using the SQL query above or by sorting the inventory list by expiry date
Cannot delete inventory item:
Confirm you have
inventory.deletepermission — Admin and Nurse by defaultIf the item is linked to prescriptions or expenses, deactivate instead of deleting to preserve historical records
Next Step
Continue to the Staff module guide to learn how to manage your clinic's staff roster, work schedules, and HR records in CareNova.