is it possible to change the times from military time to standard time for the appointment reports? these are being printed out and it is somewhat confusing to convert from the military time to the regular time… Is there a way of changing this?
I think this could be a future option, configured on a per-user basis in the system. If some users like to see the 24-hr clock they can while others, in the same system, could see a 12-hr clock. It shouldn’t be terribly difficult but certainly time consuming.
So, at the moment the short answer is: No.
The medium answer is –
Look at the code for the report and change the SQL code.
For example, in the appointment report:
<oemr>/interface/reports/appointments_report.php
change the SQL code from this –
$query = "SELECT " .
"e.pc_eventDate, e.pc_startTime, e.pc_catid, e.pc_eid, " .
to this –
$query = "SELECT " .
"e.pc_eventDate, TIME_FORMAT(e.pc_startTime, "%h:$i") as pc_startTime, e.pc_catid, e.pc_eid, " .
Jason,
Thanks for the code snippet, but I think you let a couple typos slip by.
But with the MYSQL page you referenced it was easy to figure out.
It displayed a blank report page until I changed the double quotes into singles around “%h:$i” , but the minutes didn’t display until I changed the $ to a %
Now all I have to do is figure out how to get it to sort the list with the AM appointments before the PM appointments.
Jason,
Sorry to be a pest, but the mysql website wasn’t as helpful this time.
I should have mentioned that you’re talking to a clueless newby here.
I don’t know exactly what "add this to the end of the SQL " means.
I tried adding it in various places: end of the new line, end of the subroutine, after the “TIME_FORMAT(e.pc_startTime, ‘%h:%i’) as pc_startTime” , etc, but either get sql errors or a blank page.
Yes the columns still sort when clicking the header, but the sort routine sees 1PM as smaller than 9AM, so all the afternoon appointments are listed before the morning appointments.
However your latest message finally jogged something in my brain and I tried changing line 24 from ‘time’ => ‘pc_eventDate, pc_startTime, lower(u.lname), lower(u.fname)’,
to ‘time’ => ‘pc_eventDate, e.pc_startTime, lower(u.lname), lower(u.fname)’,
SUCCESS ! IT WORKS !
The day now begins on the report at 9AM and my wife will stop complaining to me about the ‘military’ time.
Thank you
It seems to be working fine.
I _think_ the only thing affected is the Appointments Report.
The office staff loves the change. For some reason they just hate 24hr time.