3 * This template is not currently used
4 * The support script and controller are however
5 * Leave in place - eventually will use for log review gui
7 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
9 * LICENSE: This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as
11 * published by the Free Software Foundation, either version 3 of the
12 * License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Affero General Public License for more details.
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 * @author Jerry Padgett <sjpadgett@gmail.com>
24 * @link http://www.open-emr.org
26 $this->assign('title', xlt("Patient Portal") . " | " . xlt("Onsite Portal Activities"));
27 $this->assign('nav', 'onsiteportalactivities');
29 $this->display('_Header.tpl.php');
32 <script type
="text/javascript">
33 $LAB.script("scripts/app/onsiteportalactivities.js?v=<?php echo $GLOBALS['v_js_includes']; ?>").wait(function(){
34 $
(document
).ready(function(){
38 setTimeout(function(){
39 if (!page
.isInitialized
) page
.init();
44 <div
class="container">
47 <i
class="icon-th-list"></i
> <?php
echo xlt('Onsite Portal Activities'); ?
>
48 <span id
="loader" class="loader progress progress-striped active"><span
class="progress-bar"></span
></span
>
49 <div
class="col-sm-3 col-md-3 pull-right">
50 <form
class="navbar-form" role
="search">
51 <div
class="input-group">
52 <input type
="text" class="form-control" placeholder
="<?php echo xla('Search'); ?>" name
="srch-term" id
="srch-term">
53 <div
class="input-group-btn">
54 <button
class="btn btn-default" type
="submit"><i
class="glyphicon glyphicon-search"></i
></button
>
60 <!-- underscore template
for the collection
-->
61 <script type
="text/template" id
="onsitePortalActivityCollectionTemplate">
62 <table
class="collection table table-bordered table-hover">
65 <th id
="header_Id"><?php
echo xlt('Id'); ?
><%
if (page
.orderBy
== 'Id') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
66 <th id
="header_Date"><?php
echo xlt('Date'); ?
><%
if (page
.orderBy
== 'Date') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
67 <th id
="header_PatientId"><?php
echo xlt('Patient Id'); ?
><%
if (page
.orderBy
== 'PatientId') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
68 <th id
="header_Activity"><?php
echo xlt('Activity'); ?
><%
if (page
.orderBy
== 'Activity') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
69 <th id
="header_RequireAudit"><?php
echo xlt('Require Audit'); ?
><%
if (page
.orderBy
== 'RequireAudit') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
70 <th id
="header_PendingAction"><?php
echo xlt('Pending Action'); ?
><%
if (page
.orderBy
== 'PendingAction') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
71 <th id
="header_ActionTaken"><?php
echo xlt('Action Taken'); ?
><%
if (page
.orderBy
== 'ActionTaken') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
72 <th id
="header_Status"><?php
echo xlt('Status'); ?
><%
if (page
.orderBy
== 'Status') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
73 <!-- UNCOMMENT TO SHOW ADDITIONAL COLUMNS
74 <th id
="header_Narrative">Narrative
<%
if (page
.orderBy
== 'Narrative') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
75 <th id
="header_TableAction">Table Action
<%
if (page
.orderBy
== 'TableAction') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
76 <th id
="header_TableArgs">Table Args
<%
if (page
.orderBy
== 'TableArgs') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
77 <th id
="header_ActionUser">Action User
<%
if (page
.orderBy
== 'ActionUser') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
78 <th id
="header_ActionTakenTime">Action Taken Time
<%
if (page
.orderBy
== 'ActionTakenTime') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
79 <th id
="header_Checksum">Checksum
<%
if (page
.orderBy
== 'Checksum') { %
> <i
class='icon-arrow-<%= page.orderDesc ? 'up
' : 'down
' %>' /><%
} %
></th
>
84 <% items
.each(function(item
) { %
>
85 <tr id
="<%= _.escape(item.get('id')) %>">
86 <td
><%
= _
.escape(item
.get('id') ||
'') %
></td
>
87 <td
><%if
(item
.get('date')) { %
><%
= moment(app
.parseDate(item
.get('date'))).format('MMM D, YYYY h:mm A') %
><%
} else { %
>NULL<%
} %
></td
>
88 <td
><%
= _
.escape(item
.get('patientId') ||
'') %
></td
>
89 <td
><%
= _
.escape(item
.get('activity') ||
'') %
></td
>
90 <td
><%
= _
.escape(item
.get('requireAudit') ||
'') %
></td
>
91 <td
><%
= _
.escape(item
.get('pendingAction') ||
'') %
></td
>
92 <td
><%
= _
.escape(item
.get('actionTaken') ||
'') %
></td
>
93 <td
><%
= _
.escape(item
.get('status') ||
'') %
></td
>
94 <!-- UNCOMMENT TO SHOW ADDITIONAL COLUMNS
95 <td
><%
= _
.escape(item
.get('narrative') ||
'') %
></td
>
96 <td
><%
= _
.escape(item
.get('tableAction') ||
'') %
></td
>
97 <td
><%
= _
.escape(item
.get('tableArgs') ||
'') %
></td
>
98 <td
><%
= _
.escape(item
.get('actionUser') ||
'') %
></td
>
99 <td
><%if
(item
.get('actionTakenTime')) { %
><%
= moment(app
.parseDate(item
.get('actionTakenTime'))).format('MMM D, YYYY h:mm A') %
><%
} else { %
>NULL<%
} %
></td
>
100 <td
><%
= _
.escape(item
.get('checksum') ||
'') %
></td
>
107 <%
= view
.getPaginationHtml(page
) %
>
110 <!-- underscore template
for the model
-->
111 <script type
="text/template" id
="onsitePortalActivityModelTemplate">
112 <form
class="form-inline" onsubmit
="return false;">
114 <div
class="form-group inline" id
="idInputContainer">
115 <label
class="control-label" for="id"><?php
echo xlt('Id'); ?
></label
>
116 <div
class="controls inline-inputs">
117 <span
class="form-control uneditable-input" id
="id"><%
= _
.escape(item
.get('id') ||
'') %
></span
>
118 <span
class="help-inline"></span
>
121 <div
class="form-group inline" id
="dateInputContainer">
122 <label
class="control-label" for="date"><?php
echo xlt('Date'); ?
></label
>
123 <div
class="controls inline-inputs">
124 <div
class="input-append date date-picker" data
-date
-format
="yyyy-mm-dd">
125 <input id
="date" type
="text" value
="<%= moment(app.parseDate(item.get('date'))).format('YYYY-MM-DD') %>" />
126 <span
class="add-on"><i
class="icon-calendar"></i
></span
>
128 <div
class="input-append bootstrap-timepicker-component">
129 <input id
="date-time" type
="text" class="timepicker-default form-control-small" value
="<%= moment(app.parseDate(item.get('date'))).format('h:mm A') %>" />
130 <span
class="add-on"><i
class="icon-time"></i
></span
>
132 <span
class="help-inline"></span
>
135 <div
class="form-group inline" id
="patientIdInputContainer">
136 <label
class="control-label" for="patientId"><?php
echo xlt('Patient Id'); ?
></label
>
137 <div
class="controls inline-inputs">
138 <input type
="text" class="form-control" id
="patientId" placeholder
="<?php echo xla('Patient Id'); ?>" value
="<%= _.escape(item.get('patientId') || '') %>">
139 <span
class="help-inline"></span
>
142 <div
class="form-group inline" id
="activityInputContainer">
143 <label
class="control-label" for="activity"><?php
echo xlt('Activity'); ?
></label
>
144 <div
class="controls inline-inputs">
145 <input type
="text" class="form-control" id
="activity" placeholder
="<?php echo xla('Activity'); ?>" value
="<%= _.escape(item.get('activity') || '') %>">
146 <span
class="help-inline"></span
>
149 <div
class="form-group inline" id
="requireAuditInputContainer">
150 <label
class="control-label" for="requireAudit"><?php
echo xlt('Require Audit'); ?
></label
>
151 <div
class="controls inline-inputs">
152 <div
class="radio-inline">
153 <label
class="radio-inline"><input id
="requireAudit0" name
="requireAudit" type
="radio" value
=0<%
if (item
.get('requireAudit')==0) { %
> checked
="checked"<%
} %
>>No
</label
>
154 <label
class="radio-inline"><input id
="requireAudit1" name
="requireAudit" type
="radio" value
=1<%
if (item
.get('requireAudit')==1) { %
> checked
="checked"<%
} %
>>Yes
</label
>
156 <span
class="help-inline"></span
>
159 <div
class="form-group inline" id
="pendingActionInputContainer">
160 <label
class="control-label" for="pendingAction"><?php
echo xlt('Pending Action'); ?
></label
>
161 <div
class="controls inline-inputs">
162 <input type
="text" class="form-control" id
="pendingAction" placeholder
="<?php echo xla('Pending Action'); ?>" value
="<%= _.escape(item.get('pendingAction') || '') %>">
163 <span
class="help-inline"></span
>
166 <div
class="form-group inline" id
="actionTakenInputContainer">
167 <label
class="control-label" for="actionTaken"><?php
echo xlt('Action Taken'); ?
></label
>
168 <div
class="controls inline-inputs">
169 <input type
="text" class="form-control" id
="actionTaken" placeholder
="<?php echo xla('Action Taken'); ?>" value
="<%= _.escape(item.get('actionTaken') || '') %>">
170 <span
class="help-inline"></span
>
173 <div
class="form-group inline" id
="statusInputContainer">
174 <label
class="control-label" for="status"><?php
echo xlt('Status'); ?
></label
>
175 <div
class="controls inline-inputs">
176 <input type
="text" class="form-control" id
="status" placeholder
="<?php echo xla('Status'); ?>" value
="<%= _.escape(item.get('status') || '') %>">
177 <span
class="help-inline"></span
>
180 <div
class="form-group inline" id
="narrativeInputContainer">
181 <label
class="control-label" for="narrative"><?php
echo xlt('Narrative'); ?
></label
>
182 <div
class="controls inline-inputs">
183 <textarea
class="form-control" id
="narrative" rows
="3"><%
= _
.escape(item
.get('narrative') ||
'') %
></textarea
>
184 <span
class="help-inline"></span
>
187 <div
class="form-group inline" id
="tableActionInputContainer">
188 <label
class="control-label" for="tableAction"><?php
echo xlt('Table Action'); ?
></label
>
189 <div
class="controls inline-inputs">
190 <textarea
class="form-control" id
="tableAction" rows
="3"><%
= _
.escape(item
.get('tableAction') ||
'') %
></textarea
>
191 <span
class="help-inline"></span
>
194 <div
class="form-group inline" id
="tableArgsInputContainer">
195 <label
class="control-label" for="tableArgs"><?php
echo xlt('Table Args'); ?
></label
>
196 <div
class="controls inline-inputs">
197 <textarea
class="form-control" id
="tableArgs" rows
="3"><%
= _
.escape(item
.get('tableArgs') ||
'') %
></textarea
>
198 <span
class="help-inline"></span
>
201 <div
class="form-group inline" id
="actionUserInputContainer">
202 <label
class="control-label" for="actionUser"><?php
echo xlt('Action User'); ?
></label
>
203 <div
class="controls inline-inputs">
204 <input type
="text" class="form-control" id
="actionUser" placeholder
="<?php echo xla('Action User'); ?>" value
="<%= _.escape(item.get('actionUser') || '') %>">
205 <span
class="help-inline"></span
>
208 <div
class="form-group inline" id
="actionTakenTimeInputContainer">
209 <label
class="control-label" for="actionTakenTime"><?php
echo xlt('Action Taken Time'); ?
></label
>
210 <div
class="controls inline-inputs">
211 <div
class="input-append date date-picker" data
-date
-format
="yyyy-mm-dd">
212 <input id
="actionTakenTime" type
="text" value
="<%= moment(app.parseDate(item.get('actionTakenTime'))).format('YYYY-MM-DD') %>" />
213 <span
class="add-on"><i
class="icon-calendar"></i
></span
>
215 <div
class="input-append bootstrap-timepicker-component">
216 <input id
="actionTakenTime-time" type
="text" class="timepicker-default form-control-small" value
="<%= moment(app.parseDate(item.get('actionTakenTime'))).format('h:mm A') %>" />
217 <span
class="add-on"><i
class="icon-time"></i
></span
>
219 <span
class="help-inline"></span
>
222 <div
class="form-group inline" id
="checksumInputContainer">
223 <label
class="control-label" for="checksum"><?php
echo xlt('Checksum'); ?
></label
>
224 <div
class="controls inline-inputs">
225 <textarea
class="form-control" id
="checksum" rows
="3"><%
= _
.escape(item
.get('checksum') ||
'') %
></textarea
>
226 <span
class="help-inline"></span
>
232 <!-- delete button is is a separate form to prevent enter key from triggering a delete
-->
233 <form id
="deleteOnsitePortalActivityButtonContainer" class="form-inline" onsubmit
="return false;">
235 <div
class="form-group">
236 <label
class="control-label"></label
>
237 <div
class="controls">
238 <button id
="deleteOnsitePortalActivityButton" class="btn btn-mini btn-danger"><i
class="icon-trash icon-white"></i
> <?php
echo xlt('Delete Onsite Portal Activity'); ?
></button
>
239 <span id
="confirmDeleteOnsitePortalActivityContainer" class="hide">
240 <button id
="cancelDeleteOnsitePortalActivityButton" class="btn btn-mini"><?php
echo xlt('Cancel'); ?
></button
>
241 <button id
="confirmDeleteOnsitePortalActivityButton" class="btn btn-mini btn-danger"><?php
echo xlt('Confirm'); ?
></button
>
249 <!-- modal edit dialog
-->
250 <div
class="modal fade" id
="onsitePortalActivityDetailDialog">
251 <div
class="modal-dialog">
252 <div
class="modal-content">
253 <div
class="modal-header"><a
class="close" data
-dismiss
="modal">×
</a
>
254 <h3
><i
class="icon-edit"></i
> <?php
echo xlt('Edit Onsite Portal Activity'); ?
>
255 <span id
="modelLoader" class="loader progress progress-striped active"><span
class="bar"></span
></span
>
258 <div
class="modal-body">
259 <div id
="modelAlert"></div
>
260 <div id
="onsitePortalActivityModelContainer"></div
>
262 <div
class="modal-footer">
263 <button
class="btn" data
-dismiss
="modal"><?php
echo xlt('Cancel'); ?
></button
>
264 <button id
="saveOnsitePortalActivityButton" class="btn btn-primary"><?php
echo xlt('Save Changes'); ?
></button
>
270 <div id
="collectionAlert"></div
>
271 <div id
="onsitePortalActivityCollectionContainer" class="collectionContainer"></div
>
272 <p id
="newButtonContainer" class="buttonContainer">
273 <button id
="newOnsitePortalActivityButton" class="btn btn-primary"><?php
echo xlt('Add Onsite Portal Activity'); ?
></button
>
276 </div
> <!-- /container
-->
279 $this->display('_Footer.tpl.php');