Sha256: 63a8658c68383233a92417d300442bcb7880104b6c5de46b3874e070a9c58f97

Contents?: true

Size: 492 Bytes

Versions: 15

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

require_dependency "renalware/pathology"

module Renalware
  module Pathology
    # Responsible for finding the most recent observations results with in
    # the specified date range.
    #
    class ObservationsWithinDateRangeQuery
      def initialize(date_range:, relation: Observation.all)
        @relation = relation
        @date_range = date_range
      end

      def call
        @relation.where(observed_at: @date_range)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.1.0 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.167 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.166 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.165 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.164 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.163 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.162 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.161 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.160 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.159 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.158 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.157 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.156 app/models/renalware/pathology/observations_within_date_range_query.rb
renalware-core-2.0.155 app/models/renalware/pathology/observations_within_date_range_query.rb