public async Task <NoContentResult> Pmu(int clientId, ClientPmuModel model) { var user = await _userService.GetUserAsync(User); await _clientService.SetPmuAsync(clientId, model, user); return(NoContent()); }
public async Task SetPmuAsync(int clientId, ClientPmuModel model, User user) { var client = await ValidateAsync(user, clientId); client = Map(client, model); _dbContext.Clients.Update(client); await _dbContext.SaveChangesAsync(); }
private Client Map(Client client, ClientPmuModel model) { client.IsPmuCompleted = true; client.Signature = model.Signature; client.Initials = model.Initials; client.AllowPhoto = model.AllowPhoto; client.IsUnderCareOfPhysician = model.IsUnderCareOfPhysician; client.Conditions = model.Conditions; client.IsTakingBloodThinner = model.IsTakingBloodThinner; client.PhysicianName = model.PhysicianName; client.PhysicianPhoneNumber = model.PhysicianPhoneNumber; return(client); }