예제 #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));
        }
예제 #2
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));
        }
        public PerformingDocumentationMppsSummaryTable()
        {
            this.Columns.Add(new TableColumn <ModalityPerformedProcedureStepDetail, string>(
                                 SR.ColumnName,
                                 FormatDescription,
                                 5.0f));

            this.Columns.Add(new TableColumn <ModalityPerformedProcedureStepDetail, string>(
                                 SR.ColumnState,
                                 FormatStatus,
                                 1.2f));

            var sortColumn =
                new DateTimeTableColumn <ModalityPerformedProcedureStepDetail>(
                    SR.ColumnStartTime,
                    mpps => mpps.StartTime,
                    1.5f);

            this.Columns.Add(sortColumn);
            this.Sort(new TableSortParams(sortColumn, true));

            var endTimeColumn = new DateTimeTableColumn <ModalityPerformedProcedureStepDetail>(
                SR.ColumnEndTime,
                mpps => mpps.EndTime,
                1.5f);

            this.Columns.Add(endTimeColumn);
        }
예제 #4
0
        public TableCompany(Alias alias) : base("dbo", "Company", alias)
        {
            this.CompanyId   = this.CreateInt32Column(nameof(this.CompanyId), ColumnMeta.PrimaryKey().Identity());
            this.CompanyName = this.CreateStringColumn(nameof(this.CompanyName), 250);

            this.Version = this.CreateInt32Column("Version",
                                                  ColumnMeta.DefaultValue(0));
            this.ModifiedAt = this.CreateDateTimeColumn("ModifiedAt",
                                                        columnMeta: ColumnMeta.DefaultValue(SqQueryBuilder.GetUtcDate()));
        }
예제 #5
0
 public User(Alias alias) : base("dbo", "user", alias)
 {
     this.UserId    = this.CreateInt32Column("UserId");
     this.FirstName = this.CreateStringColumn("FirstName", 255);
     this.LastName  = this.CreateStringColumn("LastName", 255);
     this.Email     = this.CreateStringColumn("Email", 255);
     this.RegDate   = this.CreateDateTimeColumn("RegDate");
     this.Version   = this.CreateInt32Column("Version");
     this.Created   = this.CreateDateTimeColumn("Created");
     this.Modified  = this.CreateDateTimeColumn("Modified");
 }
예제 #6
0
        public TableUser(Alias alias) : base("dbo", "User", alias)
        {
            this.UserId    = this.CreateInt32Column("UserId", ColumnMeta.PrimaryKey().Identity());
            this.FirstName = this.CreateStringColumn("FirstName", size: 255, isUnicode: true);
            this.LastName  = this.CreateStringColumn("LastName", size: 255, isUnicode: true);

            this.Version = this.CreateInt32Column("Version",
                                                  ColumnMeta.DefaultValue(0));
            this.ModifiedAt = this.CreateDateTimeColumn("ModifiedAt",
                                                        columnMeta: ColumnMeta.DefaultValue(SqQueryBuilder.GetUtcDate()));
        }
예제 #7
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));
        }
예제 #8
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));
        }
