2 error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
);
3 require('./roots.php');
4 require($root_path.'include/inc_environment_global.php');
6 * CARE2X Integrated Hospital Information System Deployment 2.2 - 2006-07-10
7 * GNU General Public License
8 * Copyright 2002,2003,2004,2005,2006 Elpidio Latorilla
11 * See the file "copy_notice.txt" for the licence notice
13 //define('LANG_FILE','doctors.php');
14 if($HTTP_SESSION_VARS['sess_user_origin']=='personell_admin'){
15 $local_user='aufnahme_user';
17 $local_user='ck_doctors_dienstplan_user';
19 require_once($root_path.'include/inc_front_chain_lang.php');
23 require_once($root_path.'include/care_api_classes/class_personell.php');
24 $pers_obj=new Personell
;
25 $pers_obj->useAssignmentTable();
29 $data['personell_nr']=$nr;
30 $data['role_nr']=17; // 17 = doctor (role person)
31 $data['location_type_nr']=1; // 1 = dept (location type)
32 $data['location_nr']=$dept_nr;
33 $data['date_start']=date('Y-m-d');
36 $data['modify_id']=$HTTP_SESSION_VARS['sess_user_name'];
40 $data['history']="Add: ".date('Y-m-d H:i:s')." = ".$HTTP_SESSION_VARS['sess_user_name']."\n";
41 $data['create_id']=$HTTP_SESSION_VARS['sess_user_name'];
42 $data['create_time']=date('YmdHis');
43 $pers_obj->setDataArray($data);
44 if(!$pers_obj->insertDataFromInternalArray()) echo "$obj->sql<br>$LDDbNoSave";
47 $data['history']=$pers_obj->ConcatHistory("Update: ".date('Y-m-d H:i:s')." = ".$HTTP_SESSION_VARS['sess_user_name']."\n");
48 $data['modify_id']=$HTTP_SESSION_VARS['sess_user_name'];
49 $data['modify_time']=date('YmdHis');
50 $pers_obj->setDataArray($data);
51 if(!$pers_obj->updateDataFromInternalArray($item_nr)) echo "$obj->sql<br>$LDDbNoUpdate";
54 $data['status']='deleted';
55 $data['date_end']=date('Y-m-d');
56 $data['history']=$pers_obj->ConcatHistory("Deleted: ".date('Y-m-d H:i:s')." = ".$HTTP_SESSION_VARS['sess_user_name']."\n");
57 $data['modify_id']=$HTTP_SESSION_VARS['sess_user_name'];
58 $data['modify_time']=date('YmdHis');
59 $pers_obj->setDataArray($data);
60 if(!$pers_obj->updateDataFromInternalArray($item_nr)) echo "$obj->sql<br>$LDDbNoUpdate";
62 header("location:doctors-dienst-personalliste.php".URL_REDIRECT_APPEND
."&saved=1&retpath=$retpath&ipath=$ipath&dept_nr=$dept_nr&user_origin=$user_origin&nr=$nr");