예제 #1
0
 public IActionResult InsertPatientNote(PatientNoteModel note)
 {
     if (note != null && ModelState.IsValid)
     {
         note.CreationDate = DateTime.Now;
         if (_validatorRepository.Validate(note))
         {
             _patientNoteRepository.Insert(note);
             _patientNoteRepository.Save();
             return(RedirectToAction("ViewPatientNotes", "PatientNote", new { patientId = note.PatientId }));
         }
     }
     return(BadRequest(ModelState));
 }
예제 #2
0
 public void DeleteById(Guid id)
 {
     patientNoteRepository.DeleteById(id);
     patientNoteRepository.Save();
 }