Sha256: f16c25d445ee575f5948f078ff6be025e0bd41e577ecb984e7fad60725cd556e
Contents?: true
Size: 1.21 KB
Versions: 5
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 = 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
5 entries across 5 versions & 1 rubygems