/// <summary> /// Constructor for creating a new note with recipients. /// </summary> /// <param name="category"></param> /// <param name="author"></param> /// <param name="onBehalfOf"></param> /// <param name="body"></param> /// <param name="urgent"></param> public Note(string category, Staff author, StaffGroup onBehalfOf, string body, bool urgent) { _category = category; _author = author; _onBehalfOfGroup = onBehalfOf; _body = body; _urgent = urgent; _postings = new HashedSet<NotePosting>(); _creationTime = Platform.Time; }
/// <summary> /// Constructor. /// </summary> /// <param name="note"></param> /// <param name="order"></param> /// <param name="patient"></param> /// <param name="patientProfile"></param> /// <param name="noteAuthor"></param> /// <param name="recipients"></param> /// <param name="diagnosticServiceName"></param> /// <param name="isAcknowledged"></param> public OrderNoteboxItem(Note note, Order order, Patient patient, PatientProfile patientProfile, Staff noteAuthor, IList recipients, string diagnosticServiceName, bool isAcknowledged) { _noteRef = note.GetRef(); _orderRef = order.GetRef(); _patientRef = patient.GetRef(); _patientProfileRef = patientProfile.GetRef(); _mrn = patientProfile.Mrn; _patientName = patientProfile.Name; _dateOfBirth = patientProfile.DateOfBirth; _accessionNumber = order.AccessionNumber; _diagnosticServiceName = diagnosticServiceName; _category = note.Category; _urgent = note.Urgent; _postTime = note.PostTime; _author = noteAuthor; _onBehalfOfGroup = note.OnBehalfOfGroup; _isAcknowledged = isAcknowledged; _recipients = recipients; }
public AddStaffGroupResponse AddStaffGroup(AddStaffGroupRequest request) { Platform.CheckForNullReference(request, "request"); Platform.CheckMemberIsSet(request.StaffGroup, "request.StaffGroup"); var item = new StaffGroup(); var assembler = new StaffGroupAssembler(); var worklistEditable = Thread.CurrentPrincipal.IsInRole(AuthorityTokens.Admin.Data.Worklist); assembler.UpdateStaffGroup(item, request.StaffGroup, worklistEditable, true, PersistenceContext); PersistenceContext.Lock(item, DirtyState.New); PersistenceContext.SynchState(); return new AddStaffGroupResponse(assembler.CreateSummary(item)); }