public TherapyTracker.CompletedAppointment GetCompletedAppointmentTime(TherapyTracker.Appointment Appointment) { TherapyTracker.CompletedAppointment completedAppointment = TransferScheduledAppointmentToCompletedAppointment(Appointment); completedAppointment.startTime = GetStartTime(); completedAppointment.endTime = GetEndTime(completedAppointment.startTime); return(completedAppointment); }
public void AddAppointment() { TherapyTracker.Patient holdPatient = menu.SelectPatient(); DateTime startTime = GetStartTime(); DateTime endTime = GetEndTime(startTime); Appointment newAppointment = new TherapyTracker.Appointment(startTime, endTime, holdPatient); userTherapist.AddAppointment(newAppointment); }
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); }