예제 #9
0
 public IdModified(Alias alias = default) : base("t -- mpU\"s'er", alias)
 {
     this.Id       = this.CreateInt32Column("Id", ColumnMeta.Identity().PrimaryKey());
     this.Modified = this.CreateDateTimeColumn("Modified", true);
 }
        public override void Start()
        {
            base.Start();

            _workItems.Columns.Add(new TableColumn <WorkItem, string>(SR.ColumnPatient, w => w.PatientInfo)
            {
                WidthFactor = .7f
            });
            _workItems.Columns.Add(new TableColumn <WorkItem, string>(SR.ColumnStudy, w => w.StudyInfo)
            {
                WidthFactor = .9f
            });
            _workItems.Columns.Add(new TableColumn <WorkItem, string>(SR.ColumnActivityDescription, w => w.ActivityDescription)
            {
                WidthFactor = .7f
            });
            _workItems.Columns.Add(new TableColumn <WorkItem, string>(SR.ColumnStatus, w => w.Status.GetDescription())
            {
                WidthFactor         = .3f,
                TooltipTextProvider = w => string.IsNullOrEmpty(w.ProgressStatusDescription)
                                                                                                                                                ? string.Empty
                                                                                                                                                : w.ProgressStatusDescription,
                Comparison = WorkItem.StatusComparison
            });
            _workItems.Columns.Add(new TableColumn <WorkItem, string>(SR.ColumnStatusDescription, w => w.ProgressStatus)
            {
                WidthFactor = 1.5f
            });
            var requestedTimeColumn = new DateTimeTableColumn <WorkItem>(SR.ColumnRequestedTime, w => w.RequestedTime)
            {
                WidthFactor = .5f
            };

            _workItems.Columns.Add(requestedTimeColumn);
            _workItems.Columns.Add(new DateTimeTableColumn <WorkItem>(SR.ColumnScheduledTime, w => w.ScheduledTime)
            {
                WidthFactor = .5f
            });
            _workItems.Columns.Add(new TableColumn <WorkItem, string>(SR.ColumnPriority, w => w.Priority.GetDescription())
            {
                WidthFactor = .25f,
                Comparison  = WorkItem.PriorityComparison
            });
            _workItems.Columns.Add(new TableColumn <WorkItem, IconSet>(SR.ColumnProgress, w => w.ProgressIcon)
            {
                WidthFactor = .4f,
                Comparison  = WorkItem.ProgressComparison
            });


            // establish initial sort order
            _workItems.Sort(new TableSortParams(requestedTimeColumn, false));

            this.ActivityMonitor = WorkItemActivityMonitor.Create(true);
            _connectionState     = _connectionState.Update();

            this.ActivityMonitor.IsConnectedChanged += ActivityMonitorIsConnectedChanged;

            _localServerWatcher.DicomServerConfigurationChanged  += OnDicomServerConfigurationChanged;
            _localServerWatcher.StudyStorageConfigurationChanged += OnStorageConfigurationChanged;
            _localServerWatcher.DiskSpaceUsageChanged            += OnDiskspaceChanged;
        }
예제 #11
0
        private ProcedurePlanSummaryTable(int cellRowCount)
            : base(cellRowCount)
        {
            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, bool>(
                                 "X",
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.IsChecked); },
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable, bool isChecked)
            {
                checkable.IsChecked = isChecked;
                EventsHelper.Fire(_checkedRowsChanged, this, EventArgs.Empty);
            },
                                 0.1f));

            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, string>(
                                 SR.ColumnStatus,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable)
            {
                return(FormatStatus(checkable.Item));
            },
                                 0.5f));

            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, string>(
                                 SR.ColumnModality,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.ModalityProcedureStep.Modality.Name); },
                                 0.5f));

            DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> > scheduledStartTimeColumn =
                new DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> >(
                    SR.ColumnScheduledTime,
                    delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.ModalityProcedureStep.ScheduledStartTime); },
                    0.5f);

            this.Columns.Add(scheduledStartTimeColumn);

            this.Columns.Add(new DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> >(
                                 SR.ColumnCheckInTime,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.Procedure.CheckInTime); },
                                 0.5f));

            this.Columns.Add(new DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> >(
                                 SR.ColumnStartTime,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.ModalityProcedureStep.StartTime); },
                                 0.5f));


            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, string>(SR.ColumnProcedureDescription,
                                                                                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable)
            {
                // if MPS description is identical to procedure type name, don't put redundant text
                if (checkable.Item.ModalityProcedureStep.Description == checkable.Item.Procedure.Type.Name)
                {
                    return(ProcedureFormat.Format(checkable.Item.Procedure));
                }
                else
                {
                    // MPS desc is different, so append it
                    return(string.Format("{0} - {1}",
                                         ProcedureFormat.Format(checkable.Item.Procedure),
                                         checkable.Item.ModalityProcedureStep.Description));
                }
            },
                                                                                                 0.5f,
                                                                                                 ProcedureDescriptionRow));

            this.Sort(new TableSortParams(scheduledStartTimeColumn, true));
        }
예제 #12
0
 public TNext Set(DateTimeTableColumn column, DateTime value)
 {
     return(this.SetGeneric(column, SqQueryBuilder.Literal(value)));
 }