3 * Display patient 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 3
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 //SANITIZE ALL ESCAPES
22 $sanitize_all_escapes=true;
25 //STOP FAKE REGISTER GLOBALS
26 $fake_register_globals=false;
29 require_once("../../globals.php");
30 require_once("$srcdir/patient.inc");
31 require_once("$srcdir/acl.inc");
32 require_once("$srcdir/options.inc.php");
33 require_once("$srcdir/pnotes.inc");
35 $prow = getPatientData($pid, "squad, title, fname, mname, lname");
37 // Check authorization.
38 $thisauth = acl_check('patients', 'notes');
40 die(htmlspecialchars( xl('Not authorized'), ENT_NOQUOTES
));
41 if ($prow['squad'] && ! acl_check('squads', $prow['squad']))
42 die(htmlspecialchars( xl('Not authorized for this squad.'), ENT_NOQUOTES
));
44 $noteid = $_REQUEST['noteid'];
46 $ptname = $prow['title'] . ' ' . $prow['fname'] . ' ' . $prow['mname'] .
54 $nrow = getPnoteById($noteid, 'title,assigned_to,activity,body');
55 $title = $nrow['title'];
56 $assigned_to = $nrow['assigned_to'];
57 $activity = $nrow['activity'];
58 $body = $nrow['body'];
63 <?php
html_header_show();?
>
64 <link rel
='stylesheet' href
="<?php echo $css_header;?>" type
="text/css">
67 <body
class="body_top">
70 generate_display_field(array('data_type'=>'1','list_id'=>'note_type'), $title) .
71 "</b>" . htmlspecialchars( xl('for','',' ',' '), ENT_NOQUOTES
) .
72 "<b>" . htmlspecialchars( $ptname, ENT_NOQUOTES
) . "</b>"; ?
></p
>
74 <p
><?php
echo htmlspecialchars( xl('Assigned To'), ENT_NOQUOTES
); ?
>: <?php
echo htmlspecialchars( $assigned_to, ENT_NOQUOTES
); ?
></p
>
76 <p
><?php
echo htmlspecialchars( xl('Active'), ENT_NOQUOTES
); ?
>: <?php
echo htmlspecialchars( ($activity ?
xl('Yes') : xl('No')), ENT_NOQUOTES
); ?
></p
>
78 <p
><?php
echo nl2br(htmlspecialchars( $body, ENT_NOQUOTES
)); ?
></p
>
80 <script language
='JavaScript'>