public CannedTextDetail(string name, string category, StaffGroupSummary staffGroup, string text)
		{
			this.Name = name;
			this.Category = category;
			this.StaffGroup = staffGroup;
			this.Text = text;
		}
Example #2
0
 public CannedTextDetail(string name, string category, StaffGroupSummary staffGroup, string text)
 {
     this.Name       = name;
     this.Category   = category;
     this.StaffGroup = staffGroup;
     this.Text       = text;
 }
Example #3
0
		public GroupInboxFolder(OrderNoteboxFolderSystem orderNoteboxFolderSystem, StaffGroupSummary staffGroup)
			: base(orderNoteboxFolderSystem, "OrderNoteGroupInbox")
		{
			_groupRef = staffGroup.StaffGroupRef;
			this.FolderPath = this.FolderPath.Append(new PathSegment(staffGroup.Name, this.ResourceResolver));
			this.Tooltip = staffGroup.Name;
			this.IsStatic = false;
		}
Example #4
0
 public GroupInboxFolder(OrderNoteboxFolderSystem orderNoteboxFolderSystem, StaffGroupSummary staffGroup)
     : base(orderNoteboxFolderSystem, "OrderNoteGroupInbox")
 {
     _groupRef       = staffGroup.StaffGroupRef;
     this.FolderPath = this.FolderPath.Append(new PathSegment(staffGroup.Name, this.ResourceResolver));
     this.Tooltip    = staffGroup.Name;
     this.IsStatic   = false;
 }
Example #5
0
 public WorklistAdminSummary(
     EntityRef worklistRef,
     string name,
     string description,
     WorklistClassSummary worklistClass,
     StaffSummary ownerStaff,
     StaffGroupSummary ownerGroup)
     : base(worklistRef, name, description, worklistClass.ClassName, worklistClass.CategoryName, worklistClass.DisplayName, ownerStaff, ownerGroup)
 {
     WorklistClass = worklistClass;
 }
Example #6
0
        public WorklistAdminSummary(
            EntityRef worklistRef,
            string name,
            string description,
            WorklistClassSummary worklistClass,
            StaffSummary ownerStaff,
            StaffGroupSummary ownerGroup)
			: base(worklistRef, name, description, worklistClass.ClassName, worklistClass.CategoryName, worklistClass.DisplayName, ownerStaff, ownerGroup)
        {
            WorklistClass = worklistClass;
        }
