Salud IA Bot covers two specialized health domains that are often difficult for citizens to navigate: mental health and sexual and reproductive health. Both modules load structured XML datasets at startup and respond to natural-language queries with statistics, risk profiles, and care route guidance. When structured data is available the bot answers directly; otherwise LLaMA 3.1 adds context and natural fluency to the response.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.
Mental Health module
The mental health module readsSalud_Mental.xml at startup into MentalHealthService. Each record maps a CIE-10 diagnostic code and description to age-bracket case counts: menor_a_1, de_1_a_4, de_5_a_9, de_10_a_14, de_15_a_19, de_20_a_49, de_50_a_64, _65_y_mas, and a total. The exported interfaces are:
What users can ask
Key service methods
MentalHealthService provides a layered search strategy that prioritizes precision over recall:
Exact match
getStatsForDiagnosis(query) first checks for an exact match against diagnostico_ingreso or codigo_dx_ingreso after normalization.Token-scored candidate search
findDiagnosisInText(text) tokenizes the query and scores each diagnosis by how many tokens overlap, returning the highest-scoring candidate. A full phrase match in the query scores 2000; a partial inclusion scores 1400+.Life-cycle aggregation
getTopByLifeCycle(cycle, limit) groups the eight age fields into five life-cycle buckets and returns the diagnoses with the most cases in the requested cycle.| Life cycle key | Underlying age fields |
|---|---|
ninos | menor_a_1, de_1_a_4, de_5_a_9 |
adolescentes | de_10_a_14, de_15_a_19 |
jovenes | de_15_a_19, de_20_a_49 |
adultos | de_20_a_49, de_50_a_64 |
mayores | _65_y_mas |
Statistical outputs
getAgeDistribution() aggregates totals across all diagnoses for every age bracket, providing a national picture of the age profile of mental health hospitalizations. getTopDiagnoses(limit) returns the most prevalent CIE-10 diagnoses by total case count, useful for chart generation.
Sexual and Reproductive Health module
The sexual health module answers questions fromSalud_sexual_-_preguntas.xml, a curated dataset of frequently asked questions covering:
- Reproductive rights and access to services
- Contraception methods and correct usage
- ITS/HIV prevention: transmission routes, testing, treatment access
- Gender violence care routes: step-by-step guidance on how to access attention in cases of sexual or domestic violence in specific Colombian cities
Example queries
Intencion enum
SexualHealthService.classifyIntent(query) classifies incoming queries using the Intencion enum exported from sexual-health.service.ts. The detection is keyword-based and evaluates conditions in priority order:
| Detected keywords | Resolved intent |
|---|---|
emergencia, urgente, violacion, abuso, agresion, acido, ataque | EMERGENCIA |
vih, sexo sin proteccion, condon, its | RIESGO_ITS |
embarazada, adolescente, gestante | EMBARAZO_ADOLESCENTE |
donde, acudir, ips, servicio, hospital, conseguir, pastillas | BUSCAR_SERVICIO |
| (default) | BUSCAR_INFORMACION |
vih, condon, pastillas, vasectomia, embarazada), searchByKeyword returns a hardcoded expert response directly before consulting the XML question bank, guaranteeing accurate guidance on critical topics regardless of dataset coverage.
Emergency protocols
emergency-protocols.ts exports EMERGENCY_PROTOCOLS, a static object with pre-defined structured protocols for critical situations that require immediate action. Each protocol contains a keywords array for detection and a response string returned verbatim to the user:
Sexual violence
Triggered by keywords
violar, violacion, abuso sexual. Provides step-by-step guidance including post-exposure prophylaxis (PPE within 72 hours) and the national helpline Linea 155.Acid/chemical attack
Triggered by keywords
acido, quemadura, quimico. Details what NOT to do (rub, apply ice, burst blisters) and the correct first-aid response (continuous water irrigation).Domestic / partner violence
Triggered by keywords
golpea, pega, violencia, maltrato. Provides care routes: Linea 155, Fiscalia, Policia, and Comisarias de Familia.HIV exposure risk
Triggered by keywords
jeringas, comparti, vih. Instructs users to go to emergency services immediately to request post-exposure prophylaxis within 72 hours.EMERGENCY_PROTOCOLS object — LLaMA 3.1 is not involved in generating emergency instructions, ensuring that safety-critical steps are never altered or hallucinated by the model.