2 require(dirname(__DIR__
)."/require.php");
7 if(isSet($_GET["pid"])){
9 $status=$db->getStatus($pid)->fetchArray()["status"];
10 $info=viewData($db->getAdmissionData($pid)->fetchArray()["data"]);
11 $history=viewData($db->getHistory($pid)->fetchArray()["history"]);
12 $physicianArray=$db->getAllData($pid, "physician");
13 while($c=$physicianArray->fetchArray()){
14 array_push($physician, viewData($c["data"], "physician.php?pid=".$pid."&id=".$c["rowid"]));
16 $nursingArray=$db->getAllData($pid, "nursing");
17 while($c=$nursingArray->fetchArray()){
18 array_push($nursing, viewData($c["data"], "nursing.php?pid=".$pid."&id=".$c["rowid"]));
20 $reportsArray=$db->getAllData($pid, "reports");
21 while($r=$reportsArray->fetchArray()){
22 array_push($reports, viewData($r["data"], "report.php?pid=".$pid."&id=".$r["rowid"]."&form=".$db->getForm($r["rowid"])->fetchArray()["form"]));
29 <?php
include(CONFIG_LIB
."head.php");?
>
30 <title
>View Info
</title
>
33 <div
class="container">
36 <div
class="card-body">
38 <div
class="mb-2 col-md-3" id
="treatment" <?php
if($info=="") echo "style='display:none'";?
>>
39 <a
class="btn btn-success btn-lg btn-block" href
="treatment.php?pid=<?php echo $pid;?>">Treatment
</a
>
41 <div
class="mb-2 col-md-3" id
="physician" <?php
if($info=="") echo "style='display:none'";?
>>
42 <a
class="mb-2 btn btn-primary btn-lg btn-block" href
="physician.php?pid=<?php echo $pid;?>">Add Physician Note
</a
>
44 <div
class="mb-2 col-md-3" id
="nursing" <?php
if($info=="") echo "style='display:none'";?
>>
45 <a
class="mb-2 btn btn-warning btn-lg btn-block" href
="nursing.php?pid=<?php echo $pid;?>">Add Nursing Note
</a
>
47 <div
class="mb-2 col-md-3" id
="requisition" <?php
if($info=="") echo "style='display:none'";?
>>
48 <a
class="mb-2 btn btn-danger btn-lg btn-block" href
="requisition.php?pid=<?php echo $pid;?>">Add Requisition
</a
>
52 <div
class="mb-2 col-md-2" <?php
if($info=="") echo "style='display:none'";?
>>
53 <a
class="mb-2 btn btn-secondary" href
="admission.php?pid=<?php echo $pid;?>">Edit Information
</a
>
55 <div
class="mb-2 col-md-2" <?php
if($info=="") echo "style='display:none'";?
>>
56 <a
class="mb-2 btn btn-secondary" href
="history.php?pid=<?php echo $pid;?>">Edit History
</a
>
58 <div
class="mb-2 col-md-2" <?php
if($info=="") echo "style='display:none'";?
>>
59 <a
class="mb-2 btn btn-secondary" href
="laboratory.php?pid=<?php echo $pid;?>">Add Report
</a
>
61 <div
class="mb-2 col-md-2" <?php
if($info=="") echo "style='display:none'";?
>>
62 <a
class="btn btn-secondary" href
="attachments.php?pid=<?php echo $pid;?>">Attachments
</a
>
64 <div
<?php
if($status!="admitted") echo "style='display:none'";?
> class="mb-2 col-md-2" id
="discharge" <?php
if($info=="") echo "style='display:none'";?
>>
65 <a
class="btn btn-secondary" href
="discharge.php?pid=<?php echo $pid;?>">Discharge
</a
>
67 <div
<?php
if($status!="admitted") echo "style='display:none'";?
> class="mb-2 col-md-2" id
="death" <?php
if($info=="") echo "style='display:none'";?
>>
68 <a
class="btn btn-secondary" href
="death.php?pid=<?php echo $pid;?>">Death
</a
>
73 <div
<?php
if(empty($pid)) echo "style='display:none'";?
>>
74 <ul
class="nav nav-tabs" id
="listtabs" role
="tablist">
75 <li
class="nav-item" role
="presentation">
76 <a
class="nav-link active" id
="info-tab" data
-toggle
="tab" href
="#info" role
="tab" aria
-controls
="info" aria
-selected
="true">Info
</a
>
78 <li
class="nav-item" role
="presentation">
79 <a
class="nav-link" id
="history-tab" data
-toggle
="tab" href
="#history" role
="tab" aria
-controls
="history" aria
-selected
="false">History
</a
>
81 <li
class="nav-item" role
="presentation">
82 <a
class="nav-link" id
="physician-tab" data
-toggle
="tab" href
="#physician" role
="tab" aria
-controls
="physician" aria
-selected
="false">Physician Notes
</a
>
84 <li
class="nav-item" role
="presentation">
85 <a
class="nav-link" id
="nursing-tab" data
-toggle
="tab" href
="#nursing" role
="tab" aria
-controls
="clinical" aria
-selected
="false">Nursing Notes
</a
>
87 <li
class="nav-item" role
="presentation">
88 <a
class="nav-link" id
="report-tab" data
-toggle
="tab" href
="#report" role
="tab" aria
-controls
="report" aria
-selected
="false">Lab Reports
</a
>
91 <div
class="tab-content" id
="viewtabs">
92 <div
class="tab-pane fade show active" id
="info" role
="tabpanel" aria
-labelledby
="info-tab">
93 <div
class='card'><div
class='card-body'>Status
: <?php
echo $status;?
></div
></div
>
95 <div
class="col-md-6">
98 <div
class="col-md-6">
100 <tr
><th
>Diagnosis
</th
><td
><?php
echo $db->getDiagnosis($pid)->fetchArray()["diagnosis"];?
></td
></tr
>
101 <tr
><th
>Summary
</th
><td
><?php
echo $db->getSummary($pid)->fetchArray()["summary"];?
></td
></tr
>
106 <div
class="tab-pane fade" id
="history" role
="tabpanel" aria
-labelledby
="history-tab">
107 <?php
echo $history;?
>
109 <div
class="tab-pane fade" id
="physician" role
="tabpanel" aria
-labelledby
="physician-tab">
110 <?php
foreach($physician as $p) echo $p;?
>
112 <div
class="tab-pane fade" id
="nursing" role
="tabpanel" aria
-labelledby
="nursing-tab">
113 <?php
foreach($nursing as $n) echo $n;?
>
115 <div
class="tab-pane fade" id
="report" role
="tabpanel" aria
-labelledby
="report-tab">
116 <?php
foreach($reports as $r) echo $r;?
>
122 <div
<?php
if(!empty($pid)) echo "style='display:none'";?
>>
123 <h1
>Please enter a valid patient ID
</h1
>
125 <input
class="form-control" name
="pid">
126 <button
class="form-control" type
="submit">View
</button
>
129 <?php
include(CONFIG_LIB
."foot.php");?
>