Summary:
When you create a new appointment for a patient, the duration can be set to a negative value (like -30 minutes). After that it shows in calendar screen like a 15 minutes appointment.
Steps to reproduce:
Enter Calendar screen, select the Provider, create an entry on a new calendar cell, complete all the necessary details of the appointment such as category, facility, patient, provider etc. and set duration to -30 minutes (or any other negative value), then click on Save
The new appointment is saved and its representation on the calendar is as a 15 minute appointment.
Change line 205 in /interface/main/add_edit_event.php from:
$duration = $_POST['form_duration'];to
$duration = abs($_POST['form_duration']);abs() convert a number to its absolute form, ie. how far is it from zero, and is always a positive number.
So if $_POST['form_duration']="-30" is entered,
$duration= abs($_POST['form_duration']) = "30",
and it shows up correctly as a 30 minute appointment in the calendar.
Hi Ray,
After get more comfortable with command line git, this will be a nice beginner project to work on doing:
-brady
OpenEMR
Hi guys, I'm just getting started here.
https://github.com/dragon76n/openemr/commit/22c7e56a24aa6074dc83f8b77624853740a6aab6
22c7e56a24aa6074dc83f8b77624853740a6aab6
-Pinellas Hack Shack Member
Hi Dragon,
Thanks for the contribution! Just committed your commit to the codebase.
-brady
OpenEMR