]>
Softwares of Agnibho - simpleipd.git/blob - www/nursing.php
2 require(dirname(__DIR__
)."/require.php");
3 if(!empty($_GET["pid"])){
5 if(empty($_POST["intake"]) && empty($_POST["output"])){
6 if(!empty($_POST["io_from"])) $_POST["io_from"]="";
7 if(!empty($_POST["io_to"])) $_POST["io_to"]="";
9 if(!empty($_POST["date"]) && !empty($_POST["time"])){
10 if(!empty($_GET["id"])){
11 $db->editNursing($_POST, $pid, $_GET["id"]);
14 $db->addNursing($_POST, $pid);
16 header("Location: view.php?pid=".$_GET["pid"]);
19 $all=$db->getAllData($pid, "nursing");
22 while($io=="" && $a=$all->fetchArray()){
23 $d=json_decode($a["data"]);
24 $io=$d->intake
.$d->output
;
28 $d=$db->getAdmission($pid)->fetchArray();
30 $dt->setTimestamp($d["admission"]);
31 $lastIO=$dt->format("H:i");
33 if(isSet($_GET["id"])){
34 $form=schema2form("forms/nursing.schema.json", $pid, $_GET["id"], "nursing");
37 $form=schema2form("forms/nursing.schema.json");
44 <?php
include(CONFIG_LIB
."head.php");?
>
45 <title
>Nursing Notes
</title
>
48 <input type
="hidden" id
="io_to_val" name
="lastIO" value
="<?php echo $lastIO;?>">
49 <div
class="container">
50 <?php
include(CONFIG_LIB
."top.php");?
>
51 <?php
echo getInfo($pid);?
>
52 <div
<?php
echo checkAccess("nursing", "form");?
>>
56 <?php
include(CONFIG_LIB
."foot.php");?
>