Exemplo n.º 1
0
        private BiographyNoteTable(BiographyNoteComponent component, int cellRowCount)
            : base(cellRowCount)
        {
            _component = component;

            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnSeverity,
                                                                         n => (n.Category == null ? "" : n.Category.Severity.Value), 0.06f));
            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnCategory,
                                                                         n => (n.Category == null ? "" : n.Category.Name), 0.2f));
            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnDescription,
                                                                         n => (n.Category == null ? "" : n.Category.Description), 0.4f));
            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnAuthor,
                                                                         n => PersonNameFormat.Format(n.Author.Name), 0.2f));

            ITableColumn _createdOnColumn;

            this.Columns.Add(_createdOnColumn = new DateTimeTableColumn <PatientNoteDetail>(SR.ColumnCreatedOn,
                                                                                            n => n.CreationTime, 0.1f));
            this.Columns.Add(new DateTableColumn <PatientNoteDetail>(SR.ColumnValidFrom,
                                                                     n => n.ValidRangeFrom, 0.1f));
            this.Columns.Add(new DateTableColumn <PatientNoteDetail>(SR.ColumnValidUntil,
                                                                     n => n.ValidRangeUntil, 0.1f));

            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(" ",
                                                                         n => SR.ColumnMore, 0.05f)
            {
                ClickLinkDelegate = component.ShowNoteDetail
            });

            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnComments,
                                                                         n => (string.IsNullOrEmpty(n.Comment) ? "" : String.Format("Comment: {0}", RemoveLineBreak(n.Comment))), 0.1f, NoteCommentRow));

            // there aren't any items to sort right now, but calling this sets the default sort parameters to "Created" column desc
            this.Sort(new TableSortParams(_createdOnColumn, false));
        }
 private static string MakeTitle(WorklistItemSummaryBase worklistItem)
 {
     return(string.Format(SR.FormatTitleContextDescriptionReviewOrderNoteConversation,
                          PersonNameFormat.Format(worklistItem.PatientName),
                          MrnFormat.Format(worklistItem.Mrn),
                          AccessionFormat.Format(worklistItem.AccessionNumber)));
 }
Exemplo n.º 3
0
        /* this isn't needed right now, because acknowledged notes are never shown.
         * private static IconSet GetIsAcknowledgedIcon(bool isAcknowledged)
         * {
         *      return isAcknowledged ? new IconSet("NoteRead.png") : new IconSet("NoteUnread.png");
         * }
         */

        // Creates a semi-colon delimited list of the recipients
        private static string RecipientsList(IEnumerable <StaffSummary> staffRecipients, IEnumerable <StaffGroupSummary> groupRecipients)
        {
            var          sb            = new StringBuilder();
            const string itemSeparator = ";  ";

            foreach (var staffSummary in staffRecipients)
            {
                if (String.Equals(PersonNameFormat.Format(staffSummary.Name), PersonNameFormat.Format(LoginSession.Current.FullName)))
                {
                    sb.Insert(0, "me; ");
                }
                else
                {
                    sb.Append(StaffNameAndRoleFormat.Format(staffSummary));
                    sb.Append(itemSeparator);
                }
            }

            foreach (var groupSummary in groupRecipients)
            {
                sb.Append(groupSummary.Name);
                sb.Append(itemSeparator);
            }

            return(sb.ToString().TrimEnd(itemSeparator.ToCharArray()));
        }
Exemplo n.º 4
0
        public WorklistAdminSummaryTable()
        {
            this.Columns.Add(new TableColumn <WorklistAdminSummary, string>(SR.ColumnName,
                                                                            delegate(WorklistAdminSummary summary) { return(summary.DisplayName); },
                                                                            0.5f));

            this.Columns.Add(new TableColumn <WorklistAdminSummary, string>(SR.ColumnClass,
                                                                            delegate(WorklistAdminSummary summary)
            {
                return(string.Format("{0} - {1}", summary.WorklistClass.CategoryName, summary.WorklistClass.DisplayName));
            },
                                                                            0.5f));

            this.Columns.Add(new TableColumn <WorklistAdminSummary, string>(SR.ColumnDescription,
                                                                            delegate(WorklistAdminSummary summary) { return(summary.Description); },
                                                                            1.5f));

            this.Columns.Add(new TableColumn <WorklistAdminSummary, string>(SR.ColumnOwner,
                                                                            delegate(WorklistAdminSummary summary)
            {
                if (summary.OwnerStaff != null)
                {
                    return(PersonNameFormat.Format(summary.OwnerStaff.Name));
                }
                else if (summary.OwnerGroup != null)
                {
                    return(summary.OwnerGroup.Name);
                }
                else
                {
                    return("");
                }
            },
                                                                            1.0f));
        }
