Add New FMC code from Intesync
[openemr.git] / interface / patient_file / summary / pnotes_print.php
blob316ef91a4be3abd3c34e16c80fcd5d804338ff4b
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");
6 include_once("$srcdir/options.inc.php");
8 $prow = getPatientData($pid, "squad, title, fname, mname, lname");
10 // Check authorization.
11 $thisauth = acl_check('patients', 'notes');
12 if (!$thisauth)
13 die(xl('Not authorized'));
14 if ($prow['squad'] && ! acl_check('squads', $prow['squad']))
15 die(xl('Not authorized for this squad.'));
17 $noteid = $_REQUEST['noteid'];
19 $ptname = $prow['title'] . ' ' . $prow['fname'] . ' ' . $prow['mname'] .
20 ' ' . $prow['lname'];
22 $title = '';
23 $assigned_to = '';
24 $body = '';
25 $activity = 0;
26 if ($noteid) {
27 $nrow = getPnoteById($noteid, 'title,assigned_to,activity,body');
28 $title = $nrow['title'];
29 $assigned_to = $nrow['assigned_to'];
30 $activity = $nrow['activity'];
31 $body = $nrow['body'];
34 <html>
35 <head>
36 <?php html_header_show();?>
37 <link rel='stylesheet' href="<?php echo $css_header;?>" type="text/css">
38 </head>
40 <body class="body_top">
42 <p><?php echo "<b>" .
43 generate_display_field(array('data_type'=>'1','list_id'=>'note_type'), $title) .
44 "</b>" . xl('for','',' ',' ') . "<b>$ptname</b>"; ?></p>
46 <p><?php xl('Assigned To','e'); ?>: <?php echo $assigned_to; ?></p>
48 <p><?php xl('Active','e'); ?>: <?php echo $activity ? xl('Yes') : xl('No'); ?></p>
50 <p><?php echo nl2br($body); ?></p>
52 <script language='JavaScript'>
53 window.print();
54 </script>
56 </body>
57 </html>