2 require(dirname(__DIR__
)."/require.php");
3 if(checkAccess("admission")!="all"){
4 header("Location: error.php");
7 if(!empty($_POST["pid"]) && !empty($_POST["name"])){
9 header("Location: view.php?pid=".$_POST["pid"]);
12 if(!empty($_GET["pid"])){
14 if(!empty($_POST["diagnosis"]) ||
!empty($_POST["summary"])){
15 $db->editCase($pid, $_POST["diagnosis"], $_POST["summary"]);
17 $form=schema2form("forms/admission.schema.json", $pid);
20 $form=schema2form("forms/admission.schema.json");
26 <?php
include(CONFIG_LIB
."head.php");?
>
27 <title
>Admission
</title
>
30 <div
class="container">
31 <?php
include(CONFIG_LIB
."top.php");?
>
33 <div
class="card-body">
34 <h4
class="card-title">Patient Information
</h4
>
35 <form method
="post" class="mb-4" <?php
echo checkAccess("history", "form");?
>>
36 <label
for="case-diagnosis">Diagnosis
</label
>
37 <input type
="text" class="form-control" name
="diagnosis" id
="case-diagnosis" value
="<?php if(!empty($pid)) echo $db->getDiagnosis($pid)->fetchArray()["diagnosis
"];?>">
38 <label
for="case-summary">Summary
</label
>
39 <textarea type
="text" class="form-control" name
="summary" id
="case-summary"><?php
if(!empty($pid)) echo $db->getSummary($pid)->fetchArray()["summary"];?
></textarea
>
40 <button
class="btn btn-primary mt-3" type
="submit">Save
</button
>
42 <div
class="alert alert-danger"><strong
>Admission ID can NOT be changed
</strong
> after entry
. Hence
, make abolutely sure that you enter the correct admission ID before saving
.</div
>
47 <?php
include(CONFIG_LIB
."foot.php");?
>