Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
-
# ==================== Buscador de
|
|
|
|
| 2 |
|
| 3 |
# JAIRO ALEXANDER ERASO MD U Nacional de Colombia.
|
| 4 |
# DIANA MILENA SOLER MARTINEZ U Juan N. Corpas
|
|
@@ -162,7 +163,7 @@ def search_with_gemini(query, event_list):
|
|
| 162 |
|
| 163 |
# --- INTERFAZ DE USUARIO (UI) ---
|
| 164 |
|
| 165 |
-
st.title("👨⚕️ Buscador inteligente
|
| 166 |
st.markdown("Busque una enfermedad por nombre, sinónimo, código CIE-10 o CIE-11 para obtener información de notificación.")
|
| 167 |
|
| 168 |
if 'search_results' not in st.session_state:
|
|
@@ -178,7 +179,7 @@ def clear_search_state():
|
|
| 178 |
with st.form(key="search_form"):
|
| 179 |
query = st.text_input(
|
| 180 |
"Ingrese su búsqueda:",
|
| 181 |
-
placeholder="Ej:
|
| 182 |
help="Puede buscar por nombre de la enfermedad, palabras clave, o códigos CIE."
|
| 183 |
)
|
| 184 |
submitted = st.form_submit_button("Buscar", type="primary")
|
|
@@ -279,7 +280,6 @@ if st.session_state.search_results is not None:
|
|
| 279 |
else:
|
| 280 |
col2.markdown(md_string)
|
| 281 |
|
| 282 |
-
|
| 283 |
st.markdown("---")
|
| 284 |
st.subheader("Rango de Edad Permitido para Notificación")
|
| 285 |
|
|
@@ -330,4 +330,18 @@ if st.session_state.search_results is not None:
|
|
| 330 |
- **Nombre Protocolo:** `{codigo.get('NOMBRES DE PROTOCOLOS', 'N/A')}`
|
| 331 |
- **CIE-10:** `{codigo.get('CIE 10', 'N/A')}`
|
| 332 |
- **CIE-11:** `{codigo.get('CIE 11', 'N/A')}` | **Nombre CIE-11:** *{codigo.get('NOMBRES DE CIE 11', 'N/A')}*
|
| 333 |
-
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ==================== Buscador de Eventos de Notificación SIVIGILA - Colombia =====================================
|
| 2 |
+
|
| 3 |
|
| 4 |
# JAIRO ALEXANDER ERASO MD U Nacional de Colombia.
|
| 5 |
# DIANA MILENA SOLER MARTINEZ U Juan N. Corpas
|
|
|
|
| 163 |
|
| 164 |
# --- INTERFAZ DE USUARIO (UI) ---
|
| 165 |
|
| 166 |
+
st.title("👨⚕️ Buscador inteligente en Notificación SIVIGILA - Colombia")
|
| 167 |
st.markdown("Busque una enfermedad por nombre, sinónimo, código CIE-10 o CIE-11 para obtener información de notificación.")
|
| 168 |
|
| 169 |
if 'search_results' not in st.session_state:
|
|
|
|
| 179 |
with st.form(key="search_form"):
|
| 180 |
query = st.text_input(
|
| 181 |
"Ingrese su búsqueda:",
|
| 182 |
+
placeholder="Ej: Dengue, T630, mordedura de serpiente, 3MC...",
|
| 183 |
help="Puede buscar por nombre de la enfermedad, palabras clave, o códigos CIE."
|
| 184 |
)
|
| 185 |
submitted = st.form_submit_button("Buscar", type="primary")
|
|
|
|
| 280 |
else:
|
| 281 |
col2.markdown(md_string)
|
| 282 |
|
|
|
|
| 283 |
st.markdown("---")
|
| 284 |
st.subheader("Rango de Edad Permitido para Notificación")
|
| 285 |
|
|
|
|
| 330 |
- **Nombre Protocolo:** `{codigo.get('NOMBRES DE PROTOCOLOS', 'N/A')}`
|
| 331 |
- **CIE-10:** `{codigo.get('CIE 10', 'N/A')}`
|
| 332 |
- **CIE-11:** `{codigo.get('CIE 11', 'N/A')}` | **Nombre CIE-11:** *{codigo.get('NOMBRES DE CIE 11', 'N/A')}*
|
| 333 |
+
""")
|
| 334 |
+
|
| 335 |
+
# =========================================================================
|
| 336 |
+
# ========= INICIO DE LA NUEVA SECCIÓN: DEFINICIÓN DE CASO ==================
|
| 337 |
+
# =========================================================================
|
| 338 |
+
st.markdown("---")
|
| 339 |
+
definicion_de_caso = info.get("Definición de caso", "").strip()
|
| 340 |
+
|
| 341 |
+
if definicion_de_caso: # Solo se muestra si existe la definición en el JSON
|
| 342 |
+
with st.expander("📖 Ver Definición de Caso Oficial"):
|
| 343 |
+
# Se reemplaza \n por dos espacios + \n para forzar el salto de línea en Markdown
|
| 344 |
+
st.markdown(definicion_de_caso.replace('\n', ' \n'))
|
| 345 |
+
# =========================================================================
|
| 346 |
+
# ========= FIN DE LA NUEVA SECCIÓN =======================================
|
| 347 |
+
# =========================================================================
|