Class: Eaternet::Agencies::SnhdConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/eaternet/agencies/snhd_config.rb

Constant Summary collapse

DOWNLOAD_URL =
'http://southernnevadahealthdistrict.org/restaurants/download/restaurants.zip'
COLUMN_SEPARATOR =
';'
QUOTE_CHARACTER =

TODO: Verify this with SNHD.

'|'
CSV_SCHEMA =

The SNHD CSV does not have a true header row. And so, this data structure provides the column names.

{
  'restaurant_inspections.csv' => %w(
    serial_number
    permit_number
    inspection_date
    inspection_time
    employee_id
    inspection_type_id
    inspection_demerits
    inspection_grade
    permit_status
    inspection_result
    violations
    record_updated
  ),
  'restaurant_establishments.csv' => %w(
    permit_number
    facility_id
    PE
    restaurant_name
    location_name
    address
    latitude
    longitude
    city_id
    city_name
    zip_code
    nciaa
    plan_review
    record_status
    current_grade
    current_demerits
    date_current
    previous_grade
    date_previous
  ),
  'restaurant_inspection_violations.csv' => %w(
    inspection_violation_id
    inspection_id
    inspection_violation
  ),
  'restaurant_violations.csv' => %w(
    violation_id
    violation_code
    violation_sort
    violation_demerits
    violation_description
  )
}