Sha256: 388c0ab52106c82983c6fe66a3c86e246313e5e63daa79ab01452f462e23bfeb
Contents?: true
Size: 693 Bytes
Versions: 95
Compression:
Stored size: 693 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 .joins(: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
95 entries across 95 versions & 1 rubygems