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 Information System Deployment 2.1 - 2004-10-02 for Hospitals and Health Care Organizations and Services
7 Copyright (C) 2002,2003,2004,2005 Elpidio Latorilla & Intellin.org
9 GNU GPL. For details read file "copy_notice.txt".
11 $lang_tables=array('personell.php');
12 define('LANG_FILE','aufnahme.php');
13 $local_user='aufnahme_user';
14 require_once($root_path.'include/inc_front_chain_lang.php');
15 require_once($root_path.'include/care_api_classes/class_personell.php');
16 //require_once($root_path.'include/care_api_classes/class_person.php');
17 //require_once($root_path.'include/care_api_classes/class_insurance.php');
18 //require_once($root_path.'include/care_api_classes/class_ward.php');
19 require_once($root_path.'include/care_api_classes/class_globalconfig.php');
21 $GLOBAL_CONFIG=array();
23 $thisfile=basename(__FILE__
);
24 if($HTTP_COOKIE_VARS['ck_login_logged'.$sid]) $breakfile=$root_path.'main/spediens.php'.URL_APPEND
;
25 else $breakfile='personell_admin_pass.php'.URL_APPEND
.'&target='.$target;
27 $personell_obj=new Personell();
28 //$person_obj=new Person();
29 //$insurance_obj=new Insurance;
31 /* Get the personell global configs */
32 $glob_obj=new GlobalConfig($GLOBAL_CONFIG);
33 $glob_obj->getConfig('personell_%');
34 $glob_obj->getConfig('person_foto_path');
36 $updatefile='personell_register.php';
38 /* Default path for fotos. Make sure that this directory exists! */
39 $default_photo_path=$root_path.'fotos/registration';
40 $photo_filename='nopic';
42 #Check whether the origin is phone directory and if session personnel nr. is ok
43 if($HTTP_SESSION_VARS['sess_user_origin']=='phonedir'&&$HTTP_SESSION_VARS['sess_personell_nr']){
44 $personell_nr=$HTTP_SESSION_VARS['sess_personell_nr'];
46 $HTTP_SESSION_VARS['sess_personell_nr']=$personell_nr;
49 //if(!empty($GLOBAL_CONFIG['patient_financial_class_single_result'])) $encounter_obj->setSingleResult(true);
50 $personell_obj->loadPersonellData($personell_nr);
51 if($personell_obj->is_loaded
) {
52 $row=&$personell_obj->personell_data
;
55 //while(list($x,$v)=each($row)) {$$x=$v;}
58 //$insurance_class=&$encounter_obj->getInsuranceClassInfo($insurance_class_nr);
59 //$encounter_class=&$encounter_obj->getEncounterClassInfo($encounter_class_nr);
61 //if($data_obj=&$person_obj->getAllInfoObject($pid))
62 /* $list='title,name_first,name_last,name_2,name_3,name_middle,name_maiden,name_others,date_birth,
63 sex,addr_str,addr_str_nr,addr_zip,addr_citytown_nr,photo_filename';
65 $person_obj->setPID($pid);
66 if($row=&$person_obj->getValueByList($list))
68 while(list($x,$v)=each($row)) $$x=$v;
71 $addr_citytown_name=$person_obj->CityTownName($addr_citytown_nr);
72 $encoder=$encounter_obj->RecordModifierID();
75 include_once($root_path.'include/inc_date_format_functions.php');
78 //if(!$newdata) $encounter_obj->setHistorySeen($HTTP_SESSION_VARS['sess_user_name'],$encounter_nr);
79 /* Get insurance firm name*/
80 //$insurance_firm_name=$insurance_obj->getFirmName($insurance_firm_id);
82 //$current_ward_name=$ward_obj->WardName($current_ward_nr);
83 /* Check whether config path exists, else use default path */
84 $photo_path = (is_dir($root_path.$GLOBAL_CONFIG['person_foto_path'])) ?
$GLOBAL_CONFIG['person_foto_path'] : $default_photo_path;
87 /* Prepare text and resolve the numbers */
88 require_once($root_path.'include/inc_patient_encounter_type.php');
90 if(!session_is_registered('sess_parent_mod')) session_register('sess_parent_mod');
91 if(!session_is_registered('sess_user_origin')) session_register('sess_user_origin');
93 /* Save encounter nrs to session */
94 $HTTP_SESSION_VARS['sess_pid']=$pid;
95 //$HTTP_SESSION_VARS['sess_en']=$encounter_nr;
96 //$HTTP_SESSION_VARS['sess_full_en']=$full_en;
97 $HTTP_SESSION_VARS['sess_parent_mod']='admission';
98 $HTTP_SESSION_VARS['sess_pnr']=$personell_nr;
99 //$full_pnr=$personell_nr+$GLOBAL_CONFIG['personell_nr_adder'];
100 $full_pnr=$personell_nr;
101 $HTTP_SESSION_VARS['sess_full_pnr']=$full_pnr;
102 $HTTP_SESSION_VARS['sess_user_origin']='personell_admin';
104 /* Prepare the photo filename */
105 require_once($root_path.'include/inc_photo_filename_resolve.php');
107 /* Load the GUI page */
108 require('./gui_bridge/default/gui_'.$thisfile);