Verificador de Botiquín Completo - Analiza todas las interacciones de tus suplementos y medicamentos

¿Cuántas interacciones tiene tu botiquín?

Verifica TODAS tus plantas medicinales y medicamentos de una vez

250 plantas 53 clases de fármacos 592 interacciones

1. Agrega tus plantas medicinales y suplementos

2. Agrega tus medicamentos

Tu Reporte de Botiquín

0

⚕️ Aviso importante: Esta herramienta es informativa y NO reemplaza la consulta médica o farmacéutica. Comparte este reporte con tu médico o farmacéutico para una evaluación personalizada. Fuentes: EMA, ESCOP, PubMed.
var selectedHerbs = []; var selectedDrugs = []; var foundInteractions = []; function getHerbByInput(val) { val = val.toLowerCase().trim(); return HERBS.find(h => h.name.toLowerCase() === val || (h.scientific && h.scientific.toLowerCase() === val) || (h.aliases && h.aliases.some(a => a.toLowerCase() === val)) ); } function getDrugByInput(val) { val = val.toLowerCase().trim(); for (var dc of DRUG_CLASSES) { if (dc.name.toLowerCase() === val) return dc; if (dc.drugs && dc.drugs.some(d => d.toLowerCase() === val)) return dc; if (dc.aliases && dc.aliases.toLowerCase().includes(val)) return dc; } return null; } function getSuggestions(val, type) { val = val.toLowerCase().trim(); if (val.length < 2) return []; var results = []; if (type === 'herb') { for (var h of HERBS) { if (h.name.toLowerCase().includes(val) || (h.scientific && h.scientific.toLowerCase().includes(val)) || (h.aliases && h.aliases.some(a => a.toLowerCase().includes(val)))) { results.push({ name: h.name, sub: h.scientific || '', id: h.id }); } if (results.length >= 8) break; } } else { for (var dc of DRUG_CLASSES) { if (dc.name.toLowerCase().includes(val) || (dc.aliases && dc.aliases.toLowerCase().includes(val))) { results.push({ name: dc.name, sub: '', id: dc.id }); } if (dc.drugs) { for (var d of dc.drugs) { if (d.toLowerCase().includes(val)) { results.push({ name: d, sub: 'Clase: ' + dc.name, id: dc.id }); } } } if (results.length >= 8) break; } } return results; } function showSuggestions(el, items, type) { el.innerHTML = ''; if (!items.length) { el.style.display = 'none'; return; } el.style.display = 'block'; items.forEach(function(item, i) { var d = document.createElement('div'); d.innerHTML = item.name + (item.sub ? ' ' + item.sub + '' : ''); d.onclick = function() { if (type === 'herb') { document.getElementById('herb-input').value = item.name; addHerb(); } else { document.getElementById('drug-input').value = item.name; addDrug(); } el.style.display = 'none'; }; el.appendChild(d); }); } document.getElementById('herb-input').addEventListener('input', function() { var items = getSuggestions(this.value, 'herb'); showSuggestions(document.getElementById('herb-suggestions'), items, 'herb'); }); document.getElementById('drug-input').addEventListener('input', function() { var items = getSuggestions(this.value, 'drug'); showSuggestions(document.getElementById('drug-suggestions'), items, 'drug'); }); document.getElementById('herb-input').addEventListener('keydown', function(e) { if (e.key === 'Enter') { e.preventDefault(); addHerb(); } }); document.getElementById('drug-input').addEventListener('keydown', function(e) { if (e.key === 'Enter') { e.preventDefault(); addDrug(); } }); document.addEventListener('click', function(e) { if (!e.target.closest('.iw')) { document.querySelectorAll('.suggestions').forEach(s => s.style.display = 'none'); } }); function addHerb() { var inp = document.getElementById('herb-input'); var herb = getHerbByInput(inp.value); if (!herb) return; if (selectedHerbs.find(h => h.id === herb.id)) return; if (selectedHerbs.length >= 10) return; selectedHerbs.push(herb); inp.value = ''; document.getElementById('herb-suggestions').style.display = 'none'; renderTags(); } function addDrug() { var inp = document.getElementById('drug-input'); var drug = getDrugByInput(inp.value); if (!drug) return; if (selectedDrugs.find(d => d.id === drug.id)) return; if (selectedDrugs.length >= 10) return; selectedDrugs.push(drug); inp.value = ''; document.getElementById('drug-suggestions').style.display = 'none'; renderTags(); } function removeHerb(id) { selectedHerbs = selectedHerbs.filter(h => h.id !== id); renderTags(); } function removeDrug(id) { selectedDrugs = selectedDrugs.filter(d => d.id !== id); renderTags(); } function renderTags() { var ht = document.getElementById('herb-tags'); ht.innerHTML = selectedHerbs.map(h => '' + h.name + ' ' ).join(''); var dt = document.getElementById('drug-tags'); dt.innerHTML = selectedDrugs.map(d => '' + d.name + ' ' ).join(''); document.getElementById('check-btn').disabled = !(selectedHerbs.length > 0 && selectedDrugs.length > 0); } function checkAll() { foundInteractions = []; for (var herb of selectedHerbs) { for (var drug of selectedDrugs) { var matches = INTERACTIONS.filter(ix => ix.herb === herb.id && ix.drugClass === drug.id ); matches.forEach(function(ix) { foundInteractions.push({ herbName: herb.name, drugName: drug.name, severity: ix.severity, effect: ix.effect, mechanism: ix.mechanism, evidence: ix.evidence, evidenceLevel: ix.evidenceLevel || 'C', source: ix.source, doi: ix.doi }); }); } } // Sort: alta first, then moderada, then baja var order = { alta: 0, moderada: 1, baja: 2, teorica: 3 }; foundInteractions.sort(function(a, b) { return (order[a.severity] || 3) - (order[b.severity] || 3); }); renderResults(); } function renderResults() { var alta = foundInteractions.filter(ix => ix.severity === 'alta').length; var mod = foundInteractions.filter(ix => ix.severity === 'moderada').length; var baja = foundInteractions.filter(ix => ix.severity === 'baja').length; var total = foundInteractions.length; var circle = document.getElementById('score-circle'); circle.textContent = total; if (alta > 0) { circle.className = 'score-circle danger'; } else if (mod > 0) { circle.className = 'score-circle caution'; } else { circle.className = 'score-circle safe'; } var text = document.getElementById('score-text'); if (total === 0) { text.textContent = 'No se encontraron interacciones documentadas entre tus selecciones.'; } else { text.textContent = 'Se encontraron ' + total + ' interacciones potenciales en tu botiquín.'; } var summary = document.getElementById('severity-summary'); summary.innerHTML = ''; if (alta > 0) summary.innerHTML += '
' + alta + 'Severas
'; if (mod > 0) summary.innerHTML += '
' + mod + 'Moderadas
'; if (baja > 0) summary.innerHTML += '
' + baja + 'Leves
'; var list = document.getElementById('interaction-list'); list.innerHTML = '

Detalle de interacciones

'; foundInteractions.forEach(function(ix) { var doiLink = ix.doi ? ' · DOI' : ''; list.innerHTML += '
' + '
' + ix.herbName + ' + ' + ix.drugName + ' ' + ix.severity.toUpperCase() + '
' + '
Efecto: ' + ix.effect + '
' + (ix.mechanism ? '
Mecanismo: ' + ix.mechanism + '
' : '') + '
Evidencia: ' + ix.evidenceLevel + ' · ' + (ix.source || '') + doiLink + '
' + '
'; }); if (total === 0) { list.innerHTML += '
' + '

✅ Sin interacciones documentadas

' + '

Esto no descarta interacciones no documentadas. Consulta a tu farmacéutico.

'; } document.getElementById('results').style.display = 'block'; document.getElementById('results').scrollIntoView({ behavior: 'smooth' }); } function generateCardImage() { var canvas = document.getElementById('card-canvas'); var ctx = canvas.getContext('2d'); var w = 600, h = 400; canvas.width = w; canvas.height = h; // Background ctx.fillStyle = '#f7fafc'; ctx.fillRect(0, 0, w, h); // Header bar ctx.fillStyle = '#1a5632'; ctx.fillRect(0, 0, w, 70); ctx.fillStyle = '#fff'; ctx.font = 'bold 20px -apple-system, sans-serif'; ctx.textAlign = 'center'; ctx.fillText('Mi Reporte de Botiquín', w / 2, 45); var alta = foundInteractions.filter(ix => ix.severity === 'alta').length; var mod = foundInteractions.filter(ix => ix.severity === 'moderada').length; var baja = foundInteractions.filter(ix => ix.severity === 'baja').length; var total = foundInteractions.length; // Score circle var cx = w / 2, cy = 160, r = 50; ctx.beginPath(); ctx.arc(cx, cy, r, 0, Math.PI * 2); ctx.fillStyle = alta > 0 ? '#c62828' : mod > 0 ? '#e65100' : '#2e7d32'; ctx.fill(); ctx.fillStyle = '#fff'; ctx.font = 'bold 36px -apple-system, sans-serif'; ctx.fillText(total.toString(), cx, cy + 12); // Label ctx.fillStyle = '#555'; ctx.font = '14px -apple-system, sans-serif'; ctx.fillText('interacciones encontradas', cx, cy + r + 25); // Severity breakdown var y = 260; ctx.font = 'bold 14px -apple-system, sans-serif'; if (alta > 0) { ctx.fillStyle = '#c62828'; ctx.fillText(alta + ' severas', w / 4, y); } if (mod > 0) { ctx.fillStyle = '#e65100'; ctx.fillText(mod + ' moderadas', w / 2, y); } if (baja > 0) { ctx.fillStyle = '#1565c0'; ctx.fillText(baja + ' leves', (3 * w) / 4, y); } // Items checked ctx.fillStyle = '#888'; ctx.font = '12px -apple-system, sans-serif'; ctx.fillText(selectedHerbs.length + ' plantas · ' + selectedDrugs.length + ' medicamentos verificados', cx, 300); // Footer ctx.fillStyle = '#e2e8f0'; ctx.fillRect(0, h - 50, w, 50); ctx.fillStyle = '#22543d'; ctx.font = '12px -apple-system, sans-serif'; ctx.fillText('botanicaandina.com/herramientas/botiquin', cx, h - 20); ctx.fillStyle = '#888'; ctx.fillText('Verifica tu botiquín gratis — Botánica Andina', cx, h - 36); return canvas; } function downloadCard() { var canvas = generateCardImage(); var link = document.createElement('a'); link.download = 'mi-botiquin-reporte.png'; link.href = canvas.toDataURL('image/png'); link.click(); } function shareWhatsApp() { var alta = foundInteractions.filter(ix => ix.severity === 'alta').length; var total = foundInteractions.length; var text = '¿Sabías que tu botiquín puede tener interacciones? 🌿💊\n\n' + 'Encontré ' + total + ' interacciones potenciales' + (alta > 0 ? ' (' + alta + ' severas)' : '') + '.\n\n' + 'Verifica el tuyo gratis: https://botanicaandina.com/herramientas/botiquin/'; window.open('https://wa.me/?text=' + encodeURIComponent(text), '_blank'); } function copyLink() { navigator.clipboard.writeText('https://botanicaandina.com/herramientas/botiquin/').then(function() { event.target.textContent = '✓ Copiado'; setTimeout(function() { event.target.textContent = '🔗 Copiar enlace'; }, 2000); }); } function resetAll() { selectedHerbs = []; selectedDrugs = []; foundInteractions = []; document.getElementById('herb-tags').innerHTML = ''; document.getElementById('drug-tags').innerHTML = ''; document.getElementById('results').style.display = 'none'; document.getElementById('check-btn').disabled = true; window.scrollTo({ top: 0, behavior: 'smooth' }); }