Exemplo n.º 1
0
 public Examination(int id, TypeOfExamination typeOfExamination, DateTime dateAndTime, string anamnesis, Doctor doctor, Room room,
                    PatientCard patientCard, bool isSurveyCompleted = false, ExaminationStatus examinationStatus = ExaminationStatus.CREATED)
 {
     Id          = id;
     Type        = typeOfExamination;
     DateAndTime = dateAndTime;
     Anamnesis   = anamnesis;
     if (doctor == null)
     {
         Doctor = new Doctor();
     }
     else
     {
         Doctor = new Doctor(doctor);
     }
     if (room == null)
     {
         Room = new Room();
     }
     else
     {
         Room = new Room(room);
     }
     if (patientCard == null)
     {
         PatientCard = new PatientCard();
     }
     else
     {
         PatientCard = new PatientCard(patientCard);
     }
     Therapies         = new List <Therapy>();
     ExaminationStatus = examinationStatus;
     IsSurveyCompleted = isSurveyCompleted;
 }
Exemplo n.º 2
0
 public Examination(int id, TypeOfExamination typeOfExamination, DateTime dateAndTime, Model.Users.Doctor doctor, Room room, PatientCard patientCard)
 {
     IdExamination = id;
     Type          = typeOfExamination;
     DateAndTime   = dateAndTime;
     if (doctor != null)
     {
         this.doctor = new Model.Users.Doctor(doctor);
     }
     else
     {
         this.doctor = new Model.Users.Doctor();
     }
     if (room != null)
     {
         this.room = new Room(room);
     }
     else
     {
         this.room = new Room();
     }
     if (patientCard != null)
     {
         this.patientCard = new PatientCard(patientCard);
     }
     else
     {
         this.patientCard = new PatientCard();
     }
 }
        private void buttonMakeAppointment_Click(object sender, RoutedEventArgs e)
        {
            if (comboBoxDoctor.Text.Equals("") || datePickerExamination.Text.Equals("") || comboBoxAppointemtTime.Text.Equals(""))
            {
                ValidationMessageWindow validationWindow = new ValidationMessageWindow();
                validationWindow.Show();
            }
            else
            {
                patientCard = patientCardController.ViewPatientCard(MainWindow.patient.Jmbg);
                int               lastId                 = examinationController.getLastId();
                DateTime          dateAndTime            = (DateTime)datePickerExamination.SelectedDate;
                string            date                   = dateAndTime.ToShortDateString();
                string            time                   = comboBoxAppointemtTime.Text;
                DateTime          dateAndTimeExamination = Convert.ToDateTime(date + " " + time, CultureInfo.InvariantCulture);
                TypeOfExamination general                = TypeOfExamination.Opsti;
                doctor = (Doctor)comboBoxDoctor.SelectedItem;

                Examination examination = examinationController.ScheduleExamination(new Examination(++lastId, general, dateAndTimeExamination, doctor, doctor.DoctorsOffice, patientCard));

                if (examination == null)
                {
                    BusyTermWindow busyTermWindow = new BusyTermWindow();
                    busyTermWindow.caption.Text = "Termin koji ste izabrali " + date + " " + time + " " + "je već zauzet kod doktora " + doctor.Name + " " + doctor.Surname + " " + doctor.Jmbg;
                    busyTermWindow.Show();
                }
                else
                {
                    ReviewExaminationsWindow reviewExaminationsWindow = new ReviewExaminationsWindow();
                    reviewExaminationsWindow.Show();
                    this.Close();
                }
            }
        }
Exemplo n.º 4
0
        internal static ExaminationType ToExaminationType(this TypeOfExamination type)
        {
            switch (type)
            {
            case TypeOfExamination.GENERAL:
                return(ExaminationType.Examination);

            default:
                return(ExaminationType.Surgery);
            }
        }