Location: PHPKode > projects > WebETB > stats/print_pat.php4
<?php
/******************************************************************************/
/*	MODUL:	stats/print.php4           													*/
/*																										*/
/* DATUM:	27.03.2006, Version 0.1															*/
/* BESCHR.:	Druckfreundliche Ausgabe der Patientenliste                       */
/*																										*/
/*	AUTOR:   Marcus Groh																			*/
/*	LIZENZ:  GPL v2 vom Juni 1991 															*/
/*																										*/
/*	AENDERUNGEN:	16.02.2006        -initiale Version								   */
/*                27.03.2006 v 0.1, -Versionskennzeichnung eingefuehrt        */
/*                                  -Code unter GPL v2 gestellt               */
/*                                  -Tabellenname dynamisiert                 */
/*																										*/
/******************************************************************************/
$allowed_groups=array("elw");
include ('../_include/printer.php4');
// Define in this script the requested selections
include ('../stats/get_stats.php4');

?>
<br>
<center>
   <table border="0" cellspacing="0" cellpadding="0">
   <tr>
      <th colspan="3">Einsatzdaten</th>
   </tr>
   <tr>
      <td>&nbsp;Einsatzbeschreibung:</td>
      <td width="30">&nbsp;</td>
      <td><? echo $einsatz_name ; ?>&nbsp;</td>      
   </tr>
   <tr>
      <td>&nbsp;Einsatzbeginn:</td>
      <td width="30">&nbsp;</td>
      <td><? echo $result_etb_first_date . '&nbsp;&nbsp;-&nbsp;&nbsp;' . $result_etb_first_time; ?></td>      
   </tr>
   <tr>
      <td>&nbsp;Anzahl erfasster Patienten:</td>
      <td width="30">&nbsp;</td>
      <td><? echo $result_max_pat_eintr ; ?></td>      
   </tr>
   <tr>
      <td>&nbsp;Anzahl Transporte:</td>
      <td width="30">&nbsp;</td>
      <td><? echo $result_max_pat_trans ; ?></td>      
   </tr>         
   </table>

<br><br>
   <table border="0" cellpadding="0" cellspacing="0" width="950">
   <tr>
      <th colspan="9">Patientenliste</th>
   </tr>
   <tr>
      <td width="70"  align="middle"><p id="GR07">Pat-Nr.</p></td>
      <td width="60"  align="middle"><p id="GR07">Zeit<br>REG</p></td>
      <td width="60"  align="middle"><p id="GR07">Zeit<br>SAN</p></td>
      <td width="200" align="left"  ><p id="GR07">&nbsp;Diagnose<br>&nbsp;Bemerkung</p></td>
      <td width="150" align="left"  ><p id="GR07">&nbsp;Nachname<br>&nbsp;Vorname<br>&nbsp;Geb.-Datum</p></td>      
      <td width="150" align="left"  ><p id="GR07">&nbsp;Wohnort<br>&nbsp;Stra&szlig;e</p></td>
      <td width="60"  align="middle"><p id="GR07">Fahrzeug</p></td>
      <td width="70"  align="middle"><p id="GR07">Zeitpunkt<br>Abfahrt</p></td>
      <td width="130" align="middle"><p id="GR07">Zielklinik<br>bzw. Verbleib</p></td>
   </tr>
   <tr>
      <td colspan="9" height="1" width="950" style="background-color: #000000;"><img src="../_img/spacer.gif" height="1" width="950" border="0"></td>
   </tr>
   <?
   $select_pat_list="select rlsnr, pat_nr, pat_nname, pat_vname, pat_geb, pat_ort, pat_str, fzg_name, fzg_typ, fzg_zeit, fzg_ziel, reg_time, san_diag, san_comm, san_time from $T_patient where eid=$eid and used='Y' order by pat_nr";
   $result_pat_list=@mysql_db_query($database["database"],$select_pat_list,$db);
   while ( $row=mysql_fetch_array($result_pat_list) )
   {
      // sort fields
      $RLS="";
      $db_rlsnr=checkval($row['rlsnr']);
      if ($db_rlsnr)
      {
         $RLS="RLSt.-Nr.: " .$db_rlsnr;
      }
      $db_pat_nr=checkval($row['pat_nr']);
      $db_pat_nname=checkval ($row['pat_nname']);
      $db_pat_vname=checkval ($row['pat_vname']);
      $db_pat_geb=checkdateval ($row['pat_geb']);
      $db_pat_ort=checkval ($row['pat_ort']);
      $db_pat_str=checkval ($row['pat_str']);
      $db_fzg_name=checkval ($row['fzg_name']);
      $FZG="";
      $db_fzg_typ=checkval ($row['fzg_typ']);
      if ( $db_fzg_typ &0x1 )
      {
         $FZG="MTW";
      }
      elseif ( $db_fzg_typ &0x2 )
      {
         $FZG="KTW";
      }
      elseif ( $db_fzg_typ &0x4 )
      {
         $FZG="RTW";
      }
      elseif ( $db_fzg_typ &0x8 )
      {
         $FZG="NAW";
      }
      elseif ( $db_fzg_typ &0x10 )
      {
         $FZG="RTH";
      }
      elseif ( $db_fzg_typ &0x20 )
      {
         $FZG="POL";
      }
      elseif ( $db_fzg_typ &0x40 )
      {
         $FZG="PRIV";
      }      
      $db_fzg_zeit=checktimeval ($row['fzg_zeit']);
      $db_fzg_ziel=checkval ($row['fzg_ziel']);
      $db_reg_time=checktimeval ($row['reg_time']);
      $db_san_diag=checkval  ($row['san_diag']);
      $db_san_comm=checkval  ($row['san_comm']);
      $db_san_time=checktimeval  ($row['san_time']);

        // print values
        ?>
        <tr>
           <td width="70"  valign="top" align="middle"><p id="sw10_s"><? echo $db_pat_nr; ?></td>
           <td width="60"  valign="top" align="middle"><p id="sw10_s"><? echo $db_reg_time; ?></td>
           <td width="60"  valign="top" align="middle"><p id="sw10_s"><? echo $db_san_time; ?></td>
           <td width="200" valign="top" align="left"  ><p id="sw10_s"><? echo $db_san_diag  . "<br>" . $db_san_comm; ?></td>
           <td width="150" valign="top" align="left"  ><p id="sw10_s"><? echo $db_pat_nname . "<br>" . $db_pat_vname . "<br>". $db_pat_geb; ?></td>
           <td width="150" valign="top" align="left"  ><p id="sw10_s"><? echo $db_pat_ort   . "<br>" . $db_pat_str; ?></td>
           <td width="60"  valign="top" align="middle"><p id="sw10_s"><? echo $FZG          . "<br>" . $db_fzg_name; ?></td>
           <td width="70"  valign="top" align="middle"><p id="sw10_s"><? echo $db_fzg_zeit; ?></td>
           <td width="130" valign="top" align="middle"><p id="sw10_s"><? echo $db_fzg_ziel  . "<br>" . $RLS; ?></td>
        </tr>
        <tr>
           <td colspan="9" height="1" width="950" style="background-color: #999999;"><img src="../_img/spacer.gif" height="1" width="950" border="0"></td>
        </tr>
        <?         
   }
   ?>
   </table>
   <p align="center" id="sw7_s"><? echo $FOOTNOTE; ?><BR>(c) 2005-2006 by Marcus Groh</p>
   </center>
<?
include ('../_include/footer_2.php4');
?>
Return current item: WebETB