Exemple #1
0
 public LightPatientViewModel()
 {
     this.SelectPatientCommand = new RelayCommand(() =>
     {
         PluginContext.Host.SelectedPatient = this;
         this.IncrementCounter();
         PluginContext.Host.NavigateToStartPage();
     });
     this.component = PluginContext.ComponentFactory.GetInstance <IPatientSessionComponent>();
     PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IPatientSessionComponent>();
 }
 public LightPatientViewModel()
 {
     this.SelectPatientCommand = new RelayCommand(() =>
     {
         PluginContext.Host.SelectedPatient = this;
         this.IncrementCounter();
         PluginContext.Host.NavigateToStartPage();
     });
     this.component = PluginContext.ComponentFactory.GetInstance<IPatientSessionComponent>();
     PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IPatientSessionComponent>();
 }
Exemple #3
0
        public AddPatientViewModel()
            : base()
        {
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IPatientSessionComponent>();

            this.Patient = new LightPatientDto();
            this.Genders = new ObservableCollection <Tuple <string, Gender> >();
            this.Genders.Add(new Tuple <string, Gender>(Gender.Male.Translate(), Gender.Male));
            this.Genders.Add(new Tuple <string, Gender>(Gender.Female.Translate(), Gender.Female));
            this.AddCommand = new RelayCommand(() => this.Add(), () => this.CanAdd());
        }
        public AddPatientViewModel()
            : base()
        {
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IPatientSessionComponent>();

            this.Patient = new LightPatientDto();
            this.Genders = new ObservableCollection<Tuple<string, Gender>>();
            this.Genders.Add(new Tuple<string, Gender>(Gender.Male.Translate(), Gender.Male));
            this.Genders.Add(new Tuple<string, Gender>(Gender.Female.Translate(), Gender.Female));
            this.AddCommand = new RelayCommand(() => this.Add(), () => this.CanAdd());
        }
        public SearchPatientExtendedViewModel()
        {
            this.Component = PluginContext.ComponentFactory.GetInstance <IPatientSessionComponent>();

            this.FoundPatients    = new ObservableCollection <LightPatientDto>();
            this.Professions      = new ObservableCollection <ProfessionDto>();
            this.LogicalOperators = new ObservableCollection <Tuple <Operator, string> >();
            this.LogicalOperators.Add(new Tuple <Operator, string>(Operator.And, Messages.Search_And));
            this.LogicalOperators.Add(new Tuple <Operator, string>(Operator.Or, Messages.Search_Or));
            this.SelectedOperator = this.LogicalOperators[0];

            this.SearchCommand        = new RelayCommand(() => this.Search(), () => this.CanSearch());
            this.RefreshCommand       = new RelayCommand(() => this.Refresh());
            this.SelectPatientCommand = new RelayCommand(() => this.SelectPatient(), () => this.CanSelectPatient());

            this.IsBusy = false;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SearchPatientViewModel"/> class.
        /// </summary>
        public SearchPatientViewModel()
            : base()
        {
            this.FoundPatients = new ObservableCollection<LightPatientDto>();
            this.TodayPatients = new ObservableCollection<LightPatientViewModel>();
            this.SearchCommand = new RelayCommand(() => this.Search(), () => this.CanSearch());
            this.SelectPatientCommand = new RelayCommand(() => this.SelectPatient(), () => this.CanSelectPatient());

            this.component = PluginContext.ComponentFactory.GetInstance<IPatientSessionComponent>();
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IPatientSessionComponent>();

            Countdown.Elapsed += (sender, e) => PluginContext.Host.Invoke(() =>
            {
                this.SearchCommand.TryExecute();
                Countdown.Stop();
            });
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="SearchPatientViewModel"/> class.
        /// </summary>
        public SearchPatientViewModel()
            : base()
        {
            this.FoundPatients        = new ObservableCollection <LightPatientDto>();
            this.TodayPatients        = new ObservableCollection <LightPatientViewModel>();
            this.SearchCommand        = new RelayCommand(() => this.Search(), () => this.CanSearch());
            this.SelectPatientCommand = new RelayCommand(() => this.SelectPatient(), () => this.CanSelectPatient());

            this.component = PluginContext.ComponentFactory.GetInstance <IPatientSessionComponent>();
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IPatientSessionComponent>();

            Countdown.Elapsed += (sender, e) => PluginContext.Host.Invoke(() =>
            {
                this.SearchCommand.TryExecute();
                Countdown.Stop();
            });
        }
        public SearchPatientExtendedViewModel()
        {
            this.Component = PluginContext.ComponentFactory.GetInstance<IPatientSessionComponent>();

            this.FoundPatients = new ObservableCollection<LightPatientDto>();
            this.Professions = new ObservableCollection<ProfessionDto>();
            this.LogicalOperators = new ObservableCollection<Tuple<Operator, string>>();
            this.LogicalOperators.Add(new Tuple<Operator, string>(Operator.And, Messages.Search_And));
            this.LogicalOperators.Add(new Tuple<Operator, string>(Operator.Or, Messages.Search_Or));
            this.SelectedOperator = this.LogicalOperators[0];

            this.SearchCommand = new RelayCommand(() => this.Search(), () => this.CanSearch());
            this.RefreshCommand = new RelayCommand(() => this.Refresh());
            this.SelectPatientCommand = new RelayCommand(() => this.SelectPatient(), () => this.CanSelectPatient());

            this.IsBusy = false;
        }