Пример #1
0
        public async Task <IActionResult> AddIgnorableSign(string patientId, string signType, string returnUrl)
        {
            if (String.IsNullOrWhiteSpace(patientId))
            {
                ModelState.AddModelError("PatientId", $"Wrong patient id {patientId}");
            }
            else if (String.IsNullOrWhiteSpace(signType))
            {
                ModelState.AddModelError("Sign", $"Wrong sign {signType}");
            }
            else
            {
                await _watchmanPatientService.AddIgnorableSignToPatientAsync(Guid.Parse(patientId), signType,
                                                                             this.GetAccessTokenFromCookies());
            }
            string action = returnUrl.Substring(returnUrl.IndexOf('P')).Replace('/', ' ');

            return(RedirectToAction(action, new { patientId = patientId }));
        }
Пример #2
0
        public async Task <IActionResult> AddIgnorableSign([FromBody] PatientIdIgnorableSignViewModel model)
        {
            await _service.AddIgnorableSignToPatientAsync(model.PatientId, model.SignType);

            return(Ok());
        }