]>
Softwares of Agnibho - simpleipd.git/blob - www/treatment.php
2 require(dirname(__DIR__
)."/require.php");
3 if(!empty($_GET["pid"])){
5 if(!empty($_POST["omit"])){
6 $db->omitDrug($_POST["omit"]);
8 elseif(!empty($_POST["drug"])){
9 $db->addDrug($pid, $_POST["drug"], $_POST["dose"], $_POST["route"], $_POST["frequency"], $_POST["date"], $_POST["time"], $_POST["duration"], $_POST["extra_note"]);
11 $list=$db->getDrugs($pid);
13 while($drug=$list->fetchArray()){
20 // if($drug["start"]+$drug["duration"]*24*3600<time()){
21 // $db->omitDrug($drug["rowid"]);
24 //} catch(TypeError $e){}
26 $view=$view."<tr class='".$omit."'><td>".$drug["drug"]."</td><td>".$drug["dose"]."</td><td>".$drug["route"]."</td><td>".$drug["frequency"]."</td><td>".date("M j", $drug["start"])."</td><td>".$drug["duration"]."</td><td>".$drug["addl"]."</td><td><button type='submit' class='btn btn-warning' name='omit' value='".$drug["rowid"]."' form='omitter' ".$omit." ".checkAccess("treatment", "form").">Omit</button></td></tr>";
28 $view=$view."</table>";
29 $form=schema2form("forms/drugs.schema.json");
35 <?php
include(CONFIG_LIB
."head.php");?
>
36 <title
>Clinical Notes
</title
>
39 <div
class="container">
40 <?php
include(CONFIG_LIB
."top.php");?
>
41 <div
class="card mb-4">
42 <div
class="card-body">
43 <h4
class="card-title">Medicine
List</h4
>
44 <form method
='post' id
='omitter'></form
>
46 <tr
><th
>Drug
</th
><th
>Dose
</th
><th
>Route
</th
><th
>Frequency
</th
><th
>Start
</th
><th
>Duration
</th
><th
>Note
</th
><th
></th
></tr
>
51 <div
<?php
echo checkAccess("treatment","form");?
>>
55 <?php
include(CONFIG_LIB
."foot.php");?
>