Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/lerichardv/patolab-platform/llms.txt

Use this file to discover all available pages before exploring further.

PatoLab is a full-stack laboratory management platform purpose-built for pathology laboratories. It accompanies every specimen from the moment it arrives at the intake desk through macroscopic and microscopic review, collaborative report authoring, billing, and final result delivery to the requesting clinician or patient. Whether you run a small private pathology practice or a multi-pathologist diagnostic centre, PatoLab provides the structured workflow, role-based access controls, and real-time collaboration tools your team needs to operate with confidence and traceability.

Tech Stack

PatoLab is built on a modern, well-supported open-source stack chosen for reliability and developer ergonomics:
LayerTechnology
BackendLaravel 13 (PHP 8.3+) with Laravel Fortify authentication
FrontendReact 19 + Inertia.js v3 (SPA, no API layer needed)
LanguageTypeScript throughout the frontend codebase
StylingTailwind CSS 4 with shadcn/ui (New York) components and Radix UI primitives
Build ToolVite 8 with Rolldown
DatabaseSQLite (development/testing) · MySQL or PostgreSQL (production)
PDF GenerationSpatie Browsershot backed by Chromium
Collaborative EditorHocuspocus v4 WebSocket server · Yjs · TipTap 3
QueueLaravel database-backed queue (QUEUE_CONNECTION=database)

Key Feature Areas

Specimen Tracking

Manage the complete specimen lifecycle with a real-time Kanban board. Track every case from intake through seven discrete statuses, assign priorities, and keep a full audit trail.

Collaborative Report Editor

Multi-pathologist real-time report authoring powered by TipTap and Yjs. Pathologists can co-edit a single report simultaneously, with presence cursors and conflict-free merging.

Invoicing & Billing

Generate PDF invoices directly from finalized specimens. Chromium-based PDF rendering produces print-ready billing documents without any third-party services.

Roles & Permissions

Fine-grained role-based access control built on Laravel Fortify. Assign pathologists, technicians, receptionists, and administrators with scoped permissions per module.

Inventory Management

Track reagents, staining supplies, and consumables consumed per specimen. Link products to specimens via the specimen_products pivot and monitor stock levels.

WhatsApp Notifications

Deliver result notifications and report links directly to patients and referring physicians via the WhatsApp Business API — no third-party SMS gateway required.

Domain Model

The Specimen model is the central entity that everything else in PatoLab revolves around.
Specimen
 ├── belongs to  Customer
 ├── belongs to  Priority
 ├── belongs to  SpecimenType
 ├── belongs to  SpecimenTypeExamination
 ├── belongs to  SpecimenCategory
 ├── belongs to  Sequence
 ├── belongs to  Referrer
 ├── belongs to many  User          (assigned pathologists / technicians)
 ├── has one   SpecimenReport       (collaborative TipTap document)
 ├── has one   Invoice              (billing record + PDF)
 ├── has many  WorkOrder            (lab processing tasks)
 ├── has many  UserCommission       (pathologist commission records)
 └── belongs to many  Product       (consumed inventory items)
When a specimen is registered it is placed on a Priority lane inside the Kanban board. The priorities_specimens_order join table records the drag-and-drop order of every specimen card within its lane, so the board state is persisted across sessions and users.

Specimen Statuses

Each specimen moves through a defined set of statuses that map directly to real laboratory workflow stages. Every status has a dedicated colour used across the Kanban board, list views, and PDF reports.
StatusLabelHex Colour
receivedReceived#3b82f6 (blue-500)
macroscopic_reviewMacroscopic Review#8b5cf6 (violet-500)
processingProcessing#f59e0b (amber-500)
microscopic_reviewMicroscopic Review#d946ef (fuchsia-500)
finalizedFinalized#10b981 (emerald-500)
deliveredDelivered#64748b (slate-500)
cancelledCancelled#ef4444 (red-500)
These colours are defined in Specimen::STATUS_COLORS (see app/Models/Specimen.php) and are appended to every serialised specimen via the computed status_color attribute, making them immediately available on the frontend without a separate lookup.
The Kanban board is the primary day-to-day interface for laboratory staff. Column order is determined by the Priority model, and card order within each column is stored in the priorities_specimens_order table. After any database restoration or migration from another environment you must clean stale rows from this table — otherwise duplicate cards will appear. See the Deployment page for the exact cleanup SQL.

Quick Navigation

Quickstart

Get a local development environment running in under 10 minutes, including seeded test data and all dev servers.

Deployment

Step-by-step production deployment guide for traditional servers and Docker, including caching, queue workers, and Chromium setup.

Specimens

Deep dive into specimen intake, the Kanban board, status transitions, priority management, and grouped specimens.

Report Editor

Learn how the collaborative TipTap editor works, how to start the Hocuspocus WebSocket server, and how reports are finalised and signed.

Roles & Permissions

Configure roles, restrict feature access per role, and manage pathologist signatures for PDF sign-off.

WhatsApp Integration

Connect PatoLab to the WhatsApp Business API to send result notifications and secure report-delivery links.

Build docs developers (and LLMs) love