Sha256: 47bfd7384771638289069159fef0a286e7458ab40dbfe539d78183d0fc8d8a33
Contents?: true
Size: 698 Bytes
Versions: 11
Compression:
Stored size: 698 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/pathology" module Renalware module Pathology class RequestForPatientRequestDescriptionQuery def initialize(patient, request_description) @patient = patient @request_description = Renalware::Pathology::RequestDescription.find(request_description.id) end def call @patient .requests .eager_load(:request_descriptions) .where( pathology_request_descriptions_requests_requests: { request_description_id: @request_description.id } ) .order(created_at: :desc) .first end end end end
Version data entries
11 entries across 11 versions & 1 rubygems