added easy printing of a patient note
[openemr.git] / interface / patient_file / summary / pnotes_print.php
blobcb2387b197d90150d75d0c1fb2fa679e1fcd9eac
1 <?php
2 include_once("../../globals.php");
3 include_once("$srcdir/pnotes.inc");
4 include_once("$srcdir/patient.inc");
5 include_once("$srcdir/acl.inc");
7 // Check authorization.
8 $thisauth = acl_check('patients', 'notes');
9 if (!$thisauth)
10 die("Not authorized.");
11 $tmp = getPatientData($pid, "squad");
12 if ($tmp['squad'] && ! acl_check('squads', $tmp['squad']))
13 die("Not authorized for this squad.");
15 $noteid = $_REQUEST['noteid'];
17 $title = '';
18 $assigned_to = '';
19 $body = '';
20 $activity = 0;
21 if ($noteid) {
22 $prow = getPnoteById($noteid, 'title,assigned_to,activity,body');
23 $title = $prow['title'];
24 $assigned_to = $prow['assigned_to'];
25 $activity = $prow['activity'];
26 $body = $prow['body'];
29 <html>
30 <head>
31 <link rel='stylesheet' href="<?echo $css_header;?>" type="text/css">
32 </head>
34 <body <?echo $top_bg_line;?> topmargin='0' rightmargin='0' leftmargin='2'
35 bottommargin='0' marginwidth='2' marginheight='0'>
37 <p><b><?php echo $title; ?></b></p>
39 <p>Assigned To: <?php echo $assigned_to; ?></p>
41 <p>Active: <?php echo $activity ? 'Yes' : 'No'; ?></p>
43 <p><?php echo $body; ?></p>
45 <script language='JavaScript'>
46 window.print();
47 </script>
49 </body>
50 </html>