Sha256: 9059a0af5b7223adbb0a3e3e1c26cfbfaa8f7c2bb3de781ed28e6518d45f6668
Contents?: true
Size: 491 Bytes
Versions: 39
Compression:
Stored size: 491 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/pathology" require "sql/index_case_stmt" module Renalware module Pathology class OrderedPatientQuery def initialize(patient_ids) @patient_ids = patient_ids end def call Pathology::Patient .where(id: @patient_ids) .order(ids_index) end private def ids_index ::SQL::IndexedCaseStmt.new(:id, @patient_ids).generate end end end end
Version data entries
39 entries across 39 versions & 1 rubygems