Sha256: 995802a26eec552a9f95443e87f6676087c454854647ce30ddb91fd91e79a4cb
Contents?: true
Size: 723 Bytes
Versions: 24
Compression:
Stored size: 723 Bytes
Contents
require_dependency "renalware/letters" module Renalware module Letters class PathologyLayout # This method helps us iterate over the pathology required in a letter. # Path in letters should be grouped and ordered within that group. # We might display a date only once a group for instance. def each_group Pathology::ObservationDescription .select(:id, :code, :letter_group, :letter_order) .where("letter_group is not null") .order("letter_group asc, letter_order asc") .group_by(&:letter_group) .each do |group_number, descriptions| yield(group_number, descriptions) if block_given? end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems