- 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_appointment.php
blob3c034e6827db12d74af70bf6caa61c726ca7d256
1 <?php
2 if($parent_admit) $bgimg='tableHeaderbg3.gif';
3 else $bgimg='tableHeader_gr.gif';
4 $tbg= 'background="'.$root_path.'gui/img/common/'.$theme_com_icon.'/'.$bgimg.'"';
6 # Prepare the encounter classes into an array
7 if(is_object($encounter_classes)){
8 while($ec_row=$encounter_classes->FetchRow()) $enc_class[$ec_row['class_nr']]=$ec_row;
12 <script language="javascript">
13 <!-- Script Begin
14 function cancelAppointment(nr) {
15 if(confirm('<?php echo $LDSureCancelAppt; ?>')){
16 if(reason=prompt('<?php echo $LDEnterCancelReason; ?>','')){
17 window.location.href="<?php echo $thisfile.URL_REDIRECT_APPEND.'&pid='.$HTTP_SESSION_VARS['sess_pid'].'&target='.$target.'&mode=appt_cancel&nr='; ?>"+nr+"&reason="+reason;
21 function checkApptDate(d,e,n){
22 fg=false;
23 if(d=="<?php echo date('Y-m-d'); ?>"){
24 fg=true;
25 }else{
26 if (confirm("<?php echo $LDAppointNotToday.'\n'.$LDSureAdmitAppoint; ?>")){
27 fg=true;
30 if(fg){
31 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;
34 // Script End -->
35 </script>
37 <table border=0 cellpadding=3 cellspacing=1 width=100% class="frame">
38 <tr class="reg_list_titlebar">
39 <td><?php echo "$LDDate/$LDTime/$LDDetails"; ?></td>
40 <td><?php echo $LDAppointments; ?></td>
41 <td colspan=2><?php echo $LDStatus; ?></td>
42 </tr>
43 <?php
44 $toggle=0;
45 /* Get department info */
46 while($row=$result->FetchRow()){
47 if(($row['urgency']==7)&&($row['appt_status']=='pending')){
48 $bgc='hilite';
49 }else{
50 if($toggle) $bgc='wardlistrow2';
51 else $bgc='wardlistrow1';
53 $toggle=!$toggle;
54 $dept=$dept_obj->getDeptAllInfo($row['to_dept_nr']);
55 if($row['appt_status']=='cancelled') $tc='#9f9f9f';
56 else $tc='#000000';
59 <tr class="<?php echo $bgc; ?>" >
60 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>"><?php echo @formatDate2Local($row['date'],$date_format); ?></td>
61 <td rowspan=4 valign="top"><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
62 <?php
63 echo nl2br($row['purpose']);
64 if($row['appt_status']=='cancelled'){
65 echo '<br>______________________<br>'.$LDCancelReason.'<br>'.nl2br($row['cancel_reason']);
68 </td>
69 <td><FONT SIZE=1 FACE="Arial" color="<?php echo $tc; ?>">
70 <?php
71 if($row['appt_status']!='cancelled'){
72 if($row['appt_status']=='done'){
73 $urg_img='check-r.gif';
74 }else{
75 $urg_img='level_'.$row['urgency'].'.gif';
77 echo '<img '.createComIcon($root_path,$urg_img,'0','absmiddle',TRUE).'>';
79 <?php
80 if($row['appt_status']=='done' && $row['encounter_nr']){
81 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>';
83 }else{
84 echo '&nbsp;';
86 ?>
87 </td>
88 <td rowspan=4>
89 <?php
90 if($row['appt_status']=='pending'){
91 if(!$death_date||$death_date==$dbf_nodate){
93 <a href="<?php echo $thisfile.URL_APPEND.'&pid='.$HTTP_SESSION_VARS['sess_pid'].'&target='.$target.'&mode=select&nr='.$row['nr']; ?>"><img <?php echo createLDImgSrc($root_path,'edit_sm.gif','0'); ?>></a> <br>
94 <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>
95 <?php
98 <a href="javascript:cancelAppointment(<?php echo $row['nr']; ?>)"><img <?php echo createLDImgSrc($root_path,'cancel_sm.gif','0'); ?>></a>
99 <?php
100 }else{
101 echo '&nbsp;';
104 </td>
105 </tr>
107 <tr class="<?php echo $bgc; ?>" >
108 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>"><?php echo $row['time']; ?></td>
109 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
110 <?php
111 $buffer='LD'.$row['appt_status'];
112 if(isset($$buffer)&&!empty($$buffer)) echo $$buffer; else echo $row['appt_status'];
114 </td>
115 </tr>
116 <tr class="<?php echo $bgc; ?>" >
117 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
118 <?php
119 if(isset($$dept['LD_var'])&&!empty($$dept['LD_var'])) echo $$dept['LD_var'];
120 else echo $dept['name_formal'];
121 ?></td>
122 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
123 <?php
124 if($row['remind']&&$row['appt_status']=='pending'){
125 if($row['remind_email']) echo '<img '.createComIcon($root_path,'email.gif','0','',TRUE).'> ';
126 if($row['remind_mail']) echo '<img '.createComIcon($root_path,'print.gif','0','',TRUE).'> ';
127 if($row['remind_phone']) echo '<img '.createComIcon($root_path,'violet_phone_2.gif','0','',TRUE).'> ';
129 ?></td>
130 </tr>
131 <tr class="<?php echo $bgc; ?>" >
132 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>"><?php echo $row['to_personell_name']; ?></td>
133 <td><FONT SIZE=-1 FACE="Arial" color="<?php echo $tc; ?>">
134 <?php
135 $buf=$enc_class[$row['encounter_class_nr']]['LD_var'];
136 if (isset($$buf)&&!empty($$buf)) echo $$buf;
137 else echo $enc_class[$row['encounter_class_nr']]['name'];
140 &nbsp;
141 </td>
142 </tr>
144 <?php
147 </table>
148 <?php
150 if(!$death_date||$death_date == DBF_NODATE){
152 <img <?php echo createComIcon($root_path,'bul_arrowgrnlrg.gif','0','absmiddle',TRUE); ?>>
153 <a href="<?php echo $thisfile.URL_APPEND.'&pid='.$HTTP_SESSION_VARS['sess_pid'].'&target='.$target.'&mode=new'; ?>">
154 <?php echo $LDScheduleNewAppointment; ?>
155 </a>
156 <?php