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.2 - 2006-07-10 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 define('LANG_FILE','aufnahme.php');
12 $local_user='medocs_user';
13 require_once($root_path.'include/inc_front_chain_lang.php');
14 require_once($root_path.'include/care_api_classes/class_encounter.php');
15 require_once($root_path.'include/care_api_classes/class_person.php');
16 require_once($root_path.'include/care_api_classes/class_insurance.php');
17 require_once($root_path.'include/care_api_classes/class_ward.php');
18 require_once($root_path.'include/care_api_classes/class_globalconfig.php');
20 $GLOBAL_CONFIG=array();
22 $encounter_obj=new Encounter($encounter_nr);
23 $person_obj=new Person();
24 $insurance_obj=new Insurance
;
26 $glob_obj=new GlobalConfig($GLOBAL_CONFIG);
28 $thisfile='aufnahme_daten_zeigen.php';
29 $breakfile='aufnahme_pass.php?sid='.$sid.'&lang='.$lang;
31 /* Get the patient global configs */
32 $glob_obj->getConfig('patient_%');
33 $glob_obj->getConfig('person_foto_path');
35 $updatefile='aufnahme_start.php';
37 /* Default path for fotos. Make sure that this directory exists! */
38 $default_photo_path=$root_path.'fotos/registration';
39 $photo_filename='nopic';
41 $dbtable='care_encounter';
43 /* Establish db connection */
44 if(!isset($db) ||
!$db) include_once($root_path.'include/inc_db_makelink.php');
47 /* $sql='SELECT * FROM '.$dbtable.' AS enc LEFT JOIN care_person AS reg ON reg.pid = enc.pid
48 WHERE enc.encounter_nr="'.$encounter_nr.'"';
50 if($ergebnis=$db->Execute($sql)) {
51 if($ergebnis->RecordCount()) {
52 $encounter=$ergebnis->FetchRow();
53 while(list($x,$v)=each($encounter)) $$x=$v;
56 if(!empty($GLOBAL_CONFIG['patient_financial_class_single_result'])) $encounter_obj->setSingleResult(true);
58 if(!$GLOBAL_CONFIG['patient_service_care_hide']){
59 /* Get the care service classes*/
60 $care_service=$encounter_obj->AllCareServiceClassesObject();
62 if($buff=&$encounter_obj->CareServiceClass()){
63 $care_class=$buff->FetchRow();
64 while(list($x,$v)=each($care_class)) $
$x=$v;
68 if(!$GLOBAL_CONFIG['patient_service_room_hide']){
69 /* Get the room service classes */
70 $room_service=$encounter_obj->AllRoomServiceClassesObject();
72 if($buff=&$encounter_obj->RoomServiceClass()){
73 $room_class=$buff->FetchRow();
74 while(list($x,$v)=each($room_class)) $
$x=$v;
78 if(!$GLOBAL_CONFIG['patient_service_att_dr_hide']){
79 /* Get the attending doctor service classes */
80 $att_dr_service=$encounter_obj->AllAttDrServiceClassesObject();
82 if($buff=&$encounter_obj->AttDrServiceClass()){
83 $att_dr_class=$buff->FetchRow();
84 while(list($x,$v)=each($att_dr_class)) $
$x=$v;
89 $encounter_obj->loadEncounterData();
90 if($encounter_obj->is_loaded
) {
91 $row=&$encounter_obj->encounter
;
93 while(list($x,$v)=each($row)) $
$x=$v;
95 $insurance_class=&$encounter_obj->getInsuranceClassInfo($insurance_class_nr);
96 $encounter_class=&$encounter_obj->getEncounterClassInfo($encounter_class_nr);
98 //if($data_obj=&$person_obj->getAllInfoObject($pid))
99 $list='title,name_first,name_last,name_2,name_3,name_middle,name_maiden,name_others,date_birth,
100 sex,addr_str,addr_str_nr,addr_zip,addr_citytown_nr,photo_filename';
102 $person_obj->setPID($pid);
103 if($row=&$person_obj->getValueByList($list))
105 while(list($x,$v)=each($row)) $
$x=$v;
108 $addr_citytown_name=$person_obj->CityTownName($addr_citytown_nr);
109 $encoder=$encounter_obj->RecordModifierID();
112 include_once($root_path.'include/inc_date_format_functions.php');
115 if(!$newdata) $encounter_obj->setHistorySeen($HTTP_SESSION_VARS['sess_user_name'],$encounter_nr);
116 /* Get insurance firm name*/
117 $insurance_firm_name=$insurance_obj->getFirmName($insurance_firm_id);
119 $current_ward_name=$ward_obj->WardName($current_ward_nr);
120 /* Check whether config path exists, else use default path */
121 $photo_path = (is_dir($root_path.$GLOBAL_CONFIG['person_foto_path'])) ?
$GLOBAL_CONFIG['person_foto_path'] : $default_photo_path;
123 echo "$LDDbNoLink<br>";
126 /* Prepare text and resolve the numbers */
127 require_once($root_path.'include/inc_patient_encounter_type.php');
129 if(!session_is_registered('sess_parent_mod')) session_register('sess_parent_mod');
131 /* Save encounter nrs to session */
132 $HTTP_SESSION_VARS['sess_pid']=$pid;
133 $HTTP_SESSION_VARS['sess_en']=$encounter_nr;
134 $HTTP_SESSION_VARS['sess_full_en']=$full_en;
135 $HTTP_SESSION_VARS['sess_parent_mod']='admission';
137 /* Prepare the photo filename */
138 require_once($root_path.'include/inc_photo_filename_resolve.php');
140 /* Load the GUI page */
141 require('./gui_bridge/default/gui_patient_encounter_showdata.php');