Sha256: b20149f51235e819aa1fa11562af0c3e3eb873cb9290b0833c92ff704c9e0ffb

Contents?: true

Size: 960 Bytes

Versions: 4

Compression:

Stored size: 960 Bytes

Contents

# encoding: UTF-8
require 'spec_helper'

describe HL7::Message::Segment::AIP do
  context 'general' do
    before :all do
      @base_aip = 'AIP|1|U|JSB^ISON^Kathy^S|D^Doctor||20020108150000|||10|m^Minutes'
    end

    it 'creates an AIP segment' do
      expect do
        aip = HL7::Message::Segment::AIP.new( @base_aip )
        expect(aip).not_to be_nil
        expect(aip.to_s).to eq @base_aip
      end.not_to raise_error
    end

    it 'allows access to an AIP segment' do
      expect do
        aip = HL7::Message::Segment::AIP.new( @base_aip )
        expect(aip.set_id).to eq '1'
        expect(aip.segment_action_code).to eq 'U'
        expect(aip.personnel_resource_id).to eq 'JSB^ISON^Kathy^S'
        expect(aip.resource_role).to eq 'D^Doctor'
        expect(aip.start_date_time).to eq '20020108150000'
        expect(aip.duration).to eq '10'
        expect(aip.duration_units).to eq 'm^Minutes'
      end.not_to raise_error
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-hl7-1.3.3 spec/aip_segment_spec.rb
ruby-hl7-1.3.2 spec/aip_segment_spec.rb
ruby-hl7-1.3.1 spec/aip_segment_spec.rb
ruby-hl7-1.3.0 spec/aip_segment_spec.rb