PageRenderTime 56ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/or_logbook/op-care-log-arch-start.php

https://github.com/timschofield/2.8
PHP | 582 lines | 403 code | 81 blank | 98 comment | 52 complexity | e692572963466bc9e507c6b947f03cff MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, GPL-2.0
  1. <?php
  2. error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
  3. require('./roots.php');
  4. require('../../include/helpers/inc_environment_global.php');
  5. /**
  6. * CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02
  7. * GNU General Public License
  8. * Copyright 2002,2003,2004,2005 Elpidio Latorilla
  9. * elpidio@care2x.org,
  10. *
  11. * See the file "copy_notice.txt" for the licence notice
  12. */
  13. define('MODULE','or_logbook');
  14. define('LANG_FILE_MODULAR','or_logbook.php');
  15. define('NO_2LEVEL_CHK',1);
  16. require_once($root_path.'include/helpers/inc_front_chain_lang.php');
  17. if (!$internok&&!$_COOKIE['ck_op_pflegelogbuch_user'.$sid]) {header("Location:".$root_path."language/".$lang."/lang_".$lang."_invalid-access-warning.php"); exit;};
  18. //$db->debug=1;
  19. /* Load the date formatter */
  20. require_once($root_path.'include/helpers/inc_date_format_functions.php');
  21. //gjergji : new calendar
  22. require_once ('../../js/jscalendar/calendar.php');
  23. $calendar = new DHTML_Calendar('../../js/jscalendar/', $lang, 'calendar-system', true);
  24. $calendar->load_files();
  25. //end : gjergji
  26. # Check the calendar date
  27. if(isset($sdate)&&!empty($sdate)){
  28. $thisday=formatDate2STD($sdate,$date_format);
  29. }elseif(!isset($thisday)||empty($thisday)){
  30. # Set default date to today
  31. $thisday=date('Y-m-d');
  32. }
  33. # Load date shifter class
  34. require_once($root_path.'classes/datetimemanager/class.dateTimeManager.php');
  35. # Create new dateTimeManager object */
  36. $tshifter = new dateTimeManager;
  37. # Shift time back 1 day
  38. $yesday = $tshifter->shift_dates($thisday, '1', 'd');
  39. # Shift time forward 1 day
  40. $tomorow = $tshifter->shift_dates($thisday, '-1', 'd');
  41. # Todays date
  42. $today=date('Y-m-d');
  43. $opabt=get_meta_tags($root_path.'global_conf/'.$lang.'/op_tag_dept.pid');
  44. //setcookie(op_pflegelogbuch_user,$user);
  45. $thisfile=basename(__FILE__);
  46. $breakfile='javascript:window.close()';
  47. if(!isset($saal)||!$saal) $saal=1; //default or room
  48. $pdata=array();
  49. $filetitles=array();
  50. $template=array();
  51. $datafound=false;
  52. require_once($root_path.'modules/dept_admin/model/class_department.php');
  53. $dept_obj=new Department;
  54. $dept_obj->preloadDept($dept_nr);
  55. /* Load all operative departments */
  56. $surgery_arr=&$dept_obj->getAllActiveWithSurgery();
  57. /* Get list of all active OR numbers */
  58. $ORNrs=&$dept_obj->getAllActiveORNrs();
  59. function yesterday(&$fd,&$fm,&$fy,$minyr)
  60. {
  61. if ($fd<2)
  62. {
  63. if ($fm<2)
  64. {
  65. if($fy<$minyr) //minimum year allowed is minyr - 1
  66. {
  67. return false;
  68. }
  69. else
  70. {
  71. $fy=$fy-1; $fm=12; $fd=31;
  72. }
  73. }
  74. else
  75. {
  76. $fm=$fm-1;
  77. $fd=date("t",mktime(0,0,0,$fm,1,$fy)) ;
  78. }
  79. }
  80. else
  81. {
  82. $fd=$fd-1;
  83. }
  84. if (strlen($fd)==1) $fd="0".$fd;
  85. if (strlen($fm)==1) $fm="0".$fm;
  86. return true;
  87. }
  88. function tomorrow(&$fd,&$fm,&$fy,$maxyr)
  89. {
  90. if($fd<(date("t",mktime(0,0,0,$fm,1,$fy))))
  91. {
  92. $fd++;
  93. }
  94. else
  95. {
  96. if($fm<12)
  97. {
  98. $fm++;
  99. $fd="01";
  100. }
  101. else
  102. {
  103. $fy++;
  104. $fm="01";
  105. $fd="01";
  106. }
  107. }
  108. /*
  109. if (checkdate($fm,$fd+1,$fy))
  110. {
  111. $fd=$fd+1;
  112. }
  113. else
  114. {
  115. $fd=1;
  116. if ($fm<12){ $fm=$fm+1;}
  117. else {
  118. if($fy<$maxyr)
  119. {
  120. $fm=1;
  121. $fy=$fy+1;
  122. }
  123. else return false;
  124. }
  125. }
  126. */
  127. if (strlen($fd)==1) $fd="0".$fd;
  128. if (strlen($fm)==1) $fm="0".$fm;
  129. return true;
  130. }
  131. $md=$pday;
  132. if (strlen($md)==1) $md="0".$md;
  133. setcookie(firstentry,'1');
  134. $dbtable='care_encounter_op';
  135. $selectfrom="SELECT o.*,
  136. e.encounter_class_nr,
  137. p.name_last,
  138. p.name_first,
  139. p.date_birth,
  140. p.addr_str,
  141. p.addr_str_nr,
  142. p.addr_zip,
  143. t.name AS citytown_name,
  144. d.name_formal,
  145. d.LD_var";
  146. /*
  147. FROM (care_encounter_op AS o,
  148. care_encounter AS e,
  149. care_person AS p)
  150. LEFT JOIN care_address_citytown AS t ON t.nr=p.addr_citytown_nr
  151. LEFT JOIN care_department AS d ON d.nr=o.dept_nr";
  152. */
  153. $selectfrom = $selectfrom . " FROM care_encounter_op AS o LEFT JOIN care_department AS d ON d.nr= o.dept_nr
  154. LEFT JOIN care_encounter AS e ON e.encounter_nr = o.encounter_nr
  155. LEFT JOIN care_person AS p ON p.pid = e.pid
  156. LEFT JOIN care_address_citytown AS t ON t.nr=p.addr_citytown_nr";
  157. $sql=$selectfrom." WHERE o.dept_nr='$dept_nr'
  158. AND o.op_room='$saal'
  159. AND op_date='$thisday'
  160. AND o.encounter_nr=e.encounter_nr
  161. AND e.pid=p.pid
  162. ORDER BY o.create_time DESC";
  163. if($ergebnis=$db->Execute($sql)){
  164. if($maxelem=$ergebnis->RecordCount()){
  165. $datafound=true;
  166. //echo $sql."<br>";
  167. }
  168. }else{
  169. echo "<p>".$sql."<p>$LDDbNoRead";
  170. }
  171. $validyr=true;
  172. # Prepate title
  173. $sTitle = "$LDOrLogBook::$LDArchive - ";
  174. $buffer=$dept_obj->LDvar();
  175. if(isset($$buffer)&&!empty($$buffer)) $sTitle = $sTitle.$$buffer;
  176. else $sTitle = $sTitle.$dept_obj->FormalName();
  177. $sTitle = $sTitle." $LDRoom $saal";
  178. # Start Smarty templating here
  179. /**
  180. * LOAD Smarty
  181. */
  182. # Note: it is advisable to load this after the inc_front_chain_lang.php so
  183. # that the smarty script can use the user configured template theme
  184. require_once(CARE_BASE.'/include/helpers/smarty_care.class.php');
  185. $smarty = new smarty_care('nursing');
  186. # Title in toolbar
  187. $smarty->assign('sToolbarTitle',$sTitle);
  188. $smarty->assign('LDBack', $LDBack);
  189. $smarty->assign('LDHelp', $LDHelp);
  190. $smarty->assign('LDClose', $LDClose);
  191. # hide return button
  192. $smarty->assign('pbBack',FALSE);
  193. # href for help button
  194. $smarty->assign('pbHelp',CARE_GUI . "modules/" . MODULE . "/help/" . $lang . "/oplog.html");
  195. # href for close button
  196. $smarty->assign('breakfile',$breakfile);
  197. # Window bar title
  198. $smarty->assign('sWindowTitle',$sTitle);
  199. # Body Onload js
  200. if(!$nofocus) $smarty->assign('sOnLoadJs','onLoad="if (window.focus) window.focus();"');
  201. # Collect js code
  202. ob_start();
  203. ?>
  204. <script language="javascript">
  205. <!--
  206. function pruf(d)
  207. {
  208. if((d.dept_nr.value=="<?php echo $dept_nr;?>")&&(d.saal.value=="<?php echo $saal;?>")&&(d.sdate.value=="<?php echo formatDate2Local($thisday,$date_format);?>")){
  209. return false;
  210. }else{
  211. return true;
  212. }
  213. }
  214. <?php if ($datafound) { ?>
  215. function openeditwin(filename,y,m,d)
  216. {
  217. url="op-care-log-arch-edit.php?mode=edit&fileid="+filename+"&sid=<?php echo $sid; ?>&user=<?php echo str_replace(" ","+",$user); ?>&pyear="+y+"&pmonth="+m+"&pday="+d+"&dept_nr=<?php echo $dept_nr;?>&saal=<?php echo $saal;?>";
  218. w=window.parent.screen.width;
  219. h=window.parent.screen.height;
  220. archeditwin=window.open(url,"editwin","menubar=no,resizable=yes,scrollbars=yes, width=" + (w-15) + ", height=400");
  221. window.archeditwin.moveTo(0,0);
  222. }
  223. function getinfo(pid,pdata){
  224. urlholder="<?php echo $root_path; ?>modules/nursing/nursing-ward-patientdata.php<?php echo URL_REDIRECT_APPEND; ?>&pn="+pid+"&patient=" + pdata + "&station=<?php echo "$dept_nr&dept_nr=$dept_nr&pday=$pday&pmonth=$pmonth&pyear=$pyear&op_shortcut=".$_COOKIE['ck_op_pflegelogbuch_user'.$sid]; ?>";
  225. patientwin=window.open(urlholder,pid,"width=700,height=450,menubar=no,resizable=yes,scrollbars=yes");
  226. }
  227. <?php } ?>
  228. <?php require($root_path.'include/helpers/inc_checkdate_lang.php'); ?>
  229. // -->
  230. </script>
  231. <STYLE TYPE="text/css">
  232. div.cats{
  233. position: absolute;
  234. right: 10;
  235. top: 80;
  236. }
  237. </style>
  238. <?php
  239. $sTemp = ob_get_contents();
  240. ob_end_clean();
  241. $smarty->append('JavaScript',$sTemp);
  242. # Buffer page output
  243. ob_start();
  244. echo '
  245. <table cellpadding=0 cellspacing=0 border=0 bgcolor="#999999" width="100%">
  246. <tr><td>
  247. <table cellpadding="3" cellspacing="1" border="0" width="100%">';
  248. echo '
  249. <tr class="wardlisttitlerow"><td colspan=2 ><nobr>';
  250. echo '
  251. <a href="op-care-log-arch-start.php?sid='.$sid.'&lang='.$lang.'&nogetlast=1&dept_nr='.$dept_nr.'&saal='.$saal.'&thisday='.$yesday.'&noseek=1"
  252. title="'.formatDate2Local($yesday,$date_format).'">
  253. &lt;&lt; '.$LDPrevDay.'</a>';
  254. echo '
  255. </td><td colspan=5 align=center ><FONT SIZE=4>
  256. <b>';
  257. list($ty,$tm,$td)=explode('-',$thisday);
  258. echo $tage[(date("w",mktime(0,0,0,$tm,$td,$ty)))].' ('.formatDate2Local($thisday,$date_format).')</b> </td>
  259. <td colspan=2 align=right >';
  260. if($thisday!=$today) echo '
  261. <a href="op-care-log-arch-start.php?sid='.$sid.'&lang='.$lang.'&nogetlast=1&dept_nr='.$dept_nr.'&saal='.$saal.'&thisday='.$tomorow.'&noseek=1"
  262. title="'.formatDate2Local($tomorow,$date_format).'">
  263. <nobr>'.$LDNextDay.' &gt;&gt;</a></td></tr>';
  264. echo '
  265. <tr bgcolor="#f9f9f9" >';
  266. while(list($x,$v)=each($LDOpMainElements))
  267. {
  268. echo '
  269. <td class="wardlisttitlerow">'.$v.'</td>';
  270. }
  271. echo '
  272. </tr>';
  273. if($datafound)
  274. {
  275. while($pdata=$ergebnis->FetchRow())
  276. {
  277. if ($toggler==0) { echo '<tr bgcolor="#fdfdfd">'; $toggler=1;}
  278. else { echo '<tr bgcolor="#dddddd">'; $toggler=0;}
  279. echo '
  280. <a name="'.$pdata['encounter_nr'].'"></a>';
  281. list($iyear,$imonth,$iday)=explode('-',$pdata['op_date']);
  282. echo '
  283. <td valign=top><font size="1" ><font size=2 color=red><b>'.$pdata['op_nr'].'</b></font><hr>'.formatDate2Local($pdata['op_date'],$date_format).'<br>
  284. '.$tage[date("w",mktime(0,0,0,$imonth,$iday,$iyear))].'<br>
  285. <a href="op-care-log-start.php?sid='.$sid.'&lang='.$lang.'&mode=saveok&enc_nr='.$pdata['encounter_nr'].'&op_nr='.$pdata['op_nr'].'&dept_nr='.$pdata['dept_nr'].'&saal='.$pdata['op_room'].'&thisday='.$pdata['op_date'].'" ';
  286. if ($child) echo 'target="_parent"';
  287. echo '>
  288. <img '.createComIcon($root_path,'bul_arrowgrnlrg.gif','0').' alt="'.str_replace("~tagword~",$pdata['name_last'],$LDEditPatientData).'"></a>
  289. </td>';
  290. echo '
  291. <td valign=top><nobr><font size="1" color=blue>
  292. <a href="javascript:getinfo(\''.$pdata[encounter_nr].'\',\''.$pdata[dept_nr].'\')">
  293. <img '.createComIcon($root_path,'info2.gif','0').' alt="'.str_replace("~tagword~",$pdata['name_last'],$LDOpenPatientFolder).'"></a>&nbsp; ';
  294. echo ($pdata['encounter_class_nr']==1)?($pdata['encounter_nr']+$GLOBAL_CONFIG['patient_inpatient_nr_adder']) : ($pdata['encounter_nr']+$GLOBAL_CONFIG['patient_outpatient_nr_adder']);
  295. echo '<br>
  296. <font color=black><b>'.$pdata['name_last'].', '.$pdata['name_first'].'</b><br>'.formatDate2Local($pdata['date_birth'],$date_format).'<p>
  297. <font color="#000000">'.$pdata['addr_str'].' '.$pdata['addr_str_nr'].'<br>'.$pdata['addr_zip'].' '.$pdata['citytown_name'].'</font><br></td>';
  298. echo '
  299. <td valign=top><font size="1" >';
  300. echo '
  301. <font color="#cc0000">Diagnose:</font><br>';
  302. echo nl2br($pdata['diagnosis']);
  303. echo '
  304. </td>
  305. <td valign=top><font size="1" ><nobr>';
  306. $ebuf=array('operator','assistant','scrub_nurse','rotating_nurse');
  307. //$tbuf=array("O","A","I","S");
  308. //$cbuf=array("Operateur","Assistent","Instrumenteur","Springer");
  309. for($n=0;$n<sizeof($ebuf);$n++)
  310. {
  311. if(!$pdata[$ebuf[$n]]) continue;
  312. echo '<font color="#cc0000">'.$cbuf[$n].'</font><br>';
  313. $dbuf=explode("~",$pdata[$ebuf[$n]]);
  314. for($i=0;$i<sizeof($dbuf);$i++)
  315. {
  316. parse_str(trim($dbuf[$i]),$elems);
  317. if($elems[n]=="") continue;
  318. else echo '&nbsp;'.$elems[n]." ".$tbuf[$n].$elems[x]."<br>";
  319. }
  320. }
  321. echo '</td>';
  322. echo '
  323. </td>
  324. <td valign=top><font size="1" >'.$LDAnaTypes[$pdata['anesthesia']].'<p>';
  325. if($pdata[an_doctor])
  326. {
  327. echo '<font color="#cc0000">'.$LDAnaDoc.'</font><br><font color="#000000">';
  328. $dbuf=explode("~",$pdata[an_doctor]);
  329. for($i=0;$i<sizeof($dbuf);$i++)
  330. {
  331. parse_str(trim($dbuf[$i]),$elems);
  332. if($elems[n]=="") continue;
  333. else echo '&nbsp;'.$elems[n].' '.$LDAnaPrefix.$elems[x].'<br>';
  334. }
  335. echo '</font>';
  336. }
  337. /*
  338. $eo=explode("~",$pdata[entry_out]);
  339. for($i=0;$i<sizeof($eo);$i++)
  340. {
  341. parse_str($eo[$i],$eobuf);
  342. if(trim($eobuf[s])) break;
  343. }
  344. $cc=explode("~",$pdata[cut_close]);
  345. for($i=0;$i<sizeof($cc);$i++)
  346. {
  347. parse_str($cc[$i],$ccbuf);
  348. if(trim($ccbuf[s])) break;
  349. }
  350. */
  351. echo '
  352. </td>
  353. <td valign=top><font size="1" >';
  354. $cc=explode("~",$pdata['cut_close']);
  355. for($i=0;$i<sizeof($cc);$i++)
  356. {
  357. $xbug=trim($cc[$i]);
  358. if(empty($xbug)) continue;
  359. parse_str($cc[$i],$ccbuf);
  360. echo '<font size="1" color="#cc0000">'.$LDOpCut.':</font><br>'.strtr($ccbuf['s'],'.',':').'<br>
  361. <font size="1" color="#cc0000">'.$LDOpClose.':</font><br>'.strtr($ccbuf['e'],'.',':').'<br>';
  362. if(trim($ccbuf['s'])=='') break;
  363. }
  364. /*
  365. echo '<font size="1" color="#cc0000">'.$LDOpCut.':</font><br>'.convertTimeToLocal($ccbuf[s]).'<p>
  366. <font size="1" color="#cc0000">'.$LDOpClose.':</font><br>'.convertTimeToLocal($ccbuf[e]).'</td>';
  367. */
  368. echo '
  369. <td valign=top><font size="1" color="#cc0000">'.$LDOpMainElements[therapy].':<font color=black><br>'.nl2br($pdata['op_therapy']).'</td>';
  370. echo '
  371. <td valign=top><nobr><font size="1" color="#cc0000">'.$LDOpMainElements[result].':<br>';
  372. echo '<font color=black>'.nl2br($pdata['result_info']).'</td>';
  373. echo '
  374. <td valign=top><font size="1" >';
  375. $eo=explode("~",$pdata['entry_out']);
  376. for($i=0;$i<sizeof($eo);$i++)
  377. {
  378. $xbug=trim($eo[$i]);
  379. if(empty($xbug)) continue;
  380. parse_str($eo[$i],$eobuf);
  381. echo '<font size="1" color="#cc0000">'.$LDOpIn.':</font><br>'.strtr($eobuf['s'],'.',':').'<br>
  382. <font size="1" color="#cc0000">'.$LDOpOut.':</font><br>'.strtr($eobuf['e'],'.',':').'<br>';
  383. if(trim($eobuf['s'])=='') break;
  384. }
  385. /*
  386. echo '<font size="1" color="#cc0000">'.$LDOpIn.':</font><br>'.convertTimeToLocal($eobuf[s]).'<p>
  387. <font size="1" color="#cc0000">'.$LDOpOut.':</font><br>'.convertTimeToLocal($eobuf[e]).'</td>';
  388. */
  389. echo '
  390. </tr>';
  391. }
  392. }else{
  393. echo '
  394. <tr><td colspan=9 bgcolor="#fcfcfc">';
  395. echo '<p><br><center>';
  396. if ($thisday != $today)
  397. {
  398. echo '
  399. <MAP NAME="catcom">
  400. <AREA SHAPE="RECT" COORDS="158,90,230,110" HREF="op-care-log-xtsuch-start.php?sid='.$sid.'&lang='.$lang.'&mode=fresh&dept_nr='.$dept_nr.'&saal='.$saal.'" title="'.$LDSearchPatient.' ['.$LDOrLogBook.']" >
  401. </MAP><img ismap usemap="#catcom" '.createLDImgSrc($root_path,'cat-com2.gif','0').'>
  402. <DIV id=dLogoTable style=" VISIBILITY: hidden; POSITION: relative">
  403. <table border=0 bgcolor="#33333" cellspacing=0 cellpadding=1>
  404. <tr>
  405. <td>
  406. <table border=0 bgcolor="#ffffee" >
  407. <tr>
  408. <td><font size=2>
  409. &nbsp;<a href="#" onmouseover=clearTimeout(timer) onmouseout="timer=setTimeout(\'hsm()\',500)" ><img '.createComIcon($root_path,'redpfeil.gif','0').'> '.$LDShowPrevLog.'</a>&nbsp;<br>
  410. &nbsp;<a href="#" onmouseover=clearTimeout(timer) onmouseout="timer=setTimeout(\'hsm()\',500)" ><img '.createComIcon($root_path,'redpfeil.gif','0').'> '.$LDShowNextLog.'</a>&nbsp;<br>
  411. &nbsp;<a href="#" onmouseover=clearTimeout(timer) onmouseout="timer=setTimeout(\'hsm()\',500)" ><img '.createComIcon($root_path,'redpfeil.gif','0').'> '.$LDShowGuideCal.'</a>&nbsp;<br></font>
  412. </td>
  413. </tr>
  414. </table>
  415. </td>
  416. </tr>
  417. </table>
  418. </DIV>';
  419. }
  420. else
  421. {
  422. $buffy=str_replace(" ","+",$_COOKIE['ck_op_pflegelogbuch_user'.$sid]);
  423. echo '<img src="'.$root_path.'include/imgcreator/catcom.php?person='.$buffy.'&rnd='.$r.'">';
  424. if($nofile) echo '<p><b><font color="#800000" size=4>'.$LDPatNoExist.'</b>';
  425. }
  426. //echo '
  427. //<br><p>
  428. //<b>Heute ist der '.date(d).'.'.date(m).'.'.date(Y).'</b></center>';
  429. echo '</center>';
  430. echo '
  431. </td></tr>';}
  432. echo '
  433. </table>
  434. </td>
  435. </tr>
  436. </table>
  437. ';
  438. ?>
  439. <p>
  440. <ul>
  441. <form action="op-care-log-arch-start.php" method="post" name="chgdept" onSubmit="return pruf(this)">
  442. <input type="hidden" name="sid" value="<?php echo $sid; ?>">
  443. <input type="hidden" name="lang" value="<?php echo $lang; ?>">
  444. <input type="hidden" name="user" value="<?php echo $user; ?>">
  445. <input type="hidden" name="child" value="<?php echo $child; ?>">
  446. <img <?php echo createComIcon($root_path,'varrow.gif','0') ?>>
  447. <nobr>
  448. <?php echo $LDChangeDept ?><br>
  449. <select name="dept_nr" size=1>
  450. <?php
  451. while(list($x,$v)=each($surgery_arr))
  452. {
  453. if($x==42) continue;
  454. echo'
  455. <option value="'.$v['nr'].'"';
  456. if ($dept_nr==$v['nr']) echo ' selected';
  457. echo '>';
  458. $buffer=$v['LD_var'];
  459. if(isset($$buffer)&&!empty($$buffer)) echo $$buffer;
  460. else echo $v['name_formal'];
  461. echo '</option>';
  462. }
  463. ?>
  464. </select>
  465. <select name="saal" size=1>
  466. <?php
  467. if(is_object($ORNrs)){
  468. while($ORnr=$ORNrs->FetchRow())
  469. {
  470. echo'
  471. <option value="'.$ORnr['room_nr'].'"';
  472. if ($saal==$ORnr['room_nr']) echo ' selected';
  473. echo '> '.$ORnr['room_nr'].'</option>';
  474. }
  475. }
  476. ?>
  477. </select>
  478. <?php
  479. //gjergji : new calendar
  480. echo $calendar->show_calendar($calendar,$date_format,'sdate',$thisday);
  481. //end : gjergji
  482. ?>
  483. </nobr>
  484. <input type="submit" value="<?php echo $LDChange ?>">
  485. </form><p>
  486. <b><?php echo $LDOtherFunctions ?>:</b><br>
  487. <img <?php echo createComIcon($root_path,'varrow.gif','0') ?>> <a href="op-care-log-xtsuch-start.php?sid=<?php echo "$sid&lang=$lang&mode=fresh&dept_nr=$dept_nr&saal=$saal&child=$child" ?>"><?php echo "$LDSearchPatient [$LDOrLogBook]" ?></a><br>
  488. <img <?php echo createComIcon($root_path,'varrow.gif','0') ?>> <a href="op-care-log-start.php?sid=<?php echo "$sid&lang=$lang&mode=fresh&dept_nr=$dept_nr&saal=$saal" ?>" <?php if ($child) echo "target=\"_parent\""; ?>><?php echo "$LDStartNewDocu [$opabt[$dept_nr] $LDRoom $saal]" ?></a><br>
  489. <img <?php echo createComIcon($root_path,'varrow.gif','0') ?>> <a href="javascript:gethelp('oplog.php','arch','<?php echo $dif ?>','<?php echo $lastlog ?>','<?php echo $datafound ?>')"><?php echo "$LDHelp" ?></a><br>
  490. </ul>
  491. <?php
  492. $sTemp = ob_get_contents();
  493. ob_end_clean();
  494. # Assign page output to the mainframe template
  495. $smarty->assign('sMainFrameBlockData',$sTemp);
  496. /**
  497. * show Template
  498. */
  499. $smarty->display(CARE_BASE . 'main/view/mainframe.tpl');
  500. ?>