Exemplo n.º 5
0
 public VisitPractitionerTable()
 {
     this.Columns.Add(new TableColumn <VisitPractitionerDetail, string>(
                          SR.ColumnRole,
                          delegate(VisitPractitionerDetail vp)
     {
         return(vp.Role.Value);
     },
                          0.8f));
     this.Columns.Add(new TableColumn <VisitPractitionerDetail, string>(
                          SR.ColumnPractitioner,
                          delegate(VisitPractitionerDetail vp)
     {
         return(PersonNameFormat.Format(vp.Practitioner.Name));
     },
                          2.5f));
     this.Columns.Add(new DateTimeTableColumn <VisitPractitionerDetail>(
                          SR.ColumnStartTime,
                          delegate(VisitPractitionerDetail vp) { return(vp.StartTime); },
                          0.8f));
     this.Columns.Add(new DateTimeTableColumn <VisitPractitionerDetail>(
                          SR.ColumnEndTime,
                          delegate(VisitPractitionerDetail vp) { return(vp.EndTime); },
                          0.8f));
 }
Exemplo n.º 6
0
 protected bool ExecuteCore(WorklistItemSummaryBase item)
 {
     if (OrderCancelHelper.CancelOrder(item.OrderRef, PersonNameFormat.Format(item.PatientName), this.Context.DesktopWindow))
     {
         InvalidateFolders();
         return(true);
     }
     return(false);
 }
Exemplo n.º 7
0
 protected override bool Execute(RegistrationWorklistItemSummary item)
 {
     if (OrderCheckInHelper.CheckIn(item.OrderRef, PersonNameFormat.Format(item.PatientName), this.Context.DesktopWindow))
     {
         this.Context.InvalidateFolders(typeof(Folders.Registration.CheckedInFolder));
         return(true);
     }
     return(false);
 }
        private void LoadPatientProfile()
        {
            Async.CancelPending(this);

            if (_profileRef == null)
            {
                return;
            }

            Async.Request(this,
                          (IBrowsePatientDataService service) =>
            {
                var request = new GetDataRequest
                {
                    GetPatientProfileDetailRequest = new GetPatientProfileDetailRequest
                    {
                        PatientProfileRef = _profileRef,
                        // include notes for the notes component
                        IncludeNotes = true,
                        // include attachments for the docs component
                        IncludeAttachments = true,
                        // include patient allergies for allergies component
                        IncludeAllergies = true
                    }
                };

                return(service.GetData(request));
            },
                          response =>
            {
                _patientProfile = response.GetPatientProfileDetailResponse.PatientProfile;

                this.Host.Title = string.Format(SR.TitleBiography, PersonNameFormat.Format(_patientProfile.Name), MrnFormat.Format(_patientProfile.Mrn));
                _bannerComponent.HealthcareContext = _patientProfile;
                _documentComponent.Attachments     = _patientProfile.Attachments;
                _noteComponent.Notes        = _patientProfile.Notes;
                _allergyComponent.Allergies = _patientProfile.Allergies;

                NotifyPropertyChanged("SelectedOrder");
                NotifyAllPropertiesChanged();
            },
                          exception =>
            {
                ExceptionHandler.Report(exception, this.Host.DesktopWindow);

                _patientProfile = null;
                _bannerComponent.HealthcareContext = null;
                _documentComponent.Attachments     = new List <AttachmentSummary>();
                _noteComponent.Notes = new List <PatientNoteDetail>();

                NotifyPropertyChanged("SelectedOrder");
                NotifyAllPropertiesChanged();
            });
        }
Exemplo n.º 9
0
        private static void NewOrder(PatientProfileSummary patientProfile, IDesktopWindow desktopWindow)
        {
            if (patientProfile == null)
            {
                NewOrder(null, "New Order", desktopWindow);
                return;
            }

            var title = string.Format(SR.TitleNewOrder, PersonNameFormat.Format(patientProfile.Name), MrnFormat.Format(patientProfile.Mrn));

            NewOrder(patientProfile, title, desktopWindow);
        }
