Sha256: 0c4c3208521c660ce80b48b097e5b95c7ff1265c056e39dd07a6baac9b8174b2

Contents?: true

Size: 1.37 KB

Versions: 28

Compression:

Stored size: 1.37 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
  = 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.search_field search_scope, placeholder: t(".search_prompt")
      = f.input :patient_given_name_or_patient_family_name_or_drug_name_or_patient_local_patient_id_cont,
                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"
      |  
      span or
      |  
      = link_to "Reset", medications_esa_prescriptions_path
      /class: "cancel-link #{'disabled' unless searching}"

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
renalware-core-2.0.41 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.40 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.39 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.38 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.37 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.36 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.35 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.34 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.33 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.32 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.31 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.30 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.28 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.27 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.26 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.25 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.24 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.23 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.22 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.21 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim