Go to the demo site and create a new patient. Then go to the calendar and click on an empty slot. Hit Save. The system currently prompts that slot is already booked even though it’s not.
The work around is to create IN/OUT events on the calendar.
Rod seems to be using the “find available” code to decide if a slot is being double booked which does not correctly distinguish between an already used slot and an “out of office hours” slot.
This problem happens even if you are editing and re-saving an existing appointment. It also happens on parts of the schedule where I am in the office. Maybe we missed some sort of in/out setting, but it is pretty unclear if that is the case.
This problem happens even if you are editing and re-saving an existing appointment. It also happens on parts of the schedule where I am in the office. Maybe we missed some sort of in/out setting, but it is pretty unclear if that is the case.
Cverk, it would help if you can repro those problems on the demo site. But that sounds like stuff I fixed, so if you are on an older release that may be the problem.
I tried the demo and it does seem to work better than ours. I am using windows xampp 4.1.1 patch 7. I will try not to make observations of things to fix unless I have put in all the established fixes that have already been made. If you look at a scheduled visit and check the provider box it says in office, but when you try to resave it there is a box telling you the slot is used. You can click and overide it, but it makes everyone think there is something wrong. Does the demo represent fixes past the official patch releases? Or could this be windows specific? On the demo it looks like it trys to make an error box that goes away quickly by itself.
This is a known bug that we haven’t been able to fix, mostly because I haven’t been able to reproduce it (to verify, I mean when get this error as in cverk’s case where the template has been properly set). I couldn’t reproduce this in xampp-4.1.1 package (note this is likely using a newer version of xampp than cverk above; cverk can you verify this), so am wondering if it’s happening on Windows in older php versions.
I am using the xampp version with the current xampp 4.1.1 package. I imported our old data into that in order to use the newer xampp. I have put in all the patches as well.
Can you please tell the current process to get on the Professional Support Page as a provider? I have trained and helped several OpenEMR customers but now am operating under a new company name that is not on the list. Also, my partner is working on an innovative mobile app and some new forms. Please advise. email JC@acehealthsolutions.com
First, jjcahs, I suggest that you don’t post requests that not related to the topic. This thread is about a bug in the calendar. Create a new topic at least, probably in the ‘Help’ section.
I just re-tested it on 4.1.1(7) from the xampp package (which is xampp 1.8.0) and I can’t confirm this (if I set the IN/OUT template and create an appt with this I do not get the message). Very odd, Even tried it with users in different acl groups. Here’s is the code that is related to this from interface/main/calendar/add_edit_event.php:
function SubmitForm() {
var f = document.forms[0];
<?php if (!($GLOBALS['select_multi_providers'])) { // multi providers appt is not supported by check slot avail window, so skip ?>
if (f.form_action.value != 'delete') {
// Check slot availability.
var mins = parseInt(f.form_hour.value) * 60 + parseInt(f.form_minute.value);
if (f.form_ampm.value == '2' && mins < 720) mins += 720;
find_available('&cktime=' + mins);
}
else {
top.restoreSession();
f.submit();
}
<?php } else { ?>
top.restoreSession();
f.submit();
<?php } ?>
return true;
}
// Invoke the find-available popup.
function find_available(extra) {
top.restoreSession();
// (CHEMED) Conditional value selection, because there is no <select> element
// when making an appointment for a specific provider
var s = document.forms[0].form_provider;
var f = document.forms[0].facility;
<?php if ($userid != 0) { ?>
s = document.forms[0].form_provider.value;
f = document.forms[0].facility.value;
<?php } else {?>
s = document.forms[0].form_provider.options[s.selectedIndex].value;
f = document.forms[0].facility.options[f.selectedIndex].value;
<?php }?>
var c = document.forms[0].form_category;
var formDate = document.forms[0].form_date;
dlgopen('<?php echo $GLOBALS['web_root']; ?>/interface/main/calendar/find_appt_popup.php' +
'?providerid=' + s +
'&catid=' + c.options[c.selectedIndex].value +
'&facility=' + f +
'&startdate=' + formDate.value +
'&evdur=' + document.forms[0].form_duration.value +
'&eid=<?php echo 0 + $eid; ?>' +
extra,
'_blank', 500, 400);
//END (CHEMED) modifications
}
Which then goes to interface/main/calendar/find_appt_popup.php with related code there:
// The cktime parameter is a number of minutes into the starting day of a
// tentative appointment that is to be checked. If it is present then we are
// being asked to check if this indicated slot is available, and to submit
// the opener and go away quietly if it is. If it's not then we have more
// work to do.
$ckavail = true;
if (isset($_REQUEST['cktime'])) {
$cktime = 0 + $_REQUEST['cktime'];
$ckindex = (int) ($cktime * 60 / $slotsecs);
for ($j = $ckindex; $j < $ckindex + $evslots; ++$j) {
if ($slots[$j] >= 4) $ckavail = false;
}
if ($ckavail) {
// The chosen appointment time is available.
echo "<html><script language='JavaScript'>\n";
echo "function mytimeout() {\n";
echo " opener.top.restoreSession();\n";
echo " opener.document.forms[0].submit();\n";
echo " window.close();\n";
echo "}\n";
echo "</script></head><body onload='setTimeout(\"mytimeout()\",250);'>" .
xlt('Time slot is open, saving event') . "...</body></html>";
exit();
}
// The appointment slot is not available. A message will be displayed
// after this page is loaded.
}
<?php if (!$ckavail) { ?>
<?php if (acl_check('patients','appt','','write')) { ?>
if (confirm('<?php echo addslashes(xl('This appointment slot is already used, use it anyway?')); ?>')) {
opener.top.restoreSession();
opener.document.forms[0].submit();
window.close();
}
<?php } else { ?>
alert('<?php echo addslashes(xl('This appointment slot is not available, please choose another.')); ?>');
<?php } ?>
<?php } ?>
Wonder if it is related to how the slots are set up?
I think it may well be the slots issue. The IN/OUT recurring setting is almost impossible to reset. Once a recurring setting is made , going back to change that gives you these overlapping frames and it aways trys to have you schedule an appointment instead of allowing you to schedule the provider in or out. I read the idea of sneaking up from underneath with the mouse cursor, but it is very difficult to make that work. I think I also had an ACL issue, because my scheduler seemed to think if I ran late a few days she would just set me as out of the office for the last half hour of the day for the next 2 years. We have had a not pleasant discussion regarding that and I believe I have removed that ability from her ACL, but resettiing that is proving very difficult. I watched the videos and read the manual etc which is good for first time setup, but not real helpful on resetting or altering things that have already been done.
Maybe what would be useful is to have a way to reset the providers recurring IN/OUT schedule settings to baseline without erasing scheduled patient appointments. So that way if a providers schedule changes or an error is made in scheduling them, you could start over, because currently trying to fix it makes a mess. I tried just altering the database to try and make that happen, and that does not go well. Luckily that was with a test instance so I could just erase it and start over.
Cverk,
Instead of reset, how about if I add a global setting that makes it so that creating new appointments works the “old way” and doesn’t require IN/OUT events.