public void AddAppointmentToCalendar(Patient patient, Doctor doctor) { SingleSchedule newScheduleItem = new SingleSchedule { Name = String.Format("Appointment for {0} with Dr. {1}", patient.contactInformation.Name, doctor.contactInformation.Name), TimeOfDay = patient.preferredTime, Date = patient.preferredDate, Patient = patient.contactInformation.Name, Doctor = doctor.contactInformation.Name, ID = GetAppointmentNumber() }; doctor.schedules.Add(newScheduleItem); doctor.GenerateCalendar(); Appointment appointment = doctor.getAppointmentByPatient(patient.contactInformation.Name); doctor.UpdateCalendar(appointment); }
public Data BuildDataObject(Patient patient, Doctor doctor) { Appointment apt = doctor.getAppointmentByPatient(patient.contactInformation.Name); return new Data(patient.contactInformation, doctor.contactInformation.Name, apt, patient.insurance, patient.symptom); }
public void removeAppointmentFromCalendar(Patient patient, Doctor doctor) { Appointment appointment = doctor.getAppointmentByPatient(patient.contactInformation.Name); doctor.calendar.Remove(appointment); doctor.scheduleWriter.RemoveSchedule(appointment); }