public IActionResult UpdatePatientRequest(EditPatientRequestModel model)
        {
            var result = Execute(() =>
            {
                _patientRequestService.UpdatePatientRequestWithPatient(model);
            });

            return(Json(result));
        }
Example #2
0
 public Task <ResponseWrapper> UpdatePatientRequestAsync(EditPatientRequestModel model)
 {
     return(Url("patientRequest/updatePatientRequest")
            .FormUrlEncoded()
            .Param(nameof(model.PatientRequestId), model.PatientRequestId.ToString())
            .Param(nameof(model.Message), model.Message)
            .Param(nameof(model.PatientPhoneNumber), model.PatientPhoneNumber)
            .Param(nameof(model.PatientAddressLine1), model.PatientAddressLine1)
            .PostAsync <ResponseWrapper>());
 }
Example #3
0
        public void UpdatePatientRequestWithPatient(EditPatientRequestModel model)
        {
            var patRequest = _patientRequestsRepository.GetById(model.PatientRequestId);

            if (patRequest == null)
            {
                return;
            }

            patRequest.Message = model.Message;
            _patientRequestsRepository.Update(patRequest);

            if (patRequest.PatientInfoId.HasValue)
            {
                var patient = _userInfoService.GetUserInfoById(patRequest.PatientInfoId.Value);

                patient.AddressLine1 = model.PatientAddressLine1;
                patient.PhoneNumber  = model.PatientPhoneNumber;

                _userInfoService.Update(patient);
            }
        }
 public Task <ResponseWrapper> UpdatePatientRequestAsync(EditPatientRequestModel model)
 {
     return(_requestRestApi.UpdatePatientRequestAsync(model));
 }