Esempio n. 1
0
        public Model.Users.Doctor SetDoctor(Model.Users.Doctor doctor)
        {
            // TODO: implement
            List <Doctor> doctorList = ReadFromFile();

            foreach (Doctor d in doctorList)
            {
                if (d.Jmbg.Equals(doctor.Jmbg))
                {
                    d.Name             = doctor.Name;
                    d.Surname          = doctor.Surname;
                    d.Gender           = doctor.Gender;
                    d.DateOfBirth      = doctor.DateOfBirth;
                    d.City             = doctor.City;
                    d.Phone            = doctor.Phone;
                    d.Email            = doctor.Email;
                    d.HomeAddress      = doctor.HomeAddress;
                    d.Username         = doctor.Username;
                    d.Password         = doctor.Password;
                    d.NumberOfLicence  = doctor.NumberOfLicence;
                    d.Type             = doctor.Type;
                    d.DoctorsOffice    = doctor.DoctorsOffice;
                    d.DateOfEmployment = doctor.DateOfEmployment;

                    break;
                }
            }
            WriteInFile(doctorList);
            return(null);
        }
Esempio n. 2
0
 public ExaminationDTO(Model.Users.Doctor doctor, Room room, Period period, Patient patient)
 {
     Doctor  = doctor;
     Room    = room;
     Period  = period;
     Patient = patient;
 }
Esempio n. 3
0
 public ValidationMed(string sideNotes, bool approved, Medication medication, Doctor doctor)
 {
     this.sideNotes  = sideNotes;
     this.approved   = approved;
     this.medication = medication;
     this.doctor     = doctor;
 }
Esempio n. 4
0
 public Hospitalization(User patient, Model.Users.Doctor doctor, Period period, Room room)
 {
     Patient = patient;
     Doctor  = doctor;
     Period  = period;
     Room    = room;
 }
Esempio n. 5
0
 public bool CheckDoctorAvailability(Model.Users.Doctor doctor, DateTime dateAndTime)
 {
       List<Examination> scheduledExaminations = ReadFromFile();
       foreach (Examination e in scheduledExaminations)
       {
           if (DateTime.Compare(e.DateAndTime, dateAndTime) == 0  && e.doctor.Jmbg.Equals(doctor.Jmbg))
           {
               return false;
           }
       }
       return true;
   }
Esempio n. 6
0
 public Examination GetExaminationByDoctorDateAndTime(Model.Users.Doctor doctor, DateTime dateAndTime)
 {
       List<Examination> scheduledExaminations = ReadFromFile();
       foreach (Examination e in scheduledExaminations)
       {
           if (DateTime.Compare(dateAndTime, e.DateAndTime) == 0  && e.doctor.Jmbg.Equals(doctor.Jmbg))
           {
               return e;
           }
       }
       return null;
   }
Esempio n. 7
0
 public List<Examination> GetExaminationsByDoctorAndDate(Model.Users.Doctor doctor, DateTime dateAndTime)
 {
     List<Examination> result = new List<Examination>();
     List<Examination> scheduledExaminations = ReadFromFile();
     foreach (Examination e in scheduledExaminations)
     {
         if (e.DateAndTime.ToString().Equals(dateAndTime.ToString()) && e.doctor.Jmbg.Equals(doctor.Jmbg))
         {
             result.Add(e);
         }
     }
     return result;
 }
Esempio n. 8
0
        public Model.Users.Doctor NewDoctor(Model.Users.Doctor doctor)
        {
            // TODO: implement
            List <Doctor> doctorList   = ReadFromFile();
            Doctor        searchDoctor = GetDoctor(doctor.Jmbg);

            if (searchDoctor != null)
            {
                return(null);
            }

            doctorList.Add(doctor);
            WriteInFile(doctorList);

            return(doctor);
        }
Esempio n. 9
0
 public ExaminationDTO(Model.Users.Doctor doctor, Period period)
 {
     Doctor = doctor;
     Period = period;
 }
Esempio n. 10
0
 public ExaminationDTO(Model.Users.Doctor doctor, Room room, Period period)
 {
     Doctor = doctor;
     Room   = room;
     Period = period;
 }
Esempio n. 11
0
 public Article(DateTime date, PostContent postContent, Doctor author)
 {
     Date        = date;
     PostContent = postContent;
     Author      = author;
 }