public async Task <IActionResult> Get([FromBody] GuidFieldViewModel model) { var watchman = await _service.GetWatchmanAsync(model.Id); var result = JsonConvert.SerializeObject(watchman); return(Ok(result)); }
public async Task <IActionResult> Create([FromBody] GuidFieldViewModel model) { await _service.CreatePatientAsync(new PatientProfile() { Id = model.Id }); return(Ok()); }
public async Task <IActionResult> Create([FromBody] GuidFieldViewModel model) { await _service.CreateWatchmanAsync(new WatchmanProfileHealth() { Id = model.Id }); return(Ok()); }
public IActionResult RemovePatients([FromBody] GuidFieldViewModel model) { try { _service.RemoveAllPatientFromWatchman(model.Id); return(Ok()); } catch (Exception ex) { return(BadRequest(ex)); } }
public async Task <IActionResult> GetByPatientId([FromBody] GuidFieldViewModel model) { return(Ok(await _userManager.FindByPatient(model.Id))); }
public async Task <IActionResult> RefuseControlRequest([FromBody] GuidFieldViewModel model) { await _controlRequestService.UpdateRequestStatus(model.Id, ControlRequestStatus.Refused); return(Ok()); }
[HttpPost]//TODO GET public async Task <IEnumerable <ControlRequest> > GetPendingRequests([FromBody] GuidFieldViewModel model) { return(await _controlRequestService.GetPendingRequests(model.Id)); }
[HttpPost]//TODO GET public async Task <IActionResult> Get([FromBody] GuidFieldViewModel model) { return(Ok(await _controlRequestService.GetControlRequest(model.Id))); }
public async Task <IActionResult> GetIgnorableSigns([FromBody] GuidFieldViewModel model) { var result = await _service.GetIgnorableSignsAsync(model.Id); return(Ok(JsonConvert.SerializeObject(result))); }
public async Task <IActionResult> DeleteWatchmanProfile([FromBody] GuidFieldViewModel model) { await _service.DeleteWatchmanProfile(model.Id); return(NoContent()); }
public async Task <IActionResult> GetMeasurements([FromBody] GuidFieldViewModel model) { var res = await _service.GetLastHealthMeasurementsAsync(model.Id, 5); return(Ok(res)); }
public IActionResult RemoveWatchmen([FromBody] GuidFieldViewModel model) { _service.RemoveAllWatchmenFromPatient(model.Id); return(Ok()); }
public async Task <IActionResult> GetWithAllProperties([FromBody] GuidFieldViewModel model) { var res = JsonConvert.SerializeObject(await _service.GetPatientWithAllPropertiesAsync(model.Id)); return(Ok(res)); }
public async Task <IActionResult> Get([FromBody] GuidFieldViewModel model) { return(Ok(await _service.GetPatientAsync(model.Id))); }
public async Task <IActionResult> GetPatientWatchmen([FromBody] GuidFieldViewModel model) { return(Ok(JsonConvert.SerializeObject(await _service.GetPatientWatchmenAsync(model.Id)))); }
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))); }
public async Task <IActionResult> AnalyzeLastMeasurement([FromBody] GuidFieldViewModel model) { var result = await _service.GetAnalysisOfLastMeasurementAsync(model.Id); return(Ok(result)); }