Salud IA Bot is an AI-powered public health assistant built for Colombian citizens. Millions of people in Colombia face barriers to accessing timely, reliable information about disease outbreaks, vaccination coverage, and local health services — barriers that contribute to preventable illness and overloaded clinics. Salud IA Bot solves this by acting as a direct bridge between the complex datasets maintained by Colombia’s public health system (SIVIGILA, PAI vaccination records, CIE-10 mental health diagnoses) and everyday citizens through a familiar interface: Telegram. Powered by Meta LLaMA 3.1 70B via OpenRouter and backed by a NestJS + SQLite architecture, it delivers epidemiological analytics, composite risk scoring, chart visualizations, and local provider lookups — all without hallucinating on critical health data.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/RubenDarioGuerreroNeira/Ecosistema-IA-Colombia/llms.txt
Use this file to discover all available pages before exploring further.
Key Capabilities
Epidemiological Analytics
Query SIVIGILA microdatos for disease incidence rankings, demographic comparisons (gender, age group, urban vs. rural), and national summaries. Ask in plain Spanish — the bot interprets natural language and returns structured statistics.
Composite Risk Scoring
A multidimensional scoring algorithm crosses SIVIGILA case volumes, vaccination coverage gaps, rurality index, and vulnerable population data to classify risk as BAJO, MEDIO, ALTO, or CRÍTICO for diseases such as dengue, tuberculosis, malaria, and zika.
Mental & Sexual Health Guidance
Dedicated modules handle CIE-10 mental health diagnoses and sexual/reproductive health FAQs. The bot provides care pathways, prevention information (STIs, HIV), and emergency guidance (e.g., gender-based violence routes) from structured local knowledge bases.
Local Health Provider Search
Search for clinics, hospitals, and specialist services in Antioquia, Boyacá, Yopal, and Cali. Supports proximity-based lookup (geo search in Yopal with a 5 km default radius), specialty filtering (dentistry, gynecology, pharmacy), and urgency-level filtering.
Chart Visualization
Dynamic chart generation via QuickChart integration. Request bar, pie, or line charts for air quality, mental health diagnosis distributions, vaccination coverage by department, SIVIGILA disease frequency, and gender-disaggregated case breakdowns.
Early Warning System
A predictive subsystem detects queries about
predicción, pronóstico, alertas tempranas, and clasificación de riesgo, then orchestrates MlPredictionService, AdvancedPredictionService, and EarlyWarningService to return time-series forecasts and automatic outbreak alerts.Architecture Overview
Salud IA Bot is built on a modular NestJS backend with three primary layers: the Bot Layer (BotUpdate controller + nestjs-telegraf), the Services Layer (domain-specific services for each health topic and region), and the Data Layer (TypeORM + better-sqlite3 reading from a pre-seeded SQLite database). The central intelligence pattern is RAG (Retrieval-Augmented Generation). When a message arrives,BotUpdate detects the intent and routes it to the appropriate service, which fetches real statistical context from SQLite, then injects that context as a structured prompt to the LLaMA 3.1 model via OpenRouter. The LLM never generates statistics from its weights alone — it always reasons over data retrieved from the local database. For urgency queries in Cali specifically, a zero-hallucination bypass routes the request directly to a SQLite query and formats the response without touching the LLM at all, guaranteeing 100% data fidelity.
Data Domains
The bot integrates four official Colombian health data domains, all pre-processed from XML into a local SQLite database (data/salud-ia-bot.db):
| Domain | Source | Content |
|---|---|---|
| SIVIGILA Events | Instituto Nacional de Salud | Communicable disease microdatos — case counts, sex, age group, urban/rural, municipality |
| Mental Health CIE-10 | Ministerio de Salud | Diagnoses and care records coded to ICD-10; used by MentalHealthStatsService |
| Sexual & Reproductive Health | Internal knowledge base | FAQs on contraception, STI prevention, HIV, and care pathway navigation |
| Regional Providers & Vaccination | Departmental health registries + PAI | Health center locations for Antioquia, Boyacá, Yopal, and Cali; PAI vaccination coverage by department |
Tech Stack
| Component | Technology | Purpose |
|---|---|---|
| Framework | NestJS v11 | Modular, scalable backend architecture with dependency injection |
| LLM | Meta LLaMA 3.1 70B Instruct via OpenRouter | Specialized response generation with RAG-injected public health context |
| AI Client | OpenAI SDK (openai npm package) | OpenAI-compatible client pointed at OpenRouter’s API endpoint |
| Bot | nestjs-telegraf / Telegraf | Telegram Bot API integration and webhook/update handling |
| Database | TypeORM + better-sqlite3 | Local SQLite persistence; zero XML parsing at runtime in production |
| Data Processing | fast-xml-parser + xml2js | One-time migration of official XML health datasets into SQLite |
| Charts | QuickChart | Dynamic chart image generation (bar, pie, line) served as Telegram photo replies |
| Config Validation | Joi | Schema-validated environment variables — missing required vars exit the process immediately |
| Proxy Support | https-proxy-agent | Optional HTTP proxy for Telegram API access on restricted hosting providers |