Пример #1
0
        public async Task <IActionResult> Get([FromBody] GuidFieldViewModel model)
        {
            var watchman = await _service.GetWatchmanAsync(model.Id);

            var result = JsonConvert.SerializeObject(watchman);

            return(Ok(result));
        }
Пример #2
0
        public async Task <IActionResult> Create([FromBody] GuidFieldViewModel model)
        {
            await _service.CreatePatientAsync(new PatientProfile()
            {
                Id = model.Id
            });

            return(Ok());
        }
Пример #3
0
        public async Task <IActionResult> Create([FromBody] GuidFieldViewModel model)
        {
            await _service.CreateWatchmanAsync(new WatchmanProfileHealth()
            {
                Id = model.Id
            });

            return(Ok());
        }
Пример #4
0
 public IActionResult RemovePatients([FromBody] GuidFieldViewModel model)
 {
     try
     {
         _service.RemoveAllPatientFromWatchman(model.Id);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(BadRequest(ex));
     }
 }
Пример #5
0
 public async Task <IActionResult> GetByPatientId([FromBody] GuidFieldViewModel model)
 {
     return(Ok(await _userManager.FindByPatient(model.Id)));
 }
Пример #6
0
        public async Task <IActionResult> RefuseControlRequest([FromBody] GuidFieldViewModel model)
        {
            await _controlRequestService.UpdateRequestStatus(model.Id, ControlRequestStatus.Refused);

            return(Ok());
        }
Пример #7
0
 [HttpPost]//TODO GET
 public async Task <IEnumerable <ControlRequest> > GetPendingRequests([FromBody] GuidFieldViewModel model)
 {
     return(await _controlRequestService.GetPendingRequests(model.Id));
 }
Пример #8
0
 [HttpPost]//TODO GET
 public async Task <IActionResult> Get([FromBody] GuidFieldViewModel model)
 {
     return(Ok(await _controlRequestService.GetControlRequest(model.Id)));
 }
Пример #9
0
        public async Task <IActionResult> GetIgnorableSigns([FromBody] GuidFieldViewModel model)
        {
            var result = await _service.GetIgnorableSignsAsync(model.Id);

            return(Ok(JsonConvert.SerializeObject(result)));
        }
Пример #10
0
        public async Task <IActionResult> DeleteWatchmanProfile([FromBody] GuidFieldViewModel model)
        {
            await _service.DeleteWatchmanProfile(model.Id);

            return(NoContent());
        }
Пример #11
0
        public async Task <IActionResult> GetMeasurements([FromBody] GuidFieldViewModel model)
        {
            var res = await _service.GetLastHealthMeasurementsAsync(model.Id, 5);

            return(Ok(res));
        }
Пример #12
0
 public IActionResult RemoveWatchmen([FromBody] GuidFieldViewModel model)
 {
     _service.RemoveAllWatchmenFromPatient(model.Id);
     return(Ok());
 }
Пример #13
0
        public async Task <IActionResult> GetWithAllProperties([FromBody] GuidFieldViewModel model)
        {
            var res = JsonConvert.SerializeObject(await _service.GetPatientWithAllPropertiesAsync(model.Id));

            return(Ok(res));
        }
Пример #14
0
 public async Task <IActionResult> Get([FromBody] GuidFieldViewModel model)
 {
     return(Ok(await _service.GetPatientAsync(model.Id)));
 }
Пример #15
0
 public async Task <IActionResult> GetPatientWatchmen([FromBody] GuidFieldViewModel model)
 {
     return(Ok(JsonConvert.SerializeObject(await _service.GetPatientWatchmenAsync(model.Id))));
 }
Пример #16
0
        public async Task <IActionResult> DeleteWatchman([FromBody] GuidFieldViewModel model)
        {
            await _userHealthService.RemoveWatchmanFromUser(model.Id);

            return(Ok());
        }
Пример #17
0
 public async Task <IActionResult> Get([FromBody] GuidFieldViewModel model)
 {
     return(Ok(await _infoService.GetPersonalInformation(model.Id)));
 }
Пример #18
0
        public async Task <IActionResult> AnalyzeLastMeasurement([FromBody] GuidFieldViewModel model)
        {
            var result = await _service.GetAnalysisOfLastMeasurementAsync(model.Id);

            return(Ok(result));
        }