Location: PHPKode > projects > WebETB > patient/manage.php4
<?php
/******************************************************************************/
/*	MODUL:	patient/manage.php4     														*/
/*																										*/
/* DATUM:	27.03.2006, Version 0.1															*/
/* BESCHR.:	Anlegen eines neuen Patienten / Zuordnung Patientennummer         */
/*																										*/
/*	AUTOR:   Marcus Groh																			*/
/*	LIZENZ:  GPL v2 vom Juni 1991 															*/
/*																										*/
/*	AENDERUNGEN:	13.01.2006        -initiale Version								   */
/*                27.03.2006 v 0.1, -Versionskennzeichnung eingefuehrt        */
/*                                  -Code unter GPL v2 gestellt               */
/*                                  -Tabellenname dynamisiert                 */
/*																										*/
/******************************************************************************/
$allowed_groups=array("elw","san","reg");


include ('../_include/header_1.php4');

   // Hole freie Patientennummern
   $need_more="";
   $select_free_pat_nr="select pid, pat_nr from $T_patient where eid=$eid AND used='N' order by pat_nr";
   $result=@mysql_db_query($database["database"],$select_free_pat_nr,$db);
   if ( mysql_num_rows($result) == 0 ) 
   {
      $need_more=TRUE;
   }
   
   // Set group-depending target-link
      switch ($mygroup)
      {
      case "elw":      $PATMOD="all.php4";
                       break;                   
      case "san":      $PATMOD="san.php4";
                       break;
      case "reg":      $PATMOD="reg.php4";
                       break;
      case "trans":    $PATMOD="trans.php4";
                       break;                                        
      default:         $PATMOD="";
      }
         
?>
   <center>
   <br>
      
      <form action="<? echo $PATMOD; ?>" method=post name="create_pat">
      <table border="0" cellspacing="0" cellpadding="0" width="300">
      <tr>
         <th colspan="4" ALIGN="CENTER">Neuen Patient anlegen</th>
      </tr>
      <tr>
         <td colspan="4" height="1" width="600" style="background-color: #000000;"><img src="../_img/spacer.gif" height="1" width="300" border="0"></td>
      </tr>
      <tr>
         <td colspan="4" height="5"><img src="../_img/spacer.gif" border="0" width="300" height="5"></td>
      </tr>
      <?
      if ( !$need_more )
      {
      ?>      
      <tr>
         <td width="5">&nbsp;</td>
         <td width="150">Freie Nummern:</td>
         <td width="140">
            <select name="frm_pat_pid" style="border: 1px solid silver; width: 100px;">
            <?               
               while ( $row=mysql_fetch_array($result) )
               {
                  $db_pat_nr=$row['pat_nr'];
                  $db_pid=$row['pid'];
                  echo "            <option value=\"$db_pid\">$db_pat_nr\n";
               }
            ?>
            </td>
         <td width="5">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="4" height="5"><img src="../_img/spacer.gif" border="0" width="300" height="5"></td>
      </tr>
      </table>
      <br>
      <input type=hidden name="new_pat" value="TRUE">
      <input type=submit VALUE="Anlegen" style="border: 1px solid silver;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input type=reset VALUE="Abbrechen" style="border: 1px solid silver;">
      <?
      }
      else
      {
      ?>
      <tr>
         <td colspan="4">Keine freien Nummern vorhanden.</td>
      </tr>
      <tr>
         <td colspan="4" height="5"><img src="../_img/spacer.gif" border="0" width="300" height="5"></td>
      </tr>
      </table>      
      <?
      }
      ?>
      </form>
<?
include ('../_include/footer_1.php4');

?>
Return current item: WebETB