Exemplo n.º 10
0
            /// <summary>
            /// Opens a pop up providing details on the specified practitioner
            /// (must be a JSML encoded <see cref="ExternalPractitionerSummary"/> object).
            /// </summary>
            /// <param name="jsml"></param>
            /// <returns></returns>
            public void OpenPractitionerDetail(string jsml)
            {
                var practitionerSummary = JsmlSerializer.Deserialize <ExternalPractitionerSummary>(jsml);

                LaunchAsDialog(
                    _component.Host.DesktopWindow,
                    new ExternalPractitionerOverviewComponent()
                {
                    PractitionerSummary = practitionerSummary
                },
                    SR.TitleExternalPractitioner + " - " + PersonNameFormat.Format(practitionerSummary.Name));
            }
Exemplo n.º 11
0
        /// <summary>
        /// Creates the title that is displayed in the title bar.  Overridden to display user name.
        /// </summary>
        /// <param name="baseTitle"></param>
        /// <param name="activeWorkspace"></param>
        /// <returns></returns>
        protected override string MakeTitle(string baseTitle, Workspace activeWorkspace)
        {
            LoginSession currentSession = LoginSession.Current;

            // if there is a full person name associated with the session, use it
            // otherwise use the UserName (login id)
            string username = (currentSession.FullName == null) ? currentSession.UserName :
                              PersonNameFormat.Format(currentSession.FullName);

            // show working facility if specified
            if (currentSession.WorkingFacility != null)
            {
                username = string.Format("{0} @ {1}", username, currentSession.WorkingFacility.Name);
            }

            // show the user name before the base title
            return(string.Format("{0} - {1}", username, base.MakeTitle(baseTitle, activeWorkspace)));
        }
Exemplo n.º 12
0
        protected bool ExecuteCore(WorklistItemSummaryBase item)
        {
            // first check for warnings
            var warnings = new List <string>();

            Platform.GetService <IOrderEntryService>(
                service => warnings = service.QueryCancelOrderWarnings(new QueryCancelOrderWarningsRequest(item.OrderRef)).Warnings);

            if (warnings.Count > 0)
            {
                var warn   = CollectionUtils.FirstElement(warnings);
                var action = this.Context.DesktopWindow.ShowMessageBox(
                    warn + "\n\nAre you sure you want to cancel and replace this order?",
                    MessageBoxActions.YesNo);
                if (action == DialogBoxAction.No)
                {
                    return(false);
                }
            }

            var title = string.Format("Replace Order {0} - {1} {2}",
                                      AccessionFormat.Format(item.AccessionNumber),
                                      PersonNameFormat.Format(item.PatientName),
                                      MrnFormat.Format(item.Mrn));
            var component = new OrderEditorComponent(new OrderEditorComponent.ReplaceOrderOperatingContext {
                OrderRef = item.OrderRef
            });
            var result = ApplicationComponent.LaunchAsDialog(
                this.Context.DesktopWindow,
                component,
                title);

            if (result == ApplicationComponentExitCode.Accepted)
            {
                InvalidateFolders();
                return(true);
            }

            return(false);
        }
Exemplo n.º 13
0
        protected bool ExecuteCore(WorklistItemSummaryBase item)
        {
            var title = string.Format("Modify Order {0} - {1} {2}",
                                      AccessionFormat.Format(item.AccessionNumber),
                                      PersonNameFormat.Format(item.PatientName),
                                      MrnFormat.Format(item.Mrn));
            var component = new OrderEditorComponent(new OrderEditorComponent.ModifyOrderOperatingContext {
                OrderRef = item.OrderRef
            });
            var result = ApplicationComponent.LaunchAsDialog(
                this.Context.DesktopWindow,
                component,
                title);

            if (result == ApplicationComponentExitCode.Accepted)
            {
                InvalidateFolders();
                return(true);
            }

            return(false);
        }
        public AttachmentSummaryTable()
        {
            var receivedDateColumn = new DateTableColumn <AttachmentSummary>(
                SR.ColumnReceivedDate,
                summary => summary.Document.ReceivedTime,
                0.2f);

            this.Columns.Add(receivedDateColumn);
            this.Columns.Add(new TableColumn <AttachmentSummary, string>(
                                 SR.ColumnCategory,
                                 summary => summary.Category.Value,
                                 0.2f));
            this.Columns.Add(new TableColumn <AttachmentSummary, string>(
                                 SR.ColumnAttachedBy,
                                 summary => summary.AttachedBy == null ? "me" : PersonNameFormat.Format(summary.AttachedBy.Name),
                                 0.2f));
            this.Columns.Add(new TableColumn <AttachmentSummary, string>(
                                 SR.ColumnAttachmentType,
                                 summary => summary.Document.DocumentTypeName,
                                 0.2f));

            this.Sort(new TableSortParams(receivedDateColumn, false));
        }
