public HttpResponseMessage UpdateNote([FromBody] PatientNotesSearchResults noteObj) { try { ////if (!string.IsNullOrEmpty(noteObj.Note)) ////{ this.it2Business.UpdateNote(noteObj); ////} return(this.Request.CreateResponse(HttpStatusCode.OK, "Note updated.")); } catch (Exception ex) { var msg = string.Format("GetAllRxByPatientId(noteId = {0}, patientId = {1}, {2} {3}", noteObj.NoteId, noteObj.PatientId, "\n", ex); return(HandleExceptions.LogExceptions(msg, Logger, ex)); } }
public HttpResponseMessage AddNote([FromBody] PatientNotesSearchResults noteObj) { try { AccessControl.VerifyUserAccessToPatient(noteObj.PatientId); ////if (!string.IsNullOrEmpty(noteObj.Note)) ////{ this.it2Business.AddNote(noteObj); ////} return(this.Request.CreateResponse(HttpStatusCode.NoContent)); } catch (Exception ex) { var msg = string.Format("AddNote(patientid = {0}, {1}, {2}", noteObj.PatientId, "\n", ex); return(HandleExceptions.LogExceptions(msg, Logger, ex)); } }
/// <summary>The delete.</summary> /// <param name="noteObj">The note.</param> /// <returns>The <see cref="HttpResponseMessage"/>.</returns> public HttpResponseMessage Delete([FromBody] PatientNotesSearchResults noteObj) { try { var note = this.GetPatientNoteById(noteObj.NoteId.ToString(CultureInfo.InvariantCulture)); if (note != null) { AccessControl.VerifyUserAccessToPatient(note.PatientId); var pm = new PatientNoteManager(); pm.DeletePatientNoteById(noteObj.NoteId); } return(this.Request.CreateResponse(HttpStatusCode.OK, "Note deleted.")); } catch (NHibernate.ObjectNotFoundException) { return(this.Request.CreateResponse(HttpStatusCode.NotFound, "Note Not Found")); } catch (Exception ex) { var msg = string.Format("GetAllRxByPatientId(patientid = {0}, noteId = {1}, {2} {3}", noteObj.PatientId, noteObj.NoteId, "\n", ex); return(HandleExceptions.LogExceptions(msg, Logger, ex)); } }