Calender Search for Available Appointment- Exclude Certain Appointment Categories?

andyflces wrote on Tuesday, January 20, 2015:

Is it possible to exclude certain categories from the calendar when searching for an available appointment during the “in” and “out” times? For example, our office keeps canceled appointments on the calendar so the clinician can have a quick overview of their canceled patients. We keep these appointments on the calendar for one week out into the future. We then book a new appointment which will appear next to the canceled appointment.

However, when searching for a new appointment using the search feature, the appointments showing in the “canceled category” will make the calendar search feature think the slots is unavailable and will not show this as available in the search.

Question: Is is possible to exclude certain calendar categories from the search so that they don’t appear as unavailable?

Thanks!

visolveemr wrote on Tuesday, January 20, 2015:

Andy

Currently, in OpenEMR search based on status feature is not implemented. We may need to customize the code to achieve this feature. This can be done in either of two ways:

  1. You can display the status also in the search result, so that based on the status the user can predict whether it is available or not. This is an easy change, where you need to include the following code in the file interface/main/calendar/modules/PostCalendar/pntemplates/default/user/ajax_search.html
    at line 77

     <th class="calsearch_patient">[-php-] xl('Appointment Status','e'); [-/php-]</th>
    

at line 126

    // status
    echo "<td class='calsearch_patient' align='left'>";
    echo $event['apptstatus'];
    echo "</td>";
  1. The other method is as you requested to exclude certain “Status” in the search filters(as multi select option) to search based on the status. This may need more customization works.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com
Demo’s @ ViSolve Demo Library

andyflces wrote on Tuesday, January 20, 2015:

Thanks for the response. I tried to work with option 1 and modified the code accordingly; however, no visible changes to the search behavior and outcome happened :frowning:

visolveemr wrote on Wednesday, January 21, 2015:

Andy

Regarding your 2nd question, to find the “canceled appointments” also in the available slot list in “Find Available” screen(which is present in the add appointment screen). We have given the fix below, please do these changes in the file interface/main/calendar/find_appt_popup.php

replace the line at 120 by following change:(ref. version. 4.2.0)

"(pc_endDate = '0000-00-00' AND pc_eventDate >= '$sdate' AND pc_eventDate < '$edate'  and pc_apptstatus!='x'))";

This fix, will include the cancelled appointments also in the available slot list.

The same “Find Available” screen can also be modified to include a search filter of “appointment status”, to search based on status. But this needs more customization works to be done.

And in our previous post we have given the fix in the screen “Search” (which is present in the top-left corner of the calendar screen). And this is regarding your 1st question, i.e to view all the appointments in a day based on the status.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com
Demo’s @ ViSolve Demo Library

visolveemr wrote on Wednesday, January 21, 2015:

Andy

You can also search for the appointments created based on status, provider, facility, etc. in the Reports section. You can find this under Reports->Visits->Appointments screen.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com
Demo’s @ ViSolve Demo Library

andyflces wrote on Thursday, January 22, 2015:

Great!!! Thanks for the help. Your second follow-up response with the code modification to include the “x” category seems to work! I will have our office staff test this and report back if there are any problems.

Andy