Spaces:
Running
Running
Update index.html
Browse files- index.html +119 -152
index.html
CHANGED
|
@@ -5,179 +5,146 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
<title>Algoritmo DM2 – Guía Clínica</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
-
<link
|
| 9 |
-
rel="stylesheet"
|
| 10 |
-
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
|
| 11 |
-
/>
|
| 12 |
-
<link
|
| 13 |
-
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap"
|
| 14 |
-
rel="stylesheet"
|
| 15 |
-
/>
|
| 16 |
-
<style>
|
| 17 |
-
body {
|
| 18 |
-
background-color: #f8fafc;
|
| 19 |
-
font-family: "Montserrat", sans-serif;
|
| 20 |
-
}
|
| 21 |
-
.custom-select {
|
| 22 |
-
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
| 23 |
-
background-position: right 0.5rem center;
|
| 24 |
-
background-repeat: no-repeat;
|
| 25 |
-
background-size: 1.5em 1.5em;
|
| 26 |
-
-webkit-appearance: none;
|
| 27 |
-
-moz-appearance: none;
|
| 28 |
-
appearance: none;
|
| 29 |
-
padding-right: 2.5rem;
|
| 30 |
-
width: 100%;
|
| 31 |
-
padding-top: 0.5rem;
|
| 32 |
-
padding-bottom: 0.5rem;
|
| 33 |
-
padding-left: 0.75rem;
|
| 34 |
-
border-radius: 0.375rem;
|
| 35 |
-
border: 1px solid #d1d5db;
|
| 36 |
-
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
| 37 |
-
transition: border-color 0.2s, box-shadow 0.2s;
|
| 38 |
-
font-size: 0.875rem;
|
| 39 |
-
line-height: 1.25rem;
|
| 40 |
-
}
|
| 41 |
-
.custom-select:focus {
|
| 42 |
-
outline: none;
|
| 43 |
-
border-color: #3b82f6;
|
| 44 |
-
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
|
| 45 |
-
}
|
| 46 |
-
#algo-display {
|
| 47 |
-
background-color: white;
|
| 48 |
-
border: 1px solid #e5e7eb;
|
| 49 |
-
border-radius: 0.5rem;
|
| 50 |
-
padding: 1.5rem;
|
| 51 |
-
margin-top: 1rem;
|
| 52 |
-
min-height: 300px;
|
| 53 |
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
|
| 54 |
-
overflow-y: auto;
|
| 55 |
-
line-height: 1.6;
|
| 56 |
-
}
|
| 57 |
-
</style>
|
| 58 |
</head>
|
| 59 |
-
<body class="min-h-screen
|
| 60 |
-
<
|
| 61 |
-
<
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
<
|
| 75 |
-
|
| 76 |
-
for="conditionSelector"
|
| 77 |
-
class="block text-xs font-medium text-gray-600 mb-1"
|
| 78 |
-
>Condición clínica predominante (prioritario)</label
|
| 79 |
-
>
|
| 80 |
-
<select id="conditionSelector" class="custom-select text-sm">
|
| 81 |
-
<option value="">-- Ninguna / No aplica --</option>
|
| 82 |
-
<option value="ECV">Enfermedad cardiovascular (ASCVD)</option>
|
| 83 |
-
<option value="IC">Insuficiencia cardiaca</option>
|
| 84 |
-
<option value="ERC">Enfermedad renal crónica</option>
|
| 85 |
-
<option value="RCV">Elevado riesgo cardiovascular (≥3 FRCV)</option>
|
| 86 |
-
<option value="OB">Obesidad (IMC >35 kg/m<sup>2</sup>)</option>
|
| 87 |
-
<option value="FR">Fragilidad geriátrica</option>
|
| 88 |
-
</select>
|
| 89 |
-
</div>
|
| 90 |
-
|
| 91 |
-
<!-- Control glucémico -->
|
| 92 |
-
<div>
|
| 93 |
-
<label
|
| 94 |
-
for="controlSelector"
|
| 95 |
-
class="block text-xs font-medium text-gray-600 mb-1"
|
| 96 |
-
>Grado de control glucémico (HbA1c / GME)</label
|
| 97 |
-
>
|
| 98 |
-
<select id="controlSelector" class="custom-select text-sm">
|
| 99 |
-
<option value="<7">HbA1c <7 % (<154 mg/dl)</option>
|
| 100 |
-
<option value="7-9">HbA1c 7–9 % (154‑212 mg/dl)</option>
|
| 101 |
-
<option value=">9">HbA1c >9 % (>212 mg/dl)</option>
|
| 102 |
-
<option value="SYM">Hiperglucemia sintomática</option>
|
| 103 |
-
</select>
|
| 104 |
-
</div>
|
| 105 |
</div>
|
| 106 |
|
| 107 |
-
<!--
|
| 108 |
-
<div id="
|
| 109 |
-
<
|
| 110 |
-
|
| 111 |
-
<p>Seleccione una situación clínica y el grado de control.</p>
|
| 112 |
-
</div>
|
| 113 |
</div>
|
| 114 |
|
| 115 |
-
<!--
|
| 116 |
-
<div class="
|
| 117 |
-
<
|
| 118 |
-
|
| 119 |
-
target="_blank"
|
| 120 |
-
class="text-sm text-pink-700 hover:underline"
|
| 121 |
-
><i class="fas fa-file-pdf mr-1"></i>Ver algoritmo completo (PDF)</a
|
| 122 |
-
>
|
| 123 |
</div>
|
| 124 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
|
|
|
| 126 |
<script type="module">
|
| 127 |
-
|
| 128 |
-
const
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
};
|
| 142 |
|
| 143 |
-
const
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
"Inicie <span class=\"font-semibold\">terapia dual</span>: Metformina + otro ADNI según perfil (iSGLT2, arGLP‑1, iDPP‑4, pioglitazona o SU).",
|
| 148 |
-
">9":
|
| 149 |
-
"Considere <span class=\"font-semibold\">terapia triple</span> o <span class=\"font-semibold\">insulinización basal</span> si HbA1c >9 % pese a doble terapia.",
|
| 150 |
-
"SYM":
|
| 151 |
-
"Ante síntomas cardinales (poliuria, polidipsia, pérdida de peso), inicie <span class=\"font-semibold\">insulina</span> ± metformina y añada arGLP‑1 o iSGLT2 según tolerancia."
|
| 152 |
};
|
| 153 |
|
| 154 |
-
const
|
| 155 |
-
|
| 156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
|
| 158 |
-
function
|
| 159 |
-
const
|
| 160 |
-
const
|
| 161 |
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
|
| 167 |
-
|
| 168 |
-
html += `<h2 class='text-base font-bold mb-2 text-pink-700'><i class='fas fa-vials mr-2'></i>Manejo según HbA1c / GME</h2><p>${controlMap[ctrl]}</p>`;
|
| 169 |
-
}
|
| 170 |
|
| 171 |
-
if (
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
|
| 176 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
}
|
| 178 |
|
| 179 |
-
|
| 180 |
-
|
|
|
|
|
|
|
|
|
|
| 181 |
</script>
|
| 182 |
</body>
|
| 183 |
</html>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
<title>Algoritmo DM2 – Guía Clínica</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
</head>
|
| 9 |
+
<body class="bg-gray-100 text-gray-800 min-h-screen flex flex-col p-4 md:p-6 lg:p-10">
|
| 10 |
+
<header class="mb-6 text-center">
|
| 11 |
+
<h1 class="text-3xl md:text-4xl font-bold mb-2">Algoritmo Terapéutico de la Diabetes Tipo 2 (redGDPS 2023)</h1>
|
| 12 |
+
<p class="text-sm md:text-base text-gray-600">Seleccione la condición clínica predominante o el rango de HbA1c para ver la recomendación.</p>
|
| 13 |
+
</header>
|
| 14 |
+
|
| 15 |
+
<!-- Controles de selección -->
|
| 16 |
+
<section
|
| 17 |
+
class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-8 bg-white p-4 rounded-2xl shadow-sm">
|
| 18 |
+
<div>
|
| 19 |
+
<label for="condicion" class="block mb-1 font-medium">Condición clínica predominante</label>
|
| 20 |
+
<select id="condicion" class="w-full rounded-lg border-gray-300 p-2">
|
| 21 |
+
<option value="ninguna">Ninguna / No prioritaria</option>
|
| 22 |
+
<option value="ecv">Enfermedad Cardiovascular (ECV)</option>
|
| 23 |
+
<option value="ic">Insuficiencia Cardiaca (IC)</option>
|
| 24 |
+
<option value="erc">Enfermedad Renal Crónica (ERC)</option>
|
| 25 |
+
<option value="obesidad">Obesidad</option>
|
| 26 |
+
<option value="fragilidad">Fragilidad</option>
|
| 27 |
+
</select>
|
| 28 |
</div>
|
| 29 |
+
<div>
|
| 30 |
+
<label for="hba1c" class="block mb-1 font-medium">HbA1c (o GME equivalente)</label>
|
| 31 |
+
<select id="hba1c" class="w-full rounded-lg border-gray-300 p-2">
|
| 32 |
+
<option value="<7">< 7 % (GME < 153 mg/dl)</option>
|
| 33 |
+
<option value="7-9">7 – 9 % (GME 153‑212 mg/dl)</option>
|
| 34 |
+
<option value=">9">> 9 % (GME > 212 mg/dl)</option>
|
| 35 |
+
</select>
|
| 36 |
+
</div>
|
| 37 |
+
</section>
|
| 38 |
|
| 39 |
+
<!-- Resultados -->
|
| 40 |
+
<section class="space-y-6">
|
| 41 |
+
<!-- Resultado por condición -->
|
| 42 |
+
<div id="resultado-condicion" class="hidden bg-white rounded-2xl shadow p-4">
|
| 43 |
+
<h2 class="text-xl font-semibold mb-2 flex items-center"><span class="mr-2">📋</span>Manejo según condición clínica</h2>
|
| 44 |
+
<p id="texto-condicion" class="leading-relaxed"></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
</div>
|
| 46 |
|
| 47 |
+
<!-- Resultado por HbA1c -->
|
| 48 |
+
<div id="resultado-hba1c" class="hidden bg-white rounded-2xl shadow p-4">
|
| 49 |
+
<h2 class="text-xl font-semibold mb-2 flex items-center"><span class="mr-2">🩸</span>Manejo según HbA1c</h2>
|
| 50 |
+
<p id="texto-hba1c" class="leading-relaxed"></p>
|
|
|
|
|
|
|
| 51 |
</div>
|
| 52 |
|
| 53 |
+
<!-- NUEVO: Familias farmacológicas recomendadas -->
|
| 54 |
+
<div id="resultado-familias" class="hidden bg-white rounded-2xl shadow p-4">
|
| 55 |
+
<h2 class="text-xl font-semibold mb-2 flex items-center"><span class="mr-2">💊</span>Fármacos recomendados</h2>
|
| 56 |
+
<ul id="lista-familias" class="list-disc list-inside space-y-1"></ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
</div>
|
| 58 |
+
</section>
|
| 59 |
+
|
| 60 |
+
<!-- Enlace al PDF original -->
|
| 61 |
+
<footer class="mt-auto pt-6 text-center text-sm text-gray-500">
|
| 62 |
+
<a href="Algoritmo_DM2_ESP_2023.pdf" target="_blank" class="underline">Ver PDF completo del algoritmo</a>
|
| 63 |
+
</footer>
|
| 64 |
|
| 65 |
+
<!-- Lógica embebida -->
|
| 66 |
<script type="module">
|
| 67 |
+
const condicionSelect = document.getElementById('condicion');
|
| 68 |
+
const hba1cSelect = document.getElementById('hba1c');
|
| 69 |
+
|
| 70 |
+
const resCond = document.getElementById('resultado-condicion');
|
| 71 |
+
const resHbA1c = document.getElementById('resultado-hba1c');
|
| 72 |
+
const resFamilias = document.getElementById('resultado-familias');
|
| 73 |
+
|
| 74 |
+
const txtCond = document.getElementById('texto-condicion');
|
| 75 |
+
const txtHbA1c = document.getElementById('texto-hba1c');
|
| 76 |
+
const listaFamilias = document.getElementById('lista-familias');
|
| 77 |
+
|
| 78 |
+
/* Mapas simplificados → puedes refinar con tu criterio clínico */
|
| 79 |
+
const manejoCondicion = {
|
| 80 |
+
ecv: 'Priorizar SGLT2‑i o GLP‑1 RA con evidencia cardiovascular.',
|
| 81 |
+
ic: 'Iniciar/añadir SGLT2‑i. Ajustar diuréticos/IECA según IC.',
|
| 82 |
+
erc: 'Priorizar SGLT2‑i con beneficio renal. Ajustar dosis según FG.',
|
| 83 |
+
obesidad: 'Añadir o intensificar GLP‑1 RA; considerar cirugía bariátrica.',
|
| 84 |
+
fragilidad: 'Preferir iDPP‑4 o insulinas basales de acción larga con bajo riesgo de hipoglucemia.',
|
| 85 |
+
ninguna: '',
|
| 86 |
};
|
| 87 |
|
| 88 |
+
const manejoHbA1c = {
|
| 89 |
+
'<7': 'Continuar estilo de vida + Metformina en monoterapia. Revisar cada 3‑6 meses.',
|
| 90 |
+
'7-9': 'Escalada a doble terapia: Metformina + (SGLT2‑i, GLP‑1 RA o iDPP‑4 según profile).',
|
| 91 |
+
'>9': 'Considerar triple terapia o insulinización basal si síntomas. Educación intensiva.',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
};
|
| 93 |
|
| 94 |
+
const familiasPorClave = {
|
| 95 |
+
ecv: ['SGLT2‑i', 'GLP‑1 RA'],
|
| 96 |
+
ic: ['SGLT2‑i'],
|
| 97 |
+
erc: ['SGLT2‑i'],
|
| 98 |
+
obesidad: ['GLP‑1 RA'],
|
| 99 |
+
fragilidad: ['iDPP‑4', 'Insulina basal (dosis baja)'],
|
| 100 |
+
'<7': ['Metformina'],
|
| 101 |
+
'7-9': ['Metformina', 'SGLT2‑i', 'GLP‑1 RA', 'iDPP‑4'],
|
| 102 |
+
'>9': ['Metformina', 'Insulina basal', 'GLP‑1 RA', 'SGLT2‑i'],
|
| 103 |
+
};
|
| 104 |
|
| 105 |
+
function actualizar() {
|
| 106 |
+
const condicion = condicionSelect.value;
|
| 107 |
+
const hba1c = hba1cSelect.value;
|
| 108 |
|
| 109 |
+
// Reset visibilidad
|
| 110 |
+
resCond.classList.add('hidden');
|
| 111 |
+
resHbA1c.classList.add('hidden');
|
| 112 |
+
resFamilias.classList.add('hidden');
|
| 113 |
|
| 114 |
+
listaFamilias.innerHTML = '';
|
|
|
|
|
|
|
| 115 |
|
| 116 |
+
if (condicion !== 'ninguna') {
|
| 117 |
+
// Mostrar manejo por condición
|
| 118 |
+
txtCond.textContent = manejoCondicion[condicion] ?? '';
|
| 119 |
+
resCond.classList.remove('hidden');
|
| 120 |
+
|
| 121 |
+
// Familias según condición
|
| 122 |
+
(familiasPorClave[condicion] ?? []).forEach(fam => {
|
| 123 |
+
const li = document.createElement('li');
|
| 124 |
+
li.textContent = fam;
|
| 125 |
+
listaFamilias.appendChild(li);
|
| 126 |
+
});
|
| 127 |
+
if (listaFamilias.childElementCount) resFamilias.classList.remove('hidden');
|
| 128 |
+
} else {
|
| 129 |
+
// Mostrar manejo por HbA1c
|
| 130 |
+
txtHbA1c.textContent = manejoHbA1c[hba1c] ?? '';
|
| 131 |
+
resHbA1c.classList.remove('hidden');
|
| 132 |
|
| 133 |
+
// Familias según HbA1c
|
| 134 |
+
(familiasPorClave[hba1c] ?? []).forEach(fam => {
|
| 135 |
+
const li = document.createElement('li');
|
| 136 |
+
li.textContent = fam;
|
| 137 |
+
listaFamilias.appendChild(li);
|
| 138 |
+
});
|
| 139 |
+
if (listaFamilias.childElementCount) resFamilias.classList.remove('hidden');
|
| 140 |
+
}
|
| 141 |
}
|
| 142 |
|
| 143 |
+
condicionSelect.addEventListener('change', actualizar);
|
| 144 |
+
hba1cSelect.addEventListener('change', actualizar);
|
| 145 |
+
|
| 146 |
+
// Inicializar
|
| 147 |
+
actualizar();
|
| 148 |
</script>
|
| 149 |
</body>
|
| 150 |
</html>
|