From 1b701ba05e2507c925a973cabdc02b935899945b Mon Sep 17 00:00:00 2001 From: Teny Date: Wed, 26 Dec 2012 21:58:16 +0530 Subject: [PATCH] This commit helps in the following 1)The javascript error in openemr new patient validation has been corrected. The fields marked as 'Required' in layout will be correctly validated both in openemr and patient portal. 2)Now the option to put the provider Id in 'Portal' tab (In Administration -> Globals) has been provided.It will also be displayed during 'Create Offsite Portal Credentials' and 'Reset Offsite Portal Credentials' Changed the code as mentioned in Git Hub comments. Signed-off-by: Teny Additional minor change in a English constant by bradymiller. --- interface/new/new_comprehensive.php | 14 +++++++++++++- interface/patient_file/summary/create_portallogin.php | 13 +++++++++++++ interface/patient_file/summary/demographics.php | 2 +- library/globals.inc.php | 7 +++++++ myportal/soap_service/server_side.php | 12 ++++++++++-- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/interface/new/new_comprehensive.php b/interface/new/new_comprehensive.php index cd7f069a8..7bf827005 100644 --- a/interface/new/new_comprehensive.php +++ b/interface/new/new_comprehensive.php @@ -250,7 +250,8 @@ function trimlen(s) { } function validate(f) { - + var errMsgs = new Array(); + alertMsg=''; for(i=0;i + var msg = ""; + msg += ":\n\n"; + for ( var i = 0; i < errMsgs.length; i++ ) { + msg += errMsgs[i] + "\n"; + } + msg += "\n"; + + if ( errMsgs.length > 0 ) { + alert(msg); + return false; + } return true; } diff --git a/interface/patient_file/summary/create_portallogin.php b/interface/patient_file/summary/create_portallogin.php index 13055092a..4140f0f92 100644 --- a/interface/patient_file/summary/create_portallogin.php +++ b/interface/patient_file/summary/create_portallogin.php @@ -82,7 +82,10 @@ function messageCreate($uname,$pass,$site){ $offsite_portal_patient_link = $GLOBALS['portal_offsite_address_patient_link'] ? htmlspecialchars($GLOBALS['portal_offsite_address_patient_link'],ENT_QUOTES) : htmlspecialchars("https://mydocsportal.com",ENT_QUOTES); $message .= "" . $offsite_portal_patient_link . "

"; + $message .= htmlspecialchars(xl("Provider Id"),ENT_NOQUOTES) . ": " . + htmlspecialchars($GLOBALS['portal_offsite_providerid'],ENT_NOQUOTES) . "

"; } + $message .= htmlspecialchars(xl("User Name"),ENT_NOQUOTES) . ": " . htmlspecialchars($uname,ENT_NOQUOTES) . "

" . htmlspecialchars(xl("Password"),ENT_NOQUOTES) . ": " . @@ -176,6 +179,16 @@ function convertPass(){ + + + + + + diff --git a/interface/patient_file/summary/demographics.php b/interface/patient_file/summary/demographics.php index abb2188b3..ec1395d26 100644 --- a/interface/patient_file/summary/demographics.php +++ b/interface/patient_file/summary/demographics.php @@ -374,7 +374,7 @@ $(document).ready(function(){ $(".small_modal").fancybox( { 'overlayOpacity' : 0.0, 'showCloseButton' : true, - 'frameHeight' : 180, + 'frameHeight' : 200, 'frameWidth' : 380, 'centerOnScroll' : false }); diff --git a/library/globals.inc.php b/library/globals.inc.php index 2d22b05f7..505f24eac 100644 --- a/library/globals.inc.php +++ b/library/globals.inc.php @@ -1367,6 +1367,13 @@ $GLOBALS_METADATA = array( xl('Enable Offsite Patient Portal.') ), + 'portal_offsite_providerid' => array( + xl('Offsite Patient Portal Provider ID'), + 'text', // data type + '', + xl('Offsite Patient Portal Provider ID(Put Blank If not Registered).') + ), + 'portal_offsite_username' => array( xl('Offsite Patient Portal Username'), 'text', // data type diff --git a/myportal/soap_service/server_side.php b/myportal/soap_service/server_side.php index 177854eca..5c7f31703 100644 --- a/myportal/soap_service/server_side.php +++ b/myportal/soap_service/server_side.php @@ -40,6 +40,7 @@ ob_start(); require_once("../../interface/globals.php"); require_once(dirname(__FILE__)."/../../controllers/C_Document.class.php"); +require_once(dirname(__FILE__)."/../../library/options.inc.php"); $err = ''; if(!extension_loaded("soap")){ dl("php_soap.dll"); @@ -524,7 +525,14 @@ static public function batch_despatch($var,$func,$data_credentials){ $x['ok']='ok'; return UserService::function_return_to_xml($x); } - + elseif($func=='generate_layout_validation') + { + $form_id=$var['form_id']; + ob_start(); + generate_layout_validation($form_id); + $x = ob_get_clean(); + return $x; + } } else{ throw new SoapFault("Server", "credentials failed"); @@ -773,7 +781,7 @@ static public function batch_despatch($var,$func,$data_credentials){ public function getversion($data){ - return '1.2'; + return '1.3'; } -- 2.11.4.GIT