Open kshannon opened 3 years ago
The importer currently does not handle updates. I think it needs to check for a compound key of location_id and date, this also assumes that each location can only have one "appointment" record per date. This might break how some organizations provide appointments (e.g. 500 appointments on fri the 13th.) However, I can use that number and store it in the vaccines_available column, as that acts as a fairly good surrogate for number of appts.
Currently csv importing is weakly done via a self.import function in the appointment model, via an import method in the appointment controller. This should be a separate
import_appointment.rb
model andimport_appointment_controller.rb
file with its own view so we can pass back errors on rows and handle validations with grace.But for now as a one off for myself the csv importer works.