public PatientsPageViewModel()
 {
     _viewModel = new PatientsViewModel();
     _allPatients = _viewModel.AllPatients;
     _patientsForDisplay = _allPatients;
     _receptionist = new Receptionist();
     _windowFactory = new ProductionWindowFactory();
 }
 public AppointmentsPageViewModel()
 {
     _viewModel = new AppointmentsViewModel();
     _allAppointments = _viewModel.AllAppointments;
     _appointmentsForDisplay = _allAppointments;
     _receptionist = new Receptionist();
     _windowFactory = new ProductionWindowFactory();
 }
 public CasesPageViewModel()
 {
     this._viewModel = new CasesViewModel();
     this._cases = _viewModel.AllCases;
     this._casesForDisplay = this._cases;
     this._receptionist = new Receptionist();
     this._windowFactory = new ProductionWindowFactory();
 }
 public ScheduleAppointmentWindowViewModel(CaseViewModel caseVM)
 {
     this._caseViewModel = caseVM;
     this._database = new Database();
     this._doctorsVM = new DoctorsViewModel();
     this._allDoctors = _doctorsVM.AllDoctors;
     _patientName = caseVM.PatientName + " " + caseVM.PatientSurname;
     _receptionist = new Receptionist();
     List<String> appointmentTimes = this.getListOfAppointmentTimes();
     _appointmentTimes = this.createObservableCollectionOfAppointmentTimes(appointmentTimes);
 }
        public void registerNewPatient()
        {
            DateTime now = DateTime.Now;
            _patient = new Patient(Name, Surname, Gender, DateOfBirth, Convert.ToInt32(MobileNumber), Email, now);
            _receptionist = new Receptionist();

            try
            {
                _receptionist.registerNewPatient(_patient);
                _medicalCard = new MedicalCard(_patient.getPatientIDFromDb());
                _receptionist.createMedicalCard(_medicalCard);
                _receptionist.updatePatientMedicalCard(_patient, _medicalCard);
                CloseAction.Invoke();
            }
            catch (MySqlException ex)
            {
                ErrorMessage = "Problem with writing data(MySQLException)";
            }
        }
 public CaseAddPageViewModel(PatientViewModel patient)
 {
     this._patient = patient;
     this._patientName = "" + patient.Name + " " + patient.Surname;
     this._receptionist = new Receptionist();
 }