Sha256: 87a82ca6a4066d42bf14e733a2d3d95d8d82bfa5c9ff09d3167db47f638cc8f8

Contents?: true

Size: 1.18 KB

Versions: 19

Compression:

Stored size: 1.18 KB

Contents

/ # TODO: This search scope isn't very maintainable - move to a scope on the query object once
/         I understand how to define this in Arel? Ideally the local_patient_id
/         should be an eq match and the other fields a cont (ilike)?
/         Note also we should really extend this so it searches all local_patient_ids
- search_scope = :patient_given_name_or_patient_family_name_or_drug_name_or_patient_local_patient_id_cont
- searching = search.send(search_scope).present?
.search-form.filters.row
  = simple_form_for search,
    url: medications_esa_prescriptions_path,
    method: :get do |f|
    /= search_form_for(search, url: medications_esa_prescriptions_path) do |f|
    .small-6.columns
      = f.input search_scope, label: t(".search_prompt")
    .small-3.columns
      = f.input :provider_eq,
                include_blank: true,
                collection: Renalware::Medications::Provider.codes.each_with_index.map{ |x, i| [x.to_s.humanize, i] },
                label: "Provider"
    .small-3.columns.actions.end
      = f.submit "Search", class: "button"
      '  or
      = link_to "Reset", medications_esa_prescriptions_path
      /class: "cancel-link #{'disabled' unless searching}"

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
renalware-core-2.0.167 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.166 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.165 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.164 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.163 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.162 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.161 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.160 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.159 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.158 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.157 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.156 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.155 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.153 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.152 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.151 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.149 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.148 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.147 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim