Patient image fixups (#931)
[openemr.git] / interface / main / tabs / templates / patient_data_template.php
blob8731700f56087fa0b02a6df305954a8bce1f0e12
1 <?php
2 /**
3 * Patient data template.
5 * @package OpenEMR
6 * @author Robert Down <robertdown@live.com>
7 * @author Kevin Yeh <kevin.y@integralemr.com>
8 * @author Brady Miller <brady.g.miller@gmail.com>
9 * @link http://www.open-emr.org
10 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
11 * @copyright Copyright (c) 2016 Kevin Yeh <kevin.y@integralemr.com>
12 * @copyright Copyright (c) 2016 Brady Miller <brady.g.miller@gmail.com>
13 * @copyright Copyright (c) 2017 Robert Down <robertdown@live.com>
16 <script type="text/html" id="patient-data-template">
17 <div>
18 <span class="patientDataColumn">
19 <span style="float:left;"><a data-bind="click: viewPtFinder" href="#" class="btn btn-default btn-sm">
20 <i class="fa fa-search" aria-hidden="true"></i>
21 </a></span>
22 <div class="patientInfo" style="float: left">
23 <!-- ko if: patient -->
24 <div data-bind="with: patient" class="patientPicture">
25 <img data-bind="attr: {src: patient_picture()}"
26 class="img-thumbnail"
27 onError="this.src = '<?php echo $GLOBALS['images_static_relative']; ?>/patient-picture-default.png'" />
28 </div>
29 <!-- /ko -->
30 </div>
31 <div class="patientInfo">
32 <?php echo xlt("Patient"); ?>:
33 <!-- ko if: patient -->
34 <a class="ptName" data-bind="click:refreshPatient,with: patient" href="#">
35 <span data-bind="text: pname()"></span>
36 (<span data-bind="text: pubpid"></span>)
37 </a>
38 <!-- /ko -->
39 <!-- ko ifnot: patient -->
40 <?php echo xlt("None{{Patient}}");?>
41 <!-- /ko -->
42 <!-- ko if: patient -->
43 <a class="btn btn-xs btn-link" href="#" data-bind="click:clearPatient" title="<?php echo xla("Clear") ?>">
44 <i class="fa fa-times"></i>
45 </a>
46 <!-- /ko -->
47 </div>
48 <div class="patientInfo">
49 <!-- ko if: patient -->
50 <span data-bind="text:patient().str_dob()"></span>
51 <!-- /ko -->
52 </div>
53 </span>
54 <span class="patientDataColumn">
55 <!-- ko if: patient -->
56 <!-- ko with: patient -->
57 <a class="btn btn-xs btn-link" data-bind="click: clickNewEncounter" href="#" title="<?php echo xla("New Encounter");?>">
58 <i class="fa fa-plus"></i>
59 </a>
60 <div class="patientCurrentEncounter">
61 <span><?php echo xlt("Open Encounter"); ?>:</span>
62 <!-- ko if:selectedEncounter() -->
63 <a data-bind="click: refreshEncounter" href="#">
64 <span data-bind="text:selectedEncounter().date()"></span>
65 (<span data-bind="text:selectedEncounter().id()"></span>)
66 </a>
67 <!-- /ko -->
68 <!-- ko if:!selectedEncounter() -->
69 <?php echo xlt("None{{Encounter}}") ?>
70 <!-- /ko -->
71 </div>
72 <!-- ko if: encounterArray().length > 0 -->
73 <br>
74 <div class="btn-group dropdown">
75 <button class="btn btn-default btn-sm dropdown-toggle"
76 type="button" id="pastEncounters"
77 data-toggle="dropdown"
78 aria-haspopup="true"
79 aria-expanded="true">
80 <?php echo xlt("View Past Encounters"); ?>&nbsp;
81 (<span data-bind="text:encounterArray().length"></span>)
82 <span class="caret"></span>
83 </button>
84 <ul class="dropdown-menu" aria-labelledby="pastEncounters">
85 <!-- ko foreach:encounterArray -->
86 <li style="display: inline-flex;">
87 <a href="#" data-bind="click:chooseEncounterEvent">
88 <span data-bind="text:date"></span>
89 <span data-bind="text:category"></span>
90 </a>
91 <a href="#" data-bind="click:reviewEncounterEvent">
92 <i class="fa fa-rotate-left"></i>&nbsp;<?php echo xlt("Review");?>
93 </a>
94 </li>
95 <!-- /ko -->
96 </ul>
97 </div>
98 <!-- /ko -->
99 <!-- /ko -->
100 <!-- /ko -->
101 </span>
102 <!-- ko if: user -->
103 <!-- ko with: user -->
104 <!-- ko if:messages() -->
105 <span class="messagesColumn">
106 <a class="btn btn-default" href="#" data-bind="click: viewMessages" title="<?php echo xla("View Messages");?>">
107 <i class="fa fa-envelope"></i>&nbsp;<span style="display:inline" data-bind="text: messages()"></span>
108 </a>
109 </span>
110 <!-- /ko -->
111 <!-- /ko -->
112 <!-- /ko -->
113 </div>
114 <!-- /ko -->
115 </script>