]>
Softwares of Agnibho - simpleipd.git/blob - www/index.php
2 require(dirname(__DIR__
)."/require.php");
3 if(!empty($_POST["req"])){
4 $db->receiveRequisition($_POST["req"]);
6 $list=$db->getAdmittedPatientList();
9 while($arr=$list->fetchArray()){
11 $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"]."</td></tr>";
14 $reqs=$db->getRequisitionList();
17 while($arr=$reqs->fetchArray()){
19 if(!empty($arr["form"])){
20 if($arr["form"]=="report-cs"){
21 $test="<a href='vitek.php?pid=".$pid."&form=".$arr["form"]."&req=".$arr["rowid"]."&sample=".$arr["sample"]."&time=".$arr["time"]."&src=index'>".$arr["test"]."</a>";
22 if(checkAccess("report")=="all"){
23 $toReport="<a class='btn btn-sm btn-primary' href='vitek.php?pid=".$pid."&form=".$arr["form"]."&req=".$arr["rowid"]."&sample=".$arr["sample"]."&time=".$arr["time"]."&src=index'>Add Report</a>";
30 $test="<a href='report.php?pid=".$pid."&form=".$arr["form"]."&req=".$arr["rowid"]."&sample=".$arr["sample"]."&time=".$arr["time"]."&src=index'>".$arr["test"]."</a>";
31 if(checkAccess("report")=="all"){
32 $toReport="<a class='btn btn-sm btn-primary' href='vitek.php?pid=".$pid."&form=".$arr["form"]."&req=".$arr["rowid"]."&sample=".$arr["sample"]."&time=".$arr["time"]."&src=index'>Add Report</a>";
33 $toReport="<a class='btn btn-sm btn-primary' href='report.php?pid=".$pid."&form=".$arr["form"]."&req=".$arr["rowid"]."&sample=".$arr["sample"]."&time=".$arr["time"]."&src=index'>Add Report</a>";
41 $test="<a href='report.php?pid=".$pid."&form=report-other&req=".$arr["rowid"]."&src=index'>".$arr["test"]."</a>";
42 if(checkAccess("report")=="all"){
43 $toReport="<a class='btn btn-sm btn-primary' href='report.php?pid=".$pid."&form=report-other&req=".$arr["rowid"]."&src=index'>Add Report</a>";
49 if($arr["status"]=="received"){
50 $received="<span class='badge badge-success'>Sample Received</span>";
52 elseif(checkAccess("report")=="all"){
53 $received="<button class='btn btn-sm btn-outline-danger confirm' form='sample' name='req' value='".$arr["rowid"]."'>Receive Sample</button>";
56 $received="<span class='badge badge-warning'>Sample Not Received</span>";
59 $showReqs=$showReqs."<tr class='room1' data-room='".$arr["room"]."'><td>".$test."</td><td>".$arr["sample"]."</td><td>".$arr["room"]."</td><td>".date("M j", $arr["time"])."</td><td><a href='view.php?pid=".$pid."' target='_blank'>".$pid." (".$db->getWard($pid)->fetchArray()["ward"]."-".$db->getBed($pid)->fetchArray()["bed"].")</a></td></tr><tr class='room2' data-room='".$arr["room"]."'><td></td><td colspan='2'>".$arr["addl"]."</td><td>".$received."</td><td>".$toReport."</td></tr>";
66 <?php
include(CONFIG_LIB
."head.php");?
>
67 <title
>View Info
</title
>
70 <div
class="container">
71 <?php
include(CONFIG_LIB
."top.php");?
>
73 <div
class="card-body">
74 <h4
class="card-title">Patient
List</h4
>
76 <tr
><th
>Patient ID
</th
><th
>Bed Number
</th
><th
>Name
</th
><th
>Diagnosis
</th
></tr
>
77 <?php
echo $showList;?
>
79 <a
class="btn btn-primary btn-lg" href
="admission.php">Add
New Patient
</a
>
80 <a href
="archive.php" class="btn btn-outline-secondary float-right">Archive
</a
>
84 <div
class="card-body">
85 <h4
class="card-title">Requisition
List</h4
>
86 <div id
="room-filter"><button
class="btn btn-secondary m-2" data
-room
="all">All
</button
></div
>
87 <form id
="sample" method
="post"></form
>
88 <table
class="table table-striped">
89 <tr
><th
>Test Needed
</th
><th
>Sample
</th
><th
>Place
</th
><th
>Date
</th
><th
>Patient ID
</th
></tr
>
90 <?php
echo $showReqs;?
>
95 <?php
include(CONFIG_LIB
."foot.php");?
>
97 var roomList
=new Set();
98 $
(document
).ready(function(){
99 $
(".room1").each(function(){
100 roomList
.add($
(this
).data("room"));
102 roomName
=roomList
.entries();
103 for(const name of roomName
){
105 $
("#room-filter").html($
("#room-filter").html()+
"<button class='btn btn-outline-secondary m-2' data-room='"+name
[0]+
"'>"+name
[0]+
"</button>");
108 $
("#room-filter").on("click", "button", function(){
109 $
("#room-filter button").removeClass("btn-secondary");;
110 $
("#room-filter button").addClass("btn-outline-secondary");;
111 $
(this
).removeClass("btn-outline-secondary");
112 $
(this
).addClass("btn-secondary");
113 room
=$
(this
).data("room");
121 $
(".room1").each(function(){
122 if($
(this
).data("room")==room
){
126 $
(".room2").each(function(){
127 if($
(this
).data("room")==room
){