public function getMailDetails($data) { if (UserService::valid($data[0]) == 'existingpatient') { require_once "../../library/pnotes.inc"; $result = getPnoteById($data[1]); if ($result['assigned_to'] == '-patient-' && $result['message_status'] == 'New') { updatePnoteMessageStatus($data[1], 'Read'); } return $result; } else { throw new SoapFault("Server", "credentials failed"); } }
<?php if ($_GET['set_pid']) { $ndata = getPatientData($patient_id, "fname, lname, pubpid"); ?> parent.left_nav.setPatient(<?php echo "'" . addslashes($ndata['fname'] . " " . $ndata['lname']) . "'," . addslashes($patient_id) . ",'" . addslashes($ndata['pubpid']) . "',window.name"; ?> ); <?php } // If this note references a new patient document, pop up a display // of that document. // if ($noteid) { $prow = getPnoteById($noteid, 'body'); if (preg_match('/New scanned document (\\d+): [^\\n]+\\/([^\\n]+)/', $prow['body'], $matches)) { $docid = $matches[1]; $docname = $matches[2]; ?> window.open('../../../controller.php?document&retrieve&patient_id=<?php echo htmlspecialchars($patient_id, ENT_QUOTES); ?> &document_id=<?php echo htmlspecialchars($docid, ENT_QUOTES); ?> &<?php echo htmlspecialchars($docname, ENT_QUOTES); ?> &as_file=true', '_blank', 'resizable=1,scrollbars=1,width=600,height=500');
// Check authorization. $thisauth = acl_check('patients', 'notes'); if (!$thisauth) { die(htmlspecialchars(xl('Not authorized'), ENT_NOQUOTES)); } if ($prow['squad'] && !acl_check('squads', $prow['squad'])) { die(htmlspecialchars(xl('Not authorized for this squad.'), ENT_NOQUOTES)); } $noteid = $_REQUEST['noteid']; $ptname = $prow['title'] . ' ' . $prow['fname'] . ' ' . $prow['mname'] . ' ' . $prow['lname']; $title = ''; $assigned_to = ''; $body = ''; $activity = 0; if ($noteid) { $nrow = getPnoteById($noteid, 'title,assigned_to,activity,body'); $title = $nrow['title']; $assigned_to = $nrow['assigned_to']; $activity = $nrow['activity']; $body = $nrow['body']; } ?> <html> <head> <?php html_header_show(); ?> <link rel='stylesheet' href="<?php echo $css_header; ?> " type="text/css">
$reply_to = $_POST['reply_to']; if ($task == "save") { updatePnoteMessageStatus($noteid, $form_message_status); } else { updatePnotePatient($noteid, $reply_to); } $task = "edit"; $note = $_POST['note']; $title = $_POST['form_note_type']; $reply_to = $_POST['reply_to']; case "edit": if ($noteid == "") { $noteid = $_GET['noteid']; } // Update the message if it already exists; it's appended to an existing note in Patient Notes. $result = getPnoteById($noteid); if ($result) { if ($title == "") { $title = $result['title']; } $body = $result['body']; if ($reply_to == "") { $reply_to = $result['pid']; } $form_message_status = $result['message_status']; } break; case "delete": // Delete selected message(s) from the Messages box (only). $delete_id = $_POST['delete_id']; for ($i = 0; $i < count($delete_id); $i++) {