コード例 #1
0
     if ($encounter_obj->updateEncounterFromInternalArray($encounter_nr)) {
         header("location: aufnahme_daten_zeigen.php" . URL_REDIRECT_APPEND . "&encounter_nr={$encounter_nr}&origin=admit&target=entry&newdata={$newdata}");
         exit;
     }
 } else {
     $newdata = 1;
     /* Determine the format of the encounter number */
     if ($GLOBAL_CONFIG['encounter_nr_fullyear_prepend']) {
         $ref_nr = (int) date('Y') . $GLOBAL_CONFIG['encounter_nr_init'];
     } else {
         $ref_nr = $GLOBAL_CONFIG['encounter_nr_init'];
     }
     //echo $ref_nr;
     switch ($_POST['encounter_class_nr']) {
         case '1':
             $_POST['encounter_nr'] = $encounter_obj->getNewEncounterNr($ref_nr + $GLOBAL_CONFIG['patient_inpatient_nr_adder'], 1);
             break;
         case '2':
             $_POST['encounter_nr'] = $encounter_obj->getNewEncounterNr($ref_nr + $GLOBAL_CONFIG['patient_outpatient_nr_adder'], 2);
     }
     $_POST['encounter_date'] = date('Y-m-d H:i:s');
     $_POST['modify_id'] = $encoder;
     //$_POST['modify_time']='NULL';
     $_POST['create_id'] = $encoder;
     $_POST['create_time'] = date('YmdHis');
     $_POST['history'] = 'Create: ' . date('Y-m-d H:i:s') . ' = ' . $encoder;
     if (isset($_POST['encounter_nr'])) {
         unset($_POST['encounter_nr']);
     }
     //print_r($_POST);
     $encounter_obj->setDataArray($_POST);