Module: Services::Hl7AdtMessageSaver

Defined in:
app/roles/services/hl7_adt_message_saver.rb

Instance Method Summary collapse

Instance Method Details

#persist(message_type, message_body) ⇒ Object



5
6
7
8
9
10
11
# File 'app/roles/services/hl7_adt_message_saver.rb', line 5

def persist(message_type, message_body)
  Services::Hl7Message.new.tap do | msg |
    msg.message_type = message_type
    msg.message = message_body
    msg.save if msg.valid?
  end
end