NordPet
Building an autonomous clinical intelligence system using LangChain, LanceDB, and Django.
The Challenge
The industry requires more than just a CRM. Modern veterinary practice is severely bottlenecked by passive data and high-pressure environments.
Unstructured Diagnostic Reports
External laboratories often provide results as unstructured PDFs. Manually sifting through these reports leads to severe cognitive overload, causing professionals to miss critical parameters.
Meloxicam is contraindicated due to recent Stage 2 Kidney Disease history.
Pharmacological Contraindications
Cross-referencing drug contraindications with a patient's renal state relies heavily on human memory, increasing risk.
Manual SOAP & Triage
In high-pressure environments, valuable time is lost to manual SOAP data entry and non-standardized triage.
The Solution
NordPet transforms passive medical records into an active medical co-pilot. Instead of merely storing data, it uses background workers and autonomous AI agents to actively process, transcribe, and structure clinical information in real-time.
Django-Q2 Background Workers
Agents
Extraction
Multi-Agent AI Architecture
Powered by LangChain and OpenAI, NordPet delegates complex clinical workflows to specialized, autonomous agents.
Analyzes incoming patient vital signs (heart rate, temperature, weight) and symptoms to automatically assign a standardized clinical risk level (Green, Yellow, Orange, Red) before the vet even enters the room.
Integrates with OpenAI Whisper API to process raw, unstructured audio and video recordings of veterinary consultations, distilling them into concise, structured SOAP notes for the patient's permanent record.
Parses OCR text from PDF laboratory results (using Docling and RapidOCR) to automatically extract abnormal parameters, issue critical life-threatening warnings, and suggest early diagnostic hypotheses.
A conversational RAG assistant that queries historical clinic knowledge. Armed with "Tool Use", it autonomously queries the official FDA database in real-time to check for medication adverse events, actively blocking dangerous prescriptions.
Engineering Decisions & Stack
Building an AI medical platform requires strict guarantees on data validation, security, and asynchronous processing. Every layer of NordPet was engineered with these constraints in mind.
Tailwind CSS & Pydantic UI & SECURITY
A modern, responsive interface built with Tailwind. Behind the scenes, Pydantic acts as a strict shield, ensuring all Generative AI outputs are strongly typed and validated before reaching the database, eliminating LLM hallucinations.
OpenAI, Whisper & Docling AI MODELS
The brains of the operation. GPT-4 handles complex medical reasoning, Whisper translates raw consultation audio into text, and Docling (along with RapidOCR) extracts critical parameters from unstructured laboratory PDFs.
LangChain & LanceDB EMBEDDED RAG
LangChain orchestrates the specialized agents (Triage, Summary, Analysis). LanceDB is embedded directly into the application, drastically reducing network latency for vector searches across the clinic's historical data.
Django & Q2 ASYNC QUEUE
Medical records demand a battle-tested ORM and native security. Because AI orchestration is heavily I/O bound, Django-Q2 offloads all cognitive processing to background workers to keep the interface highly responsive.
Docker & PostgreSQL DEVOPS
The foundation. PostgreSQL handles robust relational data storage. The deployment architecture utilizes Docker Compose with multi-stage builds, outputting a lightweight Python Gunicorn image for production environments.
Showcase vs. Enterprise
The GitHub repository is a curated demonstration focusing exclusively on the AI architecture. The production system is a vastly different beast.
nordpet-public
A technical demonstration of the core AI orchestration.
Integration of async tasks, Agentic RAG, and FDA Tool Use for portfolio review.
Single-tenant setup. Easily spun up locally via Docker Compose.
Software-only integrations (OpenAI, FDA APIs). No physical hardware.
Enterprise SaaS
A battle-tested clinical management system built for the rigorous demands of real-world healthcare.
Designed to support the daily clinic operations for hundreds of professionals seamlessly.
Complete data isolation for multiple clinics with complex role-based access controls.
Direct parsing from physical blood analyzers, deployed on a HIPAA-compliant cloud.
"NordPet is more than a CRM; it is a vision of how artificial intelligence can be safely and ethically deployed in clinical settings to augment professionals and save lives."