🧾 TECHNICAL SPECIFICATION (TS)
Three AI-powered projects in the medical domain
for medical institutions
IMPORTANT: This is the project's primary source of truth — all development must strictly conform to this TS!
📌 Source: GitHub Issue #5 - Customer technical specification
🏗️ Unified architecture across all projects
Frontend stack:
- - Web: React/Next.js for web interfaces
- - Mobile: Flutter for mobile apps (iOS/Android)
- - Terminal/Kiosk: React-based interface for kiosks
Backend stack:
- - API Framework: FastAPI (Python) — single standard across all projects
- - Database: PostgreSQL for all data
- - Cache & Sessions: Redis for caching and sessions
- - Message Queue: Redis/RabbitMQ for async operations
Security and compliance:
- - OAuth 2.0 / OpenID Connect for authorization
- - End-to-end encryption for all medical data
- - Personal data under Kazakhstan law
- - Medical audit logs with full traceability
Infrastructure:
- - Docker containerization for all services
- - API Gateway as a single entry point
- - Real-time monitoring systems
- - Webhook system for real-time notifications
AI & Core system:
- - VARGATES AI CORE — centralized system for:
- • Unified LLM Gateway (OpenAI / local medical models)
- • Medical AI Models orchestration
- • Prompt management and versioning
- • AI performance monitoring and audit
- • Medical data processing
1. Project: AI chat — Pre-doctor consultation
Project goal:
Build an intelligent chatbot to collect complaints, symptoms, and patient history, then generate preliminary findings and route the patient to the right specialist.
Core features:
- - Dialog system to collect symptoms and medical history
- - Complaint analysis using AI via VARGATES AI CORE
- - Generation of a structured document (PDF/Word) with preliminary diagnoses
- - Recommendations on which specialists to consult
- - Integration with online appointment booking
Technical requirements:
- - Interface: web chat on the institution's website (React/Next.js)
- - AI model: integration via VARGATES AI CORE with medical models
- - Security: personal data under Kazakhstan law
- - Logging system for medical audit and fine-tuning
- - Language support: Russian and Kazakh at minimum
Expected outcome:
Reduced load on therapists, intake, and front desk; faster initial patient routing.
System architecture:
Frontend:
- - Web interface (React/Next.js) with mobile responsiveness
- - Real-time chat interface with media file support
Backend:
- - FastAPI server for chat processing
- - Integration with VARGATES AI CORE for AI processing
- - Redis for session caching and fast responses
Database:
- - PostgreSQL for chat history, user profiles, and statistics
- - FHIR HL7 compatible data structure
Integrations:
- - API to the medical information system (MIS) via FHIR
- - Document workflow system (PDF generation)
User Flow (user scenario):
- 1. User opens the website and starts the chat
- 2. AI via VARGATES AI CORE greets the user and clarifies the purpose of the visit
- 3. The bot sequentially collects data: complaints, symptoms, history
- 4. On completion the system analyzes the data and forms preliminary hypotheses
- 5. A report is generated and an appointment with a specialist is suggested
- 6. The user receives a link / QR code to download the document and book the appointment
- 7. Collected information is sent to the MIS via API
2. Project: AI — Virtual help desk
Project goal:
Develop an interactive AI-powered help desk to provide patients and visitors with information about the institution, services, schedules, and rules; print tickets and referrals; print patient routes; and provide application templates.
Core features:
- - Answers to frequently asked questions (FAQ) about services, hours, prices, and routes
- - Visualization — a virtual avatar of a medical worker (2D/3D)
- - Voice and text interaction
- - Site navigation and help with online booking
- - Support on terminals / info kiosks
Technical requirements:
- - Scenario-based and LLM-based approach
- - Web interface (React) and a kiosk version
- - Integration with the services and schedule database
- - Automatic updates of reference information
- - Voice synthesis and recognition (in Kazakh, Russian, and English)
Expected outcome:
Better-informed patients and fewer repetitive requests to staff.
System architecture:
Frontend:
- - Web interface (React/Next.js) with a 2D/3D character
- - Kiosk version for terminals
- - Voice and text input support
Backend:
- - FastAPI server for request processing
- - Integration with VARGATES AI CORE
- - Redis for caching frequently requested information
Knowledge base:
- - PostgreSQL to store reference information
- - Admin panel for content updates by administrators
Additional:
- - Text-to-Speech and Speech-to-Text module
- - Real-time updates of reference information
User Flow:
- 1. User reaches the help desk via screen or terminal
- 2. Asks a question by voice or types text
- 3. AI via VARGATES AI CORE analyzes the request and provides the answer
- 4. If needed, the user is redirected to the relevant page or to online booking
3. Project: AI — Personal doctor
Project goal:
Build an AI-powered personal assistant to monitor the user's health, analyze biometric data, and provide recommendations for lifestyle, prevention, and visiting a doctor.
Core features:
- - Interpretation of received lab results in PDF
- - Change analysis and detection of deviations
- - Notifications and reminders (medication, doctor visit, etc.)
- - Personalized advice based on the user's profile
- - Ability to keep a wellbeing diary
Technical requirements:
- - Interface: integration module inside a mobile app (iOS/Android)
- - Cloud-based data processing
- - Multilingual interface support
Expected outcome:
Better self-monitoring of health, prevention of chronic diseases, and fewer non-essential clinic visits.
System architecture:
Frontend:
- - integration module for the iOS/Android mobile app
- - Diary, vitals monitoring, and recommendations interface
Backend:
- - FastAPI server with REST API
- - Integration with VARGATES AI CORE for data analysis
- - Redis for caching user data
Integrations:
- - API to the MIS
- - Push notifications for mobile devices
Data storage:
- - PostgreSQL with end-to-end encryption
- - Compliance with medical standards
User Flow:
- 1. User opens the Flutter mobile app
- 2. The chatbot connects to the MIS and patient data via FHIR API
- 3. AI via VARGATES AI CORE analyzes deviations and issues recommendations
- 4. The user receives personalized reminders and keeps a wellbeing diary
🔗 Artifacts
- - TS web page: /technical-requirements
- - Related EPIC: #1
- - Customer: Medical institutions
📋 Status
- - Status: Approved by the customer ✅
- - Priority: Critical — foundation for all development
- - Source: Original technical specification
- - Updated: Tech stack standardization
© 2026 DreamLight Labs. Lonevi technical specification.
Source: GitHub Issue #5 - The project's primary source of truth
IMPORTANT: This is the project's primary source of truth. All development must strictly conform to this technical specification!