4 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
6 * LICENSE: This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * @author Jerry Padgett <sjpadgett@gmail.com>
21 * @link http://www.open-emr.org
24 $this->assign('title', xlt('Patient Portal') . ' | ' . xlt('Onsite Activity Views'));
25 $this->assign('nav', 'onsiteactivityviews');
27 $this->display('_FormsHeader.tpl.php');
28 echo "<script>var cuser='" . $this->cuser
. "';</script>";
30 <script type
="text/javascript">
31 $LAB.script("<?php echo $GLOBALS['web_root']; ?>/portal/patient/scripts/app/onsiteactivityviews.js?v=<?php echo $GLOBALS['v_js_includes']; ?>").wait(function(){
32 $
(document
).ready(function(){
35 setTimeout(function(){
36 if (!actpage
.isInitialized
) actpage
.init();
41 <div
class="container">
44 <i
class="icon-th-list"></i
><?php
echo xlt('Onsite Patient Activities')?
>
45 <span id
="loader" class="loader progress progress-striped active"><span
class="progress-bar"></span
></span
>
46 <div
class="col-sm-3 col-md-3 pull-right">
47 <form
class="navbar-form" role
="search">
48 <div
class="input-group">
49 <input type
="text" class="form-control" placeholder
="<?php echo xla('Search'); ?>" name
="srch-term" id
="srch-term">
50 <div
class="input-group-btn">
51 <button
class="btn btn-default" type
="submit"><i
class="glyphicon glyphicon-search"></i
></button
>
57 <!-- underscore template
for the collection
-->
58 <script type
="text/template" id
="onsiteActivityViewCollectionTemplate">
59 <table
class="collection table table-condensed table-bordered table-hover">
62 <th id
="header_Date"><?php
echo xlt('Date')?
><%
if (actpage
.orderBy
== 'Date') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
63 <th id
="header_PatientId"><?php
echo xlt('Patient Id')?
><%
if (actpage
.orderBy
== 'PatientId') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
64 <th id
="header_Fname"><?php
echo xlt('First')?
><%
if (actpage
.orderBy
== 'Fname') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
65 <th id
="header_Mname"><?php
echo xlt('Middle')?
><%
if (actpage
.orderBy
== 'Mname') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
66 <th id
="header_Lname"><?php
echo xlt('Last')?
><%
if (actpage
.orderBy
== 'Lname') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
67 <th id
="header_Narrative"><?php
echo xlt('Narrative')?
><%
if (actpage
.orderBy
== 'Narrative') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
68 <th id
="header_Activity"><?php
echo xlt('Activity')?
><%
if (actpage
.orderBy
== 'Activity') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
69 <th id
="header_RequireAudit"><?php
echo xlt('Require Audit')?
><%
if (actpage
.orderBy
== 'RequireAudit') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
70 <th id
="header_PendingAction"><?php
echo xlt('Pending Action')?
><%
if (actpage
.orderBy
== 'PendingAction') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
71 <th id
="header_Status"><?php
echo xlt('Status')?
><%
if (actpage
.orderBy
== 'Status') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
72 <!-- UNCOMMENT TO SHOW ADDITIONAL COLUMNS
- Leave in place
for future
use
73 <th id
="header_Id">Id
<%
if (actpage
.orderBy
== 'Id') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
74 <th id
="header_ActionTaken">Action Taken
<%
if (actpage
.orderBy
== 'ActionTaken') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
75 <th id
="header_TableAction">Table Action
<%
if (actpage
.orderBy
== 'TableAction') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
76 <th id
="header_TableArgs">Table Args
<%
if (actpage
.orderBy
== 'TableArgs') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
77 <th id
="header_ActionUser">Action User
<%
if (actpage
.orderBy
== 'ActionUser') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
78 <th id
="header_ActionTakenTime">Action Taken Time
<%
if (actpage
.orderBy
== 'ActionTakenTime') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
79 <th id
="header_Checksum">Checksum
<%
if (actpage
.orderBy
== 'Checksum') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
80 <th id
="header_Title">Title
<%
if (actpage
.orderBy
== 'Title') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
81 <th id
="header_Dob">Dob
<%
if (actpage
.orderBy
== 'Dob') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
82 <th id
="header_Ss">Ss
<%
if (actpage
.orderBy
== 'Ss') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
83 <th id
="header_Street">Street
<%
if (actpage
.orderBy
== 'Street') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
84 <th id
="header_PostalCode">Postal Code
<%
if (actpage
.orderBy
== 'PostalCode') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
85 <th id
="header_City">City
<%
if (actpage
.orderBy
== 'City') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
86 <th id
="header_State">State
<%
if (actpage
.orderBy
== 'State') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
87 <th id
="header_Referrerid">Referrerid
<%
if (actpage
.orderBy
== 'Referrerid') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
88 <th id
="header_Providerid">Providerid
<%
if (actpage
.orderBy
== 'Providerid') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
89 <th id
="header_RefProviderid">Ref Providerid
<%
if (actpage
.orderBy
== 'RefProviderid') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
90 <th id
="header_Pubpid">Pubpid
<%
if (actpage
.orderBy
== 'Pubpid') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
91 <th id
="header_CareTeam">Care Team
<%
if (actpage
.orderBy
== 'CareTeam') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
92 <th id
="header_Username">Username
<%
if (actpage
.orderBy
== 'Username') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
93 <th id
="header_Authorized">Authorized
<%
if (actpage
.orderBy
== 'Authorized') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
94 <th id
="header_Ufname">Ufname
<%
if (actpage
.orderBy
== 'Ufname') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
95 <th id
="header_Umname">Umname
<%
if (actpage
.orderBy
== 'Umname') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
96 <th id
="header_Ulname">Ulname
<%
if (actpage
.orderBy
== 'Ulname') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
97 <th id
="header_Facility">Facility
<%
if (actpage
.orderBy
== 'Facility') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
98 <th id
="header_Active">Active
<%
if (actpage
.orderBy
== 'Active') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
99 <th id
="header_Utitle">Utitle
<%
if (actpage
.orderBy
== 'Utitle') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
100 <th id
="header_PhysicianType">Physician Type
<%
if (actpage
.orderBy
== 'PhysicianType') { %
> <i
class='icon-arrow-<%= actpage.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
105 <% items
.each(function(item
) { %
>
106 <tr id
="<%= _.escape(item.get('id')) %>">
107 <td
><%if
(item
.get('date')) { %
><%
= moment(app
.parseDate(item
.get('date'))).format('MMM D, YYYY h:mm A') %
><%
} else { %
>NULL<%
} %
></td
>
108 <td
><%
= _
.escape(item
.get('patientId') ||
'') %
></td
>
109 <td
><%
= _
.escape(item
.get('fname') ||
'') %
></td
>
110 <td
><%
= _
.escape(item
.get('mname') ||
'') %
></td
>
111 <td
><%
= _
.escape(item
.get('lname') ||
'') %
></td
>
112 <td
><%
= _
.escape(item
.get('narrative') ||
'') %
></td
>
113 <td
><%
= _
.escape(item
.get('activity') ||
'') %
></td
>
114 <td
><%
= _
.escape(item
.get('requireAudit') ||
'') %
></td
>
115 <td
><%
= _
.escape(item
.get('pendingAction') ||
'') %
></td
>
116 <td
><%
= _
.escape(item
.get('status') ||
'') %
></td
>
117 <!-- UNCOMMENT TO SHOW ADDITIONAL COLUMNS
- Leave in place
for future
use
118 <td
><%
= _
.escape(item
.get('id') ||
'') %
></td
>
119 <td
><%
= _
.escape(item
.get('actionTaken') ||
'') %
></td
>
120 <td
><%
= _
.escape(item
.get('tableAction') ||
'') %
></td
>
121 <td
><%
= _
.escape(item
.get('tableArgs') ||
'') %
></td
>
122 <td
><%
= _
.escape(item
.get('actionUser') ||
'') %
></td
>
123 <td
><%if
(item
.get('actionTakenTime')) { %
><%
= moment(app
.parseDate(item
.get('actionTakenTime'))).format('MMM D, YYYY h:mm A') %
><%
} else { %
>NULL<%
} %
></td
>
124 <td
><%
= _
.escape(item
.get('checksum') ||
'') %
></td
>
125 <td
><%
= _
.escape(item
.get('title') ||
'') %
></td
>
126 <td
><%if
(item
.get('dob')) { %
><%
= moment(app
.parseDate(item
.get('dob'))).format('MMM D, YYYY') %
><%
} else { %
>NULL<%
} %
></td
>
127 <td
><%
= _
.escape(item
.get('ss') ||
'') %
></td
>
128 <td
><%
= _
.escape(item
.get('street') ||
'') %
></td
>
129 <td
><%
= _
.escape(item
.get('postalCode') ||
'') %
></td
>
130 <td
><%
= _
.escape(item
.get('city') ||
'') %
></td
>
131 <td
><%
= _
.escape(item
.get('state') ||
'') %
></td
>
132 <td
><%
= _
.escape(item
.get('referrerid') ||
'') %
></td
>
133 <td
><%
= _
.escape(item
.get('providerid') ||
'') %
></td
>
134 <td
><%
= _
.escape(item
.get('refProviderid') ||
'') %
></td
>
135 <td
><%
= _
.escape(item
.get('pubpid') ||
'') %
></td
>
136 <td
><%
= _
.escape(item
.get('careTeam') ||
'') %
></td
>
137 <td
><%
= _
.escape(item
.get('username') ||
'') %
></td
>
138 <td
><%
= _
.escape(item
.get('authorized') ||
'') %
></td
>
139 <td
><%
= _
.escape(item
.get('ufname') ||
'') %
></td
>
140 <td
><%
= _
.escape(item
.get('umname') ||
'') %
></td
>
141 <td
><%
= _
.escape(item
.get('ulname') ||
'') %
></td
>
142 <td
><%
= _
.escape(item
.get('facility') ||
'') %
></td
>
143 <td
><%
= _
.escape(item
.get('active') ||
'') %
></td
>
144 <td
><%
= _
.escape(item
.get('utitle') ||
'') %
></td
>
145 <td
><%
= _
.escape(item
.get('physicianType') ||
'') %
></td
>
151 <%
= view
.getPaginationHtml(page
) %
>
153 <!-- underscore template
for the model
-->
154 <script type
="text/template" id
="onsiteActivityViewModelTemplate"></script
>
155 <div id
="collectionAlert"></div
>
156 <div id
="onsiteActivityViewCollectionContainer" class="collectionContainer"></div
>
157 <p id
="returnButtonContainer" class="buttonContainer">
158 <button id
="returnHome" class="btn btn-primary"><?php
echo xlt('Home'); ?
></button
>
160 </div
> <!-- /container
-->
162 $this->display('_Footer.tpl.php');