Exemplo n.º 15
0
        public OrderListTable()
            : base(3)
        {
            this.Columns.Add(new DateTableColumn <OrderListItem>(SR.ColumnCreatedOn, order => order.EnteredTime, 0.5f));
            this.Columns.Add(new DateTimeTableColumn <OrderListItem>(SR.ColumnScheduledFor, order => order.OrderScheduledStartTime, 0.75f));
            this.Columns.Add(new TableColumn <OrderListItem, string>(SR.ColumnImagingService, order => order.DiagnosticService.Name, 1.5f));

            this.Columns.Add(new TableColumn <OrderListItem, string>(
                                 SR.ColumnStatus,
                                 order => order.OrderStatus.Code == "SC" && order.OrderScheduledStartTime == null
                                        ? SR.MessageUnscheduled
                                        : order.OrderStatus.Value,
                                 0.5f));

            this.Columns.Add(new TableColumn <OrderListItem, string>(
                                 SR.ColumnMoreInfo,
                                 order => string.Format(SR.FormatMoreInfo,
                                                        AccessionFormat.Format(order.AccessionNumber),
                                                        PersonNameFormat.Format(order.OrderingPractitioner.Name),
                                                        order.OrderingFacility.Name),
                                 1));

            this.Columns.Add(new TableColumn <OrderListItem, string>(SR.ColumnIndication, order => string.Format(SR.FormatIndication, order.ReasonForStudy), 2));
        }
