public async Task <IActionResult> Post([FromBody] NotaEnfermeria model) { try { var currentUser = await userManager.FindByNameAsync(User.Identity.Name); var newModel = new NotaEnfermeria() { Id = model.Id, pacienteId = model.pacienteId, Fecharegistro = DateTime.Now, Pesokg = model.Pesokg, Alturamts = model.Alturamts, Pulso = model.Pulso, Presion = model.Presion, Respiraxmin = model.Respiraxmin, Temperatura = model.Temperatura, doctorId = model.doctorId, Observaciones = model.Observaciones, user = currentUser }; clinicaRepositorio.AddNota(newModel); if (clinicaRepositorio.SaveAll()) { /* return Created($"/api/order/{Newmodel.Id}", Newmodel);*/ var results = new { ruta = $"{newModel.Id}" }; return(Created("", results)); } } catch (Exception ex) { logger.LogError($"Fallo al Guardar Paciente:{ex}"); } return(BadRequest("Fallo al Guardar Paciente")); }
public void AddNota(NotaEnfermeria newModel) { AddEntity(newModel); }