Sha256: 3b478eed8a88eff44b9382328f53a5824ecc4de99082df6e9804a9ce3a56cc26

Contents?: true

Size: 835 Bytes

Versions: 2

Compression:

Stored size: 835 Bytes

Contents

# $Id: test_obx_segment.rb 40 2007-06-30 01:29:19Z segfault $
$: << '../lib'
require 'test/unit'
require 'ruby-hl7'

class ObxSegment < Test::Unit::TestCase
  def setup
    @base = "OBX||TX|FIND^FINDINGS^L|1|This is a test on 05/02/94."
  end

  def test_initial_read
    obx = HL7::Message::Segment::OBX.new @base
    assert_equal( "", obx.set_id ) 
    assert_equal( "TX", obx.value_type )
    assert_equal( "FIND^FINDINGS^L", obx.observation_id )
    assert_equal( "1", obx.observation_sub_id )
    assert_equal( "This is a test on 05/02/94.", obx.observation_value )
  end
                                          
  def test_creation
    obx = HL7::Message::Segment::OBX.new
    obx.value_type = "TESTIES"
    obx.observation_id = "HR"
    obx.observation_sub_id = "2"
    obx.observation_value = "SOMETHING HAPPENned"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby-hl7-0.2.44 test/test_obx_segment.rb
ruby-hl7-0.2.50 test/test_obx_segment.rb