Exemplo n.º 16
0
        private OrderNoteboxTable(int cellRowCount)
            : base(cellRowCount)
        {
            var resolver = new ResourceResolver(this.GetType().Assembly);

            var urgentColumn = new TableColumn <OrderNoteboxItemSummary, IconSet>(SR.ColumnUrgent,
                                                                                  item => item.Urgent ? new IconSet("SingleExclamation.png") : null, 0.3f)
            {
                Comparison       = (item1, item2) => item1.Urgent.CompareTo(item2.Urgent),
                ResourceResolver = resolver
            };

            this.Columns.Add(urgentColumn);

            /* JR: this isn't needed right now, because acknowledged notes are never shown.
             * TableColumn<OrderNoteboxItemSummary, IconSet> acknowledgedColumn =
             *      new TableColumn<OrderNoteboxItemSummary, IconSet>(SR.ColumnStatus,
             *              delegate(OrderNoteboxItemSummary item) { return GetIsAcknowledgedIcon(item.IsAcknowledged); },
             *              0.3f);
             * acknowledgedColumn.Comparison = delegate(OrderNoteboxItemSummary item1, OrderNoteboxItemSummary item2)
             *      { return item1.IsAcknowledged.CompareTo(item2.IsAcknowledged); };
             * acknowledgedColumn.ResourceResolver = resolver;
             * this.Columns.Add(acknowledgedColumn);
             */

            this.Columns.Add(new TableColumn <OrderNoteboxItemSummary, string>(SR.ColumnMRN, item => MrnFormat.Format(item.Mrn), 1.0f));
            this.Columns.Add(new TableColumn <OrderNoteboxItemSummary, string>(SR.ColumnPatientName, item => PersonNameFormat.Format(item.PatientName), 1.0f));
            this.Columns.Add(new TableColumn <OrderNoteboxItemSummary, string>(SR.ColumnDescription,
                                                                               item => string.Format("{0} {1}", AccessionFormat.Format(item.AccessionNumber), item.DiagnosticServiceName),
                                                                               1.0f, 1));

            this.Columns.Add(new TableColumn <OrderNoteboxItemSummary, string>(SR.ColumnFrom,
                                                                               item => item.OnBehalfOfGroup != null
                                        ? String.Format(SR.FormatFromOnBehalf, StaffNameAndRoleFormat.Format(item.Author), item.OnBehalfOfGroup.Name, item.PostTime)
                                        : String.Format(SR.FormatFrom, StaffNameAndRoleFormat.Format(item.Author), item.PostTime),
                                                                               1.0f, 2));

            this.Columns.Add(new TableColumn <OrderNoteboxItemSummary, string>(SR.ColumnTo,
                                                                               item => String.Format(SR.FormatTo, RecipientsList(item.StaffRecipients, item.GroupRecipients)),
                                                                               1.0f, 3));

            this.Columns.Add(_postTimeColumn = new DateTimeTableColumn <OrderNoteboxItemSummary>(SR.ColumnPostTime,
                                                                                                 item => item.PostTime));
            _postTimeColumn.Visible = false;

            this.Sort(new TableSortParams(_postTimeColumn, false));
        }
        public override void Start()
        {
            Platform.GetService <IPatientAdminService>(
                service =>
            {
                var formData = service.LoadPatientProfileEditorFormData(new LoadPatientProfileEditorFormDataRequest());
                if (_isNew)
                {
                    _profile = new PatientProfileDetail();
                    _profile.Mrn.AssigningAuthority = formData.MrnAssigningAuthorityChoices.Count > 0
                                                        ? GetWorkingFacilityInformationAuthority(formData.MrnAssigningAuthorityChoices)
                                                        : null;
                    _profile.Healthcard.AssigningAuthority = formData.HealthcardAssigningAuthorityChoices.Count > 0
                                                        ? formData.HealthcardAssigningAuthorityChoices[0]
                                                        : null;
                    _profile.Sex         = formData.SexChoices[0];
                    _profile.DateOfBirth = Platform.Time.Date;
                }
                else
                {
                    var response = service.LoadPatientProfileForEdit(new LoadPatientProfileForEditRequest(_profileRef));

                    _profileRef = response.PatientProfileRef;
                    _profile    = response.PatientDetail;

                    this.Host.Title =
                        string.Format(SR.TitlePatientComponent, PersonNameFormat.Format(_profile.Name), MrnFormat.Format(_profile.Mrn));
                }

                if (_newAttachments.Count > 0)
                {
                    _profile.Attachments.AddRange(_newAttachments);
                    this.Modified      = true;
                    this.AcceptEnabled = true;
                }

                // if the user has permission to either a) create a new patient, or b) update the patient profile, then
                // these pages should be displayed
                if (Thread.CurrentPrincipal.IsInRole(
                        ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.PatientProfile.Update) ||
                    Thread.CurrentPrincipal.IsInRole(ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.Patient.Create))
                {
                    this.Pages.Add(
                        new NavigatorPage("NodePatient",
                                          _patientEditor =
                                              new PatientProfileDetailsEditorComponent(
                                                  _isNew,
                                                  formData.MrnAutoGenerated,
                                                  formData.SexChoices,
                                                  formData.MrnAssigningAuthorityChoices,
                                                  formData.HealthcardAssigningAuthorityChoices)));
                    this.Pages.Add(
                        new NavigatorPage("NodePatient/NodeAddresses",
                                          _addressesSummary = new AddressesSummaryComponent(formData.AddressTypeChoices)));
                    this.Pages.Add(
                        new NavigatorPage("NodePatient/NodePhoneNumbers",
                                          _phoneNumbersSummary = new PhoneNumbersSummaryComponent(formData.PhoneTypeChoices)));
                    this.Pages.Add(
                        new NavigatorPage("NodePatient/NodeEmailAddresses",
                                          _emailAddressesSummary = new EmailAddressesSummaryComponent()));
                    this.Pages.Add(
                        new NavigatorPage("NodePatient/NodeContactPersons",
                                          _contactPersonsSummary =
                                              new ContactPersonsSummaryComponent(formData.ContactPersonTypeChoices, formData.ContactPersonRelationshipChoices)));
                    this.Pages.Add(
                        new NavigatorPage("NodePatient/NodeCulture",
                                          _additionalPatientInfoSummary =
                                              new PatientProfileAdditionalInfoEditorComponent(formData.ReligionChoices, formData.PrimaryLanguageChoices)));

                    _addressesSummary.SetModifiedOnListChange      = true;
                    _phoneNumbersSummary.SetModifiedOnListChange   = true;
                    _emailAddressesSummary.SetModifiedOnListChange = true;
                    _contactPersonsSummary.SetModifiedOnListChange = true;

                    _patientEditor.Subject                = _profile;
                    _addressesSummary.Subject             = _profile.Addresses;
                    _phoneNumbersSummary.Subject          = _profile.TelephoneNumbers;
                    _emailAddressesSummary.Subject        = _profile.EmailAddresses;
                    _contactPersonsSummary.Subject        = _profile.ContactPersons;
                    _additionalPatientInfoSummary.Subject = _profile;
                }

                // if the user has permission to either a) create a new patient, or b) update a patient, then
                // these pages should be displayed
                if (Thread.CurrentPrincipal.IsInRole(ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.Patient.Create) ||
                    Thread.CurrentPrincipal.IsInRole(ClearCanvas.Ris.Application.Common.AuthorityTokens.Workflow.Patient.Update))
                {
                    this.Pages.Add(
                        new NavigatorPage("NodePatient/NodeNotes",
                                          _notesSummary   = new PatientNoteSummaryComponent(_profile.Notes, formData.NoteCategoryChoices)));
                    _notesSummary.SetModifiedOnListChange = true;

                    var patientDocumentsPage = new NavigatorPage("NodePatient/NodeAttachments",
                                                                 _documentSummary =
                                                                     new AttachedDocumentPreviewComponent(false, AttachmentSite.Patient));
                    this.Pages.Add(patientDocumentsPage);
                    _documentSummary.Attachments = _profile.Attachments;

                    if (_newAttachments.Count > 0)
                    {
                        this.MoveTo(this.Pages.IndexOf(patientDocumentsPage));
                        _documentSummary.SetInitialSelection(_newAttachments[0]);
                    }
                }

                this.ValidationStrategy = new AllComponentsValidationStrategy();
            });


            base.Start();
        }
