roqua-healthy 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab6e43fa75c7ad5e6bdc7b88cc5b4df1397aadfb
4
- data.tar.gz: 35fceeb06d6660649197bee950cdd36196d617ed
3
+ metadata.gz: e603a289862cc5ed41a951e56e040169cb27f3ad
4
+ data.tar.gz: e271603c076b1a9399f812aae6e5717dec953913
5
5
  SHA512:
6
- metadata.gz: 92151cca78f0cb4d8635cc7575bb45ab17ba037d73c22be42c5ede244cd52209a1862ab7e3dfb8c4c77bc555bb3795f4025409065f6b4f154302764eed7bb2ee
7
- data.tar.gz: 22f4cbcd57f7e789736bfe7cc84c96738be75acc1dfbd6aef235dd65966e6fa1a3ba4797690c2778f44bf8584c3b8d2cad6c267e9adda2901199b42ee1d4786c
6
+ metadata.gz: d68bf8cd67c0037c49a6538c57b6761aeb00b4908892316f5e25560c7e82a0719d5ed9a61ce1cfbed4c917241e3e709b779b1f96d38ba7afe870f819ea80fcf9
7
+ data.tar.gz: fb6e76356ec6015f61ad7d9ba7da752b61e6ac3d4cc39e72f8e9c274946dfdd12418f7037f7799d6ae2dfe7ec0e12f83bed193a6d157fb34cd3bdd728a723a1a
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.1.2
2
+
3
+ * Fall back to PID.13.1 for cell_phone when type is undefined
4
+
1
5
  ### 1.1.1
2
6
 
3
7
  * Added `Roqua::Healthy::Error` and `Roqua::Healthy::ConnectionError` base classes for exceptions
@@ -73,6 +73,11 @@ module Roqua
73
73
  phone_cell_record = message.fetch('PID').fetch('PID.13').find do |record|
74
74
  record.fetch('PID.13.2', :unknown_type_of_phone_record) == 'ORN'
75
75
  end
76
+
77
+ phone_cell_record ||= message.fetch('PID').fetch('PID.13').find do |record|
78
+ record.fetch('PID.13.1', '') =~ /\A06/
79
+ end
80
+
76
81
  return nil unless phone_cell_record
77
82
 
78
83
  phone_cell_record.fetch('PID.13.1', "")
@@ -1,6 +1,6 @@
1
1
  module Roqua
2
2
  module Healthy
3
3
  # healthy version
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
6
6
  end
@@ -142,7 +142,7 @@
142
142
  </PID.11>
143
143
  <PID.12/>
144
144
  <PID.13>
145
- <PID.13.1>050-1234568</PID.13.1>
145
+ <PID.13.1>06-12345678</PID.13.1>
146
146
  </PID.13>
147
147
  <PID.14>
148
148
  <PID.14.1>&quot;&quot;</PID.14.1>
@@ -21,7 +21,7 @@ describe 'Fetching A19 from CDIS' do
21
21
  it { expect(subject[:country]).to eq('') }
22
22
  it { expect(subject[:birthdate]).to eq('19800101') }
23
23
  it { expect(subject[:gender]).to eq('M') }
24
- it { expect(subject[:phone_cell]).to be_nil }
24
+ it { expect(subject[:phone_cell]).to eq('06-12345678') }
25
25
  end
26
26
 
27
27
  describe 'the patient Piet Fictief' do
@@ -21,6 +21,6 @@ describe 'Fetching A19 from Comez' do
21
21
  it { expect(subject[:country]).to eq('NL') }
22
22
  it { expect(subject[:birthdate]).to eq('17070415') }
23
23
  it { expect(subject[:gender]).to eq('F') }
24
- it { expect(subject[:phone_cell]).to be_nil }
24
+ it { expect(subject[:phone_cell]).to eq('0612345678mdr') }
25
25
  end
26
26
  end
@@ -67,6 +67,6 @@ describe 'Fetching A19 from USER' do
67
67
  it { expect(subject[:country]).to eq('6030') }
68
68
  it { expect(subject[:birthdate]).to eq('17070415') }
69
69
  it { expect(subject[:gender]).to eq('M') }
70
- it { expect(subject[:phone_cell]).to be_nil }
70
+ it { expect(subject[:phone_cell]).to eq('0611223344') }
71
71
  end
72
72
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-healthy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-30 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport