- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / medocs / include / init_show.php
blob63df09262fb4a291bc73794e27bc0a956dff10a7
1 <?php
2 $lang_tables[]='prompt.php';
3 define('LANG_FILE','aufnahme.php');
4 # Resolve the local user based on the origin of the script
5 if($HTTP_SESSION_VARS['sess_user_origin']=='admission') {
6 $breakfile=$root_path.'modules/registration_admission/aufnahme_daten_zeigen.php'.URL_APPEND.'&encounter_nr='.$HTTP_SESSION_VARS['sess_en'];
7 $local_user='aufnahme_user';
8 }elseif($HTTP_SESSION_VARS['sess_user_origin']=='registration'){
9 $breakfile=$root_path.'modules/registration_admission/patient_register_show.php'.URL_APPEND.'&pid='.$HTTP_SESSION_VARS['sess_pid'];
10 $local_user='aufnahme_user';
11 }else{
12 $breakfile='medocs_pass.php';
13 $local_user='medocs_user';
16 require_once($root_path.'include/inc_front_chain_lang.php');
17 require_once($root_path.'include/inc_date_format_functions.php');
18 require_once($root_path.'include/care_api_classes/class_person.php');
20 $admissionfile='aufnahme_start.php'.URL_APPEND;
22 if((!isset($pid)||!$pid)&&$HTTP_SESSION_VARS['sess_pid']) $pid=$HTTP_SESSION_VARS['sess_pid'];
23 elseif($pid) $HTTP_SESSION_VARS['sess_pid']=$pid;
25 //$HTTP_SESSION_VARS['sess_path_referer']=$top_dir.$thisfile;
26 //$HTPP_SESSION_VARS['sess_pid']=$pid;
28 /* Default path for fotos. Make sure that this directory exists! */
29 $default_photo_path=$root_path.'fotos/registration';
30 $photo_filename='nopic';
32 if(!isset($user_id) || !$user_id)
34 $user_id=$local_user.$sid;
35 $user_id=$$user_id;
38 if(isset($pid) && ($pid!='')) {
39 $person_obj=new Person($pid);
42 if($data_obj=&$person_obj->getAllInfoObject()){
43 $zeile=$data_obj->FetchRow();
45 while(list($x,$v)=each($zeile)) $$x=$v;
49 $sql='SELECT * FROM care_appointment WHERE pid='.$pid;
51 if($result=$db->Execute($sql)){
52 $row=$result->RecordCount();
56 require_once($root_path.'include/care_api_classes/class_globalconfig.php');
57 $glob_obj=new GlobalConfig($GLOBAL_CONFIG);
58 $glob_obj->getConfig('person_%');
59 $glob_obj->getConfig('patient_%');
61 /* Check whether config foto path exists, else use default path */
62 $photo_path = (is_dir($root_path.$GLOBAL_CONFIG['person_foto_path'])) ? $GLOBAL_CONFIG['person_foto_path'] : $default_photo_path;
63 require_once($root_path.'include/inc_photo_filename_resolve.php');
65 if($HTTP_SESSION_VARS['sess_parent_mod']=='admission') {
66 $parent_admit=true;
67 $page_title=$LDAdmission;
68 }else{
69 $parent_admit=false;
70 $page_title=$LDPatientRegister;