forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_pro.php
59 lines (54 loc) · 2.51 KB
/
get_pro.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* Easipro class
*
* @package OpenEMR
* @link http://www.open-emr.org
* @author Cassian LUP <[email protected]>
* @author Jerry Padgett <[email protected]>
* @author Shiqiang Tao <[email protected]>
* @author Brady Miller <[email protected]>
* @copyright Copyright (c) 2011 Cassian LUP <[email protected]>
* @copyright Copyright (c) 2016-2017 Jerry Padgett <[email protected]>
* @copyright Copyright (c) 2018 Shiqiang Tao <[email protected]>
* @copyright Copyright (c) 2020 Brady Miller <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/
require_once("verify_session.php");
use OpenEMR\Easipro\Easipro;
$records = Easipro::assessmentsForPatient($pid);
if (!empty($records)) { ?>
<div class="font-weight-bold m-1" onclick="$('.assessment-row').toggleClass('d-none');" role="button">
<i class="font-weight-bold fa fa-eye mr-1"></i><?php echo xlt("My Assessments") ?>
</div>
<div class="table-responsive">
<table class="table table-sm table-striped">
<thead class="assessment-row">
<tr>
<th><?php echo xlt('Name'); ?></th>
<th><?php echo xlt('Deadline (CST)'); ?></th>
<th><?php echo xlt('Status'); ?></th>
<th> </th>
</tr>
</thead><tbody>
<?php
foreach ($records as $row) {
echo "<tr class='assessment-row' id='hide_assessment_" . attr($row['assessment_oid']) . "'>";
echo "<td>" . text($row['form_name']) . "</td>";
echo "<td>" . text($row['deadline']) . "</td>";
echo "<td id='asst_status_" . attr($row['assessment_oid']) . "'>" . text($row['status']) . "</td>";
if ($row['status'] == 'ordered') {
echo "<td id='asst_" . attr($row['assessment_oid']) . "'><button class='btn btn-sm btn-primary' onclick=\"startAssessment(this," . attr_js($row['assessment_oid']) . ")\">" . xlt('Start Assessment') . "</button></td>";
} elseif ($row['status'] == 'in-progress') {
echo "<td>" . xlt('Continue Assessment') . "</td>";
} elseif ($row['status'] == 'completed') {
echo "<td><i class='fa fa-check-circle'></i></td>";
}
echo "</tr>";
}
echo "</tbody></table></div>";
} else {
echo xlt("No Assessment to Display.");
}
echo "<div class='form-row mx-2' id='ContentTitle'></div>";
echo "<div class='container-lg' id='Content'></div>" ?>