Sha256: 4a064c78c40a2475aa16744812b4410448f388dd37b1175645bf76c6044ed33b
Contents?: true
Size: 611 Bytes
Versions: 127
Compression:
Stored size: 611 Bytes
Contents
# frozen_string_literal: true require_dependency "renalware/letters" module Renalware module Letters class DraftLetter include Wisper::Publisher include LetterPathology def self.build new end def call(patient, params = {}) letter = LetterFactory.new(patient, params).build letter.pathology_snapshot = build_pathology_snapshot(patient) letter.save! letter.reload broadcast(:draft_letter_successful, letter) rescue ActiveRecord::RecordInvalid broadcast(:draft_letter_failed, letter) end end end end
Version data entries
127 entries across 127 versions & 1 rubygems