From 2ef98aaea58505c84f2ad965acd0b1288399ce20 Mon Sep 17 00:00:00 2001 From: Sergio Nicolas Lavaise Date: Thu, 16 Apr 2026 13:40:05 -0300 Subject: [PATCH] =?UTF-8?q?Parser:=20fallback=20buscar=20valor=20por=20nom?= =?UTF-8?q?bre=20de=20par=C3=A1metro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sections/HistoriaClinica.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sections/HistoriaClinica.tsx b/src/sections/HistoriaClinica.tsx index 77cc198..fb4e0f4 100644 --- a/src/sections/HistoriaClinica.tsx +++ b/src/sections/HistoriaClinica.tsx @@ -727,8 +727,10 @@ for (const linea of lineas) { for (const [clave, info] of Object.entries(mapeoParametros)) { if (lineaLower.includes(clave)) { - // buscar primer número puro después de show_chart - const match = linea.match(/show_chart.*?(\d+\.?\d*)/); + let match = linea.match(/show_chart.*?(\d+\.?\d*)/); + if (!match) { + match = linea.match(new RegExp(clave + '.*?(\\d+\\.?\\d*)')); + } if (match && match[1]) { const valor = parseFloat(match[1].replace(',', '.')); if (!isNaN(valor) && valor > 0 && valor < 1000) {