public Patients() { MaterialControls control = new MaterialControls(); BindingContext = new PatientsViewModel(); InitializeComponent(); }
public PatientsPage() { //var vm = new PatientsViewModel(); //this.BindingContext = vm; InitializeComponent(); BindingContext = _viewModel = new PatientsViewModel(); _viewModel.DisplayClientAlreadyRegisteredPrompt += () => DisplayAlert("Error", "The Patient is Aready Registered", "OK"); _viewModel.DisplayRegistrationSuccessPrompt += () => DisplayAlert("Success", "The Patient has been registered successfully", "OK"); _viewModel.DisplayRegistrationFailedPrompt += () => DisplayAlert("Error", "User registration failed, Please try again", "OK"); _viewModel.DisplayRequiredFieldPrompt += () => DisplayAlert("Error", "OPD Number, First Name, Last Name and Village Fields are required", "OK"); _viewModel.activity = activity; Opdnumber.Completed += (object sender, EventArgs e) => { Firstname.Focus(); }; Firstname.Completed += (object sender, EventArgs e) => { Lastname.Focus(); }; Housenumber.Completed += (object sender, EventArgs e) => { Village.Focus(); }; Village.Completed += (object sender, EventArgs e) => { Phonenumber.Focus(); }; Phonenumber.Completed += (object sender, EventArgs e) => { _viewModel.SubmitCommand.Execute(null); }; }
public void ShowSearchResult(PatientsViewModel patients) { foreach (PatientViewModel patient in patients.Patients) { AddPatientToGrid(patient); } }
public async Task <IActionResult> AllPatients() { if (TempData["message"] != null) { ModelState.AddModelError("info", _localizer[TempData["message"].ToString()]); } try { var model = new PatientsViewModel(); model.Patients = await _cacheService.GetPatientsAsync(); if (model.Patients == null) { model.Patients = await _client.SendRequestAsync <List <Patient> >(HttpMethod.Get, "Patients"); _cacheService.SetPatientsAsync(model.Patients); } return(View(model)); } catch (HttpRequestException) { throw new ServerConnectionException(); } }
public async Task OnGetAsync(int?pageIndex) { var tmp = await _context.Patient.Include(u => u.User).Include(p => p.Picture).AsNoTracking().ToListAsync(); var patList = new List <PatientsViewModel>(); foreach (var item in tmp) { var temp = new PatientsViewModel { Id = item.Id, FirstName = item.User.FirstName, LastName = item.User.LastName, Phone = item.User.PhoneNumber, Email = item.User.Email, }; if (item.Picture.ImageData != null) { temp.Base64 = Convert.ToBase64String(item.Picture.ImageData); } patList.Add(temp); } int pageSize = 4; patients = PaginatedList <PatientsViewModel> .CreateAsync(patList, pageIndex ?? 1, pageSize); }
public MainViewModel() { DoctorsVM = new DoctorsViewModel(); SpecialtyesVM = new SpecialtyesViewModel(); PatientsVM = new PatientsViewModel(); ReceptionsVM = new ReceptionsViewModel(); CurrentView = ReceptionsVM; DoctorsViewCommand = new RelayCommand(o => { CurrentView = DoctorsVM; }); SpecialtyesViewCommand = new RelayCommand(o => { CurrentView = SpecialtyesVM; }); PatientsViewCommand = new RelayCommand(o => { CurrentView = PatientsVM; }); ReceptionsViewCommand = new RelayCommand(o => { CurrentView = ReceptionsVM; }); }
public IActionResult DokterDashboard() { List <Patient> patients = new List <Patient>(); PatientsViewModel model = new PatientsViewModel(patients); return(View(model)); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { patientRepository = new PatientRepository(data); var viewModel = new PatientsViewModel(patientRepository); patientRepository.EventAddElement += viewModel.UpdateViewModel; DataContext = viewModel; }
public PatientsPage() { InitializeComponent(); _patientsViewModel = new PatientsViewModel(); Patients_DataGrid.ItemsSource = _patientsViewModel.Patients; _patientsViewModel.UpdatePatientsAsync().ConfigureAwait(false); }
////Id v.d. patiënt, wordt uiteindelijk meegegeven vanuit een andere view. //string idP = "27f36d8b-6661-4a99-954f-b8c1522852f8"; public ActionResult Dashboard() { List <Patient> patients = new List <Patient>(); PatientsViewModel model = new PatientsViewModel(patients); model.DoctorId = idD; return(View(model)); }
public IActionResult Index() { var model = new PatientsViewModel() { Patients = _patientClient.GetPatients(), AddPatientViewModel = new AddPatientViewModel() }; return(View(model)); }
public ActionResult Index() { var patients = _patientRepository.Patients.ToList(); var model = new PatientsViewModel() { AllPatients = patients }; return(View(model)); }
//Delete private void ExecuteDeletePatientsCommand() { MessageBoxResult res = MessageBox.Show("Are you sure want to delete?", "Confirmation!", MessageBoxButton.YesNo, MessageBoxImage.Question); if (res == MessageBoxResult.Yes) { _dataService.DeletePatient(Selected); PatientsViewModel.UpdatePatients(); } }
private void OnButtonArchived(object sender, EventArgs e) { lblFiled.FontAttributes = FontAttributes.Bold; lblAll.FontAttributes = FontAttributes.None; lblActive.FontAttributes = FontAttributes.None; LineAll.IsVisible = false; LineActive.IsVisible = false; LineFiled.IsVisible = true; BindingContext = new PatientsViewModel("Arquivados"); }
public ActionResult Create(PatientsViewModel model, string redirectUrl) { if (!ModelState.IsValid) { return(View(model)); } var patient = model.Map <Patients>(); Patient.Create(patient); return(RedirectToLocal(redirectUrl)); }
public ActionResult Edit(PatientsViewModel model, string redirectUrl) { var patient = Patient.GetById(model.PatientsId); if (patient != null) { Mapper.Map(model, patient); Patient.Update(patient); } return(RedirectToLocal(redirectUrl)); }
public PatientsPage() { InitializeComponent(); NavigationCacheMode = NavigationCacheMode.Enabled; navigationHelper = new NavigationHelper(this); navigationHelper.LoadState += NavigationHelper_LoadState; navigationHelper.SaveState += NavigationHelper_SaveState; VM = DataContext as PatientsViewModel; VM.ApiSettings = App.ApiSettings; }
public PatientsPage() { var TheViewModel = new PatientsViewModel(); BindingContext = TheViewModel; InitializeComponent(); var task = Task.Run(async() => await _dataServices.GetGenders().ConfigureAwait(false)); _Genders = task.Result; var task2 = Task.Run(async() => await _dataServices.GetBloodGroup().ConfigureAwait(false)); _BloodGroups = task2.Result; }
public PatientsPage() { var TheViewModel = new PatientsViewModel(); BindingContext = TheViewModel; //BloodGroupsListView.ItemsSource = TheViewModel._patientsList.ToList(); InitializeComponent(); //var task = Task.Run(async () => await _dataServices.GetGenders().ConfigureAwait(false)); //var task2 = Task.Run(async () => await _dataServices.GetBloodGroup().ConfigureAwait(false)); //_Genders = TheViewModel._GendersList; //_BloodGroups = TheViewModel._BloodGroupsList; }
public PatientsPage() { try { ViewModel = Resolver.Resolve <PatientsViewModel>(); } catch (Exception ex) { throw ex; } BindingContext = ViewModel; InitializeComponent(); }
public ActionResult Patients() { var usertable = new UserTable <AppMember>(Context); var patients = usertable.GetUserByRole("Patient") .Select(p => new PatientViewModel { Name = toUpperCase(p.UserName), DateBirth = p.DateBirth, Address = p.Address, Email = p.Email.ToLower(), PhoneNumber = p.PhoneNumber, Id = p.Id, CommunicationType = p.CommunicationType }); var patientsModel = new PatientsViewModel(); patientsModel.Patients = patients; return(View(patientsModel)); }
public IActionResult test() { Patient bob = new Patient("Bob", "bobson", "10", "test"); Patient herman = new Patient("herman", "hermanson", "42", "groen"); Patient julius = new Patient("julius", "De vries", "42", "groen"); Patient Tony = new Patient("Tony", "Zhou", "42", "groen"); Patient Ruud = new Patient("Ruud", "Willems", "42", "groen"); Patient Julian = new Patient("Julian", "Tekstra", "42", "groen"); Patient Rens = new Patient("Rens", "van Lieshout", "42", "groen"); Patient Hendrieka = new Patient("Hendrieka", "Hendriks", "42", "groen"); PatientsViewModel model = new PatientsViewModel(new List <Patient> { bob, herman, julius, Tony, Ruud, Julian, Rens, Hendrieka }); return(View(model)); }
public PatientsViewModel ReadOnePatient(int _id) { PatientsEntity _patient = new PatientsRepository().ReadOne(_id); PatientsViewModel doctor_vm = new PatientsViewModel(); doctor_vm = new PatientsViewModel { Id = _patient.Id, PatientNS = _patient.Person.Name + ' ' + _patient.Person.Surname, DoctorNS = _patient.Doctor.Person.Name + ' ' + _patient.Doctor.Person.Surname, Address = _patient.Person.Address, Phone = _patient.Person.Phone, Removed = _patient.Removed }; return(doctor_vm); }
public void Execute(object parameter) { // wyciągnięcie danych z tabeli - patients getter = new PatientsViewModel(); //Deklarujemy zmienną typu PatientsView selectedPatient = getter.InfoPatientGetter(); //SelectedIDPatient = selectedPatient[1]; MessageBoxResult result = MessageBox.Show("Czy na pewno chcesz usunąć pacjenta " + selectedPatient[1] + " " + selectedPatient[2], "Potwierdź usunięcie użytkownika", MessageBoxButton.OKCancel, MessageBoxImage.Warning); switch (result) { case MessageBoxResult.OK: vm.Delete(); break; case MessageBoxResult.Cancel: break; } }
private async Task <ActionResult> ViewPatients(CancellationToken ct) { var cache = new ResponseCache <AgeBounds>(false, DefaultCacheTime.Long, _settings.ResponseCacheEnabled, _settings.ResponseCacheDefaultShortTimeInMinutes, _settings.ResponseCacheDefaultLongTimeInMinutes); var ageBounds = cache.GetValue(Request); if (ageBounds == null) { ageBounds = await _glanceDa.GetAgeBoundsAsync(_credentials, ct); cache.SetValue(Request, ageBounds); } var model = new PatientsViewModel { AgeMax = Math.Ceiling(ageBounds.Max).ToString(System.Globalization.CultureInfo.InvariantCulture), AgeMin = Math.Floor(ageBounds.Min).ToString(System.Globalization.CultureInfo.InvariantCulture), }; return(View(model)); }
private async Task <ActionResult> ViewPatients(CancellationToken ct) { var cache = new ResponseCache <AgeBounds>(false, DefaultCacheTime.Long, _settings.ResponseCacheEnabled, _settings.ResponseCacheDefaultShortTimeInMinutes, _settings.ResponseCacheDefaultLongTimeInMinutes); var ageBounds = cache.GetValue(Request); if (ageBounds == null) { ageBounds = await _glanceDa.GetAgeBoundsAsync(_credentials, ct); cache.SetValue(Request, ageBounds); } var model = new PatientsViewModel { AgeMax = ageBounds.Max, AgeMin = ageBounds.Min, }; return(View(model)); }
public IActionResult Index(string searchParams = "") { var patientsModel = new PatientsViewModel(); patientsModel.Patients = new List <PatientViewModel>(); foreach (var patient in _patientLogic.GetByName(searchParams, false).Where(patient => patient.IsApproved)) { patientsModel.Patients.Add(new PatientViewModel { Id = patient.Id, Name = patient.Name, Age = patient.Age, Disease = new DiseaseViewModel { Id = patient.Disease.Id } }); } return(View(patientsModel)); }
public IActionResult All() { var allActivePatients = this._patientService .GetAllActivePatients(); var patientsViewModel = new PatientsViewModel { Patients = allActivePatients .Select( p => new PatientViewModel { Id = p.Id, FirstName = p.FirstName, LastName = p.LastName, SSN = p.SSN, AverageRating = this._ratingService .GetAveragePatientRating(p.Id), }) .ToArray() }; return(View(patientsViewModel)); }
public IActionResult Delete(PatientsViewModel patient) { new PatientsManager().DeletePatients(patient.Id); return(RedirectToAction("Index")); }
public ViewResult Edit(int?_id) { PatientsViewModel patient = _patientsManager.ReadOnePatient((int)_id); return(View(patient)); }
private async Task<ActionResult> ViewPatients(CancellationToken ct) { var cache = new ResponseCache<AgeBounds>(false, DefaultCacheTime.Long, _settings.ResponseCacheEnabled, _settings.ResponseCacheDefaultShortTimeInMinutes, _settings.ResponseCacheDefaultLongTimeInMinutes); var ageBounds = cache.GetValue(Request); if (ageBounds == null) { ageBounds = await _glanceDa.GetAgeBoundsAsync(_credentials, ct); cache.SetValue(Request, ageBounds); } var model = new PatientsViewModel { AgeMax = Math.Ceiling(ageBounds.Max).ToString(System.Globalization.CultureInfo.InvariantCulture), AgeMin = Math.Floor(ageBounds.Min).ToString(System.Globalization.CultureInfo.InvariantCulture), }; return View(model); }