Ejemplo 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));
        }
        public override void Start()
        {
            // Create component for each tab
            _bannerComponent       = new BannerComponent();
            _orderHistoryComponent = new BiographyOrderHistoryComponent(_initialSelectedOrderRef)
            {
                PatientRef = _patientRef
            };
            _demographicComponent = new BiographyDemographicComponent {
                DefaultProfileRef = _profileRef, PatientRef = _patientRef
            };
            _documentComponent = new AttachedDocumentPreviewComponent(true, AttachmentSite.Patient);
            _noteComponent     = new BiographyNoteComponent();
            _allergyComponent  = new PatientAllergiesComponent();

            // Create tab and tab groups
            _pagesContainer = new TabComponentContainer();
            _pagesContainer.Pages.Add(new TabPage(SR.TitleOrders, _orderHistoryComponent));

            if (new WorkflowConfigurationReader().EnableVisitWorkflow)
            {
                _visitHistoryComponent = new BiographyVisitHistoryComponent {
                    PatientRef = _patientRef
                };
                _pagesContainer.Pages.Add(new TabPage(SR.TitleVisits, _visitHistoryComponent));
            }

            _pagesContainer.Pages.Add(new TabPage(SR.TitleDemographicProfiles, _demographicComponent));
            _pagesContainer.Pages.Add(new TabPage(SR.TitlePatientAttachments, _documentComponent));
            _pagesContainer.Pages.Add(new TabPage(SR.TitlePatientNotes, _noteComponent));
            //_pagesContainer.Pages.Add(new TabPage(SR.TitlePatientAllergies, _allergyComponent));

            var tabGroupContainer = new TabGroupComponentContainer(LayoutDirection.Horizontal);

            tabGroupContainer.AddTabGroup(new TabGroup(_pagesContainer, 1.0f));

            _contentComponentHost = new ChildComponentHost(this.Host, tabGroupContainer);
            _contentComponentHost.StartComponent();

            _bannerComponentHost = new ChildComponentHost(this.Host, _bannerComponent);
            _bannerComponentHost.StartComponent();

            _toolSet = new ToolSet(new PatientBiographyToolExtensionPoint(), new PatientBiographyToolContext(this));

            LoadPatientProfile();

            base.Start();
        }
Ejemplo n.º 3
0
 public BiographyNoteTable(BiographyNoteComponent component)
     : this(component, NumRows)
 {
 }