Sha256: d87ba07fea6a798ce024082b72472bc85bc4e7c21d5e940af55ca9a83e9ee7da
Contents?: true
Size: 856 Bytes
Versions: 19
Compression:
Stored size: 856 Bytes
Contents
require_dependency "renalware/clinical" module Renalware module Clinical class DryWeightsPresenter DEFAULT_LIMIT = 10_000 attr_reader :patient, :limit def initialize(patient:, dry_weights: nil, limit: nil) @patient = patient @limit = limit || DEFAULT_LIMIT @weights = dry_weights # optional otherwise we grab them ourselves end def weights @weights ||= begin Renalware::Clinical::DryWeight.for_patient(patient) .includes(:assessor) .limit(limit) .ordered end end def dry_weights @dry_weights ||= begin CollectionPresenter.new(weights, Renalware::Clinical::DryWeightPresenter) end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems