def save_data(self):
     """One by one saves serialized appointments to database."""
     LOGGER.info('------------------------------')
     LOGGER.info('|         Save Data           |')
     LOGGER.info('------------------------------')
     rec_count = 1
     total = len(self.serialized_appointments)
     LOGGER.info('Saving appointments to database. Count: %i', total)        
     for appt in self.serialized_appointments:
         LOGGER.info('Saving appointment (%i of %i). Alt appointment id: %s', rec_count, total, appt.altAppointmentId)
         save_appointment(appt.__dict__)
         rec_count = rec_count + 1
 def save_data(self):
     """
         Save serialized data in database, make changes in table : Patient, Appointment, Doctor, Facility
         
     """
     LOGGER.info("-------------------------------")
     LOGGER.info("|         Save Data           |")
     LOGGER.info("-------------------------------")
     LOGGER.info("Saving appointments to database. Count: %s" % (len(self.serialized_appointments)))
     number = 1
     for appt in self.serialized_appointments:
         LOGGER.info(
             "Saving appointment (%s of %s). Alt appointment id: %s"
             % (number, len(self.serialized_appointments), appt.altAppointmentId)
         )
         appt.altFacilityId = 1
         number += 1
         save_appointment(appt.__dict__)