public bool canGoOnVacation(Physitian physitian, TimeInterval timeInterval) { bool isNotOnVacation = !physitian.IsOnVacation(timeInterval); bool isNotScheduled = !IsPhysitianScheduled(physitian, timeInterval); return(isNotOnVacation && isNotScheduled); }
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); }
public InpatientCareService(Physitian loggedPhysitian) { this.loggedPhysitian = loggedPhysitian; this.roomBedTypeRepository = new RoomBedTypeFileSystem(); this.inpatientCareRepository = new InpatientCareFileSystem(); this.bedReservationRepository = new BedReservationFileSystem(); this.roomRepository = new RoomFileSystem(); }
public PhysitianHospitalAccountsController(Physitian loggedPhysitian) { this.loggedPhysitian = loggedPhysitian; this.hospitalService = new HospitalService(); this.reportService = new ReportService(); this.patientAccountsService = new PatientAccountsService(); this.physitianScheduleService = new PhysitianScheduleService(loggedPhysitian); }
public bool IsPhysitianAvailableAtAnyTime(Physitian physitian, List <TimeInterval> timeIntervals) { foreach (TimeInterval timeInterval in timeIntervals) { if (IsPhysitianAvailable(physitian, timeInterval)) { return(true); } } return(false); }
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); }
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); }
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); }
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); }
public void RemovePhysitian(Physitian oldPhysitian) { if (oldPhysitian == null) { return; } if (this.physitian != null) { if (this.physitian.Contains(oldPhysitian)) { this.physitian.Remove(oldPhysitian); } } }
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); }
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); }
public PhysitianScheduleController(Physitian loggedPhysitian) { this.loggedPhysitian = loggedPhysitian; this.physitianScheduleService = new PhysitianScheduleService(loggedPhysitian); }