Sha256: 09ee088d05225e3843b49df6e824c77b02ce81bedc27082606b7a4f1ac92f50f
Contents?: true
Size: 820 Bytes
Versions: 9
Compression:
Stored size: 820 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/ukrdc" require "attr_extras" # rubocop:disable Rails/Output module Renalware module UKRDC module TreatmentTimeline # # Re-generates the ukrdc_treatments for a patient from their modalities and other information. # class GenerateTimeline pattr_initialize :patient def call PrepareTables.call RemapModelTableNamesToTheirPreparedEquivalents.call modalities.each do |modality| print "#{modality.description.name} " GeneratorFactory.call(modality).call end end private def modalities patient.modalities.order(started_on: :asc, updated_at: :asc) end end end end end # rubocop:enable Rails/Output
Version data entries
9 entries across 9 versions & 1 rubygems