Sha256: 9fd3f4167eb530be31890242267dd33e6779ca639fc0abe1e38e64e9b1dc143b

Contents?: true

Size: 514 Bytes

Versions: 104

Compression:

Stored size: 514 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/pathology"

module Renalware
  module Pathology
    class ObservationForPatientObservationDescriptionQuery
      def initialize(patient, observation_description)
        @patient = patient
        @observation_description = observation_description
      end

      def call
        @patient
          .observations
          .where(description: @observation_description)
          .order(observed_at: :desc)
          .first
      end
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
renalware-core-2.0.121 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.120 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.119 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.118 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.117 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.116 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.115 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.113 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.112 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.111 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.110 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.109 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.108 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.106 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.105 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.104 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.103 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.102 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.101 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb
renalware-core-2.0.100 app/models/renalware/pathology/observation_for_patient_observation_description_query.rb