]>
Softwares of Agnibho - simpleipd.git/blob - discharge.php
d147c690c19739b46b5e9bc4e63962bb63377d12
2 require("lib/require.php");
3 if(!empty($_GET["pid"])){
5 if(!empty($_POST["delete"])){
6 $db->deleteAdvice($_POST["delete"]);
8 elseif(!empty($_POST["drug"])){
9 $db->addAdvice($pid, $_POST["drug"], $_POST["dose"], $_POST["route"], $_POST["frequency"], $_POST["duration"], $_POST["extra-note"]);
11 $list=$db->getAdvice($pid);
12 $view="<form method='post' id='delete'></form>";
13 $view=$view."<table class='table'>";
14 $view=$view."<tr><th>Drug</th><th>Dose</th><th>Route</th><th>Frequency</th><th>Duration</th><th>Note</th></tr>";
15 while($drug=$list->fetchArray()){
17 $view=$view."<tr><td>".$drug["drug"]."</td><td>".$drug["dose"]."</td><td>".$drug["route"]."</td><td>".$drug["frequency"]."</td><td>".$drug["duration"]."</td><td>".$drug["addl"]."</td><td><button class='btn btn-warning' name='delete' value='".$drug["rowid"]."' form='delete'>Delete</button></td></tr>";
19 $view=$view."</table>";
20 $form=schema2form("forms/drugs.schema.json");
26 <?php
include("lib/head.php");?
>
27 <title
>Discharge Notes
</title
>
30 <div
class="container">
31 <div
class="card mb-4">
32 <div
class="card-body">
33 <h4
class="card-title">Medicine
List</h4
>
37 <div
<?php
echo checkAccess("discharge", "form");?
>>
40 <form method
="post" action
="print-discharge.php?pid=<?php echo $pid;?>" class="mt-4" <?php
echo checkAccess("discharge", "form");?
>>
41 <textarea
class="form-control mb-2" id
="discharge-note" name
="discharge-note"></textarea
>
42 <button type
="submit" class="btn btn-danger">Discharge Patient
</button
>
45 <?php
include("lib/foot.php");?
>