public TherapyTracker.CompletedAppointment GetCompletedAppointmentTime(TherapyTracker.Appointment Appointment) { TherapyTracker.CompletedAppointment completedAppointment = TransferScheduledAppointmentToCompletedAppointment(Appointment); completedAppointment.startTime = GetStartTime(); completedAppointment.endTime = GetEndTime(completedAppointment.startTime); return(completedAppointment); }
public void AddCompleteAppointment(CompletedAppointment CompletedAppointment) { completedSchedule.Add(CompletedAppointment); CompletedAppointment.AddMinutesToPatient(); CompletedAppointment.patientIdentifier.DetermineRUG(); Console.WriteLine("\nAn appointment has been COMPLETED with " + CompletedAppointment.patientIdentifier.name); Console.WriteLine("Starting at " + CompletedAppointment.startTime + " and ending at " + CompletedAppointment.endTime + ".\n"); RemovePreviousAppointment(CompletedAppointment); }
public void RemovePreviousAppointment(CompletedAppointment Appointment) { foreach (Appointment appointment in schedule) { if (appointment.appointmentID == Appointment.appointmentID) { schedule.Remove(appointment); break; } } }
public void CompleteAppointment() { TherapyTracker.Appointment appointmentToComplete = GetAppointment(); Console.WriteLine("Did you complete the session as originally scheduled?\n"); Console.WriteLine("(1)Yes or (2)No\n"); int userInput = VerifyOneOrTwo(); if (userInput == 1) { TherapyTracker.CompletedAppointment completed = TransferScheduledAppointmentToCompletedAppointment(appointmentToComplete); userTherapist.AddCompleteAppointment(completed); } else { TherapyTracker.CompletedAppointment completed = GetCompletedAppointmentTime(appointmentToComplete); userTherapist.AddCompleteAppointment(completed); } }
public TherapyTracker.CompletedAppointment TransferScheduledAppointmentToCompletedAppointment(TherapyTracker.Appointment Appointment) { TherapyTracker.CompletedAppointment completedAppointment = new TherapyTracker.CompletedAppointment(Appointment.startTime, Appointment.endTime, Appointment.patientIdentifier); completedAppointment.appointmentID = Appointment.appointmentID; return(completedAppointment); }