public override void Start() { _xmlValidationManager = XmlValidationManager.Instance; // try to load existing rules // if this fails, an exception will be thrown, preventing this component from starting var rules = CollectionUtils.Map(_xmlValidationManager.GetRules(_applicationComponentClass), (XmlElement node) => new Rule(node.OuterXml, _liveComponent)); _rules.Items.AddRange(rules); _componentProperties = CollectionUtils.Select(_applicationComponentClass.GetProperties(), p => !p.DeclaringType.Equals(typeof(IApplicationComponent)) && !p.DeclaringType.Equals(typeof(ApplicationComponent))); _rulesActionModel = new CrudActionModel(true, false, true); _rulesActionModel.Add.SetClickHandler(AddNewRule); _rulesActionModel.Delete.SetClickHandler(DeleteSelectedRule); _rulesActionModel.Delete.Enabled = false; _editor = CodeEditorFactory.CreateCodeEditor(); _editor.Language = "xml"; _editorHost = new ChildComponentHost(this.Host, _editor.GetComponent()); _editorHost.StartComponent(); base.Start(); }
public override void Start() { this._dicomPrinterConfigurationEditorComponent = new DicomPrinterConfigurationEditorComponent(); this._childComponentHost = new ChildComponentHost(base.Host, this._dicomPrinterConfigurationEditorComponent); this._dicomPrinterConfigurationEditorComponent.PropertyChanged += new PropertyChangedEventHandler(this.LocalPropertyChanged); this._dicomPrinterConfigurationEditorComponent.Validation.Add(new ValidationRule("HaveModalityPixelSpacing", new ValidationRule.ValidationDelegate(this.GetValidtionResult))); ItemCollection <Checkable <DicomPrinter> > items = this._dicomPrinterTable.Items; if (Convert == null) { Convert = new Converter <DicomPrinter, Checkable <DicomPrinter> >(DciomPrintApplicationComponent.WrapperDicomPrinterToCheckable); } items.AddRange(CollectionUtils.Map <DicomPrinter, Checkable <DicomPrinter> >(DicomPrintSettings.LocalDicomPrinterCollection, Convert)); this._dicomPrinterTable.SelectDicomPrinter(DicomPrintSettings.LocalDefaultPrinterName); if (items.Count > 0) { if (this._dicomPrinterTable.SelectFirstCheckedCheckableDicomPrinter == null) { this.SelectedItem = new Selection(items[0]); } } if (this._dicomPrinter == null) { this._dicomPrinterConfigurationEditorComponent.Configuration = new DicomPrinter.Configuration(); } else { this._dicomPrinterConfigurationEditorComponent.Configuration = this._dicomPrinter.Item.Config; } base.Start(); this._childComponentHost.StartComponent(); }
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 override void Stop() { if (_bannerComponentHost != null) { _bannerComponentHost.StopComponent(); _bannerComponentHost = null; } if (_orderNotesComponentHost != null) { _orderNotesComponentHost.StopComponent(); _orderNotesComponentHost = null; } if (_protocolEditorComponentHost != null) { _protocolEditorComponentHost.StopComponent(); _protocolEditorComponentHost = null; } if (_rightHandComponentContainerHost != null) { _rightHandComponentContainerHost.StopComponent(); _rightHandComponentContainerHost = null; } base.Stop(); }
public override void Stop() { if (_bannerHost != null) { _bannerHost.StopComponent(); _bannerHost = null; } if (_rightHandComponentContainerHost != null) { _rightHandComponentContainerHost.StopComponent(); _rightHandComponentContainerHost = null; } if (_transcriptionEditorHost != null) { _transcriptionEditorHost.StopComponent(); if (_transcriptionEditorHost is IDisposable) { ((IDisposable)_transcriptionEditorHost).Dispose(); _transcriptionEditor = null; } } base.Stop(); }
public override void Start() { // create the diff component _diffComponentHost = new ChildComponentHost(this.Host, _diffComponent = new PatientProfileDiffComponent()); _diffComponentHost.StartComponent(); // add all target profiles - ensure the initially selected one is at the top of the list _targetProfileTable = new PatientProfileTable(); _targetProfileTable.Items.Add(_selectedTargetProfile); foreach (var profile in _targetProfiles) { if (!profile.PatientProfileRef.Equals(_selectedTargetProfile.PatientProfileRef, true)) { _targetProfileTable.Items.Add(profile); } } _reconciliationProfileTable = new ReconciliationCandidateTable(); foreach (var match in _candidates) { var entry = new ReconciliationCandidateTableEntry(match); entry.CheckedChanged += CandidateCheckedChangedEventHandler; _reconciliationProfileTable.Items.Add(entry); } base.Start(); }
public override void Start() { _worklistPrintPreviewComponent = new WorklistPrintViewComponent(_printContext); _worklistPrintPreviewComponentHost = new ChildComponentHost(this.Host, _worklistPrintPreviewComponent); _worklistPrintPreviewComponentHost.StartComponent(); base.Start(); }
public override void Start() { _reportViewComponentHost = new ChildComponentHost(this.Host, new ReportViewComponent(this)); _reportViewComponentHost.StartComponent(); UpdateReportList(); base.Start(); }
public override void Stop() { if (_profileViewComponentHost != null) { _profileViewComponentHost.StopComponent(); _profileViewComponentHost = null; } base.Stop(); }
public override void Start() { _profileViewComponent = new ProfileViewComponent(); _profileViewComponentHost = new ChildComponentHost(this.Host, _profileViewComponent); _profileViewComponentHost.StartComponent(); LoadPatientProfile(); base.Start(); }
public override void Stop() { if (_editorHost != null) { _editorHost.StopComponent(); _editorHost = null; } base.Stop(); }
public override void Stop() { if (_orderNotesComponentHost != null) { _orderNotesComponentHost.StopComponent(); _orderNotesComponentHost = null; } base.Stop(); }
public override void Stop() { if (_visitDetailComponentHost != null) { _visitDetailComponentHost.StopComponent(); _visitDetailComponentHost = null; } base.Stop(); }
public override void Start() { _visitDetailComponent = new BiographyVisitDetailViewComponent(); _visitDetailComponentHost = new ChildComponentHost(this.Host, _visitDetailComponent); _visitDetailComponentHost.StartComponent(); LoadVisits(); base.Start(); }
public override void Stop() { if (_tabComponentContainerHost != null) { _tabComponentContainerHost.StopComponent(); _tabComponentContainerHost = null; } base.Stop(); }
public override void Stop() { if (_mergedOrderPreviewComponentHost != null) { _mergedOrderPreviewComponentHost.StopComponent(); _mergedOrderPreviewComponentHost = null; } base.Stop(); }
/// <summary> /// Called by the host when the application component is being terminated. /// </summary> public override void Stop() { if (_previewHost != null) { _previewHost.StopComponent(); _previewHost = null; } base.Stop(); }
public override void Stop() { if (_diffComponentHost != null) { _diffComponentHost.StopComponent(); _diffComponentHost = null; } base.Stop(); }
public override void Stop() { if (_detailsPagesHost != null) { _detailsPagesHost.StopComponent(); _detailsPagesHost = null; } base.Stop(); }
public override void Stop() { if (_reportPreviewComponentHost != null) { _reportPreviewComponentHost.StopComponent(); _reportPreviewComponentHost = null; } base.Stop(); }
public override void Start() { if (_dicomPrinterConfigurationEditorComponent == null) { _dicomPrinterConfigurationEditorComponent = new DicomPrinterConfigurationEditorComponent(); } _dicomPrinterConfigurationEditorComponent.Configuration = _dicomPrinter.Config; this._childComponentHost = new ChildComponentHost(base.Host, this._dicomPrinterConfigurationEditorComponent); this._dicomPrinterConfigurationEditorComponent.ModifiedChanged += new EventHandler(this.LocalPropertyChanged); base.Start(); this._childComponentHost.StartComponent(); }
/// <summary> /// Called by the host to initialize the application component. /// </summary> public override void Start() { // init lookup handlers _cannedTextLookupHandler = new CannedTextLookupHandler(this.Host.DesktopWindow); // init recip table here, and not in constructor, because it relies on Host being set _recipients = new RecipientTable(this); // if exactly 1 template choice, then it is selected _selectedTemplate = _templateChoices.Count == 1 ? _templateChoices[0] : null; // create soft keys UpdateSoftKeys(); // load the existing conversation, plus editor form data GetConversationEditorFormDataResponse formDataResponse = null; Platform.GetService <IOrderNoteService>( service => { var formDataRequest = new GetConversationEditorFormDataRequest( _selectedTemplate != null ? _selectedTemplate.GetStaffRecipients() : new List <string>(), _selectedTemplate != null ? _selectedTemplate.GetGroupRecipients() : new List <string>()); formDataResponse = service.GetConversationEditorFormData(formDataRequest); var request = new GetConversationRequest(_orderRef, new List <string>(_orderNoteCategories), false); var response = service.GetConversation(request); _orderRef = response.OrderRef; _orderNotes = response.OrderNotes; }); // init on-behalf of choices _onBehalfOfChoices = formDataResponse.OnBehalfOfGroupChoices; _onBehalfOfChoices.Insert(0, _emptyStaffGroup); // initialize from template (which may be null) InitializeFromTemplate(_selectedTemplate, formDataResponse.RecipientStaffs, formDataResponse.RecipientStaffGroups); // build the action model _recipientsActionModel = new CrudActionModel(true, false, true, new ResourceResolver(this.GetType(), true)); _recipientsActionModel.Add.SetClickHandler(AddRecipient); _recipientsActionModel.Delete.SetClickHandler(DeleteRecipient); // init conversation view component _orderNoteViewComponent = new OrderNoteViewComponent(_orderNotes); _orderNoteViewComponent.CheckedItemsChanged += delegate { NotifyPropertyChanged("CompleteButtonLabel"); }; _orderNotesComponentHost = new ChildComponentHost(this.Host, _orderNoteViewComponent); _orderNotesComponentHost.StartComponent(); base.Start(); }
/// <summary> /// Called by the host to initialize the application component. /// </summary> public override void Start() { _reportPreviewComponent = new ReportPreviewComponent(null); _reportPreviewComponentHost = new ChildComponentHost(this.Host, _reportPreviewComponent); _reportPreviewComponentHost.StartComponent(); RefreshComponent(); _toolSet = new ToolSet(new BiographyOrderReportsToolExtensionPoint(), new BiographyOrderReportsToolContext(this)); base.Start(); }
/// <summary> /// Called by the host to initialize the application component. /// </summary> public override void Start() { _cannedTextLookupHandler = new CannedTextLookupHandler(this.Host.DesktopWindow); LoadOrCreateReportContent(); _previewComponent.SetUrl(this.PreviewUrl); _previewHost = new ChildComponentHost(this.Host, _previewComponent); _previewHost.StartComponent(); _context.WorklistItemChanged += WorklistItemChangedEventHandler; 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() { // 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(); }
public override void Stop() { if (_bannerComponentHost != null) { _bannerComponentHost.StopComponent(); _bannerComponentHost = null; } if (_documentationHost != null) { _documentationHost.StopComponent(); _documentationHost = null; } base.Stop(); }
/// <summary> /// Called by the host to initialize the application component. /// </summary> public override void Start() { this.Validation.Add(new ValidationRule("Supervisor", delegate { var ok = _supervisor != null || SubmitForReviewVisible == false; return(new ValidationResult(ok, SR.MessageChooseRadiologist)); })); //// create supervisor lookup handler, using filters supplied in application settings var filters = TranscriptionSettings.Default.SupervisorStaffTypeFilters; var staffTypes = string.IsNullOrEmpty(filters) ? new string[] { } : CollectionUtils.Map <string, string>(filters.Split(','), s => s.Trim()).ToArray(); _supervisorLookupHandler = new StaffLookupHandler(this.Host.DesktopWindow, staffTypes); StartTranscribingWorklistItem(); _bannerHost = new ChildComponentHost(this.Host, new BannerComponent(this.WorklistItem)); _bannerHost.StartComponent(); _rightHandComponentContainer = new TabComponentContainer { ValidationStrategy = new AllComponentsValidationStrategy() }; _orderComponent = new ReportingOrderDetailViewComponent(this.WorklistItem.PatientRef, this.WorklistItem.OrderRef); _rightHandComponentContainer.Pages.Add(new TabPage("Order", _orderComponent)); _rightHandComponentContainerHost = new ChildComponentHost(this.Host, _rightHandComponentContainer); _rightHandComponentContainerHost.StartComponent(); // check for a report editor provider. If not found, use the default one var transcriptionEditorProvider = CollectionUtils.FirstElement <ITranscriptionEditorProvider>( new TranscriptionEditorProviderExtensionPoint().CreateExtensions()); _transcriptionEditor = transcriptionEditorProvider == null ? new TranscriptionEditorComponent(new TranscriptionEditorContext(this)) : transcriptionEditorProvider.GetEditor(new TranscriptionEditorContext(this)); _transcriptionEditorHost = new ChildComponentHost(this.Host, _transcriptionEditor.GetComponent()); _transcriptionEditorHost.StartComponent(); _transcriptionEditorHost.Component.ModifiedChanged += ((sender, args) => this.Modified = this.Modified || _transcriptionEditorHost.Component.Modified); base.Start(); }
public override void Stop() { if (_rightHandComponentContainerHost != null) { _rightHandComponentContainerHost.StopComponent(); _rightHandComponentContainerHost = null; } if (_delaySelectionTimer != null) { _delaySelectionTimer.Stop(); _delaySelectionTimer.Dispose(); _delaySelectionTimer = null; } base.Stop(); }
public override void Stop() { if (_contentComponentHost != null) { _contentComponentHost.StopComponent(); _contentComponentHost = null; } if (_bannerComponentHost != null) { _bannerComponentHost.StopComponent(); _bannerComponentHost = null; } _toolSet.Dispose(); base.Stop(); }