- modules/fotolab updated imagej to current version & some cod fixes to make it work
[care2x.git] / Care2007 / modules / registration_admission / gui_bridge / default / gui_person_reg_archive.php
blobd9aebba9153826d8ae76d6e908145f9d67183133
1 <?php
3 require('./gui_bridge/default/gui_std_tags.php');
5 function createTR($input_name, $ld_text, $input_val, $colspan = 2, $input_size = 35)
8 ?>
10 <tr>
11 <td class="reg_item"><?php echo $ld_text ?>:
12 </td>
13 <td colspan=<?php echo $colspan; ?> class="reg_input"><input name="<?php echo $input_name; ?>" type="text" size="<?php echo $input_size; ?>" value="<?php if(isset($input_val)) echo $input_val; ?>">
14 </td>
15 </tr>
17 <?php
20 # Start buffering
22 ob_start();
26 <script language="javascript">
27 <!--
28 function popSearchWin(target,obj_val,obj_name) {
29 urlholder="./data_search.php<?php echo URL_REDIRECT_APPEND; ?>&target="+target+"&obj_val="+obj_val+"&obj_name="+obj_name;
30 DSWIN<?php echo $sid ?>=window.open(urlholder,"wblabel<?php echo $sid ?>","menubar=no,width=400,height=550,resizable=yes,scrollbars=yes");
33 <?php require($root_path.'include/inc_checkdate_lang.php'); ?>
35 -->
36 </script>
37 <?php
39 $sTemp = ob_get_contents();
41 $smarty->append('JavaScript',$sTemp);
43 # Empty the buffer variable
44 $sTemp = '';
46 /* Create the tabs */
47 $tab_bot_line='#66ee66';
48 require('./gui_bridge/default/gui_tabs_patreg.php');
50 if(isset($mode)&&($mode=='search'||$mode=='paginate')){
52 if(defined('SHOW_SEARCH_QUERY')&&SHOW_SEARCH_QUERY) echo $LDSearchKeyword.': '.$s2;
55 <table border=0>
56 <tr>
57 <td><img <?php echo createMascot($root_path,'mascot1_r.gif','0','bottom') ?> align="absmiddle"></td>
58 <td class="prompt">
59 <b>
60 <?php if($rows) echo str_replace("~nr~",$totalcount,$LDFoundData).' '.$LDShowing.' '.$pagen->BlockStartNr().' '.$LDTo.' '.$pagen->BlockEndNr().'.'; else echo str_replace('~nr~','0',$LDSearchFound); ?></b></td>
61 </tr>
62 </table>
64 <?php
68 <?php
70 if(isset($rows)&&$rows) {
74 <table border=0 cellpadding=0 cellspacing=0>
75 <tr class="reg_list_titlebar">
76 <td><b>
77 <?php
78 if($oitem=='sex') $flag=TRUE;
79 else $flag=FALSE;
80 echo $pagen->SortLink($LDSex,'sex',$odir,$flag);
81 ?></b></td>
82 <td><b>
83 <?php
84 if($oitem=='name_last') $flag=TRUE;
85 else $flag=FALSE;
86 echo $pagen->SortLink($LDLastName,'name_last',$odir,$flag);
87 ?></b></td>
88 <td><b>
89 <?php
90 if($oitem=='name_first') $flag=TRUE;
91 else $flag=FALSE;
92 echo $pagen->SortLink($LDFirstName,'name_first',$odir,$flag);
93 ?></b></td>
94 <td><b>
95 <?php
96 if($oitem=='date_birth') $flag=TRUE;
97 else $flag=FALSE;
98 echo $pagen->SortLink($LDBday,'date_birth',$odir,$flag);
99 ?></b></td>
100 <td align='center'><b>
101 <?php
102 if($oitem=='addr_zip') $flag=TRUE;
103 else $flag=FALSE;
104 echo $pagen->SortLink($LDZipCode,'addr_zip',$odir,$flag);
106 ?></b></td>
107 <td><b>
108 <?php
109 if($oitem=='pid') $flag=TRUE;
110 else $flag=FALSE;
111 echo $pagen->SortLink($LDRegistryNr,'pid',$odir,$flag);
112 ?></b></td>
113 <td><b>
114 <?php
115 if($oitem=='date_reg') $flag=TRUE;
116 else $flag=FALSE;
117 echo $pagen->SortLink($LDRegDate,'date_reg',$odir,$flag);
118 ?></b></td>
119 </tr>
120 <?php
121 # Load common icons
122 $img_arrow=createComIcon($root_path,'r_arrowgrnsm.gif','0');
123 $img_male=createComIcon($root_path,'spm.gif','0');
124 $img_female=createComIcon($root_path,'spf.gif','0');
126 $toggle=0;
127 while($result=$ergebnis->FetchRow()){
128 if($result['status']==''||$result['status']=='normal'){
130 echo'
131 <tr ';
132 if($toggle){
133 //echo "bgcolor=#efefef";
134 echo 'class="wardlistrow2"';
135 $toggle=0;
136 } else {
137 //echo "bgcolor=#ffffff";
138 echo 'class="wardlistrow1"';
139 $toggle=1;
141 $buf='patient_register_show.php'.URL_APPEND.'&origin=archive&pid='.$result['pid'].'&target=archiv';
142 echo '>
143 <td>&nbsp; &nbsp;<a href="'.$buf.'" title="'.$LDClk2Show.'">';
145 switch($result['sex']){
146 case 'f': echo '<img '.$img_female.'>'; break;
147 case 'm': echo '<img '.$img_male.'>'; break;
148 default: echo '&nbsp;'; break;
151 echo '</a></td>
152 <td>&nbsp; <a href="'.$buf.'" title="'.$LDClk2Show.'">'.$result['name_last'].'</a></td>
153 <td>&nbsp; &nbsp;<a href="'.$buf.'" title="'.$LDClk2Show.'">'.$result['name_first'].'</a>';
155 # If person is dead show a black cross
156 if($result['death_date']&&$result['death_date']!=$dbf_nodate) echo '&nbsp;<img '.createComIcon($root_path,'blackcross_sm.gif','0','absmiddle').'>';
158 echo '</td>
159 <td>&nbsp; &nbsp;'.@formatDate2Local($result['date_birth'],$date_format).'</td>
160 <td align=right>&nbsp; &nbsp;'.$result['addr_zip'].'</td>
161 <td align=right>&nbsp; &nbsp;'.$result['pid'].'</td>
162 <td align=right>&nbsp; &nbsp;<a href="'.$buf.'" title="'.$LDClk2Show.'">'.@formatDate2Local($result['date_reg'],$date_format).'</a></td>
163 </tr>
164 <tr>
165 <td colspan=8 height=1 class="thinrow_vspacer"><img src="../../gui/img/common/default/pixel.gif" border=0 width=1 height=1></td>
166 </tr>';
171 echo '
172 <tr><td colspan=6>'.$pagen->makePrevLink($LDPrevious).'</td>
173 <td align=right>'.$pagen->makeNextLink($LDNext).'</td>
174 </tr>';
176 </table>
179 <form method="post" action="patient_register_archive.php" >
180 <input type="hidden" name="sid" value="<?php echo $sid ?>">
181 <input type="hidden" name="lang" value="<?php echo $lang ?>">
182 <input type="hidden" name="mode" value="?">
183 <input type="submit" value="<?php echo $LDAdvancedSearch ?>" >
184 </form>
186 <?php
188 else
192 <form method="post" action="<?php echo $thisfile; ?>" name="aufnahmeform">
194 <table border=0 cellspacing=0 cellpadding=0>
196 <?php
197 if(!isset($pid)) $pid='';
198 createTR('pid', $LDAdmitNr,$pid);
199 if(!isset($user_id)) $user_id='';
200 createTR( 'user_id', $LDRegBy,$user_id);
203 <tr>
204 <td class="reg_item"><?php echo $LDRegDate ?>:
205 </td>
206 <td class="reg_input">
207 <?php
208 //gjergji : new calendar
209 require_once ('../../js/jscalendar/calendar.php');
210 $calendar = new DHTML_Calendar('../../js/jscalendar/', $lang, 'calendar-system', true);
211 $calendar->load_files();
214 if(!empty($date_start))
215 echo $calendar->show_calendar($calendar,$date_format,'date_start',$date_start);
216 else
217 echo $calendar->show_calendar($calendar,$date_format,'date_start');
218 //end : gjergji
220 </td>
221 <td class="reg_input"><nobr><?php echo $LDTo ?>:
222 <?php
223 //gjergji : new calendar
224 if(!empty($date_end))
225 echo $calendar->show_calendar($calendar,$date_format,'date_end',$date_end);
226 else
227 echo $calendar->show_calendar($calendar,$date_format,'date_end');
228 //end : gjergji
230 </nobr></td>
231 </tr>
234 <?php
235 if(!isset($name_last)) $name_last='';
236 if(!isset($name_first)) $name_first='';
237 createTR('name_last', $LDLastName,$name_last);
238 createTR( 'name_first', $LDFirstName,$name_first);
240 if (!$GLOBAL_CONFIG['person_name_2_hide'])
242 if(!isset($name_2)) $name_2='';
243 createTR('name_2', $LDName2,$name_2);
246 if (!$GLOBAL_CONFIG['person_name_3_hide'])
248 if(!isset($name_3)) $name_3='';
249 createTR('name_3', $LDName3,$name_3);
252 if (!$GLOBAL_CONFIG['person_name_middle_hide'])
254 if(!isset($name_middle)) $name_middle='';
255 createTR('name_middle', $LDNameMid,$name_middle);
258 if (!$GLOBAL_CONFIG['person_name_maiden_hide'])
260 if(!isset($name_maiden)) $name_maiden='';
261 createTR('name_maiden', $LDNameMaiden,$name_maiden);
264 if (!$GLOBAL_CONFIG['person_name_others_hide'])
266 if(!isset($name_others)) $name_others='';
267 createTR('name_others', $LDNameOthers,$name_others);
270 if(!isset($date_birth)) $date_birth='';
271 if(!isset($addr_str)) $addr_str='';
272 if(!isset($addr_str_nr)) $addr_str_nr='';
273 if(!isset($addr_zip)) $addr_zip='';
274 if(!isset($addr_city_town)) $addr_city_town='';
277 <tr>
278 <td class="reg_item"><?php echo $LDBday ?>:
279 </td>
280 <td class="reg_input">
281 <?php
282 //gjergji : new calendar
283 if(!empty($date_birth))
284 echo $calendar->show_calendar($calendar,$date_format,'date_birth',$date_birth);
285 else
286 echo $calendar->show_calendar($calendar,$date_format,'date_birth');
287 //end : gjergji
289 </td>
290 <td colspan=2 class="reg_input"><?php echo $LDSex ?>: <input name="sex" type="radio" value="m"><?php echo $LDMale ?>&nbsp;&nbsp;
291 <input name="sex" type="radio" value="f"><?php echo $LDFemale ?>
292 </td>
293 </tr>
295 <tr>
296 <td class="reg_item"><?php echo $LDCivilStatus ?>:
297 </td>
298 <td colspan=2 class="reg_input"> <input name="civil_status" type="radio" value="single"><?php echo $LDSingle ?>&nbsp;&nbsp;
299 <input name="civil_status" type="radio" value="married"><?php echo $LDMarried ?>
300 <input name="civil_status" type="radio" value="divorced"><?php echo $LDDivorced ?>&nbsp;&nbsp;
301 <input name="civil_status" type="radio" value="widowed"><?php echo $LDWidowed ?>
302 <input name="civil_status" type="radio" value="separated"><?php echo $LDSeparated ?>&nbsp;&nbsp;
303 </td>
304 </tr>
306 <tr>
307 <td colspan=3><?php echo $LDAddress ?>:
308 </td>
310 </tr>
312 <tr>
313 <td class="reg_item"><?php echo $LDStreet ?>:
314 </td>
315 <td class="reg_input"><input name="addr_str" type="text" size="35" value="<?php if(isset($addr_str)) echo $addr_str; ?>">
316 </td>
317 <td class="reg_input">&nbsp;&nbsp;&nbsp;<?php if (isset($errorstreetnr)&&$errorstreetnr) echo "<font color=red>"; ?><?php echo $LDStreetNr ?>:<input name="addr_str_nr" type="text" size="10" value="<?php echo $addr_str_nr; ?>">
318 </td>
319 </tr>
321 <tr>
322 <td class="reg_item"><?php echo $LDTownCity ?>:
323 </td>
324 <td class="reg_input"><input name="addr_citytown_name" type="text" size="35" value="<?php if(isset($addr_citytown_name)) echo $addr_citytown_name; ?>">
325 <a href="javascript:popSearchWin('citytown','aufnahmeform.addr_citytown_nr','aufnahmeform.addr_citytown_name')"><img <?php echo createComIcon($root_path,'l-arrowgrnlrg.gif','0') ?>></a>
326 </td>
327 <td class="reg_input">&nbsp;&nbsp;&nbsp;<?php if (isset($errorzip)&&$errorzip) echo "<font color=red>"; ?><?php echo $LDZipCode ?>:<input name="addr_zip" type="text" size="10" value="<?php echo $addr_zip; ?>">
328 </td>
329 </tr>
331 <?php
333 if (!$GLOBAL_CONFIG['person_phone_1_nr_hide'])
335 if(!isset($phone_1_nr)) $phone_1_nr='';
336 createTR('phone_1_nr', $LDPhone.' 1',$phone_1_nr,2);
339 if (!$GLOBAL_CONFIG['person_phone_2_nr_hide'])
341 if(!isset($phone_2_nr)) $phone_2_nr='';
342 createTR('phone_2_nr', $LDPhone.' 2',$phone_2_nr,2);
345 if (!$GLOBAL_CONFIG['person_cellphone_1_nr_hide'])
347 if(!isset($cellphone_1_nr)) $cellphone_1_nr='';
348 createTR('cellphone_1_nr', $LDCellPhone.' 1',$cellphone_1_nr,2);
351 if (!$GLOBAL_CONFIG['person_cellphone_2_nr_hide'])
353 if(!isset($cellphone_2_nr)) $cellphone_2_nr='';
354 createTR('cellphone_2_nr', $LDCellPhone.' 2',$cellphone_2_nr,2);
357 if (!$GLOBAL_CONFIG['person_fax_hide'])
359 if(!isset($fax)) $fax='';
360 createTR('fax', $LDFax,$fax,2);
363 if (!$GLOBAL_CONFIG['person_email_hide'])
365 if(!isset($email)) $email='';
366 createTR('email', $LDEmail,$email,2);
369 if (!$GLOBAL_CONFIG['person_citizenship_hide'])
371 if(!isset($citizenship)) $citizenship='';
372 createTR('citizenship', $LDCitizenship,$citizenship,2);
375 if (!$GLOBAL_CONFIG['person_sss_nr_hide'])
377 if(!isset($sss_nr)) $sss_nr='';
378 createTR('sss_nr', $LDSSSNr,$sss_nr,2);
381 if (!$GLOBAL_CONFIG['person_nat_id_nr_hide'])
383 if(!isset($nat_id_nr)) $nat_id_nr='';
384 createTR('nat_id_nr', $LDNatIdNr,$nat_id_nr,2);
387 if (!$GLOBAL_CONFIG['person_religion_hide'])
389 if(!isset($religion)) $religion='';
390 createTR('religion', $LDReligion,$religion,2);
393 if (!$GLOBAL_CONFIG['person_ethnic_orig_hide'])
395 if(!isset($ethnic_orig)) $ethnic_orig='';
396 createTR('ethnic_orig', $LDEthnicOrigin,$ethnic_orig,2);
400 </table>
402 <input type=hidden name="sid" value=<?php echo $sid; ?>>
403 <input type=hidden name="lang" value="<?php echo $lang; ?>">
404 <input type="hidden" name="mode" value="search">
405 <input type="hidden" name="addr_citytown_nr">
406 <input type="image" <?php echo createLDImgSrc($root_path,'searchlamp.gif','0') ?> alt="<?php echo $LDSaveData ?>" align="absmiddle">
408 </form>
410 <?php
413 $sTemp = ob_get_contents();
414 ob_end_clean();
415 $smarty->assign('sMainDataBlock',$sTemp);
417 $smarty->assign('sMainBlockIncludeFile','registration_admission/reg_plain.tpl');
419 # Show mainframe
421 $smarty->display('common/mainframe.tpl');
424 <!-- <img <?php echo createComIcon($root_path,'varrow.gif','0') ?>> <a href="patient_register.php<?php echo URL_APPEND; ?>&newdata=1&from=entry"><?php echo $LDPatientRegister ?></a><br>
425 <img <?php echo createComIcon($root_path,'varrow.gif','0') ?>> <a href="patient_register_search.php<?php echo URL_APPEND; ?>"><?php echo $LDPatientSearch ?></a><br>
427 --><p>
428 <a href="<?php echo 'patient.php'.URL_APPEND; ?>"><img <?php echo createLDImgSrc($root_path,'cancel.gif','0') ?> alt="<?php echo $LDCancelClose ?>"></a>