Module: Extensions::HL7::Segments::MSH::InstanceMethods

Defined in:
lib/core_ext/segments/msh.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/core_ext/segments/msh.rb', line 12

def to_hash
  @hash = {"enc_chars" => self.enc_chars,
          "seq" => self.seq,
          "sendingApplication" => self.sending_app,
          "sendingFacility" => self.sending_facility,
          "receivingApplication" => self.recv_app,
          "receivingFacility" => self.recv_facility,
          "dateTime" => self.time,
          "security" => self.security,
          "messageType" => self.message_type.split("^").first,
          "messageEvent" => self.message_type.split("^").last,
          "messageControlId" => self.message_control_id,
          "processingID" => self.processing_id,
          "versionID" => self.version_id}
end