public WorklistViewModel(ExamListViewType examlistType, IWorkListDataSource dataSource) { this.Type = examlistType; this._dataSource = dataSource; Root = new CaseListItem(); IsActive = false; this.RefreshCommand = new RelayCommand(Refresh); this.ReserveCaseCommand = new RelayCommand(ReserveCases, () => CanReserveCases()); this.UnreserveCaseCommand = new RelayCommand(UnreserveCases, () => CanUnreserveCases()); this.RequestConsultationCommand = new RelayCommand(RequestConsultation, () => CanRequestConsultation()); this.EditReportCommand = new RelayCommand(EditReport, () => CanEditReport()); this.ViewReportCommand = new RelayCommand(ViewReport, () => CanViewReport()); this.ViewSnapshotsCommand = new RelayCommand(ViewSnapshots, () => CanViewSnapshots()); this.ViewNotesCommand = new RelayCommand(ViewNotes, () => CanViewNotes()); this.ViewInCaptureCommand = new RelayCommand(ViewInCapture, () => CanViewInCapture()); //this.DoubleClickCommand = new RelayCommand(this.ReserveCases, () => CanReserveCases()); this.ViewDefaultHealthSummaryCommand = new RelayCommand(ViewDefaultHealthSummary, () => CanViewDefaultHealthSummary()); this.ViewHealthSummaryListCommand = new RelayCommand(ViewHealthSummaryList, () => CanViewHealthSummaryList()); this.WorklistFilterViewModel = new WorklistFilterViewModel(this.Type); this.WorklistFilterViewModel.PropertyChanged += new PropertyChangedEventHandler(WorklistFilterViewModel_PropertyChanged); // configure periodic refresh, periodically refreshes active worklist _refreshTimer = new DispatcherTimer(); _refreshTimer.Interval = TimeSpan.FromMilliseconds(3000); _refreshTimer.Tick += new EventHandler(_timer_Tick); _refreshTimer.Start(); }
public static WorklistViewModel Create(ExamListViewType examListViewType, IWorkListDataSource dataSource) { WorklistViewModel viewModel = new WorklistViewModel(examListViewType, dataSource); switch (examListViewType) { case ExamListViewType.Read: viewModel.Title = "Readlist"; break; case ExamListViewType.Unread: viewModel.Title = "Results"; break; case ExamListViewType.Patient: viewModel.Title = "Patient"; break; } return viewModel; }