diff --git a/api/lab/save_tomas_config.php b/api/lab/save_tomas_config.php
index 06fb5cc..8383d86 100644
--- a/api/lab/save_tomas_config.php
+++ b/api/lab/save_tomas_config.php
@@ -85,10 +85,10 @@ if ($action === 'add_exam') {
$sepLabel = "$examName · {$h12}:{$mm} {$ampm}";
}
- $sepId = $prefix . 's' . $idx . $uid;
- $horaId = $prefix . 'h' . $idx . $uid;
- $resId = $prefix . 'r' . $idx . $uid;
- $firmaId = $prefix . 'f' . $idx . $uid;
+ $sepId = $prefix . 's' . $idx . $uid;
+ $horaId = $prefix . 'h' . $idx . $uid;
+ $obsId = $prefix . 'o' . $idx . $uid;
+ $firmaId = $prefix . 'f' . $idx . $uid;
$esquema[] = [
'id' => $sepId,
@@ -96,28 +96,9 @@ if ($action === 'add_exam') {
'label' => $sepLabel,
'condicion'=> ['campo_id' => $condCampoId, 'valores' => [$examName]],
];
- $esquema[] = [
- 'id' => $horaId,
- 'tipo' => 'hora',
- 'label' => 'Hora de toma',
- ];
- $esquema[] = [
- 'id' => $resId,
- 'tipo' => 'numero',
- 'label' => 'Resultado',
- ];
- $esquema[] = [
- 'id' => $prefix . 'o' . $idx . $uid,
- 'tipo' => 'texto',
- 'label' => 'Observaciones',
- 'placeholder' => '',
- 'required' => false,
- ];
- $esquema[] = [
- 'id' => $firmaId,
- 'tipo' => 'firma_profesional',
- 'label' => 'Firma del profesional',
- ];
+ $esquema[] = ['id' => $horaId, 'tipo' => 'hora', 'label' => 'Hora de toma'];
+ $esquema[] = ['id' => $obsId, 'tipo' => 'texto', 'label' => 'Observaciones', 'placeholder' => '', 'required' => false];
+ $esquema[] = ['id' => $firmaId, 'tipo' => 'firma_profesional', 'label' => 'Firma del profesional'];
}
$db->getConnection()->prepare(
diff --git a/ver_formulario_enviado.php b/ver_formulario_enviado.php
index aec04d1..0ab22b0 100644
--- a/ver_formulario_enviado.php
+++ b/ver_formulario_enviado.php
@@ -305,7 +305,12 @@ if ($modoTurnero && $embebido && $_soloFirmaPro) {
if (is_array($__rawCfg)) {
$_tomasConfig = $__rawCfg;
foreach ($_mpGroups as $__gk => &$__gsecs) {
- if (!isset($_tomasConfig[$__gk])) continue;
+ if (!isset($_tomasConfig[$__gk])) {
+ // Grupo no configurado: ocultar sus secciones y vaciarlo del mapa
+ foreach ($__gsecs as $__s) { $_mpSkippedSepIds[$__s['sep_id']] = true; }
+ $__gsecs = [];
+ continue;
+ }
$__allowed = array_flip($_tomasConfig[$__gk]);
foreach ($__gsecs as $__s) {
if (!isset($__allowed[$__s['firma']])) {
@@ -369,6 +374,7 @@ function esc2(mixed $v): string {
function _addExamWizardHtml(string $cid): string {
return '
+