]> Softwares of Agnibho - simpleipd.git/blob - www/index.php
Added ventilator note
[simpleipd.git] / www / index.php
1 <?php
2 require(dirname(__DIR__)."/require.php");
3 $list=$db->getPatientList();
4 $showList="";
5 while($arr=$list->fetchArray()){
6 $pid=$arr["pid"];
7 $showList=$showList."<tr><td><a href='view.php?pid=".$pid."'>".$pid."</a></td><td>".$arr["ward"]."-".$arr["bed"]."</td><td>".$arr["name"]."</td><td>".$arr["diagnosis"]."</tr>";
8 }
9 $reqs=$db->getRequisitionList();
10 $showReqs="";
11 while($arr=$reqs->fetchArray()){
12 $pid=$arr["pid"];
13 if(!empty($arr["form"])){
14 if($arr["form"]=="report-cs"){
15 $test="<a href='vitek.php?pid=".$pid."&form=".$arr["form"]."&req=".$arr["rowid"]."&sample=".$arr["sample"]."&src=index'>".$arr["test"]."</a>";
16 }
17 else{
18 $test="<a href='report.php?pid=".$pid."&form=".$arr["form"]."&req=".$arr["rowid"]."&sample=".$arr["sample"]."&src=index'>".$arr["test"]."</a>";
19 }
20 }
21 else{
22 $test="<a href='report.php?pid=".$pid."&form=report-other&req=".$arr["rowid"]."&src=index'>".$arr["test"]."</a>";
23 }
24 $showReqs=$showReqs."<tr><td>".$test."</td><td>".$arr["sample"]."</td><td>".$arr["room"]."</td><td>".date("M j, Y", $arr["time"])."</td><td><a href='view.php?pid=".$pid."' target='_blank'>".$pid."</a></td></tr>";
25 }
26 ?>
27 <!DOCTYPE html>
28 <html>
29 <head>
30 <?php include(CONFIG_LIB."head.php");?>
31 <title>View Info</title>
32 </head>
33 <body>
34 <div class="container">
35 <?php include(CONFIG_LIB."top.php");?>
36 <div class="card">
37 <div class="card-body">
38 <h4 class="card-title">Patient List</h4>
39 <table class="table">
40 <tr><th>Patient ID</th><th>Bed Number</th><th>Name</th><th>Diagnosis</th></tr>
41 <?php echo $showList;?>
42 </table>
43 <a class="btn btn-primary btn-lg" href="admission.php">Add New Patient</a>
44 </div>
45 </div>
46 <div class="card">
47 <div class="card-body">
48 <h4 class="card-title">Requisition List</h4>
49 <table class="table">
50 <tr><th>Test Needed</th><th>Sample</th><th>Place</th><th>Date</th><th>Patient ID</th></tr>
51 <?php echo $showReqs;?>
52 </table>
53 </div>
54 </div>
55 </div>
56 <?php include(CONFIG_LIB."foot.php");?>
57 </body>
58 </html>