Exemplo 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);
        }
Exemplo n.º 2
0
 public ExaminationDTO(Model.Users.Doctor doctor, Room room, Period period, Patient patient)
 {
     Doctor  = doctor;
     Room    = room;
     Period  = period;
     Patient = patient;
 }
Exemplo 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;
 }
Exemplo n.º 4
0
 public Hospitalization(User patient, Model.Users.Doctor doctor, Period period, Room room)
 {
     Patient = patient;
     Doctor  = doctor;
     Period  = period;
     Room    = room;
 }
Exemplo 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;
   }
Exemplo 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;
   }
Exemplo 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;
 }
Exemplo 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);
        }
Exemplo n.º 9
0
 public ExaminationDTO(Model.Users.Doctor doctor, Period period)
 {
     Doctor = doctor;
     Period = period;
 }
Exemplo n.º 10
0
 public ExaminationDTO(Model.Users.Doctor doctor, Room room, Period period)
 {
     Doctor = doctor;
     Room   = room;
     Period = period;
 }
Exemplo n.º 11
0
 public Article(DateTime date, PostContent postContent, Doctor author)
 {
     Date        = date;
     PostContent = postContent;
     Author      = author;
 }