Sha256: 91031a70634198a89e41cab6c9b9b8bdce2f2ebd737f4992504baeba4fac62dc

Contents?: true

Size: 793 Bytes

Versions: 4

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/renal"

module Renalware
  module Renal
    class AKIAlertSearchForm
      include ActiveModel::Model
      include Virtus::Model

      attribute :hospital_unit_id, Integer
      attribute :hospital_ward_id, Integer
      attribute :action, String
      attribute :term, String
      attribute :on_hotlist, String
      attribute :s, String

      def query
        @query ||= begin
          options = {
            identity_match: term,
            hospital_ward_id_eq: hospital_ward_id,
            hospital_ward_hospital_unit_id_eq: hospital_unit_id,
            action_id_eq: action,
            hotlist_eq: on_hotlist,
            s: s
          }
          AKIAlertQuery.new(options)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
renalware-core-2.0.13 app/models/renalware/renal/aki_alert_search_form.rb
renalware-core-2.0.12 app/models/renalware/renal/aki_alert_search_form.rb
renalware-core-2.0.11 app/models/renalware/renal/aki_alert_search_form.rb
renalware-core-2.0.9 app/models/renalware/renal/aki_alert_search_form.rb