- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / appointment_scheduler / gui_bridge / default / gui_show_appointment.php
blob6b06b1b7736f092735c067a950b9601eb9a1ede1
1 <?php
2 $bgimg='tableHeader_gr.gif';
3 $tbg= 'background="'.$root_path.'gui/img/common/'.$theme_com_icon.'/'.$bgimg.'"';
4 ?>
5 <script language="">
6 <!-- Script Begin
7 function cancelAppointment(nr) {
8 if(confirm('<?php echo $LDSureCancelAppt; ?>')){
9 if(reason=prompt('<?php echo $LDEnterCancelReason; ?>','')){
10 window.location.href="<?php echo $thisfile.URL_REDIRECT_APPEND."&currYear=$currYear&currMonth=$currMonth&currDay=$currDay&target=$target&mode=appt_cancel&nr="; ?>"+nr+"&reason="+reason;
14 function checkApptDate(d,e,n){
15 fg=false;
16 if(d=="<?php echo date('Y-m-d'); ?>"){
17 fg=true;
18 }else{
19 if (confirm("<?php echo $LDAppointNotToday.'\n'.$LDSureAdmitAppoint; ?>")){
20 fg=true;
23 if(fg){
24 window.location.href="<?php echo $root_path.'modules/registration_admission/aufnahme_start.php'.URL_REDIRECT_APPEND; ?>&pid=<?php echo $HTTP_SESSION_VARS['sess_pid'] ?>&origin=patreg_reg&encounter_class_nr="+e+"&appt_nr="+n;
28 // Script End -->
29 </script>
31 <table border=0 cellpadding=3 cellspacing=1 width=100%>
32 <tr class="wardlisttitlerow">
33 <td <?php echo $tbg; ?>><FONT SIZE=-1 FACE="Arial" color="#000066"><?php echo "$LDDate/$LDTime/$LDDetails"; ?></td>
34 <td <?php echo $tbg; ?>><FONT SIZE=-1 FACE="Arial" color="#000066"><?php echo $LDPatient; ?></td>
35 <td <?php echo $tbg; ?>><FONT SIZE=-1 FACE="Arial" color="#000066"><?php echo $LDAppointments; ?></td>
36 <td <?php echo $tbg; ?> colspan=2><FONT SIZE=-1 FACE="Arial" color="#000066"><?php echo $LDStatus; ?></td>
37 </tr>
38 <?php
39 $toggle=0;
40 /* Get department info */
41 while($row=$result->FetchRow()){
42 if(($row['urgency']==7)&&($row['appt_status']=='pending')){
43 $bgc='hilite';
44 }else{
45 if($toggle) $bgc='wardlistrow2';
46 else $bgc='wardlistrow1';
48 $toggle=!$toggle;
49 $dept=$dept_obj->getDeptAllInfo($row['to_dept_nr']);
50 if($row['appt_status']=='cancelled') $tc='#9f9f9f';
51 else $tc='';
54 <tr class="<?php echo $bgc; ?>" >
55 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>"><?php echo @formatDate2Local($row['date'],$date_format); ?></td>
56 <td rowspan=4 valign="top"><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>"><font color="<?php if(empty($tc)) echo '#0000cc'; else echo $tc; ?>"><b>
57 <a href="<?php echo $root_path.'modules/registration_admission/patient_register_show.php'.URL_APPEND.'&pid='.$row['pid']; ?>" title="<?php echo "$LDRegistration: $LDClk2Show" ?>">
58 <?php
59 echo ucfirst($row['name_last']).'</b></font>, '.ucfirst($row['name_first']).'<br>';
60 echo @formatDate2Local($row['date_birth'],$date_format);
62 if($row['death_date']&&$row['death_date']!=DBF_NODATE){
63 echo '&nbsp;<img '.createComIcon($root_path,'blackcross_sm.gif','0','',TRUE).'>&nbsp;'.@formatDate2Local($row['death_date'],$date_format).'</font>';
66 echo '<br>';
67 # Show sex icons
68 switch($row['sex']){
69 case 'f': echo '<img '.$img_female.'>'; break;
70 case 'm': echo '<img '.$img_male.'>'; break;
71 default: echo '&nbsp;'; break;
74 </a>
75 </td>
76 <td rowspan=4 valign="top"><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
77 <?php
78 echo nl2br($row['purpose']);
79 if($row['appt_status']=='cancelled'){
80 echo '<br>______________________<br>'.$LDCancelReason.'<br>'.nl2br($row['cancel_reason']);
83 </td>
84 <td><FONT SIZE=1 FACE="Arial" color="<?php echo $tc; ?>">
85 <?php
86 if($row['appt_status']!='cancelled'){
87 if($row['appt_status']=='done'){
88 $urg_img='check-r.gif';
89 }else{
90 $urg_img='level_'.$row['urgency'].'.gif';
92 echo '<img '.createComIcon($root_path,$urg_img,'0','absmiddle',TRUE).'>';
94 <?php
95 if($row['appt_status']=='done' && $row['encounter_nr']){
96 echo '<a href="'.$root_path.'modules/registration_admission/aufnahme_daten_zeigen.php'.URL_APPEND.'&encounter_nr='.$row['encounter_nr'].'&origin=appt&target='.$target.'">'.$row['encounter_nr'].'</a>';
98 }else{
99 echo '&nbsp;';
103 </td>
104 <td rowspan=4 valign="top">
105 <?php
106 if($row['appt_status']=='pending'){
107 if(!$row['death_date']||$row['death_date']==DBF_NODATE){
109 <a href="<?php echo $editorfile.URL_APPEND.'&pid='.$row['pid'].'&target=&mode=select&nr='.$row['nr']; ?>"><img <?php echo createLDImgSrc($root_path,'edit_sm.gif','0'); ?>></a> <br>
110 <!-- <a href="<?php echo $root_path.'modules/registration_admission/aufnahme_start.php'.URL_APPEND; ?>&pid=<?php echo $row['pid'] ?>&origin=patreg_reg&encounter_class_nr=<?php echo $row['encounter_class_nr']; ?>&appt_nr=<?php echo $row['nr']; ?>"><img <?php echo createLDImgSrc($root_path,'admit_sm.gif','0'); ?>></a> <br>
111 --> <a href="javascript:checkApptDate('<?php echo $row['date'] ?>','<?php echo $row['encounter_class_nr'] ?>','<?php echo $row['nr'] ?>' )"><img <?php echo createLDImgSrc($root_path,'admit_sm.gif','0'); ?>></a> <br>
113 <?php
116 <a href="javascript:cancelAppointment(<?php echo $row['nr']; ?>)"><img <?php echo createLDImgSrc($root_path,'cancel_sm.gif','0'); ?>></a>
117 <?php
118 }else{
119 echo '&nbsp;';
122 </td>
123 </tr>
124 <tr class="<?php echo $bgc; ?>" >
125 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>"><?php echo $row['time']; ?></td>
126 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
127 <?php
128 $buffer='LD'.$row['appt_status'];
129 if(isset($$buffer)&&!empty($$buffer)) echo $$buffer; else echo $row['appt_status'];
131 </td>
132 </tr>
133 <tr class="<?php echo $bgc; ?>" >
134 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
135 <?php
136 if(isset($$dept['LD_var'])&&!empty($$dept['LD_var'])) echo $$dept['LD_var'];
137 else echo $dept['name_formal'];
138 ?></td>
139 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
140 <?php
141 if($row['remind']&&$row['appt_status']=='pending'){
142 if($row['remind_email']) echo '<img '.createComIcon($root_path,'email.gif','0','',TRUE).'> ';
143 if($row['remind_mail']) echo '<img '.createComIcon($root_path,'print.gif','0','',TRUE).'> ';
144 if($row['remind_phone']) echo '<img '.createComIcon($root_path,'violet_phone_2.gif','0','',TRUE).'> ';
146 ?></td>
147 </tr>
148 <tr class="<?php echo $bgc; ?>" >
149 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>"><?php echo $row['to_personell_name']; ?></td>
150 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
151 <?php
152 $buf=$enc_class[$row['encounter_class_nr']]['LD_var'];
153 if (isset($$buf)&&!empty($$buf)) echo $$buf;
154 else echo $enc_class[$row['encounter_class_nr']]['name'];
156 </td>
157 </tr>
159 <?php
162 </table>