Calender: Add Dropdown Field (New Appointment Form)

(Ben Ipinge) #1

Ola :hugs:

I am running v5.0.1(6), and I would like to add a new field in new appointment form. Tried the layout, list and forms options under administration but cannot find anything.

I am assuming that some programming is required, where can I find the code to change this? :blush:

(Ralf Lukner MD PhD) #2

The Listbox is one that you could use. You would create a custom list and then use that name in the field type. I can give you more detailed instructions if that would be helpful.

(Ben Ipinge) #3

Please do.

I can create a new list but were would it be applied to?

(Ralf Lukner MD PhD) #4

Okay. Let’s say you created a list Patient_Status with these elements:

And you wanted to add this to the form that to the demographics form, you would add another row like the one with Patient_Status to the Layout for Core/demographics below:

Now, if you must have it on the appointment form itself, then you will need to edit that form and create fields in the database for that. Unfortunately that will require some programming.

The database table for the appointments is openemr.openemr_postcalendar_events. I believe the php file that would need to be edited is this one: openemr/interface/main/calendar/add_edit_event.php


(Ben Ipinge) #5

Awesome Ralf.

And by adding new coloumn or fields in the table, won’t it break it?

(Ralf Lukner MD PhD) #6

This is running currently in my clinic, and it works well. A column is automatically added to the openemr.patient_data table by this change. I did modify some of the code for other forms (like the patient finder form) so that I can filter to view only active patients, for example.