= simple_form_for filter_form,
                  as: :q,
                  url: hd_mdm_patients_path,
                  method: :get,
                  html: { autocomplete: "off" },
                  wrapper: :horizontal_form do |f|
  .row
    .medium-4.columns
      = f.input :hospital_unit_id,
          collection: Renalware::Hospitals::Centre.with_hd_sites.ordered,
          as: :grouped_select, group_method: :hd_sites,
          label: t(".hospital_unit")

    .medium-4.columns
      = f.input :schedule_definition_ids,
          collection: Renalware::HD::ScheduleDefinitionFilter.all,
          label_method: :days,
          value_method: :ids,
          include_blank: true,
          label:  t(".schedule")

    .medium-4.columns.actions
      = f.submit t("helpers.submit.filter"), class: "button", name: nil
      span= " or "
      = link_to t("helpers.reset"), hd_mdm_patients_path

= simple_form_for filter_form,
                  as: :q,
                  url: hd_mdm_patients_path,
                  method: :get,
                  html: { autocomplete: "off" },
                  wrapper: :horizontal_form do |f|
  .row
    .medium-4.columns
      = f.input :hospital_unit_id,
          collection: Renalware::Hospitals::Centre.with_hd_sites.ordered,
          as: :grouped_select, group_method: :hd_sites,
          label: t(".hospital_unit")

    .medium-4.columns
      = f.input :schedule_definition_ids,
          collection: Renalware::HD::ScheduleDefinitionFilter.order('ids::text').all,
          label_method: :days,
          value_method: :ids,
          include_blank: true,
          label:  t(".schedule")

    .medium-4.columns.actions
      = f.submit t("helpers.submit.filter"), class: "button", name: nil
      span= " or "
      = link_to t("helpers.reset"), hd_mdm_patients_path

Fix order issue on Heroku
Fix order issue on Heroku

Ordering by ids::text in the view does not guarantee the the order
so applying in the view

airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core