Integrating the problem list improvements with the recent fee sheet improvements...
[openemr.git] / interface / forms / fee_sheet / review / views / justify_display.php
blob5b0a169e52c6fb75e4b6b708a86bf7c66bcf84f3
1 <?php
2 /**
3 * knockoutjs template for rendering the interface for justifying procedures
4 *
5 * Copyright (C) 2013 Kevin Yeh <kevin.y@integralemr.com> and OEMR <www.oemr.org>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the 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 General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Kevin Yeh <kevin.y@integralemr.com>
20 * @link http://www.open-emr.org
23 <script type="text/html" id="justify-display">
24 <div data-bind="visible: $data.show">
25 <div class="duplicate_warning" data-bind="visible: $data.duplicates().length>0">
26 <div data-bind="event:{click: toggle_warning_details}" class="problem_warning" title="<?php echo xla('Click for more details') ?>"><?php echo xlt("Warning, patient has ambiguous codes in the problems list!") ?></div>
27 <div class="warning_details" data-bind="visible: show_warning_details">
28 <?php echo xlt("The following problems have the same diagnosis codes. Encounter issues will not be updated. Please use the encounter interface instead.") ?>
29 <span data-bind="foreach: $data.duplicates">
30 <div data-bind="text: description() +':'+ code_type() + '|' + code()"></div>
31 </span>
32 </div>
33 </div>
34 <span>
35 <span data-bind="visible: diag_code_types.length>0">
36 <input value= type="text" data-bind="value: search_query, valueUpdate: 'afterkeydown', event:{focus:search_focus, blur: search_blur, keydown:search_key}, hasfocus: search_has_focus"/>
37 <span class="search_results" data-bind="visible: (search_results().length>0) && search_show">
38 <table>
39 <tbody data-bind="foreach: $data.search_results">
40 <tr>
41 <td class="search_result_code" data-bind="text:description, event:{click: function(data,event){return choose_search_diag(data,event,$parent)}}"></td>
42 <td data-bind="text:code, attr:{title:code_type}"></td>
43 </tr>
44 </tbody>
45 </table>
46 </span>
47 <select data-bind="value: searchType, options: diag_code_types, optionsText: 'key'"></select>
48 </span>
49 </span>
50 <table>
51 <thead>
52 <tr>
53 <th class='sort' data-bind="event: {click: sort_justify}" title="<?php echo xla('Click to sort') ?>">#</th>
54 <th title="<?php echo xla('Justification Entries') ?>"><?php echo xlt("J{{Justify Header}}");?></th>
55 <th title="<?php echo xla('Problem')?>"><?php echo xlt("P{{Justify Header}}");?></th>
56 </tr>
57 </thead>
58 <tbody data-bind="foreach: $data.diagnosis_options">
59 <tr data-bind="attr:{class: source, encounter_issue: encounter_issue}">
60 <td class="priority" data-bind="text: priority()!=99999 ? priority() : ''"/></td>
61 <td class="checkbox"><input type="checkbox" data-bind="checked: selected, event:{click: function(data,event){return check_justify(data,event,$parent);}}" /></td>
62 <td class="problem_info"><input type="checkbox" data-bind="visible: $data.prob_id()==null && $data.allowed_to_create_problem_from_diagnosis()=='TRUE', checked: create_problem" title="<?php echo xla('Check to create problem from this diagnosis');?>"/></td>
63 <td class="info" data-bind="text: code, attr:{title:code_type}"></td>
64 <td class="info">
65 <span title="<?php echo xla('Click to edit description'); ?>" data-bind="text: description, visible: !edit_mode(), event: {click: start_edit}"></span>
66 <input class="description" type="text" data-bind="valueUpdate: 'afterkeydown',value: description, visible: edit_mode(), event: {blur: end_edit, keydown:edit_key},hasfocus: edit_mode()"/>
67 </td>
68 </tr>
69 </tbody>
70 </table>
71 <div>
72 <input type="button" data-bind="click: update_justify" value="<?php echo xlt("Update");?>"/>
73 <input class="cancel_dialog" type="button" data-bind="click: cancel_justify" value="<?php echo xla("Cancel");?>"/>
74 </div>
75 </div>
76 </script>