private void addNewPatientKioskBooking(PatientKioskBookingVoCollection patientKioskBookingCol, Booking_AppointmentVo booking_AppointmentVo) { if(patientKioskBookingCol == null) throw new CodingRuntimeException("Cannot add on a null collection!"); if(booking_AppointmentVo == null) return; PatientKioskPatientVo newPatient = null; if(booking_AppointmentVo.getPatientIsNotNull()) { newPatient = populatePatientKioskFromBookingAppointment(booking_AppointmentVo.getPatient()); } if(newPatient != null) { PatientKioskAppointmentVoCollection newAppointmentCol = new PatientKioskAppointmentVoCollection(); PatientKioskAppointmentVo newAppointment = new PatientKioskAppointmentVo(); newAppointment.setName(booking_AppointmentVo.getSessionIsNotNull() ? booking_AppointmentVo.getSession().getName() : null); newAppointment.setDate(booking_AppointmentVo.getAppointmentDate()); newAppointment.setTime(booking_AppointmentVo.getApptStartTime()); newAppointment.setID(booking_AppointmentVo.getID_Booking_Appointment()); newAppointmentCol.add(newAppointment); PatientKioskBookingVo newPatientKiosBooking = new PatientKioskBookingVo(); newPatientKiosBooking.setPatient(newPatient); newPatientKiosBooking.setAppointments(newAppointmentCol); patientKioskBookingCol.add(newPatientKiosBooking); } }