示例#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());
        }
 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));
        }