- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / registration_admission / gui_bridge / default / gui_show_sick_confirm.php
blob3cf703f668a7632e8d60b455e61f9a103c778a38
1 <script language="JavaScript">
2 <!-- Script Begin
3 function printForm() {
4 urlholder="print_sick_confirm.php?sid=<?php echo "$sid&lang=$lang&dept_nr=$dept_nr&get_nr=$get_nr" ?>";
5 drgwin_<?php echo $sid ?>=window.open(urlholder,"drgwin_<?php echo $sid ?>","width=600,height=650,menubar=no,resizable=yes,scrollbars=yes");
6 //window.drgwin_<?php echo $sid ?>.moveTo(100,100);
8 // Script End -->
9 </script>
10 <?php
11 # Prepare some values for the template
12 if($insurance){
13 $TP_enc_insurance_name=$insurance['name'];
14 $TP_enc_insurance_nr=$insurance['insurance_nr'];
15 $TP_enc_insurance_subarea=$insurance['sub_area'];
18 # Extract the confirmation record for display
19 if($get_nr){
20 $sickconfirm=$single_obj->FetchRow();
21 }elseif(is_object($sickconfirm_obj)){
22 $sickconfirm=$sickconfirm_obj->FetchRow();
25 # Take over the dept number
26 $dept_nr=$sickconfirm['dept_nr'];
28 $TP_insco_1='AOK';
29 $TP_insco_2='BKK';
30 $TP_insco_3='KKH';
31 $TP_insco_4='TKK';
32 $TP_insco_5='HKH';
33 $TP_insco_6='BGG';
36 $TP_date_birth=formatDate2Local($date_birth,$date_format);
37 $TP_care_logo=createLogo($root_path,'care_logo.gif','0','right','','nodim','25');
38 # Signature stamp of the department
39 $TP_dept_sigstamp=nl2br($sickconfirm['sig_stamp']);
40 $TP_width='';
41 # Logo of the department
42 $logobuff=$root_path.'gui/img/logos_dept/dept_'.$dept_nr.'.'.$sickconfirm['logo_mime_type'];
43 if(file_exists($logobuff)){
44 $TP_dept_logo=$logobuff;
45 # Check the logo dimensions
46 $logosize=GetImageSize($logobuff);
47 # If height > $logo_ht_limit, use limit
48 if($logosize[1]>$logo_ht_limit) $TP_height='height='.$logo_ht_limit;
49 else $TP_height='height='.$logosize[1];
50 }else{
51 $TP_dept_logo=$root_path.'gui/img/common/default/pixel.gif'; # Else output a transparent pixel
54 $TP_date_end=formatDate2Local($sickconfirm['date_end'],$date_format);
55 $TP_date_start=formatDate2Local($sickconfirm['date_start'],$date_format);
56 $TP_date_confirm=formatDate2Local($sickconfirm['date_confirm'],$date_format);
58 $TP_href_des='';
59 $TP_href_dss='';
60 $TP_href_dcs='';
61 $TP_href_end='';
62 $TP_img_calendar='';
63 $TP_date_format='';
66 $TP_diagnosis=nl2br($sickconfirm['diagnosis']);
68 # Get the address of the hospital from the global config table
69 $glob_obj->getConfig('main_info_address');
70 $TP_main_address=nl2br($GLOBAL_CONFIG['main_info_address']);
72 # Load the template
73 $TP_sickform=&$TP_obj->load('registration_admission/tp_show_sick_confirm.htm');
74 # Show the print button
75 echo '<a href="javascript:printForm(\''.$sickconfirm['nr'].'\')"><img '.createLDImgSrc($root_path,'printout.gif','0').'></a>';
76 # Output template
77 eval("echo $TP_sickform;");
79 # If more than 1 record available, list the remaining
80 if($rows>1){
82 # Initialize template variable for the next templates
83 $TP_tb_header='';
84 $TP_tb_row='';
86 $toggle=false;
87 # List the remaining confirmation records if any
89 while($other_row=$sickconfirm_obj->FetchRow()){
91 if($toggle) $TP_bgcolor='#fdfdfd';
92 else $TP_bgcolor='#ffffff';
93 $toggle=!$toggle;
95 if($other_row['nr']==$get_nr) continue;
96 # If still empty, load and show the table header row.
97 if($TP_tb_header==''){
98 $TP_tb_header=$TP_obj->load('registration_admission/tp_show_sick_confirm_tb_header.htm');
99 eval("echo $TP_tb_header;");
101 # Prepare the confim date & diagnosis and href url and dept name
102 $TP_date_confirm=formatDate2Local($other_row['date_confirm'],$date_format);
103 $TP_diagnosis=nl2br($other_row['diagnosis']);
104 $TP_href=$thisfile.URL_APPEND.'&get_nr='.$other_row['nr'].'&dept_nr='.$dept_nr;
105 if(isset($$other_row['LD_var'])&&!empty($$other_row['LD_var'])) $TP_dept_name=$$other_row['LD_var'];
106 else $TP_dept_name=$other_row['name_formal'];
107 # Load item row template if still empty
108 if($TP_tb_row==''){
109 $TP_tb_row=$TP_obj->load('registration_admission/tp_show_sick_confirm_tb_row.htm');
111 eval("echo $TP_tb_row;");
113 echo '</table>';
116 if(!$is_discharged){
120 <form method="post" name="newform" action="<?php echo $thisfile; ?>">
121 <img <?php echo createComIcon($root_path,'bul_arrowgrnlrg.gif','0','absmiddle'); ?>>
122 <?php echo $LDCreateNewForm; ?>
123 <select name="dept_nr">
124 <option value=""></option>
125 <?php
126 while(list($x,$v)=each($dept_med)){
127 echo '<option value="'.$v['nr'].'" ';
128 if($v['nr']==$dept_nr) echo 'selected';
129 echo '>';
130 if(isset($$v['LD_var'])&&$$v['LD_var']) echo $$v['LD_var'];
131 else echo $v['name_formal'];
132 echo '</option>
136 </select>
137 <input type="hidden" name="sid" value="<?php echo $sid; ?>">
138 <input type="hidden" name="lang" value="<?php echo $lang; ?>">
139 <input type="hidden" name="encounter_nr" value="<?php echo $HTTP_SESSION_VARS['sess_en']; ?>">
140 <input type="hidden" name="pid" value="<?php echo $HTTP_SESSION_VARS['sess_pid']; ?>">
141 <input type="hidden" name="mode" value="new">
142 <input type="hidden" name="target" value="<?php echo $target; ?>">
143 <!-- <input type="submit" <?php echo createLDImgSrc($root_path,'ok.gif','0','absmiddle'); ?> >
145 <input type="submit" value="go">
146 </form>
147 <?php