From 9a194f55f4c6f29e12a6a9e3c58c921b83950408 Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Mon, 29 Jan 2018 00:40:54 -0800 Subject: [PATCH] adjustments to prior commit --- custom/import_xml.php | 10 +-- interface/cmsportal/history_form.php | 4 +- interface/cmsportal/insurance_form.php | 9 +-- interface/cmsportal/issue_form.php | 5 +- interface/cmsportal/lbf_form.php | 5 +- interface/cmsportal/patient_form.php | 4 +- interface/forms/LBF/new.php | 4 +- interface/forms/newpatient/common.php | 2 +- interface/main/calendar/find_patient_popup.php | 2 +- interface/main/finder/patient_select.php | 26 +++---- interface/new/new_comprehensive_save.php | 3 + interface/new/new_patient_save.php | 3 +- interface/patient_file/summary/browse.php | 90 ++++++++++++++-------- .../patient_file/summary/demographics_save.php | 6 +- .../patient_file/transaction/add_transaction.php | 4 +- interface/usergroup/facility_user_admin.php | 4 +- library/formatting.inc.php | 40 ++++++++-- library/options.inc.php | 33 +++++--- library/patient.inc | 23 ++---- myportal/soap_service/server_audit.php | 34 ++++---- portal/account/account.lib.php | 2 +- 21 files changed, 188 insertions(+), 125 deletions(-) diff --git a/custom/import_xml.php b/custom/import_xml.php index b73b30867..d92c3254d 100644 --- a/custom/import_xml.php +++ b/custom/import_xml.php @@ -11,11 +11,11 @@ * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 */ - include_once("../interface/globals.php"); - include_once("$srcdir/patient.inc"); - include_once("$srcdir/acl.inc"); +require_once("../interface/globals.php"); +require_once("$srcdir/patient.inc"); +require_once("$srcdir/acl.inc"); - use OpenEMR\Core\Header; +use OpenEMR\Core\Header; function setInsurance($pid, $ainsurance, $asubscriber, $seq) { @@ -131,7 +131,7 @@ if ($_POST['form_import']) { $apatient['lname'], $apatient['mname'], $apatient['sex'], - $apatient['dob'], + fixDate($apatient['dob']), $apatient['street'], $apatient['zip'], $apatient['city'], diff --git a/interface/cmsportal/history_form.php b/interface/cmsportal/history_form.php index e779131d6..67e34d684 100644 --- a/interface/cmsportal/history_form.php +++ b/interface/cmsportal/history_form.php @@ -113,14 +113,14 @@ $(document).ready(function() { $('.datepicker').datetimepicker({ - + }); $('.datetimepicker').datetimepicker({ - + }); diff --git a/interface/cmsportal/insurance_form.php b/interface/cmsportal/insurance_form.php index 141870f1a..01cb50e36 100644 --- a/interface/cmsportal/insurance_form.php +++ b/interface/cmsportal/insurance_form.php @@ -174,7 +174,7 @@ if ($_POST['bn_save']) { $newdata['subscriber_fname'], $newdata['subscriber_relationship'], '', // subscriber_ss - fixDate($newdata['subscriber_DOB']), + $newdata['subscriber_DOB'], $newdata['subscriber_street'], $newdata['subscriber_postal_code'], $newdata['subscriber_city'], @@ -189,7 +189,7 @@ if ($_POST['bn_save']) { '', // subscriber_employer_country '', // copay $newdata['subscriber_sex'], - fixDate($newdata['date']), + $newdata['date'], 'TRUE', // accept_assignment '' // policy_type ); @@ -271,14 +271,14 @@ $(document).ready(function() { $('.datepicker').datetimepicker({ - + }); $('.datetimepicker').datetimepicker({ - + }); @@ -379,4 +379,3 @@ if (f.form_phone) phonekeyup(f.form_phone, mypcc); - diff --git a/interface/cmsportal/issue_form.php b/interface/cmsportal/issue_form.php index 120f36234..d534ad5bb 100644 --- a/interface/cmsportal/issue_form.php +++ b/interface/cmsportal/issue_form.php @@ -218,14 +218,14 @@ $(document).ready(function() { $('.datepicker').datetimepicker({ - + }); $('.datetimepicker').datetimepicker({ - + }); @@ -332,4 +332,3 @@ foreach ($issue_layout as $lorow) { - diff --git a/interface/cmsportal/lbf_form.php b/interface/cmsportal/lbf_form.php index f4bc4e013..35b334acc 100644 --- a/interface/cmsportal/lbf_form.php +++ b/interface/cmsportal/lbf_form.php @@ -72,14 +72,14 @@ $(document).ready(function() { $('.datepicker').datetimepicker({ - + }); $('.datetimepicker').datetimepicker({ - + }); @@ -142,4 +142,3 @@ foreach ($result['fields'] as $field_id => $newvalue) { - diff --git a/interface/cmsportal/patient_form.php b/interface/cmsportal/patient_form.php index 7636686ad..53c53c922 100644 --- a/interface/cmsportal/patient_form.php +++ b/interface/cmsportal/patient_form.php @@ -186,14 +186,14 @@ $(document).ready(function() { $('.datepicker').datetimepicker({ - + }); $('.datetimepicker').datetimepicker({ - + }); diff --git a/interface/forms/LBF/new.php b/interface/forms/LBF/new.php index e101004ee..bfe07280a 100644 --- a/interface/forms/LBF/new.php +++ b/interface/forms/LBF/new.php @@ -415,14 +415,14 @@ if (!empty($_POST['bn_save']) || !empty($_POST['bn_save_print']) || !empty($_POS $('.datepicker').datetimepicker({ - + }); $('.datetimepicker').datetimepicker({ - + }); diff --git a/interface/forms/newpatient/common.php b/interface/forms/newpatient/common.php index 4dad585e3..3487d502d 100644 --- a/interface/forms/newpatient/common.php +++ b/interface/forms/newpatient/common.php @@ -411,7 +411,7 @@ echo ">" . xlt('None'). "\n"; - value='' + value='' title='' /> diff --git a/interface/main/calendar/find_patient_popup.php b/interface/main/calendar/find_patient_popup.php index a24282ec9..09d95d0a9 100644 --- a/interface/main/calendar/find_patient_popup.php +++ b/interface/main/calendar/find_patient_popup.php @@ -33,7 +33,7 @@ if ($_REQUEST['searchby'] && $_REQUEST['searchparm']) { } elseif ($searchby == "ID") { $result = getPatientId("$searchparm", "*"); } elseif ($searchby == "DOB") { - $result = getPatientDOB("$searchparm", "*"); + $result = getPatientDOB(DateToYYYYMMDD($searchparm), "*"); } elseif ($searchby == "SSN") { $result = getPatientSSN("$searchparm", "*"); } diff --git a/interface/main/finder/patient_select.php b/interface/main/finder/patient_select.php index 249170413..68307a767 100644 --- a/interface/main/finder/patient_select.php +++ b/interface/main/finder/patient_select.php @@ -127,7 +127,7 @@ $MAXSHOW = 100; // maximum number of results to display at once //the maximum number of patient records to display: $sqllimit = $MAXSHOW; -$given = "*, DATE_FORMAT(DOB,'%m/%d/%Y') as DOB_TS"; +$given = "*"; $orderby = "lname ASC, fname ASC"; $search_service_code = trim($_POST['search_service_code']); @@ -235,7 +235,7 @@ if ($popup) { } else if ($findBy == "ID") { $result = getPatientId("$patient", $given, "id ASC, ".$orderby, $sqllimit, $fstart); } else if ($findBy == "DOB") { - $result = getPatientDOB("$patient", $given, "DOB ASC, ".$orderby, $sqllimit, $fstart); + $result = getPatientDOB(DateToYYYYMMDD($patient), $given, "DOB ASC, ".$orderby, $sqllimit, $fstart); } else if ($findBy == "SSN") { $result = getPatientSSN("$patient", $given, "ss ASC, ".$orderby, $sqllimit, $fstart); } elseif ($findBy == "Phone") { //(CHEMED) Search by phone number @@ -417,7 +417,7 @@ if ($result) { echo "" . htmlspecialchars($iter['ss'], ENT_NOQUOTES) . ""; if ($iter{"DOB"} != "0000-00-00 00:00:00") { - echo "" . htmlspecialchars($iter['DOB_TS'], ENT_NOQUOTES) . ""; + echo "" . text(oeFormatShortDate($iter['DOB'])) . ""; } else { echo " "; } @@ -435,11 +435,11 @@ if ($result) { $pid = ''; // calculate date differences based on date of last encounter with billing entries - $query = "select DATE_FORMAT(max(form_encounter.date),'%m/%d/%y') as mydate," . + $query = "select max(form_encounter.date) as mydate," . " (to_days(current_date())-to_days(max(form_encounter.date))) as day_diff," . - " DATE_FORMAT(max(form_encounter.date) + interval " . + " (max(form_encounter.date) + interval " . add_escape_custom($add_days) . - " day,'%m/%d/%y') as next_appt, dayname(max(form_encounter.date) + interval " . + " day) as next_appt, dayname(max(form_encounter.date) + interval " . add_escape_custom($add_days) . " day) as next_appt_day from form_encounter " . "join billing on billing.encounter = form_encounter.encounter and " . @@ -450,15 +450,15 @@ if ($result) { if ($results = sqlFetchArray($statement)) { $last_date_seen = $results['mydate']; $day_diff = $results['day_diff']; - $next_appt_date= xl($results['next_appt_day']).', '.$results['next_appt']; + $next_appt_date= xl($results['next_appt_day']).', '.oeFormatShortDate($results['next_appt']); } // calculate date differences based on date of last encounter regardless of billing - $query = "select DATE_FORMAT(max(form_encounter.date),'%m/%d/%y') as mydate," . + $query = "select max(form_encounter.date) as mydate," . " (to_days(current_date())-to_days(max(form_encounter.date))) as day_diff," . - " DATE_FORMAT(max(form_encounter.date) + interval " . + " (max(form_encounter.date) + interval " . add_escape_custom($add_days) . - " day,'%m/%d/%y') as next_appt, dayname(max(form_encounter.date) + interval " . + " day) as next_appt, dayname(max(form_encounter.date) + interval " . add_escape_custom($add_days) . " day) as next_appt_day from form_encounter " . " where form_encounter.pid = ?"; @@ -466,7 +466,7 @@ if ($result) { if ($results = sqlFetchArray($statement)) { $last_date_seen = $results['mydate']; $day_diff = $results['day_diff']; - $next_appt_date= xl($results['next_appt_day']).', '.$results['next_appt']; + $next_appt_date= xl($results['next_appt_day']).', '.oeFormatShortDate($results['next_appt']); } //calculate count of encounters by distinct billing dates with cpt4 @@ -491,8 +491,8 @@ if ($result) { echo "" . htmlspecialchars($encounter_count, ENT_NOQUOTES) . "\n"; echo "" . htmlspecialchars($day_diff, ENT_NOQUOTES) . "\n"; - echo "" . htmlspecialchars($last_date_seen, ENT_NOQUOTES) . "\n"; - echo "" . htmlspecialchars($next_appt_date, ENT_NOQUOTES) . "\n"; + echo "" . text(oeFormatShortDate($last_date_seen)) . "\n"; + echo "" . text($next_appt_date) . "\n"; } else { // alternate search results style foreach ($extracols as $field_id => $frow) { echo ""; diff --git a/interface/new/new_comprehensive_save.php b/interface/new/new_comprehensive_save.php index fa1e7c683..feef48b29 100644 --- a/interface/new/new_comprehensive_save.php +++ b/interface/new/new_comprehensive_save.php @@ -77,6 +77,7 @@ updatePatientData($pid, $newdata['patient_data'], true); updateEmployerData($pid, $newdata['employer_data'], true); $i1dob = DateToYYYYMMDD(filter_input(INPUT_POST, "i1subscriber_DOB")); +$i1date = DateToYYYYMMDD(filter_input(INPUT_POST, "i1effective_date")); // sqlStatement("unlock tables"); // end table lock @@ -115,6 +116,7 @@ newInsuranceData( $i2dob = DateToYYYYMMDD(filter_input(INPUT_POST, "i2subscriber_DOB")); +$i2date = DateToYYYYMMDD(filter_input(INPUT_POST, "i2effective_date")); newInsuranceData( $pid, @@ -148,6 +150,7 @@ newInsuranceData( ); $i3dob = DateToYYYYMMDD(filter_input(INPUT_POST, "i3subscriber_DOB")); +$i3date = DateToYYYYMMDD(filter_input(INPUT_POST, "i3effective_date")); newInsuranceData( $pid, diff --git a/interface/new/new_patient_save.php b/interface/new/new_patient_save.php index 9a38e3bed..10b30d0d2 100644 --- a/interface/new/new_patient_save.php +++ b/interface/new/new_patient_save.php @@ -59,6 +59,7 @@ if ($_POST['form_create']) { $form_city = '' ; $form_postcode = '' ; $form_countrycode = '' ; + $form_regdate = DateToYYYYMMDD(trim($_POST['regdate'])); // EOS DBC // =================== @@ -109,7 +110,7 @@ if ($_POST['form_create']) { "", // $drivers_license = "", "", // $hipaa_notice = "", "", // $hipaa_message = "", - $_POST['regdate'] + $form_regdate ); newEmployerData($pid); diff --git a/interface/patient_file/summary/browse.php b/interface/patient_file/summary/browse.php index 9850eb7e5..74fe97456 100644 --- a/interface/patient_file/summary/browse.php +++ b/interface/patient_file/summary/browse.php @@ -1,10 +1,20 @@ + * @copyright Copyright (c) 2018 Brady Miller + * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 + */ +require_once("../../globals.php"); +require_once("$srcdir/patient.inc"); +require_once("$srcdir/options.inc.php"); -include_once("../../globals.php"); -include_once("$srcdir/patient.inc"); -include_once("$srcdir/options.inc.php"); +use OpenEMR\Core\Header; //the maximum number of patient records to display: $M = 100; @@ -13,25 +23,43 @@ $browsenum = (is_numeric($_REQUEST['browsenum'])) ? $_REQUEST['browsenum'] : 1; ?> - - + + + + - + -
"> +"> - + -   - +   +
subscriber_country) // in case this is commented out df.form_isubscriber_country.value=''; df.isubscriber_phone.value=''; - df.isubscriber_DOB.value=''; + df.isubscriber_DOB.value=''; df.isubscriber_ss.value=''; df.form_isubscriber_sex.value=''; @@ -93,7 +121,7 @@ function auto_populate_employer_address(){ - +
@@ -142,7 +170,7 @@ function auto_populate_employer_address(){ - + @@ -218,17 +246,17 @@ function auto_populate_employer_address(){ } else { ?> -
:
:
:
+
- += $M) { break; @@ -255,7 +283,7 @@ if ($findby == "Last" && $result = getPatientLnames("$patient", "*,DATE_FORMAT(D print ""; + text(oeFormatShortDate($iter{"DOB"})) . ""; } else { print ""; + text(oeFormatShortDate($iter{"DOB"})) . ""; } else { print ""; + text(oeFormatShortDate($iter{"DOB"})) . ""; } else { print ""; + text(oeFormatShortDate($iter{"DOB"})) . ""; } else { print "
+ - + - + - + -
" . - htmlspecialchars($iter{"DOB_TS"}, ENT_NOQUOTES) . "= $M) { break; @@ -290,7 +318,7 @@ if ($findby == "ID" && $result = getPatientId("$patient", "*, DATE_FORMAT(DOB,'% print "" . - htmlspecialchars($iter{"DOB_TS"}, ENT_NOQUOTES) . "= $M) { break; @@ -325,7 +353,7 @@ if ($findby == "DOB" && $result = getPatientDOB("$patient", "*, DATE_FORMAT(DOB, print "" . - htmlspecialchars($iter{"DOB_TS"}, ENT_NOQUOTES) . "= $M) { break; @@ -360,7 +388,7 @@ if ($findby == "SSN" && $result = getPatientSSN("$patient", "*, DATE_FORMAT(DOB, print "" . - htmlspecialchars($iter{"DOB_TS"}, ENT_NOQUOTES) . " - + }); $('.datetimepicker').datetimepicker({ - + }); diff --git a/interface/usergroup/facility_user_admin.php b/interface/usergroup/facility_user_admin.php index 5b4a9d5c5..fcc90348e 100644 --- a/interface/usergroup/facility_user_admin.php +++ b/interface/usergroup/facility_user_admin.php @@ -61,14 +61,14 @@ if (!isset($_GET["user_id"]) || !isset($_GET["fac_id"])) { $('.datepicker').datetimepicker({ - + }); $('.datetimepicker').datetimepicker({ - + }); diff --git a/library/formatting.inc.php b/library/formatting.inc.php index ffe18bcef..98d923297 100644 --- a/library/formatting.inc.php +++ b/library/formatting.inc.php @@ -58,10 +58,10 @@ function oeFormatShortDate($date = 'today', $showYear = true) // 0 - Time format 24 hr // 1 - Time format 12 hr -function oeFormatTime($time, $format = "") +function oeFormatTime($time, $format = "global") { $formatted = $time; - if ($format == "") { + if ($format === "global") { $format = $GLOBALS['time_display_format']; } @@ -79,9 +79,9 @@ function oeFormatTime($time, $format = "") * @param $datetime * @return string */ -function oeFormatDateTime($datetime) +function oeFormatDateTime($datetime, $formatTime = "global") { - echo oeFormatShortDate(substr($datetime, 0, 10)) . " " . oeFormatTime(substr($datetime, 10)); + return oeFormatShortDate(substr($datetime, 0, 10)) . " " . oeFormatTime(substr($datetime, 11), $formatTime); } /** @@ -178,9 +178,9 @@ function DateFormatRead($mode = 'legacy') function DateToYYYYMMDD($DateValue) { -//With the help of function DateFormatRead() now the user can enter date is any of the 3 formats depending upon the global setting. - //But in database the date can be stored only in the yyyy-mm-dd format. - //This function accepts a date in any of the 3 formats, and as per the global setting, converts it to the yyyy-mm-dd format. + //With the help of function DateFormatRead() now the user can enter date is any of the 3 formats depending upon the global setting. + //But in database the date can be stored only in the yyyy-mm-dd format. + //This function accepts a date in any of the 3 formats, and as per the global setting, converts it to the yyyy-mm-dd format. if (trim($DateValue)=='') { return ''; } @@ -199,6 +199,32 @@ function DateToYYYYMMDD($DateValue) } } +function TimeToHHMMSS($TimeValue) +{ + //For now, just return the $TimeValue, since input fields are not formatting time. + // This can be upgraded if decided to format input time fields. + + if (trim($TimeValue)=='') { + return ''; + } + + return $TimeValue; +} + + +function DateTimeToYYYYMMDDHHMMSS($DateTimeValue) +{ + //This function accepts a timestamp in any of the selected formats, and as per the global setting, converts it to the yyyy-mm-dd hh:mm:ss format. + + // First deal with the date + $fixed_date = DateToYYYYMMDD(substr($DateTimeValue, 0, 10)); + + // Then deal with the time + $fixed_time = TimeToHHMMSS(substr($DateTimeValue, 11)); + + return $fixed_date . " " . $fixed_time; +} + // Returns age in a desired format: // 0 = "xx month(s)" if < 2 years, else years // 1 = Years : just a number diff --git a/library/options.inc.php b/library/options.inc.php index 173c8d143..1b1b84c71 100644 --- a/library/options.inc.php +++ b/library/options.inc.php @@ -308,10 +308,8 @@ function parse_static_text($frow) // $frow is a row from the layout_options table. // $currvalue is the current value, if any, of the associated item. -// $useFormatDate - change values of dates inputs to local format date (according $GLOBALS['date_display_format']). -// IMPORTANT - in the case $useFormatDate is true, not forget to convert a dates back to mysql format using DateToYYYYMMDD() function before saving. // -function generate_form_field($frow, $currvalue, $useFormatDate = false) +function generate_form_field($frow, $currvalue) { global $rootdir, $date_init, $ISSUE_TYPES, $code_types; @@ -461,11 +459,11 @@ function generate_form_field($frow, $currvalue, $useFormatDate = false) if ($data_type == 4) { $modtmp = isOption($frow['edit_options'], 'F') === false ? 0 : 1; if (!$modtmp) { - $dateValue = $useFormatDate ? oeFormatShortDate(substr($currescaped, 0, 10)) : substr($currescaped, 0, 10); + $dateValue = oeFormatShortDate(substr($currescaped, 0, 10)); echo " @@ -3388,7 +3396,14 @@ function get_layout_form_value($frow, $prefix = 'form_') $field_id = $frow['field_id']; $value = ''; if (isset($_POST["$prefix$field_id"])) { - if ($data_type == 21) { + if ($data_type == 4) { + $modtmp = isOption($frow['edit_options'], 'F') === false ? 0 : 1; + if (!$modtmp) { + $value = DateToYYYYMMDD($_POST["$prefix$field_id"]); + } else { + $value = DateTimeToYYYYMMDDHHMMSS($_POST["$prefix$field_id"]); + } + } else if ($data_type == 21) { if (!$frow['list_id']) { if (!empty($_POST["form_$field_id"])) { $value = xlt('Yes'); diff --git a/library/patient.inc b/library/patient.inc index 4c0613131..3273e6560 100644 --- a/library/patient.inc +++ b/library/patient.inc @@ -832,7 +832,6 @@ function getPatientName($pid) /* find patient data by DOB */ function getPatientDOB($DOB = "%", $given = "pid, id, lname, fname, mname", $orderby = "lname ASC, fname ASC", $limit = "all", $start = "0") { - $DOB = DateToYYYYMMDD($DOB); $sqlBindArray = array(); $where = "DOB like ? "; array_push($sqlBindArray, $DOB."%"); @@ -968,9 +967,6 @@ function newPatientData( $regdate = "" ) { - $DOB = DateToYYYYMMDD($DOB); - $regdate = DateToYYYYMMDD($regdate); - $fitness = 0; $referral_source = ''; if ($pid) { @@ -1095,14 +1091,10 @@ function fixDate($date, $default = "0000-00-00") function pdValueOrNull($key, $value) { - if ($key == 'DOB' || $key == 'regdate' || $key == 'contrastart' || - substr($key, 0, 8) == 'userdate' || $key == 'deceased_date') { - if ((empty($value) || $value == '0000-00-00')) { - return "NULL"; - } else { - //return format date for mysql - return "'" . DateToYYYYMMDD($value) . "'"; - } + if (($key == 'DOB' || $key == 'regdate' || $key == 'contrastart' || + substr($key, 0, 8) == 'userdate' || $key == 'deceased_date') && + (empty($value) || $value == '0000-00-00')) { + return "NULL"; } else { return "'" . add_escape_custom($value) . "'"; } @@ -1114,7 +1106,6 @@ function updatePatientData($pid, $new, $create = false) { /******************************************************************* $real = getPatientData($pid); - $new['DOB'] = DateToYYYYMMDD($new['DOB']); while(list($key, $value) = each ($new)) $real[$key] = $value; $real['date'] = "'+NOW()+'"; @@ -1262,11 +1253,13 @@ function newInsuranceData( return false; } - // If a bad date was passed, err on the side of caution. - $effective_date = DateToYYYYMMDD($effective_date); + // If empty dates were passed, then zero them. if (empty($effective_date)) { $effective_date = '0000-00-00'; } + if (empty($subscriber_DOB)) { + $subscriber_DOB = '0000-00-00'; + } $idres = sqlStatement("SELECT * FROM insurance_data WHERE " . "pid = ? AND type = ? ORDER BY date DESC", array($pid,$type)); diff --git a/myportal/soap_service/server_audit.php b/myportal/soap_service/server_audit.php index 5b9c3284c..0d3991739 100644 --- a/myportal/soap_service/server_audit.php +++ b/myportal/soap_service/server_audit.php @@ -1,5 +1,5 @@ // // @@ -19,7 +19,7 @@ // openemr/interface/login/GnuGPL.html // For more information write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// +// // Author: Eldho Chacko // Jacob T Paul // @@ -28,10 +28,10 @@ require_once("server_mail.php"); - + class UserAudit extends UserMail { - + //to generate random password public function generatePassword($length = 20) @@ -97,7 +97,7 @@ class UserAudit extends UserMail throw new SoapFault("Server", "credentials failed"); } } - + //update the audit master_table with the status ie denied,approved etc. @@ -116,10 +116,10 @@ class UserAudit extends UserMail throw new SoapFault("Server", "credentials failed"); } } - -// Will update the corresponding tables with the audited and approved data. + +// Will update the corresponding tables with the audited and approved data. //Appointments and Demos are updated from the audit_details table to the actual transaction tables public function update_audited_data($var) { @@ -153,7 +153,7 @@ class UserAudit extends UserMail if ($table=='patient_data') { $newdata['patient_data'][$rowfield['field_name']]=$rowfield['field_value']; } - + if ($table=='employer_data') { $newdata['employer_data'][$rowfield['field_name']]=$rowfield['field_value']; } @@ -166,15 +166,15 @@ class UserAudit extends UserMail $newdata[$rowfield['entry_identification']][$rowfield['field_name']]=$rowfield['field_value']; } } - + if ($table=='openemr_postcalendar_events') { $newdata['openemr_postcalendar_events'][$rowfield['field_name']]=$rowfield['field_value']; } - + if ($table=='ar_session') { $newdata['ar_session'][$rowfield['field_name']]=$rowfield['field_value']; } - + if ($table=='documents_legal_master') { $newdata['documents_legal_master'][$rowfield['field_name']]=$rowfield['field_value']; } @@ -182,7 +182,7 @@ class UserAudit extends UserMail if ($table=='documents_legal_detail') { $newdata['documents_legal_detail'][$rowfield['field_name']]=$rowfield['field_value']; } - + if ($table=='patient_access_offsite') { $newdata['patient_access_offsite'][$rowfield['field_name']]=$rowfield['field_value']; if ($rowfield['field_name'] == 'portal_pwd') { @@ -222,7 +222,7 @@ class UserAudit extends UserMail $newdata[${ins.$i._type}]['subscriber_fname'], $newdata[${ins.$i._type}]['subscriber_relationship'], $newdata[${ins.$i._type}]['subscriber_ss'], - $newdata[${ins.$i._type}]['subscriber_DOB'], + fixDate($newdata[${ins.$i._type}]['subscriber_DOB']), $newdata[${ins.$i._type}]['subscriber_street'], $newdata[${ins.$i._type}]['subscriber_postal_code'], $newdata[${ins.$i._type}]['subscriber_city'], @@ -237,7 +237,7 @@ class UserAudit extends UserMail $newdata[${ins.$i._type}]['subscriber_employer_country'], $newdata[${ins.$i._type}]['copay'], $newdata[${ins.$i._type}]['subscriber_sex'], - $newdata[${ins.$i._type}]['date'], + fixDate($newdata[${ins.$i._type}]['date']), $newdata[${ins.$i._type}]['accept_assignment'] ); } @@ -342,7 +342,7 @@ class UserAudit extends UserMail throw new SoapFault("Server", "credentials failed"); } } - + //Data from portal is inserted through this function. It will wait for audit and approval //according to the facility settings. audit_details is the child table of Audit_master @@ -359,7 +359,7 @@ class UserAudit extends UserMail $table_name_array=$var['table_name_array']; $field_name_value_array=$var['field_name_value_array']; $entry_identification_array=$var['entry_identification_array']; - + if ($audit_master_id_to_delete) { $qry = "DELETE from audit_master WHERE id=?"; sqlStatement($qry, array($audit_master_id_to_delete)); @@ -405,7 +405,7 @@ class UserAudit extends UserMail throw new SoapFault("Server", "credentials failed"); } } - + //Data from portal is inserted through this function. It will wait for audit and approval //according to the facility settings. This is the master table entry. diff --git a/portal/account/account.lib.php b/portal/account/account.lib.php index 708b36a36..802aa0c74 100644 --- a/portal/account/account.lib.php +++ b/portal/account/account.lib.php @@ -77,7 +77,7 @@ function saveInsurance($pid) $subscriber_employer_country = "", $copay = $_REQUEST['copay'], $subscriber_sex = "", - $effective_date = $_REQUEST['date'], + $effective_date = DateToYYYYMMDD($_REQUEST['date']), $accept_assignment = "TRUE", $policy_type = "" ); -- 2.11.4.GIT