3 * Viewing of office notes.
5 * LICENSE: This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
17 * @author Brady Miller <brady@sparmy.com>
18 * @link http://www.open-emr.org
21 include_once("../../globals.php");
23 //display all of the notes for the day, as well as others that are active from previous dates, up to a certain number, $N
26 $oNoteService = new \services\
ONoteService();
32 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
33 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-3-3-4/dist/css/bootstrap.min.css">
34 <?php
if ($_SESSION['language_direction'] == 'rtl') { ?
>
35 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-rtl-3-3-4/dist/css/bootstrap-rtl.min.css">
38 <script src
="<?php echo $GLOBALS['assets_static_relative'] ?>/jquery-min-1-11-1/index.js"></script
>
39 <script src
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-3-3-4/dist/js/bootstrap.min.js"></script
>
41 <body
class="body_top">
43 <div id
="officenotes_list">
44 <a href
="office_comments_full.php" onclick
='top.restoreSession()'>
45 <font
class="title"><?php
echo xlt('Office Notes'); ?
></font
>
46 <font
class="more"><?php
echo text($tmore);?
></font
></a
>
50 <table border
=0 width
=100%
>
54 $notes = $oNoteService->getNotes(1, 0, ($N +
1));
56 //retrieve all active notes
59 $notes_count = 0;//number of notes so far displayed
60 foreach ($notes as $note) {
61 if ($notes_count >= $N) {
62 //we have more active notes to print, but we've reached our display maximum (defined at top of this file)
64 $notice .= '<div class="alert alert-info">';
65 $notice .= ' <a href=\'office_comments_full.php?active=-1\' onclick=\'top.restoreSession()\'>'.xlt("Some office notes were not displayed. Click here to view all.").'</a>';
71 $date = $note->getDate()->format('Y-m-d');
72 $date = oeFormatShortDate($date);
74 $todaysDate = new DateTime();
75 if ($todaysDate->format('Y-m-d') == $date) {
76 $date_string = xl("Today") . ", " . $date;
82 $card .= '<div class="panel panel-default">';
83 $card .= ' <div class="panel-heading">';
84 $card .= ' <h3 class="panel-title">'.text($date_string).' <strong>('.text($note->getUser()->getUsername()).')</strong></h3>';
86 $card .= ' <div class="panel-body">';
87 $card .= text($note->getBody());