$data['dept_nr'] = $dept_nr; $data['parameters'] = $paramlist; $data['doctor_sign'] = $doctor_sign; $data['highrisk'] = $_highrisk_; $data['notes'] = $notes; $data['sample_time'] = $sample_time; $data['sample_weekday'] = $sday; $data['status'] = $status; $data['history'] = "CONCAT(history,'Update: " . date('Y-m-d H:i:s') . " = " . $_SESSION['sess_user_name'] . "\n')"; $data['is_disabled'] = $is_disabled; $data['modify_id'] = $_SESSION['sess_user_name']; $data['modify_time'] = date('Y-m-d H:i:s'); $data['priority'] = $urgency; $diag_obj->setDataArray($data); $diag_obj->setWhereCond(" batch_nr={$batch_nr}"); if ($diag_obj->updateDataFromInternalArray($batch_nr)) { // Load the visual signalling functions include_once $root_path . 'include/inc_visual_signalling_fx.php'; // Set the visual signal setEventSignalColor($pn, SIGNAL_COLOR_DIAGNOSTICS_REQUEST); header("location:" . $root_path . "modules/laboratory/labor_test_request_aftersave.php" . URL_REDIRECT_APPEND . "&edit=" . $edit . "&saved=update&pn=" . $pn . "&station=" . $station . "&user_origin=" . $user_origin . "&status=" . $status . "&target=chemlabor&batch_nr=" . $batch_nr . "&noresize=" . $noresize); exit; } else { echo "Woops: <p>{$sql}<p>{$LDDbNoSave}"; $mode = ""; } } //end of prepareTestElements() break; // end of case 'save' /* If mode is edit, get the stored test request when its status is either "pending" or "draft"