Sha256: cf08439dac9ae09b55a0610409b33bc3a5ff77b88d904607151bd285073cc6d7

Contents?: true

Size: 934 Bytes

Versions: 30

Compression:

Stored size: 934 Bytes

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?
.filters
  .row
    = search_form_for(search, url: medications_esa_prescriptions_path) do |f|
      .small-7.medium-7.large-5.columns
        = f.search_field search_scope, placeholder: t(".search_prompt")
      .small-5.medium-5.columns.end
        = f.submit "Search", class: "button"
        = link_to t(".clear-search"),
                  medications_esa_prescriptions_path,
                  class: "cancel-link #{'disabled' unless searching}"

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc1 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta12 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta11 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta10 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta9 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta8 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta7 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta6 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta5 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim
renalware-core-2.0.0.pre.beta4 app/views/renalware/medications/drug_types/prescriptions/_filters.html.slim