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/inventory

Who can access:

Action

Admin

Doctor

Receptionist

Nurse

View inventory

Create item

Edit item

Delete item

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

Badge

Condition

In Stock

Quantity is above minimum stock level

Low Stock

Quantity is at or below minimum stock level

Out of Stock

Quantity is zero

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/new

Required Fields

Field

Notes

Name

Item name (e.g. Amoxicillin 500mg, Surgical Gloves L)

Quantity

Current stock count — integer

Unit

Unit of measurement (e.g. box, bottle, pack, piece)

Minimum Stock

Threshold below which low stock alert triggers

Optional Fields

Classification:

Field

Notes

Category

Item category (e.g. Medication, Equipment, Consumable, PPE)

Description

Detailed description of the item

Manufacturer

Manufacturing company name

Batch Number

Production batch identifier for traceability

Pricing:

Field

Notes

Price

Cost per unit

Supplier:

Field

Notes

Supplier

Free text supplier name

Supplier ID

Optional — link to a Lab Vendor record

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:

Field

Notes

Expiry Date

Date the item expires — important for medications

Status:

Field

Notes

Status

active by default — inactive items are hidden from selection dropdowns

Notes

Additional notes about the item

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]/edit

All 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:

  1. Sidebar → Inventory

  2. Find the item → Edit

  3. Update Quantity to the new total (existing + received)

  4. Update Batch Number if the new delivery has a different batch

  5. Update Expiry Date if the new batch expires later

  6. 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_id to 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.

Condition

Result

quantity > min_stock

In Stock — no alert

quantity <= min_stock

Low Stock alert triggered

quantity = 0

Out of Stock

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:

Item Type

Suggested Minimum

Fast-moving medications

20–30% of typical monthly usage

Surgical consumables

1–2 weeks of average usage

Slow-moving equipment

1–2 units

Emergency supplies

Never below 5 units

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:

  1. Edit the inventory item

  2. In the Supplier ID field, search for the vendor name

  3. Select from the dropdown

  4. 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

Column

Type

Description

id

uuid

Unique item ID

name

text

Item name

category

text

Item category

description

text

Item description

manufacturer

varchar

Manufacturer name

batch_number

varchar

Production batch number

quantity

integer

Current stock count

unit

text

Unit of measurement

min_stock

integer

Minimum stock threshold

price

numeric

Cost per unit

supplier

text

Free text supplier name

supplier_id

uuid

FK → lab_vendors (set null on delete)

expiry_date

date

Item expiry date

status

text

active / inactive

notes

text

Additional notes

created_at

timestamptz

Creation timestamp

updated_at

timestamptz

Last updated timestamp

An index is set on name for fast search performance.

Relationship to Other Modules

Module

Relationship

Prescriptions

Items linked to dispensed medications

Expenses

Items linked to purchasing expenses

Lab Vendors

Items linked to their supplier vendor

Dashboard

Low stock count shown on Admin and Nurse dashboards

Workflow Examples

Adding initial stock when setting up the clinic:

  1. Sidebar → Inventory → Add Item

  2. Enter item name, quantity, unit, and minimum stock level

  3. Add category, manufacturer, batch number, and expiry date

  4. Link to a supplier if applicable

  5. Save — item appears in list with stock status badge

Restocking after delivery:

  1. Sidebar → Inventory

  2. Find the item in the list → Edit

  3. Add received quantity to existing quantity

  4. Update batch number and expiry date if new batch

  5. Save — stock status badge updates automatically

Responding to a low stock alert:

  1. Dashboard → Low Stock widget (Admin or Nurse dashboard)

  2. Note which items are low

  3. Contact the supplier to place a reorder

  4. When stock arrives → update quantities as above

Tracking medication dispensing:

  1. Doctor creates prescription linked to inventory item

  2. Nurse or pharmacist dispenses the medication

  3. Sidebar → Inventory → find the item → Edit

  4. Reduce quantity by amount dispensed

  5. Save — stock level updates

Checking for expired stock: Run the expiry query above in Supabase → SQL Editor to identify and remove expired items:

  1. Note expired items from query results

  2. Sidebar → Inventory → find item

  3. Either set status to inactive or delete if no historical links

Troubleshooting

Inventory not visible in sidebar:

  • Confirm your role has inventory.view permission in Dashboard → Permissions

  • Doctors 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_stock

  • Confirm min_stock is set to a value greater than 0 — items with min_stock = 0 never trigger low stock alerts

  • Hard 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.delete permission — Admin and Nurse by default

  • If 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.