private async void ValidateResponsePayMedicalCenterCoordination(ResponsePayMedicalCenterCoordination response)
        {
            await dialogService.ShowMessage(response.Title, response.Message);

            if (response.Success && response.StatusCode == 0)
            {
                IMedicalCenterCoordinationPageViewModel pageViewModel = ServiceLocator.Current.GetInstance <IMedicalCenterCoordinationPageViewModel>();
                pageViewModel.CoordinationSelected = new CoordinationViewModel
                {
                    Address                 = responsePreConfirmation.PreConfirm.ClinicAddress,
                    AgendaName              = ServiceSelected.Name,
                    ClinicCode              = MedicalCenterSelected.ClinicCode,
                    ClinicName              = MedicalCenterSelected.ClinicName,
                    Cost                    = responsePreConfirmation.PreConfirm.Price,
                    Date                    = ScheduleSelected.Date,
                    Document                = PersonSelected.Document,
                    FullAddress             = string.Format("{0} - {1}", MedicalCenterSelected.ClinicName, responsePreConfirmation.PreConfirm.ClinicAddress),
                    Hour                    = ScheduleSelected.Time,
                    Time                    = ScheduleSelected.Time,
                    IsVisiblePay            = false,
                    IsVisibleRecommendation = true,
                    Latitude                = double.Parse((responsePreConfirmation.PreConfirm.Latitude.Replace(".", phoneService.CurrentCulture.NumberFormat.CurrencyDecimalSeparator))),
                    Longitude               = double.Parse((responsePreConfirmation.PreConfirm.Longitude.Replace(".", phoneService.CurrentCulture.NumberFormat.CurrencyDecimalSeparator))),
                    Names                   = PersonSelected.Names,
                    NameSpecialty           = SpecialitySelected.Description,
                    Price                   = responsePreConfirmation.PreConfirm.Price,
                    RDACode                 = MedicalCenterSelected.RDACode,
                    Recommendations         = response.Recommendations,
                    SpecialityCode          = SpecialitySelected.Code,
                    YearMonthDay            = ScheduleSelected.YearMonthDay
                };
                await navigationService.BackToRoot();

                await navigationService.Navigate(AppPages.MedicalCenterCoordinationDetailPage, true);
            }
        }
        public async void Payment()
        {
            if (PaymentMethodSelected.ExternalMethod == false)
            {
                dialogService.ShowProgress();
                RequestPayMedicalCenterCoordination request = new RequestPayMedicalCenterCoordination
                {
                    ClinicCode        = MedicalCenterSelected.ClinicCode,
                    DocumentType      = PersonSelected.DocumentType,
                    Email             = PersonSelected.Email,
                    IdReference       = ServiceLocator.Current.GetInstance <ILoginViewModel>().User.IdReference,
                    LocalCode         = MedicalCenterSelected.LocalCode,
                    Number            = PersonSelected.Document,
                    PatientCode       = responsePreConfirmation.PreConfirm.PatientCode,
                    PatientName       = PersonSelected.FullNames,
                    Phone             = string.IsNullOrEmpty(PersonSelected.CellPhone) ? PersonSelected.Phone : PersonSelected.CellPhone,
                    ProductCode       = responsePreConfirmation.PreConfirm.ProductCode,
                    RDACode           = MedicalCenterSelected.RDACode,
                    SpecialityCode    = SpecialitySelected.Code,
                    Time              = ScheduleSelected.Time,
                    YearMonthDay      = ScheduleSelected.YearMonthDay,
                    Installments      = PaymentMethodSelected.InstallmentSelected.ToString(),
                    PaymentMethodCode = PaymentMethodSelected.PaymentMethodCode,
                    PaymentMethodName = PaymentMethodSelected.PaymentMethodName,
                    Price             = responsePreConfirmation.PreConfirm.Price,
                    UserEmail         = ServiceLocator.Current.GetInstance <ILoginViewModel>().User.UserName
                };
                ResponsePayMedicalCenterCoordination response = await apiService.PayMedicalCenterCoordination(request);

                dialogService.HideProgress();
                ValidateResponsePayMedicalCenterCoordination(response);
            }
            else
            {
                string Url = string.Format("{0}?Price={1}&UserEmail={2}&IdReference={3}&Token={4}&RDACode={5}&LocalCode={6}&ClinicCode={7}&SpecialityCode={8}&DocumentType={9}&Number={10}&PatientCode={11}&ProductCode={12}&YearMonthDay={13}&Time={14}&Phone={15}&Email={16}&PaymentMethodCode=Online&PaymentMethodName=Online&Installments={17}&AgendaType={18}&PatientName={19}",
                                           AppConfigurations.UrlPayCoordinationApp,
                                           responsePreConfirmation.PreConfirm.Price,
                                           ServiceLocator.Current.GetInstance <ILoginViewModel>().User.UserName,
                                           ServiceLocator.Current.GetInstance <ILoginViewModel>().User.IdReference,
                                           "0123456789",
                                           MedicalCenterSelected.RDACode,
                                           MedicalCenterSelected.LocalCode,
                                           MedicalCenterSelected.ClinicCode,
                                           SpecialitySelected.Code,
                                           PersonSelected.DocumentType,
                                           PersonSelected.Document,
                                           responsePreConfirmation.PreConfirm.PatientCode,
                                           responsePreConfirmation.PreConfirm.ProductCode,
                                           ScheduleSelected.YearMonthDay,
                                           ScheduleSelected.Time,
                                           PersonSelected.CellPhone != null ? PersonSelected.CellPhone : PersonSelected.Phone,
                                           PersonSelected.Email,
                                           PaymentMethodSelected.InstallmentSelected.ToString(),
                                           ServiceSelected.Code,
                                           PersonSelected.FullNames);

                await dialogService.ShowMessage(AppResources.TittleMedicalCenterCoordination, "Tu coordinación quedó reservada, finalizado el proceso de pago se te notificará confirmada");

                phoneService.OpenUrl(Url);
                await navigationService.BackToRoot();

                await navigationService.Navigate(AppPages.MedicalCenterCoordinationPage);
            }
        }