2 require(dirname(__DIR__
)."/require.php");
4 if(isSet($_GET["pid"])){
6 if(!empty($_GET["get"]) && $_GET["get"]=="nursing"){
8 $nursingArray=$db->getAllData($pid, "nursing");
9 while($item=$nursingArray->fetchArray()){
10 array_push($nursing, json_decode($item["data"]));
12 echo json_encode($nursing);
15 if(!empty($_GET["get"]) && $_GET["get"]=="physician"){
17 $physicianArray=$db->getAllData($pid, "physician");
18 while($item=$physicianArray->fetchArray()){
19 array_push($physician, json_decode($item["data"]));
21 echo json_encode($physician);
24 if(!empty($_GET["get"]) && $_GET["get"]=="reports"){
26 $reportsArray=$db->getAllData($pid, "reports");
27 while($item=$reportsArray->fetchArray()){
28 array_push($reports, json_decode($item["data"]));
30 echo json_encode($reports);
33 if(!empty($_GET["get"]) && $_GET["get"]=="treatment"){
35 $treatmentArray=$db->getDrugs($pid);
36 while($item=$treatmentArray->fetchArray()){
38 array_push($treatment, $item);
41 echo json_encode($treatment);
49 <?php
include(CONFIG_LIB
."head.php");?
>
50 <title
>View Info
</title
>
53 <div
class="container">
54 <?php
include(CONFIG_LIB
."top.php");?
>
55 <div
class="alert alert-warning"><p
>This page contains experimental features
. Please
double check
for the time being
.</p
></div
>
57 <?php
echo getInfo($pid);?
>
59 <div
class="alert alert-light d-none" id
="ioAlert">Possible inconsistent intake output data
. (<span id
="ioInconsistency"></span
>)</div
>
60 <div
class="card d-none" id
="ioData">
61 <div
class="card-body">
62 <h4
class="card-heading">Intake
/Output
</h4
>
64 <li
>Approximate
<span
class="ioGap"></span
> hours intake
: <span id
="approxIn"></span
> ml
</li
>
65 <li
>Approximate
<span
class="ioGap"></span
> hours output
: <span id
="approxOut"></span
> ml
</li
>
70 <div
class="card-body">
75 <h4
>Clinical Parameters
</h4
>
78 <tr
><th
>Date
/Time
</th
><th
><select id
="clinVar"><option disabled selected
>--Select Parameter
--</option
></select
></th
></tr
>
83 <canvas id
="clinChart"></canvas
>
88 <tr
><th
>Date
/Time
</th
><th
><select id
="reportsVar"><option disabled selected
>--Select Parameter
--</option
></select
></th
></tr
>
90 <tbody id
="reportsData">
93 <canvas id
="reportsChart"></canvas
>
97 <tr
><td
><select id
="drugVar"><option disabled selected
>--Select Drug
--</option
></select
></td
><td id
="drugData1"></td
><td id
="drugData2"></td
></tr
>
99 <canvas id
="drugsChart"></canvas
>
100 <?php
include(CONFIG_LIB
."foot.php");?
>
101 <script
>var pid
="<?php echo $pid;?>"</script
>
102 <script src
="res/calc.js"></script
>