class VaccinationReport
Attributes
Public Instance Methods
Source
# File app/models/vaccination_report.rb, line 26 def csv_data exporter_class.call( team:, programme:, academic_year:, start_date: date_from, end_date: date_to ) end
Source
# File app/models/vaccination_report.rb, line 36 def csv_filename return nil if invalid? from_str = date_from&.to_fs(:long) || "earliest" to_str = date_to&.to_fs(:long) || "latest" "#{programme.name} - #{file_format} - #{from_str} - #{to_str}.csv" end
Source
# File app/models/vaccination_report.rb, line 45 def file_formats common_file_formats = %w[mavis systm_one] if team.careplus_enabled? common_file_formats + ["careplus"] else common_file_formats end end
Source
# File app/models/vaccination_report.rb, line 18 def programme Programme.find(programme_type) if programme_type end
Source
# File app/models/vaccination_report.rb, line 22 def programme=(value) self.programme_type = value.type end