From 573b78275fea4e679843e6eff9c2e0faf71d8975 Mon Sep 17 00:00:00 2001 From: bradymiller Date: Tue, 22 Jan 2013 13:43:36 -0800 Subject: [PATCH] The Third Reminders email bug fix - contributed by arnabnaha --- library/reminders.php | 64 ++++++++++++++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/library/reminders.php b/library/reminders.php index fa5d8006a..ae3951cc6 100644 --- a/library/reminders.php +++ b/library/reminders.php @@ -389,35 +389,41 @@ function send_reminders() { // Call to patient if Allow Voice Message and set reminder sent flag. if ($hipaa_voice == "YES") { - // Automated VOIP service provided by Maviq. Please visit http://signup.maviq.com for more information. - $siteId = $GLOBALS['phone_gateway_username']; - $token = $GLOBALS['phone_gateway_password']; - $endpoint = $GLOBALS['phone_gateway_url']; - $client = new MaviqClient($siteId, $token, $endpoint); - //Set up params. - $data = array( - "firstName" => $patientfname, - "lastName" => $patientlname, - "phone" => $patientphone, - //"apptDate" => "$scheduled_date[1]/$scheduled_date[2]/$scheduled_date[0]", - "timeRange" => "10-18", - "type" => "reminder", - "timeZone" => date('P'), - "greeting" => str_replace("[[sender]]", $sender_name, str_replace("[[patient_name]]", $patientfname, $myrow['reminder_content'])) - ); - - // Make the call. - $response = $client->sendRequest("appointment", "POST", $data); - - if ($response->IsError) { - // deal with and keep track of this unsuccessful call - $logging['number_failed_calls']++; - } - else { - // deal with and keep track of this succesful call - sqlStatementCdrEngine("UPDATE `patient_reminders` SET `voice_status`='1', `date_sent`=NOW() WHERE id=?", array($reminder['id']) ); - $logging['number_success_calls']++; - } + +/****************************************************************************** +* // Maviq does not work, is not currently supported, and seems to break on windows servers, so this +* // feature has been commented out for now. +* // Automated VOIP service provided by Maviq. Please visit http://signup.maviq.com for more information. +* $siteId = $GLOBALS['phone_gateway_username']; +* $token = $GLOBALS['phone_gateway_password']; +* $endpoint = $GLOBALS['phone_gateway_url']; +* $client = new MaviqClient($siteId, $token, $endpoint); +* //Set up params. +* $data = array( +* "firstName" => $patientfname, +* "lastName" => $patientlname, +* "phone" => $patientphone, +* //"apptDate" => "$scheduled_date[1]/$scheduled_date[2]/$scheduled_date[0]", +* "timeRange" => "10-18", +* "type" => "reminder", +* "timeZone" => date('P'), +* "greeting" => str_replace("[[sender]]", $sender_name, str_replace("[[patient_name]]", $patientfname, $myrow['reminder_content'])) +* ); +* +* // Make the call. +* $response = $client->sendRequest("appointment", "POST", $data); +* +* if ($response->IsError) { +* // deal with and keep track of this unsuccessful call +* $logging['number_failed_calls']++; +* } +* else { +* // deal with and keep track of this succesful call +* sqlStatementCdrEngine("UPDATE `patient_reminders` SET `voice_status`='1', `date_sent`=NOW() WHERE id=?", array($reminder['id']) ); +* $logging['number_success_calls']++; +* } +*******************************************************************************/ + } } -- 2.11.4.GIT