예제 #1
0
{
    return preg_replace("/[^[:alnum:]+]/", "_", $wild);
}
if (isset($mode) && !empty($mode)) {
    if ($mode == 'save') {
        # Save the nr
        if (empty($_POST['status'])) {
            $_POST['status'] = ' ';
        }
        $_POST['modify_id'] = $_SESSION['sess_user_name'];
        $_POST['id'] = "_" . cleanString(strtolower($_POST['name'])) . '__' . strtolower($_POST['group_id']);
        $_POST['history'] = $lab_obj->ConcatHistory("Update " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n");
        # Set to use the test params
        $lab_obj->useTestParams();
        # Point to the data array
        $lab_obj->setDataArray($_POST);
        if ($lab_obj->updateDataFromInternalArray($_POST['nr'])) {
            $item_no = $pres_obj->GetItemIDByNumber('LAB' . $_POST['nr']);
            $das_obj->updateLabTest($item_no, $_POST);
            if ($lab_obj->deleteParamType($_POST['id'])) {
                if (!empty($_POST['field_type']) && !empty($_POST['input_value'])) {
                    //i'm dealing with a drop down
                    if ($_POST['field_type'] == 'drop_down') {
                        $value_type = explode(";", $_POST['input_value']);
                        $lab_obj->useTestParamsType();
                        foreach ($value_type as $arrNr => $value) {
                            $tmp_array['input_value'] = $value;
                            $tmp_array['param_id'] = $_POST['id'];
                            $lab_obj->insertDataFromArray($tmp_array);
                        }
                        //i'm dealing with ranged values
예제 #2
0
     $dbuf['test_date'] = date('Y-m-d');
 }
 $lab_obj_sub->deleteOldValues($batch_nr, $encounter_nr);
 foreach ($nbuf as $key => $value) {
     if (isset($value) && !empty($value)) {
         $parsedParamList['test_date'] = date('Y-m-d');
         $parsedParamList['batch_nr'] = $batch_nr;
         $parsedParamList['job_id'] = $job_id;
         $parsedParamList['encounter_nr'] = $encounter_nr;
         $parsedParamList['paramater_name'] = $key;
         $parsedParamList['parameter_value'] = $value;
         $parsedParamList['test_time'] = date('H:i:s');
         $parsedParamList['history'] = "Create " . date('Y-m-d H:i:s') . " " . $_SESSION['sess_user_name'] . "\n";
         $parsedParamList['create_id'] = $_SESSION['sess_user_name'];
         $parsedParamList['create_time'] = date('YmdHis');
         $lab_obj_sub->setDataArray($parsedParamList);
         if ($lab_obj_sub->insertDataFromInternalArray()) {
             echo $lab_obj_sub->insertDataFromInternalArray();
             $saved = TRUE;
             $lab_obj->getLastQuery();
         } else {
             echo "<p>" . $lab_obj->getLastQuery() . "{$LDDbNoSave}";
         }
     }
 }
 # If save successful, jump to display values
 if ($saved) {
     include_once $root_path . 'include/inc_visual_signalling_fx.php';
     # Set the visual signal
     setEventSignalColor($encounter_nr, SIGNAL_COLOR_DIAGNOSTICS_REPORT);
     //header("location:$thisfile?sid=$sid&lang=$lang&saved=1&batch_nr=$batch_nr&encounter_nr=$encounter_nr&job_id=$job_id&parameterselect=$parameterselect&allow_update=1&user_origin=$user_origin&tickerror=$tickerror");