public override void Start() { _orderNoteComponent = new OrderNoteSummaryComponent(OrderNoteCategory.General); _orderNotesComponentHost = new ChildComponentHost(this.Host, _orderNoteComponent); _orderNotesComponentHost.StartComponent(); _orderNoteComponent.Notes = _context.OrderNotes; _protocolSummaryComponentHost = new ChildComponentHost(this.Host, new ProtocolSummaryComponent(_context)); _protocolSummaryComponentHost.StartComponent(); _rightHandComponentContainer = new TabComponentContainer(); _orderAttachmentsComponent = new AttachedDocumentPreviewComponent(true, AttachmentSite.Order) { OrderRef = _context.OrderRef }; _rightHandComponentContainer.Pages.Add(new TabPage(SR.TitleOrderAttachments, _orderAttachmentsComponent)); // instantiate all extension pages foreach (IPerformingDocumentationOrderDetailsPageProvider pageProvider in new PerformingDocumentationOrderDetailsPageProviderExtensionPoint().CreateExtensions()) { _extensionPages.AddRange(pageProvider.GetPages(new PerformingDocumentationOrderDetailsContext(this))); } // add extension pages to container and set initial context // the container will start those components if the user goes to that page foreach (var page in _extensionPages) { _rightHandComponentContainer.Pages.Add(new TabPage(page.Path, page.GetComponent())); } _rightHandComponentContainerHost = new ChildComponentHost(this.Host, _rightHandComponentContainer); _rightHandComponentContainerHost.StartComponent(); base.Start(); }
public AttachedDocumentPreviewComponentControl(AttachedDocumentPreviewComponent component) : base(component) { InitializeComponent(); _component = component; _attachments.ShowToolbar = true; _attachments.Table = _component.AttachmentTable; _attachments.MenuModel = _component.AttachmentActionModel; _attachments.ToolbarModel = _component.AttachmentActionModel; _attachments.DataBindings.Add("Selection", _component, "Selection", true, DataSourceUpdateMode.OnPropertyChanged); }
public AttachedDocumentPreviewComponentControl(AttachedDocumentPreviewComponent component) : base(component) { InitializeComponent(); _component = component; _attachments.ShowToolbar = true; _attachments.Table = _component.AttachmentTable; _attachments.MenuModel = _component.AttachmentActionModel; _attachments.ToolbarModel = _component.AttachmentActionModel; _attachments.DataBindings.Add("Selection", _component, "Selection", true, DataSourceUpdateMode.OnPropertyChanged); }
public override void Start() { StartProtocollingWorklistItem(); this.Host.Title = ProtocolDocument.GetTitle(this.WorklistItem); _bannerComponentHost = new ChildComponentHost(this.Host, new BannerComponent(this.WorklistItem)); _bannerComponentHost.StartComponent(); _orderNotesComponentHost = new ChildComponentHost(this.Host, new OrderNoteSummaryComponent(OrderNoteCategory.Protocol, this.SaveEnabled)); _orderNotesComponentHost.StartComponent(); ((OrderNoteSummaryComponent)_orderNotesComponentHost.Component).Notes = _notes; _orderNotesComponentHost.Component.ModifiedChanged += ((sender, args) => this.Modified = this.Modified || _orderNotesComponentHost.Component.Modified); _protocolEditorComponentHost = new ChildComponentHost(this.Host, new ProtocolEditorComponent(this.WorklistItem)); _protocolEditorComponentHost.StartComponent(); ((ProtocolEditorComponent)_protocolEditorComponentHost.Component).CanEdit = this.SaveEnabled; _protocolEditorComponentHost.Component.ModifiedChanged += ((sender, args) => this.Modified = this.Modified || _protocolEditorComponentHost.Component.Modified); _rightHandComponentContainer = new TabComponentContainer(); _orderDetailViewComponent = new ProtocollingOrderDetailViewComponent(this.WorklistItem.PatientRef, this.WorklistItem.OrderRef); _rightHandComponentContainer.Pages.Add(new TabPage(SR.TitleOrder, _orderDetailViewComponent)); _orderAttachmentsComponent = new AttachedDocumentPreviewComponent(true, AttachmentSite.Order); _orderAttachmentsComponent.OrderRef = this.WorklistItem.OrderRef; _rightHandComponentContainer.Pages.Add(new TabPage(SR.TitleOrderAttachments, _orderAttachmentsComponent)); _additionalInfoComponent = new OrderAdditionalInfoComponent(true); _additionalInfoComponent.OrderExtendedProperties = _orderDetail.ExtendedProperties; _additionalInfoComponent.Context = new OrderAdditionalInfoComponent.HealthcareContext(this.WorklistItem.OrderRef); _rightHandComponentContainer.Pages.Add(new TabPage(SR.TitleAdditionalInfo, _additionalInfoComponent)); _rightHandComponentContainer.Pages.Add(new TabPage(SR.TitlePriors, _priorReportsComponent = new PriorReportComponent(this.WorklistItem))); _rightHandComponentContainerHost = new ChildComponentHost(this.Host, _rightHandComponentContainer); _rightHandComponentContainerHost.StartComponent(); SetInitialProtocollingTabPage(); base.Start(); }
public override void Start() { _mergedOrderViewComponentContainer = new TabComponentContainer(); _mergedOrderPreviewComponentHost = new ChildComponentHost(this.Host, _mergedOrderViewComponentContainer); _mergedOrderPreviewComponentHost.StartComponent(); _mergedOrderViewComponentContainer.Pages.Add(new TabPage(SR.TitleOrder, _orderPreviewComponent = new MergedOrderDetailViewComponent())); _mergedOrderViewComponentContainer.Pages.Add(new TabPage(SR.TitleOrderAttachments, _attachmentSummaryComponent = new AttachedDocumentPreviewComponent(true, AttachmentSite.Order))); // instantiate all extension pages foreach (IMergeOrdersPageProvider pageProvider in new MergeOrdersPageProviderExtensionPoint().CreateExtensions()) { _extensionPages.AddRange(pageProvider.GetPages(_extensionPageContext)); } // add extension pages to container and set initial context // the container will start those components if the user goes to that page foreach (var page in _extensionPages) { _mergedOrderViewComponentContainer.Pages.Add(new TabPage(page.Path, page.GetComponent())); } // Load form data Platform.GetService( delegate(IBrowsePatientDataService service) { var request = new GetDataRequest { GetOrderDetailRequest = new GetOrderDetailRequest() }; foreach (var orderRef in _orderRefs) { request.GetOrderDetailRequest.OrderRef = orderRef; var response = service.GetData(request); _ordersTable.Items.Add(response.GetOrderDetailResponse.Order); } }); _ordersTable.Sort(); // Re-populate orderRef list by sorted accession number _orderRefs.Clear(); _orderRefs.AddRange(CollectionUtils.Map <OrderDetail, EntityRef>(_ordersTable.Items, item => item.OrderRef)); _selectedOrder = CollectionUtils.FirstElement(_ordersTable.Items); DryRunForSelectedOrder(); base.Start(); }
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( "Patient", _patientEditor = new PatientProfileDetailsEditorComponent( _isNew, formData.MrnAutoGenerated, formData.SexChoices, formData.MrnAssigningAuthorityChoices, formData.HealthcardAssigningAuthorityChoices))); this.Pages.Add( new NavigatorPage( "Patient/Addresses", _addressesSummary = new AddressesSummaryComponent(formData.AddressTypeChoices))); this.Pages.Add( new NavigatorPage( "Patient/Phone Numbers", _phoneNumbersSummary = new PhoneNumbersSummaryComponent(formData.PhoneTypeChoices))); this.Pages.Add( new NavigatorPage("Patient/Email Addresses", _emailAddressesSummary = new EmailAddressesSummaryComponent())); this.Pages.Add( new NavigatorPage( "Patient/Contact Persons", _contactPersonsSummary = new ContactPersonsSummaryComponent(formData.ContactPersonTypeChoices, formData.ContactPersonRelationshipChoices))); this.Pages.Add( new NavigatorPage( "Patient/Culture", _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("Patient/Notes", _notesSummary = new PatientNoteSummaryComponent(_profile.Notes, formData.NoteCategoryChoices))); _notesSummary.SetModifiedOnListChange = true; var patientDocumentsPage = new NavigatorPage( "Patient/Attachments", _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(); }
public void SetComponent(IApplicationComponent component) { _component = (AttachedDocumentPreviewComponent)component; }
public void SetComponent(IApplicationComponent component) { _component = (AttachedDocumentPreviewComponent)component; }