/**
         * displays appointments and allows user to add notes.
         */
        private void showAppointments()
        {
            List <Appointment> appointments = DataSearching.getPractitionerAppointments(this); //this refers to instance of object, Gets the list of appointments for the current logged in practioner. w
            string             response     = "";
            bool inMenu = true;

            try
            {
                while (inMenu)
                {
                    Console.Clear();
                    DataPrinting.printPractitionerAppointments(this); //Prints Appointments based on the current logged in Practioner.
                    response = GeneralFunctions.getOptionalInput("Add note to appointment: ", false);

                    if (response != "")
                    {
                        if (appointments.Exists(appointment => appointment.getId() == response)) //finds defined condition, acts as a search filter, has been explained in a different a usertype .cs
                        {
                            addNote(appointments.Find(appointment => appointment.getId() == response));
                        }
                        else
                        {
                            Console.WriteLine("Appointment not found.");
                        }
                    }
                    else
                    {
                        inMenu = false;
                    }
                }
            }
            catch (Exception e)
            {
                GeneralFunctions.errorHandler(e);
            }
        }