Skip to main content

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.

Salud IA Bot operates on pre-loaded local datasets stored in SQLite rather than making live queries to government APIs at request time. On first deployment, seed scripts (scripts/import-data.ts, scripts/seed-antioquia.ts, scripts/seed-vaccination.ts) parse each XML file with fast-xml-parser or xml2js and insert the structured rows into data/salud-ia-bot.db via TypeORM. At runtime, every service queries SQLite directly — no XML is parsed in hot paths. The sole exception is the air quality dataset, which may be refreshed via an external API call at runtime.
Air quality data is the only dataset that may be updated via an external API call at runtime. All other datasets require running seed scripts to refresh.

Dataset Inventory

The table below lists every XML file consumed by the application, the government system or programme that owns the data, the NestJS service that exposes it, and how often the upstream source publishes updated extracts.
File NameDomainContentServiceUpdate Frequency
Eventos_de_Interés_en_Salud_Pública_20260514.xmlSIVIGILADisease event microdatosHealthDataServiceAs released by INS
Salud_Mental.xmlMinisterio SaludCIE-10 diagnoses and statsMentalHealthServiceAnnual
Salud_sexual_-_preguntas.xmlInternalSexual health Q&A pairsSexualHealthServiceManual
Prestadores_de_Salud_Departamento_de_Antioquia.xmlSISPROAntioquia providersAntioquiaHealthServiceQuarterly
Centros_de_salud_Yopal._.xmlSISPROYopal health centersYopalHealthServiceQuarterly
SERVICIOS_OFERTADOS_RED_DE_SALUD_DEL_CENTRO_ESE_POR_SEDE_CALI.xmlSISPRO/Cali ESECali services by sedeCaliHealthServiceQuarterly
servicios_salud_boyaca.xmlSISPROBoyacá providersBoyacaHealthServiceQuarterly
Coberturas_administrativas_de_vacunación_por_departamento_20260528.xmlPAIDept vaccination coverageVaccinationServiceAnnual
Cobertura_de_Vacunación_PAI_en_el_Valle_del_Cauca.xmlPAIValle del Cauca vaccinationVaccinationServiceAnnual
DATOS_DE_VACUNACIÓN_EN_NIÑOS_Y_NIÑAS.xmlPAIChildren vaccination dataVaccinationServiceAnnual
Calidad_del_Aire_en_Colombia_(Promedio_Anual)_20260528.xmlIDEAM/ExternalAir quality indicatorsAirQualityServiceAnnual

XML Schema Example

All SIVIGILA event files follow this element structure. Each <Evento> block represents one disease-event record as reported by the national surveillance system:
<Eventos>
  <Evento>
    <nombre_del_evento>Dengue</nombre_del_evento>
    <total_de_eventos>15420</total_de_eventos>
    <femenino>8200</femenino>
    <masculino>7220</masculino>
    <urbano>9800</urbano>
    <rural>5620</rural>
    <fecha_notificaci_n>2024-01-15</fecha_notificaci_n>
  </Evento>
</Eventos>
The seed script (scripts/import-data.ts) parses this structure and maps each field to a TypeORM entity before bulk-inserting into SQLite. Services then query the database using TypeORM repository methods — no XML parsing occurs at request time.

Seed and Migration Pipeline

The full data pipeline from raw XML to queryable SQLite proceeds in three stages:
XML file (data/)

    ▼  fast-xml-parser / xml2js
scripts/import-data.ts
scripts/seed-antioquia.ts
scripts/seed-vaccination.ts

    ▼  TypeORM bulk insert
data/salud-ia-bot.db (SQLite)

    ▼  better-sqlite3 at runtime
HealthDataService / MentalHealthService / VaccinationService / …
Running the seeds locally:
# Import SIVIGILA events, mental health, sexual health, Yopal, Cali, Boyacá
npx ts-node scripts/import-data.ts

# Import Antioquia providers (separate seed due to dataset size)
npx ts-node scripts/seed-antioquia.ts

# Import all PAI vaccination datasets
npx ts-node scripts/seed-vaccination.ts
In production, synchronize: false is set on the TypeORM data source to prevent the schema from being modified at runtime.

Data Refresh Workflow

To update any dataset to a newer government export:
  1. Download the new XML extract from the upstream source.
  2. Replace the corresponding file in data/ (keep the same filename, or update the import path in the seed script).
  3. Re-run the relevant seed script to repopulate SQLite.
  4. Redeploy the application so the new data/salud-ia-bot.db is served in production.

Data Sources and Governance

ProgrammeFull NameWebsite
SIVIGILASistema Nacional de Vigilancia en Salud Públicains.gov.co
PAIPrograma Ampliado de Inmunizacionesminsalud.gov.co
SISPROSistema Integral de Información de la Protección Socialsispro.gov.co
IDEAMInstituto de Hidrología, Meteorología y Estudios Ambientalesideam.gov.co
SIVIGILA is managed by Colombia’s INS (Instituto Nacional de Salud) and is the authoritative source for communicable disease surveillance microdatos. PAI data comes from the Programa Ampliado de Inmunizaciones, published by the Ministerio de Salud y Protección Social. Regional provider data (SISPRO) is sourced from the national health services registry and is filtered per department or municipality.

Build docs developers (and LLMs) love