}
if(!empty($_POST["pid"]) && !empty($_POST["name"])){
$db->admit($_POST);
- //header("Location: view.php?pid=".$_POST["pid"]);
- //exit();
+ header("Location: view.php?pid=".$_POST["pid"]);
+ exit();
}
if(!empty($_GET["pid"])){
$pid=$_GET["pid"];
$pid=$_GET["pid"];
if(!empty($_POST["date"]) && !empty($_POST["time"]) && !empty($_POST["diagnosis"])){
$db->setDead($pid, $_POST);
- //header("Location: view.php?id=".$_GET["id"]);
- //exit();
+ header("Location: view.php?pid=".$_GET["pid"]);
+ exit();
}
$form=schema2form("forms/death.schema.json", $pid, null, null, (object)["diagnosis"=>$db->getDiagnosis($pid)->fetchArray()["diagnosis"]]);
}
$pid=$_GET["pid"];
if(!empty($_POST["cc"])){
$db->updateHistory($_POST, $pid);
- //header("Location: view.php?pid=".$pid);
- //exit();
+ header("Location: view.php?pid=".$pid);
+ exit();
}
}
if(!empty($_GET["pid"])){
$error="<div class='alert alert-danger'>Username or password is incorrect.</div>";
}
}
-//header("Location: view.php?id=".$_GET["id"]);
+//header("Location: view.php?pid=".$_GET["pid"]);
//exit();
?>
<!DOCTYPE html>
else{
$db->addNursing($_POST, $pid);
}
- //header("Location: view.php?id=".$_GET["id"]);
- //exit();
+ header("Location: view.php?pid=".$_GET["pid"]);
+ exit();
}
if(isSet($_GET["id"])){
$form=schema2form("forms/nursing.schema.json", $pid, $_GET["id"], "nursing");
else{
$db->addPhysician($_POST, $pid);
}
- //header("Location: view.php?id=".$_GET["id"]);
- //exit();
+ header("Location: view.php?pid=".$_GET["pid"]);
+ exit();
}
if(isSet($_GET["id"])){
$form=schema2form("forms/physician.schema.json", $pid, $_GET["id"], "physician");
if(!empty($_GET["req"])){
$db->omitRequisition($_GET["req"]);
}
- //header("Location: view.php?id=".$_GET["id"]);
- //exit();
+ header("Location: view.php?pid=".$_GET["pid"]);
+ exit();
}
if(isSet($_GET["id"])){
$form=schema2form("forms/".$_GET["form"].".schema.json", $pid, $_GET["id"], "reports");