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