Sha256: 509068c60b13e30998c17a46017d04617d333e51d177a7384f3eb8761f25b5a2

Contents?: true

Size: 1.15 KB

Versions: 4

Compression:

Stored size: 1.15 KB

Contents

# encoding: UTF-8
require 'spec_helper'

describe HL7::Message::Segment::IN1 do
  context 'general' do
    before :all do
      @base_in1 = 'IN1|1||752|ACORDIA NATIONAL||||A|GRP|||||||SMITH^JOHN|19|19700102||||||||||||||||||WC23732763278A|||||||||||||||||X'
    end

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

    it 'allows access to an IN1 segment' do
      expect do
        in1 = HL7::Message::Segment::IN1.new( @base_in1 )
        expect(in1.set_id).to eq '1'
        expect(in1.insurance_company_id).to eq '752'
        expect(in1.insurance_company_name).to eq 'ACORDIA NATIONAL'
        expect(in1.group_number).to eq 'A'
        expect(in1.group_name).to eq 'GRP'
        expect(in1.name_of_insured).to eq 'SMITH^JOHN'
        expect(in1.insureds_relationship_to_patient).to eq '19'
        expect(in1.insureds_date_of_birth).to eq '19700102'
        expect(in1.policy_number).to eq 'WC23732763278A'
        expect(in1.vip_indicator).to eq 'X'
      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/in1_segment_spec.rb
ruby-hl7-1.3.2 spec/in1_segment_spec.rb
ruby-hl7-1.3.1 spec/in1_segment_spec.rb
ruby-hl7-1.3.0 spec/in1_segment_spec.rb