Exemplo n.º 18
0
            /// <summary>
            /// Formats the specified Person Name (must be a JSML encoded <see cref="PersonNameDetail"/> object).
            /// </summary>
            /// <param name="jsml"></param>
            /// <returns></returns>
            public string FormatPersonName(string jsml)
            {
                var nameDetail = JsmlSerializer.Deserialize <PersonNameDetail>(jsml);

                return(nameDetail == null ? "" : PersonNameFormat.Format(nameDetail));
            }
        public OrderSummaryTable()
        {
            this.Columns.Add(new DateTimeTableColumn <OrderSummary>("Scheduled Requested For",
                                                                    delegate(OrderSummary order) { return(order.SchedulingRequestTime); }));
            this.Columns.Add(new TableColumn <OrderSummary, string>(SR.ColumnAccessionNumber,
                                                                    delegate(OrderSummary order) { return(AccessionFormat.Format(order.AccessionNumber)); }));
            this.Columns.Add(new TableColumn <OrderSummary, string>(SR.ColumnImagingService,
                                                                    delegate(OrderSummary order) { return(order.DiagnosticServiceName); }));
            this.Columns.Add(new TableColumn <OrderSummary, string>(SR.ColumnPriority,
                                                                    delegate(OrderSummary order) { return(order.OrderPriority.Value); }));
            this.Columns.Add(new TableColumn <OrderSummary, string>(SR.ColumnStatus,
                                                                    delegate(OrderSummary order) { return(order.OrderStatus.Value); }));

            this.Columns.Add(new TableColumn <OrderSummary, string>("Ordered by",
                                                                    delegate(OrderSummary order) { return(PersonNameFormat.Format(order.OrderingPractitioner.Name)); }));

            this.Columns.Add(new TableColumn <OrderSummary, string>("Ordered From",
                                                                    delegate(OrderSummary order) { return(order.OrderingFacility); }));
            this.Columns.Add(new TableColumn <OrderSummary, string>("Reason for Study",
                                                                    delegate(OrderSummary order) { return(order.ReasonForStudy); }));
            this.Columns.Add(new DateTableColumn <OrderSummary>(SR.ColumnCreatedOn,
                                                                delegate(OrderSummary order) { return(order.EnteredTime); }));
        }
Exemplo n.º 20
0
 public StaffSelectorTable()
 {
     this.Columns.Add(new TableColumn <StaffSummary, string>(SR.ColumnName, item => PersonNameFormat.Format(item.Name), 1.0f));
     this.Columns.Add(new TableColumn <StaffSummary, string>(SR.ColumnRole, item => item.StaffType.Value, 0.5f));
 }
Exemplo n.º 21
0
        public WorklistItemTable()
            : base(NumRows)
        {
            // Visible Columns
            var priorityColumn = new TableColumn <TItem, IconSet>(SR.ColumnPriority, item => GetPriorityIcon(item.OrderPriority), 0.2f)
            {
                Comparison       = ComparePriorities,
                ResourceResolver = new ResourceResolver(this.GetType().Assembly)
            };

            var mrnColumn          = new TableColumn <TItem, string>(SR.ColumnMRN, item => MrnFormat.Format(item.Mrn), 0.9f);
            var nameColumn         = new TableColumn <TItem, string>(SR.ColumnName, item => PersonNameFormat.Format(item.PatientName), 1.5f);
            var scheduledForColumn = new DateTimeTableColumn <TItem>(SR.ColumnTime, item => item.Time, 1.1f);
            var descriptionRow     = new TableColumn <TItem, string>(SR.ColumnDescription, FormatDescription, 1.0f, DescriptionRow);

            // Invisible but sortable columns
            var patientClassColumn = new TableColumn <TItem, string>(SR.ColumnPatientClass, FormatPatientClass, 1.0f)
            {
                Visible = false
            };

            var accessionNumberColumn = new TableColumn <TItem, string>(SR.ColumnAccessionNumber,
                                                                        item => AccessionFormat.Format(item.AccessionNumber), 1.0f)
            {
                Visible = false
            };

            var procedureNameColumn = new TableColumn <TItem, string>(SR.ColumnProcedure, ProcedureFormat.Format, 1.0f)
            {
                Visible = false
            };

            // The order of the addition determines the order of SortBy dropdown
            this.Columns.Add(priorityColumn);
            this.Columns.Add(mrnColumn);
            this.Columns.Add(nameColumn);
            this.Columns.Add(patientClassColumn);
            this.Columns.Add(procedureNameColumn);
            this.Columns.Add(accessionNumberColumn);
            this.Columns.Add(scheduledForColumn);
            this.Columns.Add(descriptionRow);

            // Sort the table by Scheduled Time initially
            this.Sort(new TableSortParams(scheduledForColumn, true));
        }
