Most medical product companies still rely on the same distribution model: sales reps visit clinics, leave samples, and hope the doctor recommends the product later. There's no direct link between the clinical moment and the actual purchase.
MedLinq changes that. The platform connects a pharmaceutical company's product line directly to patients during the consultation itself. Each affiliated doctor gets a unique QR code. The patient scans it in the clinic, lands on the doctor's personalized storefront, and buys the recommended products right there, with the doctor present to guide them.
The company controls everything behind the scenes: product assignment, pricing, payment processing, shipping, commission tracking, and automated invoicing. The doctor doesn't manage a thing. They bring the customer through their QR code and earn a commission on every order.
Core Capabilities
QR-linked doctor storefronts with unique, hash-based URLs
Admin-controlled product assignment and per-doctor pricing
Supervised purchasing: customers buy directly in the clinic under doctor guidance
Multi-gateway payment processing (N-Genius + Tabby installments)
Configurable VAT and shipping fees with free shipping threshold
Promo code system, one per doctor with a standalone budget
Doctor commission tracking, calculated and locked at order time
Sales representative system with independent commission tracking
Doctor dashboard showing processed orders and earned commissions
Full admin control over products, doctors, customers, orders, and settings
Role-based access with two separate dashboards (Admin + Doctor)
Multilingual storefront in Arabic and English with RTL support
Invoice PDF generation with full tax and fee breakdown
WhatsApp notifications for order communication
Core Architecture
QR-Linked Doctor Storefronts
Every doctor on the platform gets a unique storefront URL generated from a hash-based slug. No sequential IDs exposed, no guessable URLs. The QR code points directly to that slug, and when a patient scans it, they see only the products assigned to that doctor, at the prices defined by the company.
The doctor doesn't configure anything. The company maintains full control over what's sold and at what price.
Pricing, VAT & Shipping Engine
All order financials run through a dedicated calculation pipeline:
VAT configurable as a fixed amount or percentage, pulled from admin settings
Shipping fees configurable type (fixed or percentage) with a free shipping threshold that auto-applies when the order total qualifies
Calculation order: subtotal → promo discount → total after discount → VAT → total after tax → shipping → final total
All values are locked on the order at creation time and reflected on the generated invoice PDF. No recalculation after the fact. If the company changes a tax rate or shipping fee next week, existing orders stay exactly as they were.
Commission System
Each doctor has a commission rate on their profile. When an order comes through their storefront, the commission amount is calculated and stored on the order immediately. Even if the doctor's rate changes later, historical commissions stay accurate.
The doctor's dashboard shows only their processed orders and the commission earned from each. Sales representatives are linked to doctors and have their own commission tracking, so the company gets full visibility into field team performance.
Payments: N-Genius and Tabby
Two payment gateways are integrated:
N-Genius is the primary UAE banking gateway. It handles the full payment lifecycle: auth token generation, order creation, payment capture, status verification, and webhook callbacks for async updates.
Tabby handles buy-now-pay-later installments. An availability check runs before checkout to confirm the customer qualifies, then the installment flow is presented as an option.
Both gateways feed into a unified order and payment status pipeline, with timestamps tracked at each state transition (Pending → Success → Failed → Refunded).
Roles & Permissions
The platform runs two completely separate Filament panels from a single codebase:
Admin panel is accessible only to users with the admin flag and without the doctor role. Full control over all resources, settings, and data.
Doctor panel is accessible to users with a linked doctor profile or the doctor role. Scoped to their own orders and commissions only.
Spatie Permission handles RBAC across the application, while Filament Shield adds granular resource-level controls, defining exactly who can view, create, edit, or delete each resource within the admin panel. The doctor role is auto-assigned when a doctor profile is created.
Admin Experience
Products & Assignment — Full product management with translatable content (EN/AR), media handling with WebP optimization via Spatie, stock status tracking, and category organization. Products are assigned to specific doctors from the admin panel with per-doctor pricing control.
Doctors & Sales Reps — Doctor profiles with commission rates, assigned sales representatives, and full order history. Sales rep management with independent commission tracking and performance visibility.
Orders & Customers — Complete order lifecycle with status tracking (Waiting → Processing → Declined → Completed). Customer records with delivery details. Soft delete with automatic pruning after one year.
Promo Codes — One promo code per doctor with a standalone budget, managed entirely by the admin. The company gets fine-grained promotional control without giving doctors access to discount mechanics.
Settings — VAT type and value, shipping type and value, free shipping threshold. All configurable from the dashboard without touching code.
Data Exports — Orders, doctors, and customers exportable to Excel/CSV.
Impersonation — Admins can log in as any doctor to debug or verify their experience.
WhatsApp Integration
When an order is placed, the system generates a formatted PDF invoice with the full breakdown: items, taxes, shipping, and discounts. That invoice goes to the customer via WhatsApp Cloud API, so they get instant confirmation without depending on email.
WhatsApp also handles order updates, keeping the customer in the loop throughout fulfillment.
My Role
Full system architecture and feature design
Backend development (Laravel ecosystem)
Frontend implementation (Livewire, Alpine.js, Tailwind CSS)
Payment integrations (N-Genius, Tabby)
Commission and pricing calculation engine
Dual Filament panel setup (Admin + Doctor)
Role and permission system (Spatie + Filament Shield)
Multi-currency and VAT/tax infrastructure
QR code generation and doctor storefront routing
WhatsApp Cloud API integration for invoicing and notifications
Let's Build Something Serious
If you're looking for a developer who can take an unconventional business model — point-of-care commerce, multi-party commissions, dual-panel access control — and turn it into a clean, production-ready system, I'd love to chat.