Skip to content

Commit

Permalink
adjustments to prior commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Feb 2, 2018
1 parent d514ec4 commit 9a194f5
Show file tree
Hide file tree
Showing 21 changed files with 188 additions and 125 deletions.
10 changes: 5 additions & 5 deletions custom/import_xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -131,7 +131,7 @@ function setInsurance($pid, $ainsurance, $asubscriber, $seq)
$apatient['lname'],
$apatient['mname'],
$apatient['sex'],
$apatient['dob'],
fixDate($apatient['dob']),
$apatient['street'],
$apatient['zip'],
$apatient['city'],
Expand Down
4 changes: 2 additions & 2 deletions interface/cmsportal/history_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ function validate() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
$('.datetimepicker').datetimepicker({
<?php $datetimepicker_timepicker = true; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
Expand Down
9 changes: 4 additions & 5 deletions interface/cmsportal/insurance_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
$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'],
Expand All @@ -189,7 +189,7 @@
'', // subscriber_employer_country
'', // copay
$newdata['subscriber_sex'],
fixDate($newdata['date']),
$newdata['date'],
'TRUE', // accept_assignment
'' // policy_type
);
Expand Down Expand Up @@ -271,14 +271,14 @@ function validate() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
$('.datetimepicker').datetimepicker({
<?php $datetimepicker_timepicker = true; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
Expand Down Expand Up @@ -379,4 +379,3 @@ function validate() {
</center>
</body>
</html>

5 changes: 2 additions & 3 deletions interface/cmsportal/issue_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ function validate() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
$('.datetimepicker').datetimepicker({
<?php $datetimepicker_timepicker = true; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
Expand Down Expand Up @@ -332,4 +332,3 @@ function validate() {
</center>
</body>
</html>

5 changes: 2 additions & 3 deletions interface/cmsportal/lbf_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ function openPatient() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
$('.datetimepicker').datetimepicker({
<?php $datetimepicker_timepicker = true; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
Expand Down Expand Up @@ -142,4 +142,3 @@ function openPatient() {
</center>
</body>
</html>

4 changes: 2 additions & 2 deletions interface/cmsportal/patient_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ function validate() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
$('.datetimepicker').datetimepicker({
<?php $datetimepicker_timepicker = true; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
Expand Down
4 changes: 2 additions & 2 deletions interface/forms/LBF/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,14 @@ function verifyCancel() {
$('.datepicker').datetimepicker({
<?php $datetimepicker_timepicker = false; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
$('.datetimepicker').datetimepicker({
<?php $datetimepicker_timepicker = true; ?>
<?php $datetimepicker_showseconds = false; ?>
<?php $datetimepicker_formatInput = false; ?>
<?php $datetimepicker_formatInput = true; ?>
<?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
<?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
});
Expand Down
2 changes: 1 addition & 1 deletion interface/forms/newpatient/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ function cancelClickedOld() {
<td class='bold' nowrap><?php echo xlt('Date of Service:'); ?></td>
<td class='text' nowrap>
<input type='text' size='10' class='datepicker input-sm' name='form_date' id='form_date' <?php echo $disabled ?>
value='<?php echo $viewmode ? oeFormatShortDate(substr($result['date'], 0, 10)) : oeFormatShortDate(date('Y-m-d')); ?>'
value='<?php echo $viewmode ? attr(oeFormatShortDate(substr($result['date'], 0, 10))) : oeFormatShortDate(date('Y-m-d')); ?>'
title='<?php echo xla('Date of service'); ?>' />
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion interface/main/calendar/find_patient_popup.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
} elseif ($searchby == "ID") {
$result = getPatientId("$searchparm", "*");
} elseif ($searchby == "DOB") {
$result = getPatientDOB("$searchparm", "*");
$result = getPatientDOB(DateToYYYYMMDD($searchparm), "*");
} elseif ($searchby == "SSN") {
$result = getPatientSSN("$searchparm", "*");
}
Expand Down
26 changes: 13 additions & 13 deletions interface/main/finder/patient_select.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function submitList(offset) {

//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']);
Expand Down Expand Up @@ -235,7 +235,7 @@ function submitList(offset) {
} 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
Expand Down Expand Up @@ -417,7 +417,7 @@ function submitList(offset) {

echo "<td class='srSS'>" . htmlspecialchars($iter['ss'], ENT_NOQUOTES) . "</td>";
if ($iter{"DOB"} != "0000-00-00 00:00:00") {
echo "<td class='srDOB'>" . htmlspecialchars($iter['DOB_TS'], ENT_NOQUOTES) . "</td>";
echo "<td class='srDOB'>" . text(oeFormatShortDate($iter['DOB'])) . "</td>";
} else {
echo "<td class='srDOB'>&nbsp;</td>";
}
Expand All @@ -435,11 +435,11 @@ function submitList(offset) {
$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 " .
Expand All @@ -450,23 +450,23 @@ function submitList(offset) {
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 = ?";
$statement= sqlStatement($query, array($iter{"pid"}));
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
Expand All @@ -491,8 +491,8 @@ function submitList(offset) {

echo "<td class='srNumEnc'>" . htmlspecialchars($encounter_count, ENT_NOQUOTES) . "</td>\n";
echo "<td class='srNumDay'>" . htmlspecialchars($day_diff, ENT_NOQUOTES) . "</td>\n";
echo "<td class='srDateLast'>" . htmlspecialchars($last_date_seen, ENT_NOQUOTES) . "</td>\n";
echo "<td class='srDateNext'>" . htmlspecialchars($next_appt_date, ENT_NOQUOTES) . "</td>\n";
echo "<td class='srDateLast'>" . text(oeFormatShortDate($last_date_seen)) . "</td>\n";
echo "<td class='srDateNext'>" . text($next_appt_date) . "</td>\n";
} else { // alternate search results style
foreach ($extracols as $field_id => $frow) {
echo "<td class='srMisc'>";
Expand Down
3 changes: 3 additions & 0 deletions interface/new/new_comprehensive_save.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
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
Expand Down Expand Up @@ -115,6 +116,7 @@


$i2dob = DateToYYYYMMDD(filter_input(INPUT_POST, "i2subscriber_DOB"));
$i2date = DateToYYYYMMDD(filter_input(INPUT_POST, "i2effective_date"));

newInsuranceData(
$pid,
Expand Down Expand Up @@ -148,6 +150,7 @@
);

$i3dob = DateToYYYYMMDD(filter_input(INPUT_POST, "i3subscriber_DOB"));
$i3date = DateToYYYYMMDD(filter_input(INPUT_POST, "i3effective_date"));

newInsuranceData(
$pid,
Expand Down
3 changes: 2 additions & 1 deletion interface/new/new_patient_save.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
$form_city = '' ;
$form_postcode = '' ;
$form_countrycode = '' ;
$form_regdate = DateToYYYYMMDD(trim($_POST['regdate']));
// EOS DBC
// ===================

Expand Down Expand Up @@ -109,7 +110,7 @@
"", // $drivers_license = "",
"", // $hipaa_notice = "",
"", // $hipaa_message = "",
$_POST['regdate']
$form_regdate
);

newEmployerData($pid);
Expand Down
Loading

0 comments on commit 9a194f5

Please sign in to comment.