Sha256: db1b3c22a94d443f8512ad2fc3cb57efc1d401de80001a7d6e0c0826a49ddd1e

Contents?: true

Size: 1.51 KB

Versions: 8

Compression:

Stored size: 1.51 KB

Contents

# frozen_string_literal: true
require 'spec_helper'

describe 'Fetching A19 from GGZWNB' do
  describe 'a patient' do
    before { load_fixture 'ggzwnb_patient', '1234567' }
    subject { Roqua::Healthy::A19.fetch("1234567") }

    it { expect(subject[:status]).to eq('SUCCESS') }
    it { expect(subject[:error]).to  be_nil }
    it { expect(subject[:source]).to eq('UMCG') }
    it do
      expect(subject[:identities]).to eq([{ident: '1234567', authority: 'PI'},
                                          {ident: '123456789', authority: 'NNNLD'}])
    end
    it { expect(subject[:firstname]).to    eq('G') }
    it { expect(subject[:initials]).to     eq('M') }
    it { expect(subject[:lastname]).to     eq('Geit') }
    it { expect(subject[:display_name]).to eq('Geit') }
    it { expect(subject[:nickname]).to     eq('Gerda') }
    it { expect(subject[:email]).to        be_blank }
    it { expect(subject[:address_type]).to eq('H') }
    it { expect(subject[:street]).to       eq('Wegweg 1') }
    it { expect(subject[:city]).to         eq('Dorp') }
    it { expect(subject[:zipcode]).to      eq('1234AB') }
    it { expect(subject[:country]).to      eq('6030') }
    it { expect(subject[:birthdate]).to    eq('19880101') }
    it { expect(subject[:gender]).to       eq('F') }
    # phone cells with letters are rejected, because it usually means they can not be used as a client's own
    # cell phone number
    it { expect(subject[:phone_cell]).to   eq('0612345678') }
    it { expect(subject[:deceased]).to     eq(false) }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
roqua-healthy-1.6.0 spec/integration/ggzwnb_spec.rb
roqua-healthy-1.5.13 spec/integration/ggzwnb_spec.rb
roqua-healthy-1.5.12 spec/integration/ggzwnb_spec.rb
roqua-healthy-1.5.11 spec/integration/ggzwnb_spec.rb
roqua-healthy-1.5.10 spec/integration/ggzwnb_spec.rb
roqua-healthy-1.5.9 spec/integration/ggzwnb_spec.rb
roqua-healthy-1.5.8 spec/integration/ggzwnb_spec.rb
roqua-healthy-1.5.7 spec/integration/ggzwnb_spec.rb