Sha256: 1bc2d3c62754df1a2e7516ea99b77c020027afa895e7d2faa342dc8afb3d54a3

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

# encoding: UTF-8
require 'spec_helper'

describe HL7::Message::Segment::PV1 do
  context 'general' do
    before :all do
      @base = "PV1||R|||||||||||||||A|||V02^19900607~H02^19900607"
    end

    it 'allows access to an PV1 segment' do
      pv1 = HL7::Message::Segment::PV1.new @base
      expect(pv1.patient_class).to eq "R"
    end

    it 'allows creation of an OBX segment' do
      pv1= HL7::Message::Segment::PV1.new
      pv1.referring_doctor="Smith^John"
      expect(pv1.referring_doctor).to eq "Smith^John"
      pv1.admit_date = Date.new(2014, 1, 1)
      expect(pv1.admit_date).to eq '20140101'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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