private AppointmentRepo(IPersistable persistable, List <User> users, List <Department> departments)
        {
            _persistable = persistable;

            _appointments = _persistable.GetAppointments(users, departments);

            _updateAppointmentNotification = new AppointmentNotification(_appointments, this, _persistable);
        }
        private void CheckForAppointments()
        {
            List <User> users = new List <User>();

            users.AddRange(_clients);
            users.AddRange(_practitioners);
            List <Appointment> tempAppointments = _persistable.GetAppointments(users, _departments);

            bool newAppointmentsInDatabase = !(tempAppointments.Count == _appointments.Count || tempAppointments.All(_appointments.Contains));

            if (newAppointmentsInDatabase)
            {
                _appointments = tempAppointments;
                AppointmentsUpdatedEventHandler?.Invoke(_appointments, EventArgs.Empty);
            }
        }