Example #7
0
        public WorklistSummary(EntityRef worklistRef, string displayName, string description,
			string className, string classCategoryName, string classDisplayName, StaffSummary ownerStaff, StaffGroupSummary ownerGroup)
        {
            WorklistRef = worklistRef;
            DisplayName = displayName;
            Description = description;
            ClassName = className;
			ClassCategoryName = classCategoryName;
			ClassDisplayName = classDisplayName;
			OwnerStaff = ownerStaff;
            OwnerGroup = ownerGroup;
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="orderNoteRef"></param>
        /// <param name="category"></param>
        /// <param name="creationTime"></param>
        /// <param name="postTime"></param>
        /// <param name="author"></param>
        /// <param name="onBehalfOfGroup"></param>
        /// <param name="isAcknowledged"></param>
		/// <param name="urgent"></param>
		/// <param name="noteBody"></param>
        public OrderNoteSummary(EntityRef orderNoteRef, string category, DateTime? creationTime, DateTime? postTime,
			StaffSummary author, StaffGroupSummary onBehalfOfGroup, bool isAcknowledged, bool urgent, string noteBody)
        {
            OrderNoteRef = orderNoteRef;
            Category = category;
            CreationTime = creationTime;
            PostTime = postTime;
            Author = author;
        	OnBehalfOfGroup = onBehalfOfGroup;
            IsAcknowledged = isAcknowledged;
        	Urgent = urgent;
            NoteBody = noteBody;
        }
 public CannedTextSummary(EntityRef cannedTextRef
                          , string name
                          , string category
                          , StaffSummary staff
                          , StaffGroupSummary staffGroup
                          , string textSnippet)
 {
     this.CannedTextRef = cannedTextRef;
     this.Name          = name;
     this.Category      = category;
     this.Staff         = staff;
     this.StaffGroup    = staffGroup;
     this.TextSnippet   = textSnippet.Substring(0, textSnippet.Length < MaxTextLength ? textSnippet.Length : MaxTextLength);
 }
		public CannedTextSummary(EntityRef cannedTextRef
			, string name
			, string category
			, StaffSummary staff
			, StaffGroupSummary staffGroup
			, string textSnippet)
		{
			this.CannedTextRef = cannedTextRef;
			this.Name = name;
			this.Category = category;
			this.Staff = staff;
			this.StaffGroup = staffGroup;
			this.TextSnippet = textSnippet.Substring(0, textSnippet.Length < MaxTextLength ? textSnippet.Length : MaxTextLength);
		}
Example #11
0
        public override void Accept()
        {
            if (this.HasValidationErrors)
            {
                this.ShowValidation(true);
                return;
            }

            try
            {
                // give extension pages a chance to save data prior to commit
                _extensionPages.ForEach(page => page.Save());

                // Update staffs
                _staffGroupDetail.Members = new List <StaffSummary>(_staffEditor.SelectedItems);

                if (!_worklistEditor.IsReadOnly)
                {
                    _staffGroupDetail.Worklists = new List <WorklistSummary>(_worklistEditor.SelectedItems);
                }

                Platform.GetService <IStaffGroupAdminService>(service =>
                {
                    if (_staffGroupRef == null)
                    {
                        var response       = service.AddStaffGroup(new AddStaffGroupRequest(_staffGroupDetail));
                        _staffGroupRef     = response.StaffGroup.StaffGroupRef;
                        _staffGroupSummary = response.StaffGroup;
                    }
                    else
                    {
                        var response       = service.UpdateStaffGroup(new UpdateStaffGroupRequest(_staffGroupDetail));
                        _staffGroupRef     = response.StaffGroup.StaffGroupRef;
                        _staffGroupSummary = response.StaffGroup;
                    }
                });

                this.Exit(ApplicationComponentExitCode.Accepted);
            }
            catch (Exception e)
            {
                ExceptionHandler.Report(e, "Unable to save Staff Group", this.Host.DesktopWindow,
                                        () => Exit(ApplicationComponentExitCode.Error));
            }
        }
        private void InitializeOnBehalfOf(TemplateData template)
        {
            if (template != null)
            {
                // take from template, and update the user prefs
                var groupName = template.OnBehalfOfGroup;
                OrderNoteConversationComponentSettings.Default.PreferredOnBehalfOfGroupName = StringUtilities.EmptyIfNull(groupName);
                OrderNoteConversationComponentSettings.Default.Save();

                _onBehalfOf = CollectionUtils.SelectFirst(_onBehalfOfChoices, group => group.Name == groupName);
            }
            else
            {
                // if not set from template, use the saved setting value
                _onBehalfOf = CollectionUtils.SelectFirst(_onBehalfOfChoices,
                                                          g => g.Name == OrderNoteConversationComponentSettings.Default.PreferredOnBehalfOfGroupName);
            }
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="noteRef"></param>
 /// <param name="orderRef"></param>
 /// <param name="patientRef"></param>
 /// <param name="patientProfileRef"></param>
 /// <param name="mrn"></param>
 /// <param name="patientName"></param>
 /// <param name="dateOfBirth"></param>
 /// <param name="accessionNumber"></param>
 /// <param name="diagnosticServiceName"></param>
 /// <param name="category"></param>
 /// <param name="urgent"></param>
 /// <param name="postTime"></param>
 /// <param name="author"></param>
 /// <param name="onBehalfOfGroup"></param>
 /// <param name="isAcknowledged"></param>
 /// <param name="staffRecipients"></param>
 /// <param name="groupRecipients"></param>
 public OrderNoteboxItemSummary(
     EntityRef noteRef,
     EntityRef orderRef,
     EntityRef patientRef,
     EntityRef patientProfileRef,
     CompositeIdentifierDetail mrn,
     PersonNameDetail patientName,
     DateTime?dateOfBirth,
     string accessionNumber,
     string diagnosticServiceName,
     string category,
     bool urgent,
     DateTime?postTime,
     StaffSummary author,
     StaffGroupSummary onBehalfOfGroup,
     bool isAcknowledged,
     List <StaffSummary> staffRecipients,
     List <StaffGroupSummary> groupRecipients)
 {
     NoteRef           = noteRef;
     OrderRef          = orderRef;
     PatientRef        = patientRef;
     PatientProfileRef = patientProfileRef;
     Mrn                   = mrn;
     PatientName           = patientName;
     DateOfBirth           = dateOfBirth;
     AccessionNumber       = accessionNumber;
     DiagnosticServiceName = diagnosticServiceName;
     Category              = category;
     Urgent                = urgent;
     PostTime              = postTime;
     Author                = author;
     OnBehalfOfGroup       = onBehalfOfGroup;
     IsAcknowledged        = isAcknowledged;
     StaffRecipients       = staffRecipients;
     GroupRecipients       = groupRecipients;
 }
 public AddStaffGroupResponse(StaffGroupSummary staffGroup)
 {
     this.StaffGroup = staffGroup;
 }
Example #15
0
        /// <summary>
        /// Constructor for generating a new order note.
        /// </summary>
        /// <param name="category"></param>
        /// <param name="noteBody"></param>
        /// <param name="onBehalfOfGroup"></param>
        /// <param name="urgent"></param>
        /// <param name="staffRecipients"></param>
        /// <param name="groupRecipients"></param>
        public OrderNoteDetail(string category, string noteBody, StaffGroupSummary onBehalfOfGroup, bool urgent, List<StaffSummary> staffRecipients, List<StaffGroupSummary> groupRecipients)
        {
            Category = category;
            NoteBody = noteBody;
            OnBehalfOfGroup = onBehalfOfGroup;
            Urgent = urgent;

            StaffRecipients = staffRecipients == null ? null :
                CollectionUtils.Map<StaffSummary, StaffRecipientDetail>(staffRecipients,
                    delegate(StaffSummary staff)
                    {
                        return new StaffRecipientDetail(staff, false, null);
                    });


            GroupRecipients = groupRecipients == null ? null :
                CollectionUtils.Map<StaffGroupSummary, GroupRecipientDetail>(groupRecipients,
                    delegate(StaffGroupSummary group)
                    {
                        return new GroupRecipientDetail(group, false, null, null);
                    });
        }
Example #16
0
 /// <summary>
 /// Constructor for creating detail for an existing order note.
 /// </summary>
 /// <param name="orderNoteRef"></param>
 /// <param name="category"></param>
 /// <param name="creationTime"></param>
 /// <param name="postTime"></param>
 /// <param name="author"></param>
 /// <param name="onBehalfOfGroup"></param>
 /// <param name="urgent"></param>
 /// <param name="staffRecipients"></param>
 /// <param name="groupRecipients"></param>
 /// <param name="noteBody"></param>
 /// <param name="canAcknowledge"></param>
 public OrderNoteDetail(EntityRef orderNoteRef, string category, DateTime creationTime,
     DateTime? postTime, StaffSummary author, StaffGroupSummary onBehalfOfGroup, bool urgent,
     List<StaffRecipientDetail> staffRecipients,
     List<GroupRecipientDetail> groupRecipients, string noteBody, bool canAcknowledge)
 {
     OrderNoteRef = orderNoteRef;
     Category = category;
     CreationTime = creationTime;
     PostTime = postTime;
     Author = author;
     OnBehalfOfGroup = onBehalfOfGroup;
     Urgent = urgent;
     StaffRecipients = staffRecipients;
     GroupRecipients = groupRecipients;
     NoteBody = noteBody;
     CanAcknowledge = canAcknowledge;
 }
Example #17
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="isAcknowledged"></param>
 /// <param name="acknowledgedTime"></param>
 /// <param name="group"></param>
 /// <param name="acknowledgedBy"></param>
 public GroupRecipientDetail(StaffGroupSummary group, bool isAcknowledged, DateTime? acknowledgedTime, StaffSummary acknowledgedBy)
     : base(isAcknowledged, acknowledgedTime)
 {
     Group = group;
     AcknowledgedByStaff = acknowledgedBy;
 }
 public UpdateStaffGroupResponse(StaffGroupSummary staffGroup)
 {
     this.StaffGroup = staffGroup;
 }
 public GetWorklistEditValidationRequest(bool isUserWorklist, StaffGroupSummary ownerGroup)
 {
     IsUserWorklist = isUserWorklist;
     OwnerGroup     = ownerGroup;
 }
Example #20
0
 public UpdateStaffGroupResponse(StaffGroupSummary staffGroup)
 {
     this.StaffGroup = staffGroup;
 }
		public GetWorklistEditValidationRequest(bool isUserWorklist, StaffGroupSummary ownerGroup)
		{
			IsUserWorklist = isUserWorklist;
			OwnerGroup = ownerGroup;
		}
 public AddStaffGroupResponse(StaffGroupSummary staffGroup)
 {
     this.StaffGroup = staffGroup;
 }