}
if (isset($_REQUEST['codigo_consulta'])) {
    $_SESSION['codigo_consulta'] = $_REQUEST['codigo_consulta'];
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>NUEVO PROCEDIMIENTO</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" />
<link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon">
</head>
<?php 
if ($_REQUEST['id'] === '1') {
    $rs = $consulta->procedimiento_nuevo($_REQUEST['procedimiento'], '0');
    if ($rs) {
        echo "<script  LANGUAGE='JavaScript'> window.opener.location.href = 'consulta_procedimiento.php?procedimiento=" . $_SESSION['procedimiento_id'] . "&codigo_consulta=" . $_SESSION['codigo_consulta'] . "';\r\nwindow.close();  </script>";
    }
}
?>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;
    </td>
  </tr>
  <tr>
    <td align="center">