Sha256: cb2828e6dc7a2de9a7adc8182ab79c6491905714de99cb760e523e0eadf76128

Contents?: true

Size: 535 Bytes

Versions: 106

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/pathology"

module Renalware
  module Pathology
    class ObservationForPatientRequestDescriptionQuery
      def initialize(patient, request_description)
        @patient = patient
        @observation_description = request_description.required_observation_description
      end

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

Version data entries

106 entries across 106 versions & 1 rubygems

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