private void SelectPatient(object o)
        {
            var vm     = new PatientListViewModel(Repository, _dialogRepository);
            var dialog = _dialogRepository.GetView(vm);

            if (dialog?.ShowDialog() == true)
            {
                Appointment.Patient   = _mapper.Map <PatientNewDto>(vm.SelectedPatient !.Patient);
                Appointment.PatientId = vm.SelectedPatient !.Id;
                OnPropertyChanged(nameof(Name));
            }
        }
        protected override (bool, PatientNewDto) CreateNewDto()
        {
            var newPatient = new PatientNewDto {
                Address = new AddressNewDto()
            };

            var vm     = new PatientNewViewModel(newPatient, PatientNewDtoValidator, DialogRepository);
            var dialog = DialogRepository.GetView(vm);

            if (dialog?.ShowDialog() == true)
            {
                return(true, vm.Patient);
            }

            return(false, vm.Patient);
        }
        protected override (bool, AppointmentNewDto) CreateNewDto()
        {
            var appointmentDto = new AppointmentViewDto()
            {
                Type = AppointmentType.Initial, Date = DateTimeOffset.UtcNow
            };

            var vm     = new AppointmentViewModel(appointmentDto, AppointmentNewDtoValidator, DialogRepository, Repository, Mapper);
            var dialog = DialogRepository.GetView(vm);

            if (dialog?.ShowDialog() == true)
            {
                appointmentDto = vm.Appointment;
                var newDto = Mapper.Map <AppointmentNewDto>(appointmentDto);
                return(true, newDto);
            }

            return(false, appointmentDto);
        }