[Ruby-hl7-users] Empty sections?
Christian Baumann
Christian.Baumann at agfa.com
Tue Jun 19 02:04:26 EDT 2007
Hello,
I´ld like to know how to handle empty segments?
Everytime I try to create a Message-object with the following code:
raw_input = open( "sample.hl7" ).readlines
msg = HL7::Message.new( raw_input )
I get this error message:
c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:253:in `generate_segments': undefined method `to_sym' for nil:NilClass (NoMethodError)
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:236:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:236:in `generate_segments'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:230:in `parse_string'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:219:in `parse_enumerable'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:218:in `each'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:218:in `parse_enumerable'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:166:in `parse'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-hl7-0.1.23/lib/ruby-hl7.rb:90:in `initialize'
from hl7_tries4.rb:5:in `new'
from hl7_tries4.rb:5
Thy in advance,
Christian
More information about the Ruby-hl7-users
mailing list