Sha256: 9804e4cc68620e4e12c7825eee32556cf3438f244fdc510f89ba0f5e00a8b994

Contents?: true

Size: 1.21 KB

Versions: 93

Compression:

Stored size: 1.21 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"
      |  
      span or
      |  
      = link_to "Reset", medications_esa_prescriptions_path
      /class: "cancel-link #{'disabled' unless searching}"

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
renalware-core-2.0.146 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.145 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.144 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.143 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.142 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.141 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.140 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.139 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.138 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.137 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.136 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.135 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.134 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.133 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.132 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.131 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.130 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.129 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.128 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.127 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim