2 include_once("../../globals.php");
3 include_once("$srcdir/transactions.inc");
4 require_once("$srcdir/options.inc.php");
6 use OpenEMR\Core\Header
;
7 use OpenEMR\Menu\PatientMenuRole
;
11 <title
><?php
echo xlt('Patient Transactions');?
></title
>
12 <?php Header
::setupHeader('common'); ?
>
14 <script type
="text/javascript">
15 // Called by the deleteme.php window on a successful delete.
16 function imdeleted() {
18 location
.href
= '../../patient_file/transaction/transactions.php';
20 // Process click on Delete button.
21 function deleteme(transactionId
) {
23 dlgopen('../deleter.php?transaction=' + transactionId
, '_blank', 500, 450);
26 <?php
require_once("$include_root/patient_file/erx_patient_portal_js.php"); // jQuery for popups for eRx and patient portal ?>
30 <body
class="body_top">
31 <div
class="container">
32 <!--<h1
><?php
echo xlt('Patient Transactions');?
></h1
>-->
33 <?php
$header_title = xl('Patient Transactions for');?
>
35 <div
class="col-sm-12">
36 <?php
require_once("$include_root/patient_file/summary/dashboard_header.php");?
>
40 <div
class="col-sm-12">
42 $list_id = "nav-list5"; // to indicate nav item is active, count and give correct id
43 // Collect the patient menu then build it
44 $menuPatient = new PatientMenuRole();
45 $menuPatient->displayHorizNavBarMenu();
50 <div
class="col-sm-12">
51 <div
class="btn-group">
52 <!--<a href
="../summary/demographics.php" class="btn btn-default btn-back" onclick
="top.restoreSession()">
53 <?php
echo xlt('Back to Patient'); ?
></a
>-->
54 <a href
="add_transaction.php" class="btn btn-default btn-add" onclick
="top.restoreSession()">
55 <?php
echo xlt('Create New Transaction'); ?
></a
>
56 <a href
="print_referral.php" class="btn btn-default btn-print" onclick
="top.restoreSession()">
57 <?php
echo xlt('View/Print Blank Referral Form'); ?
></a
>
63 <div
class="col-sm-12 text">
66 if ($result = getTransByPid($pid)) {
69 <table
class="table table-striped">
73 <th
><?php
echo xlt('Type'); ?
></th
>
74 <th
><?php
echo xlt('Date'); ?
></th
>
75 <th
><?php
echo xlt('User'); ?
></th
>
76 <th
><?php
echo xlt('Details'); ?
></th
>
81 foreach ($result as $item) {
82 if (!isset($item['body'])) {
86 if (getdate() == strtotime($item['date'])) {
87 $date = "Today, " . date('D F ds', strtotime($item['date']));
89 $date = date('D F ds', strtotime($item['date']));
92 $date = oeFormatShortDate($item['refer_date']);
94 $edit = xl('View/Edit');
95 $view = xl('Print'); //actually prints or displays ready to print
96 $delete = xl('Delete');
97 $title = xl($item['title']);
101 <div
class="btn-group oe-pull-toward">
102 <a href
='add_transaction.php?transid=<?php echo attr($id); ?>&title=<?php echo attr($title); ?>&inmode=edit'
103 onclick
='top.restoreSession()'
104 class='btn btn-default btn-edit'>
105 <?php
echo text($edit); ?
>
107 <?php
if (acl_check('admin', 'super')) { ?
>
109 onclick
='deleteme(<?php echo attr($id); ?>)'
110 class='btn btn-default btn-delete'>
111 <?php
echo text($delete); ?
>
114 <?php
if ($item['title'] == 'LBTref') { ?
>
115 <a href
='print_referral.php?transid=<?php echo attr($id); ?>' onclick
='top.restoreSession();'
116 class='btn btn-print btn-default'>
117 <?php
echo text($view); ?
>
122 <!--<td
><?php
echo generate_display_field(['data_type' => 99, 'list_id' => 'Transactions'], $item['title']); ?
></td
>-->
123 <td
><?php
echo getLayoutTitle('Transactions', $item['title']); ?
></td
>
124 <td
><?php
echo text($date); ?
></td
>
125 <td
><?php
echo text($item['user']); ?
></td
>
126 <td
><?php
echo text($item['body']); ?
></td
>
137 <span
class="text"><i
class="fa fa-exclamation-circle oe-text-orange" aria
-hidden
="true"></i
> <?php
echo xlt('There are no transactions on file for this patient.'); ?
></span
>
143 </div
><!--end of container div
-->
145 //home of the help modal ;)
146 //$GLOBALS['enable_help'] = 0; // Please comment out line if you want help modal to function on this page
147 if ($GLOBALS['enable_help'] == 1) {
148 echo "<script>var helpFile = 'transactions_dashboard_help.php'</script>";
149 require "$include_root/help_modal.php";
153 var listId
= '#' +
'<?php echo text($list_id); ?>';
154 $
(document
).ready(function(){
155 $
(listId
).addClass("active");