public ActionResult UpdateAppointment(CreateAppointmentViewModel model)
        {
            try
            {
                var timeZone = Request.Cookies["TimeZone"].Value;
                var authInfo = (AuthInfo)Session["auth_info"];
                if (authInfo == null)
                {
                    return(Json(new KeyValueResult(false, "Your session has expired. Please signin again."), JsonRequestBehavior.AllowGet));
                }
                var dateTimeExpected = model.ExpectedDate + " " + model.ExpectedTime;
                var dateExpected     = Utils.StringToDateTime(dateTimeExpected);
                var appointment      = new CreateUpdateAppointmentModel
                {
                    AppointmentId    = model.Id,
                    ClinicId         = authInfo.CurrentSelectedClinic.ClinicId,
                    PatientId        = model.PatientId,
                    DoctorId         = model.DoctorId,
                    DoctorName       = model.DoctorName,
                    ClinicName       = authInfo.CurrentSelectedClinic.ClinicName,
                    ClinicPhone      = authInfo.CurrentSelectedClinic.Phone,
                    ExpectedDuration = int.Parse(model.Duration),
                    CarerFirstName   = model.OtherFirstName,
                    CarerLastName    = model.OtherLastName,
                    IsCarer          = model.IsCarer ? 1 : 0,
                    IsNewPatient     = model.IsNewPatient,
                    Patient          = new PatientCreateAppointmentModel
                    {
                        PatientId = model.PatientId,
                        FirstName = model.FirstName,
                        LastName  = model.LastName,
                        Phone     = model.Phone,
                        Email     = model.Email
                    },
                    ExpectedStartDateTime = Utils.ToUTCTimeSpan(dateExpected, timeZone),
                    MeetingUri            = model.SipUriMeeting,
                    JoinMettingUrl        = model.UrlJoinMeeting,
                    IsFloating            = model.IsFloating
                };

                _appointmentService.UpdateAppointment(appointment);
                return(Json(new KeyValueResult(true, "Welio appointment successfully updated."), JsonRequestBehavior.AllowGet));
            }
            catch (ApiException ex)
            {
                return(Json(new KeyValueResult(false, ex.Message), JsonRequestBehavior.AllowGet));
            }
        }
        public void UpdateAppointment(CreateUpdateAppointmentModel model)
        {
            var url = ApiUrl.Default.RootApi + ApiUrl.Default.UpdateAppointment;

            Restful.Post(url, null, model);
        }