Beispiel #1
0
        public bool canGoOnVacation(Physitian physitian, TimeInterval timeInterval)
        {
            bool isNotOnVacation = !physitian.IsOnVacation(timeInterval);
            bool isNotScheduled  = !IsPhysitianScheduled(physitian, timeInterval);

            return(isNotOnVacation && isNotScheduled);
        }
Beispiel #2
0
        public bool IsPhysitianAvailable(Physitian physitian, TimeInterval timeInterval)
        {
            bool isTheirShift    = physitian.IsTheirShift(timeInterval);
            bool isNotOnVacation = !physitian.IsOnVacation(timeInterval);
            bool isNotScheduled  = !IsPhysitianScheduled(physitian, timeInterval);

            return(isTheirShift && isNotOnVacation && isNotScheduled);
        }
Beispiel #3
0
 public InpatientCareService(Physitian loggedPhysitian)
 {
     this.loggedPhysitian          = loggedPhysitian;
     this.roomBedTypeRepository    = new RoomBedTypeFileSystem();
     this.inpatientCareRepository  = new InpatientCareFileSystem();
     this.bedReservationRepository = new BedReservationFileSystem();
     this.roomRepository           = new RoomFileSystem();
 }
Beispiel #4
0
 public PhysitianHospitalAccountsController(Physitian loggedPhysitian)
 {
     this.loggedPhysitian          = loggedPhysitian;
     this.hospitalService          = new HospitalService();
     this.reportService            = new ReportService();
     this.patientAccountsService   = new PatientAccountsService();
     this.physitianScheduleService = new PhysitianScheduleService(loggedPhysitian);
 }
Beispiel #5
0
 public bool IsPhysitianAvailableAtAnyTime(Physitian physitian, List <TimeInterval> timeIntervals)
 {
     foreach (TimeInterval timeInterval in timeIntervals)
     {
         if (IsPhysitianAvailable(physitian, timeInterval))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #6
0
        private AppointmentDTO createAppointment(Physitian physitian, Room room, TimeInterval timeInterval)
        {
            AppointmentDTO appointment = new AppointmentDTO();

            appointment.ProcedureType = appointmentPreferrences.ProcedureType;
            appointment.Patient       = appointmentPreferrences.Patient;
            appointment.Time          = timeInterval;
            appointment.Physitian     = physitian;
            appointment.Room          = room;
            return(appointment);
        }
Beispiel #7
0
        public ExamController(Appointment appointment)
        {
            this.loggedPhysitian = appointment.Physitian;
            this.SelectedPatient = appointment.Patient;
            ProcedureType procedure = appointment.ProcedureType;

            reportService = new ReportService();

            String patientConditions = this.GetPatientConditions();

            this.CurrentReport = new Report(DateTime.Today, "", selectedPatient, loggedPhysitian, patientConditions);
        }
        private bool IsPatientScheduledForPhysitian(Patient patient, Physitian physitian)
        {
            List <Appointment> patientAppointments = appointmentRepository.GetAppointmentsByPatient(patient);

            foreach (Appointment appointment in patientAppointments)
            {
                if (appointment.Physitian.Equals(physitian))
                {
                    return(true);
                }
            }
            return(false);
        }
Beispiel #9
0
        public List <Appointment> GetAppointmentsByPhysitian(Physitian physitian)
        {
            List <Appointment> appointments = new List <Appointment>();

            foreach (Appointment appointment in GetAll())
            {
                if (physitian.Equals(appointment.Physitian))
                {
                    appointments.Add(appointment);
                }
            }
            return(appointments);
        }
Beispiel #10
0
        private bool IsPhysitianScheduled(Physitian physitian, TimeInterval timeInterval)
        {
            List <Appointment> appointments = appointmentRepository.GetAppointmentsByPhysitian(physitian);

            foreach (Appointment appointment in appointments)
            {
                if (timeInterval.IsOverLapping(appointment.TimeInterval))
                {
                    return(true);
                }
            }
            return(false);
        }
        public List <Patient> getPatientsForPhysitian(Physitian physitian)
        {
            List <Patient> allPatients = patientRepository.GetAll();
            List <Patient> patients    = new List <Patient>();

            foreach (Patient patient in allPatients)
            {
                if (IsPatientScheduledForPhysitian(patient, physitian))
                {
                    patients.Add(patient);
                }
            }
            return(patients);
        }
Beispiel #12
0
 public void RemovePhysitian(Physitian oldPhysitian)
 {
     if (oldPhysitian == null)
     {
         return;
     }
     if (this.physitian != null)
     {
         if (this.physitian.Contains(oldPhysitian))
         {
             this.physitian.Remove(oldPhysitian);
         }
     }
 }
Beispiel #13
0
 public void AddPhysitian(Physitian newPhysitian)
 {
     if (newPhysitian == null)
     {
         return;
     }
     if (this.physitian == null)
     {
         this.physitian = new List <Physitian>();
     }
     if (!this.physitian.Contains(newPhysitian))
     {
         this.physitian.Add(newPhysitian);
     }
 }
 public PhysitianScheduleService(Physitian loggedPhysitian)
 {
     this.loggedPhysitian       = loggedPhysitian;
     this.appointmentRepository = new AppointmentFileSystem();
 }
 public InpatientCareController(Physitian loggedPhysitian)
 {
     this.loggedPhysitian      = loggedPhysitian;
     this.inpatientCareService = new InpatientCareService(loggedPhysitian);
 }
 internal void RemoveVacation(TimeInterval timeInterval, Physitian physitianDTO)
 {
     physitianDTO.RemoveVacationTime(timeInterval);
     physitianRepository.Update(physitianDTO);
 }
Beispiel #17
0
 public List <Patient> GetPatientsByPhysitian(Physitian physitian)
 {
     throw new NotImplementedException();
 }
 internal void DeletePhysician(Physitian physitian)
 {
     physitianRepository.Delete(physitian.SerialNumber);
 }
 internal void NewPhysician(Physitian physitian)
 {
     physitianRepository.Save(physitian);
 }
 internal void EditPhysician(Physitian physitian)
 {
     physitianRepository.Update(physitian);
 }
 internal List <TimeInterval> GetAllVacations(Physitian physitianDTO)
 {
     return(physitianRepository.GetById(physitianDTO.SerialNumber).VacationTime);
 }
Beispiel #22
0
 public PhysitianScheduleController(Physitian loggedPhysitian)
 {
     this.loggedPhysitian          = loggedPhysitian;
     this.physitianScheduleService = new PhysitianScheduleService(loggedPhysitian);
 }