From 5a82cbe399ef492d8a20a5615d379c06e1999808 Mon Sep 17 00:00:00 2001 From: Luis Maas Date: Fri, 1 Feb 2013 09:19:04 -0800 Subject: [PATCH] changes suggested by Brady Miller and minor stylesheet fix --- ccr/createCCR.php | 5 ++++- ccr/transmitCCD.php | 26 -------------------------- library/log.inc | 1 + 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/ccr/createCCR.php b/ccr/createCCR.php index b73c6ace2..f006fed39 100644 --- a/ccr/createCCR.php +++ b/ccr/createCCR.php @@ -48,6 +48,7 @@ if (isset($_GET['portal_auth'])) { require_once(dirname(__FILE__) . "/../interface/globals.php"); require_once(dirname(__FILE__) . "/../library/sql-ccr.inc"); +require_once(dirname(__FILE__) . "/../library/classes/class.phpmailer.php"); require_once(dirname(__FILE__) . "/uuid.php"); require_once(dirname(__FILE__) . "/transmitCCD.php"); require_once(dirname(__FILE__) . "/../custom/code_types.inc.php"); @@ -259,6 +260,9 @@ function createCCR($action,$raw="no",$requested_by=""){ if (file_exists($xmlName)) { unlink($xmlName); } + $e_styleSheet = $ccd->createProcessingInstruction('xml-stylesheet', + 'type="text/xsl" href="stylesheet/cda.xsl"'); + $ccd->insertBefore($e_styleSheet,$ccd->firstChild); $ccd->save($xmlName); $zip->addFile($xmlName, basename($xmlName) ); $zip->close(); @@ -364,7 +368,6 @@ if($_POST['ccrAction']) { /* If transmit requested, fail fast if the recipient address fails basic validation */ if (substr($raw,0,4)=="send") { $send_to = trim(stripslashes(substr($raw,5))); - require($GLOBALS['fileroot'] . "/library/classes/class.phpmailer.php"); if (!PHPMailer::ValidateAddress($send_to)) { echo(htmlspecialchars( xl('Invalid recipient address. Please try again.'), ENT_QUOTES)); return; diff --git a/ccr/transmitCCD.php b/ccr/transmitCCD.php index c52f2b741..f9b5d390f 100644 --- a/ccr/transmitCCD.php +++ b/ccr/transmitCCD.php @@ -24,32 +24,6 @@ * @link http://www.open-emr.org */ -//SANITIZE ALL ESCAPES -$sanitize_all_escapes=true; -// - -//STOP FAKE REGISTER GLOBALS -$fake_register_globals=false; -// - -// check if using the patient portal -//(if so, then use the portal authorization) -if (isset($_GET['portal_auth'])) { - $landingpage = "../patients/index.php"; - session_start(); - if ( isset($_SESSION['pid']) && isset($_SESSION['patient_portal_onsite']) ) { - $pid = $_SESSION['pid']; - $ignoreAuth=true; - global $ignoreAuth; - } - else { - session_destroy(); - header('Location: '.$landingpage.'?w'); - exit; - } -} - -require_once(dirname(__FILE__) . "/../interface/globals.php"); require_once(dirname(__FILE__) . "/../library/log.inc"); /* diff --git a/library/log.inc b/library/log.inc index d35865977..428d9fc5a 100644 --- a/library/log.inc +++ b/library/log.inc @@ -15,6 +15,7 @@ function newEvent($event, $user, $groupname, $success, $comments="", $patient_id $ret = sqlInsertClean_audit($sql); if($patient_id=="NULL")$patient_id=0; + send_atna_audit_msg($user, $groupname, $event, $patient_id, $success, $comments); } -- 2.11.4.GIT