/// <summary>
 ///  Get user (identified by SessionData.UserSessionData.CurrentUserId) data from database using CredentialsService and PatientService 
 ///and display data on the page
 /// </summary>
 private void DisplayPatientInfo()
 {
     _credentialsService = new CredentialsService();
     Credentials credentials = _credentialsService.FindById(SessionData.UserSessionData.CurrentUserId);
     _patientService = new PatientService();
     Patient patient = _patientService.FindById(SessionData.UserSessionData.CurrentUserId);
     if (patient != null && credentials != null)
     {
         SetImages();
         labelPatientName.Content = patient.FirstName + " " + patient.LastName;
         labelPatientEmail.Content = credentials.Email;
         labelPatientPhone.Content = patient.PhoneNumber;
         labelPatientAddress.Content = patient.Address;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// using SessionData.UserSessionData finds which user is currently logged in,
 /// using PatientService retrieve data from database about the current user, in order to fill the fields of the edit form
 /// </summary>
 private void PopulateUserForm()
 {
     _patientService = new PatientService();
     _patient        = _patientService.FindById(SessionData.UserSessionData.CurrentUserId);
     if (_patient != null)
     {
         textBoxUserFirstName.Text            = _patient.FirstName;
         textBoxUserLastName.Text             = _patient.LastName;
         textBoxUserAddress.Text              = _patient.Address;
         textBoxUserPhone.Text                = _patient.PhoneNumber;
         datePickerUserBirthdate.SelectedDate = _patient.BirthDate;
         textBoxUserGeneticDisorder.Text      = _patient.GeneticDiseases;
         textBoxUserInsuranceNr.Text          = _patient.InsuranceNumber;
     }
 }
        /// <summary>
        ///  Get user (identified by SessionData.UserSessionData.CurrentUserId) data from database using CredentialsService and PatientService
        ///and display data on the page
        /// </summary>
        private void DisplayPatientInfo()
        {
            _credentialsService = new CredentialsService();
            Credentials credentials = _credentialsService.FindById(SessionData.UserSessionData.CurrentUserId);

            _patientService = new PatientService();
            Patient patient = _patientService.FindById(SessionData.UserSessionData.CurrentUserId);

            if (patient != null && credentials != null)
            {
                SetImages();
                labelPatientName.Content    = patient.FirstName + " " + patient.LastName;
                labelPatientEmail.Content   = credentials.Email;
                labelPatientPhone.Content   = patient.PhoneNumber;
                labelPatientAddress.Content = patient.Address;
            }
        }
        public DoctorAppointmentAssignResult(int appoitnmentId)
        {
            InitializeComponent();
            groupBox.Visibility = Visibility.Hidden;
            h_date.Visibility = Visibility.Hidden;
            h_diagnosis.Visibility = Visibility.Hidden;
            h_medication.Visibility = Visibility.Hidden;
            h_symptoms.Visibility = Visibility.Hidden;
            h_results.Visibility = Visibility.Hidden;
            _appointmentService = new AppointmentService();
            _patientService = new PatientService();
            _resultsService = new ResultsService();

            _selectedAppointment = _appointmentService.FindById(appoitnmentId);
            _selectedPatient = _patientService.FindById(_selectedAppointment.IdPacient);

            nameLabel.Content = _selectedPatient.FirstName + " " + _selectedPatient.LastName;
            insuranceNumberLabel.Content = _selectedPatient.InsuranceNumber;
            geneticDisorderLabel.Content = _selectedPatient.GeneticDiseases;
        }
Exemplo n.º 5
0
        public DoctorAppointmentAssignResult(int appoitnmentId)
        {
            InitializeComponent();
            groupBox.Visibility     = Visibility.Hidden;
            h_date.Visibility       = Visibility.Hidden;
            h_diagnosis.Visibility  = Visibility.Hidden;
            h_medication.Visibility = Visibility.Hidden;
            h_symptoms.Visibility   = Visibility.Hidden;
            h_results.Visibility    = Visibility.Hidden;
            _appointmentService     = new AppointmentService();
            _patientService         = new PatientService();
            _resultsService         = new ResultsService();

            _selectedAppointment = _appointmentService.FindById(appoitnmentId);
            _selectedPatient     = _patientService.FindById(_selectedAppointment.IdPacient);

            nameLabel.Content            = _selectedPatient.FirstName + " " + _selectedPatient.LastName;
            insuranceNumberLabel.Content = _selectedPatient.InsuranceNumber;
            geneticDisorderLabel.Content = _selectedPatient.GeneticDiseases;
        }
Exemplo n.º 6
0
 public PatientModel FindById(int id)
 {
     return(patientService.FindById(id));
 }
Exemplo n.º 7
0
        //
        // GET: /Patient/Edit/5

        public ActionResult Edit(int id)
        {
            Patient Model = Service.FindById(id);

            return(View(Model));
        }
 /// <summary>
 /// using SessionData.UserSessionData finds which user is currently logged in,
 /// using PatientService retrieve data from database about the current user, in order to fill the fields of the edit form
 /// </summary>
 private void PopulateUserForm()
 {
     _patientService = new PatientService();
     _patient = _patientService.FindById(SessionData.UserSessionData.CurrentUserId);
     if (_patient != null)
     {
         textBoxUserFirstName.Text = _patient.FirstName;
         textBoxUserLastName.Text = _patient.LastName;
         textBoxUserAddress.Text = _patient.Address;
         textBoxUserPhone.Text = _patient.PhoneNumber;
         datePickerUserBirthdate.SelectedDate = _patient.BirthDate;
         textBoxUserGeneticDisorder.Text = _patient.GeneticDiseases;
         textBoxUserInsuranceNr.Text = _patient.InsuranceNumber;
     }
 }