Exemplo n.º 22
0
 public static string GetTitle(ReportingWorklistItemSummary item)
 {
     return(string.Format("Protocol - {0} - {1}", PersonNameFormat.Format(item.PatientName), MrnFormat.Format(item.Mrn)));
 }
Exemplo n.º 23
0
        public string FormatName(object item)
        {
            var name = (PersonNameDetail)item;

            return(PersonNameFormat.Format(name));
        }
Exemplo n.º 24
0
        public PatientNoteTable()
            : base(NumRows)
        {
            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnSeverity,
                                                                         n => (n.Category == null ? "" : n.Category.Severity.Value), 0.1f));
            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnCategory,
                                                                         n => (n.Category == null ? "" : n.Category.Name), 0.2f));
            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnAuthor,
                                                                         n => n.Author == null ? SR.LabelMe : PersonNameFormat.Format(n.Author.Name), 0.2f));

            ITableColumn _createdOnColumn;

            this.Columns.Add(_createdOnColumn = new TableColumn <PatientNoteDetail, string>(SR.ColumnCreatedOn,
                                                                                            n => n.CreationTime == null ? SR.LabelNew : Format.DateTime(n.CreationTime), 0.2f));
            this.Columns.Add(new DateTableColumn <PatientNoteDetail>(SR.ColumnExpiryDate,
                                                                     n => n.ValidRangeUntil, 0.2f));

            this.Columns.Add(new TableColumn <PatientNoteDetail, string>(SR.ColumnComments,
                                                                         n => RemoveLineBreak(n.Comment), 1.0f, NoteCommentRow));

            // there aren't any items to sort right now, but calling this sets the default sort parameters to "Created" column desc
            this.Sort(new TableSortParams(_createdOnColumn, false));
        }
            public ExternalPractitionerTable(ExternalPractitionerMergeSelectedDuplicateComponent owner)
            {
                _owner = owner;

                var nameColumn = new TableColumn <ExternalPractitionerSummary, string>(SR.ColulmnPractitionerName,
                                                                                       prac => PersonNameFormat.Format(prac.Name), 0.5f)
                {
                    ClickLinkDelegate = _owner.LaunchSelectedPractitionerPreview
                };

                var licenseColumn = new TableColumn <ExternalPractitionerSummary, string>(SR.ColumnLicenseNumber,
                                                                                          prac => prac.LicenseNumber, 0.25f);

                var billingColumn = new TableColumn <ExternalPractitionerSummary, string>(SR.ColumnBillingNumber,
                                                                                          prac => prac.BillingNumber, 0.25f);

                this.Columns.Add(nameColumn);
                this.Columns.Add(licenseColumn);
                this.Columns.Add(billingColumn);
            }
Exemplo n.º 26
0
        public string FormatPatientProfile(object item)
        {
            var summary = (PatientProfileSummary)item;

            return(String.Format("{0} - {1}", MrnFormat.Format(summary.Mrn), PersonNameFormat.Format(summary.Name)));
        }
