Fix: corregir cuenta de parámetros en INSERT cultivos
This commit is contained in:
+2
-2
@@ -269,9 +269,9 @@ app.put('/api/state', (req, res) => {
|
||||
}
|
||||
|
||||
if (state.cultivos?.length) {
|
||||
const stmt = db.prepare('INSERT INTO cultivos (id, pacienteId, internacionId, fechaToma, protocolo, tipoMuestra, observaciones, estado, fechaResultado, germen, sensible, resistente) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
|
||||
const stmt = db.prepare('INSERT INTO cultivos (id, pacienteId, internacionId, fechaToma, protocolo, tipoMuestra, observaciones, estado, fechaResultado, germen, sensible, resistente) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)');
|
||||
for (const c of state.cultivos) {
|
||||
stmt.run(c.id, c.pacienteId, c.internacionId, c.fechaToma, c.protocolo, c.tipoMuestra, c.observaciones, c.estado, c.fechaResultado, c.germen, c.sensible, c.resistente);
|
||||
stmt.run(c.id, c.pacienteId, c.internacionId || null, c.fechaToma || null, c.protocolo || null, c.tipoMuestra || null, c.observaciones || null, c.estado || null, c.fechaResultado || null, c.germen || null, c.sensible || null, c.resistente || null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1462,7 +1462,7 @@ function SeccionAcidosBase({ ab, patientId, add, update, del }: {
|
||||
<div className="bg-gray-50 p-2 rounded text-center"><p className="text-xs text-gray-500">BE</p><p className="font-bold">{a.be}</p></div>
|
||||
<div className="bg-gray-50 p-2 rounded text-center"><p className="text-xs text-gray-500">SatO2</p><p className="font-bold">{a.sato2}%</p></div>
|
||||
{a.lactato && <div className="bg-gray-50 p-2 rounded text-center"><p className="text-xs text-gray-500">Lactato</p><p className="font-bold">{a.lactato}</p></div>}
|
||||
{a.fio2 && <div className="bg-gray-50 p-2 rounded text-center"><p className="text-xs text-gray-500">FiO2</p><p className="font-bold">{a.fio2}%</p></div>}
|
||||
{a.fio2 && <div className="bg-gray-50 p-2 rounded text-center"><p className="text-xs text-gray-500">FiO2</p><p className="font-bold">{a.fio2}</p></div>}
|
||||
</div>
|
||||
{a.interpretacion && <div className="bg-teal-50 p-3 rounded-lg border border-teal-200"><p className="text-sm font-medium text-teal-800">Interpretación: {a.interpretacion}</p></div>}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user