1 <script language
="JavaScript">
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);
11 # Prepare some values for the template
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
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'];
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']);
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];
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);
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']);
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>';
77 eval("echo $TP_sickform;");
79 # If more than 1 record available, list the remaining
82 # Initialize template variable for the next templates
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';
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
109 $TP_tb_row=$TP_obj->load('registration_admission/tp_show_sick_confirm_tb_row.htm');
111 eval("echo $TP_tb_row;");
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
>
126 while(list($x,$v)=each($dept_med)){
127 echo '<option value="'.$v['nr'].'" ';
128 if($v['nr']==$dept_nr) echo 'selected';
130 if(isset($
$v['LD_var'])&&$
$v['LD_var']) echo $
$v['LD_var'];
131 else echo $v['name_formal'];
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">