Exemplo n.º 27
0
 public PatientProfileTable()
 {
     this.Columns.Add(
         new TableColumn <PatientProfileSummary, string>(SR.ColumnMRN,
                                                         delegate(PatientProfileSummary profile) { return(MrnFormat.Format(profile.Mrn)); }, 1.0f));
     this.Columns.Add(
         new TableColumn <PatientProfileSummary, string>(SR.ColumnPatientName,
                                                         delegate(PatientProfileSummary profile) { return(PersonNameFormat.Format(profile.Name)); }, 2.0f));
     this.Columns.Add(
         new TableColumn <PatientProfileSummary, string>(SR.ColumnHealthcardNumber,
                                                         delegate(PatientProfileSummary profile) { return(HealthcardFormat.Format(profile.Healthcard)); }, 1.0f));
     this.Columns.Add(
         new DateTableColumn <PatientProfileSummary>(SR.ColumnDateOfBirth,
                                                     delegate(PatientProfileSummary profile) { return(profile.DateOfBirth); }, 1.0f));
     this.Columns.Add(
         new TableColumn <PatientProfileSummary, string>(SR.ColumnSex,
                                                         delegate(PatientProfileSummary profile) { return(profile.Sex.Value); }, 0.5f));
 }
Exemplo n.º 28
0
        public ReconciliationCandidateTable()
        {
            this.Columns.Add(
                new TableColumn <ReconciliationCandidateTableEntry, bool>(SR.ColumnAbbreviationReconciliation,
                                                                          delegate(ReconciliationCandidateTableEntry item) { return(item.Checked); },
                                                                          delegate(ReconciliationCandidateTableEntry item, bool value) { item.Checked = value; }, 0.5f));
            this.Columns.Add(
                new TableColumn <ReconciliationCandidateTableEntry, string>(SR.ColumnScore,
                                                                            delegate(ReconciliationCandidateTableEntry item) { return(item.ReconciliationCandidate.Score.ToString()); }, 1.0f));
            this.Columns.Add(
                new TableColumn <ReconciliationCandidateTableEntry, string>(SR.ColumnSite,
                                                                            delegate(ReconciliationCandidateTableEntry item) { return(item.ReconciliationCandidate.PatientProfile.Mrn.AssigningAuthority.Code); }, 0.5f));
            this.Columns.Add(
                new TableColumn <ReconciliationCandidateTableEntry, string>(SR.ColumnMRN,
                                                                            delegate(ReconciliationCandidateTableEntry item) { return(item.ReconciliationCandidate.PatientProfile.Mrn.Id); }, 1.0f));
            this.Columns.Add(
                new TableColumn <ReconciliationCandidateTableEntry, string>(SR.ColumnName,
                                                                            delegate(ReconciliationCandidateTableEntry item) { return(PersonNameFormat.Format(item.ReconciliationCandidate.PatientProfile.Name)); }, 2.0f));
            this.Columns.Add(
                new TableColumn <ReconciliationCandidateTableEntry, string>(SR.ColumnHealthcardNumber,
                                                                            delegate(ReconciliationCandidateTableEntry item) { return(HealthcardFormat.Format(item.ReconciliationCandidate.PatientProfile.Healthcard)); }, 1.0f));

            DateTimeTableColumn <ReconciliationCandidateTableEntry> dateOfBirthColumn =
                new DateTimeTableColumn <ReconciliationCandidateTableEntry>(SR.ColumnDateOfBirth,
                                                                            delegate(ReconciliationCandidateTableEntry item) { return(item.ReconciliationCandidate.PatientProfile.DateOfBirth); }, 1.0f);

            this.Columns.Add(dateOfBirthColumn);

            this.Columns.Add(
                new TableColumn <ReconciliationCandidateTableEntry, string>(SR.ColumnSex,
                                                                            delegate(ReconciliationCandidateTableEntry item) { return(item.ReconciliationCandidate.PatientProfile.Sex.Value); }, 0.5f));
        }
Exemplo n.º 29
0
        public ExternalPractitionerWorkflowTable()
        {
            this.Columns.Add(new TableColumn <ExternalPractitionerSummary, string>(SR.ColumnName
                                                                                   , item => PersonNameFormat.Format(item.Name), 1.0f));
            this.Columns.Add(new TableColumn <ExternalPractitionerSummary, string>(SR.ColumnLicenseNumber,
                                                                                   item => item.LicenseNumber, 0.5f));
            this.Columns.Add(new TableColumn <ExternalPractitionerSummary, string>(SR.ColumnBillingNumber,
                                                                                   item => item.BillingNumber, 0.5f));
            this.Columns.Add(_timeColumn = new DateTimeTableColumn <ExternalPractitionerSummary>(SR.ColumnTime,
                                                                                                 item => _timeInfo == null ? item.LastVerifiedTime : (DateTime?)_timeInfo.GetValue(item, null), 0.75f));

            // Perform initial sort
            this.Sort(new TableSortParams(_timeColumn, true));
        }
 public override string GetTitle()
 {
     return(string.Format("Performing - {0} - {1}", PersonNameFormat.Format(_item.PatientName), MrnFormat.Format(_item.Mrn)));
 }