roqua-healthy 1.5.9 → 1.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.document +0 -0
- data/.rspec +0 -0
- data/.yardopts +0 -0
- data/ChangeLog.md +4 -0
- data/Guardfile +0 -0
- data/LICENSE.txt +0 -0
- data/Rakefile +0 -0
- data/circle.yml +0 -0
- data/gemfiles/rails41.gemfile +0 -0
- data/gemfiles/rails42.gemfile +0 -0
- data/gemfiles/rails50.gemfile +0 -0
- data/lib/roqua/healthy/a19.rb +0 -0
- data/lib/roqua/healthy/a19/address_parser.rb +9 -1
- data/lib/roqua/healthy/a19/correct_patient_check.rb +0 -0
- data/lib/roqua/healthy/a19/impulse_name_parser.rb +0 -0
- data/lib/roqua/healthy/a19/name_parser.rb +0 -0
- data/lib/roqua/healthy/a19/response_parser.rb +0 -0
- data/lib/roqua/healthy/message_cleaner.rb +0 -0
- data/lib/roqua/healthy/version.rb +1 -1
- data/lib/roqua_healthy.rb +0 -0
- data/spec/fixtures/comez_patient.xml +0 -0
- data/spec/fixtures/ggzwnb_patient.xml +0 -0
- data/spec/fixtures/oru-requests/spsy1218j.hl7 +0 -0
- data/spec/fixtures/oru-requests/spsy1218o.hl7 +0 -0
- data/spec/fixtures/oru-requests/spsy1218o2.hl7 +0 -0
- data/spec/fixtures/oru-requests/spsy411o.hl7 +0 -0
- data/spec/fixtures/oru-requests/spsy411o2.hl7 +0 -0
- data/spec/fixtures/oru-requests/spsyl.hl7 +0 -0
- data/spec/fixtures/oru-responses/xmcare_nack.hl7 +0 -0
- data/spec/fixtures/user_patient.xml +0 -0
- data/spec/fixtures/user_patient_not_found.xml +0 -0
- data/spec/fixtures/user_patient_with_gsm_and_email.xml +0 -0
- data/spec/fixtures/user_patient_with_maiden_name.xml +0 -0
- data/spec/fixtures/xmcare_house_number_addendum.xml +335 -0
- data/spec/fixtures/xmcare_patient.xml +0 -0
- data/spec/fixtures/xmcare_patient_email_in_field_number_four.xml +0 -0
- data/spec/fixtures/xmcare_patient_not_found.xml +0 -0
- data/spec/fixtures/xmcare_patient_with_maiden_name.xml +0 -0
- data/spec/fixtures/xmcare_patient_without_birthdate.xml +0 -0
- data/spec/fixtures/xmcare_phone_cell_in_prn.xml +0 -0
- data/spec/fixtures/xmcare_phone_cell_in_prn_orn.xml +0 -0
- data/spec/fixtures/xmcare_phone_home_in_prn.xml +0 -0
- data/spec/fixtures/xmcare_timeout_waiting_for_ack.xml +0 -0
- data/spec/fixtures/xmcare_unconventional_phone_cell_in_orn.xml +0 -0
- data/spec/fixtures/xmcare_unconventional_phone_cell_in_orn2.xml +0 -0
- data/spec/healthy_spec.rb +0 -0
- data/spec/integration/xmcare_spec.rb +8 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/support/fixtures.rb +0 -0
- data/spec/unit/a19/address_parser_spec.rb +25 -0
- data/spec/unit/a19/correct_patient_check_spec.rb +0 -0
- data/spec/unit/a19_spec.rb +0 -0
- data/spec/unit/message_cleaner_spec.rb +0 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fe41526687263d414b6fbb4a14e77d0538d14cfc
|
4
|
+
data.tar.gz: d9222496cb31cd289ac4050f89a0bd77dea11d71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f408d157c74b9d00f250921b041e35faa9cfa116f931ec8e3d38127ab484565c195915fc583aa73d9a23f7d004719e9ce675d1993e026c06ab7ebc9d5739eb13
|
7
|
+
data.tar.gz: b16066084c03e52ea5f81f857cf6c994c72164696eb36e853f9f52bbe1bac0b0ba5a3b47cab969c02be495a8b4bbc891917dd64247b353d72867e1c37968eae3
|
data/.document
CHANGED
File without changes
|
data/.rspec
CHANGED
File without changes
|
data/.yardopts
CHANGED
File without changes
|
data/ChangeLog.md
CHANGED
data/Guardfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/circle.yml
CHANGED
File without changes
|
data/gemfiles/rails41.gemfile
CHANGED
File without changes
|
data/gemfiles/rails42.gemfile
CHANGED
File without changes
|
data/gemfiles/rails50.gemfile
CHANGED
File without changes
|
data/lib/roqua/healthy/a19.rb
CHANGED
File without changes
|
@@ -16,7 +16,15 @@ module Roqua
|
|
16
16
|
|
17
17
|
def street
|
18
18
|
return nil if record.blank? || record.fetch('PID.11.1').blank?
|
19
|
-
|
19
|
+
|
20
|
+
street = record.fetch('PID.11.1').fetch('PID.11.1.1')
|
21
|
+
suffix = record.fetch('PID.11.2', nil)
|
22
|
+
|
23
|
+
if suffix.present? && !street.end_with?(suffix)
|
24
|
+
street + suffix
|
25
|
+
else
|
26
|
+
street
|
27
|
+
end
|
20
28
|
end
|
21
29
|
|
22
30
|
def city
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/roqua_healthy.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,335 @@
|
|
1
|
+
<HL7Message>
|
2
|
+
<MSH>
|
3
|
+
<MSH.1>|</MSH.1>
|
4
|
+
<MSH.2>^~\&</MSH.2>
|
5
|
+
<MSH.3>
|
6
|
+
<MSH.3.1>XMCARE</MSH.3.1>
|
7
|
+
</MSH.3>
|
8
|
+
<MSH.4>
|
9
|
+
<MSH.4.1>ZIS</MSH.4.1>
|
10
|
+
</MSH.4>
|
11
|
+
<MSH.5>
|
12
|
+
<MSH.5.1>ROQUA</MSH.5.1>
|
13
|
+
</MSH.5>
|
14
|
+
<MSH.6>
|
15
|
+
<MSH.6.1>RGOC</MSH.6.1>
|
16
|
+
</MSH.6>
|
17
|
+
<MSH.7>
|
18
|
+
<MSH.7.1>20190620121912</MSH.7.1>
|
19
|
+
</MSH.7>
|
20
|
+
<MSH.8/>
|
21
|
+
<MSH.9>
|
22
|
+
<MSH.9.1>ADR</MSH.9.1>
|
23
|
+
<MSH.9.2>A19</MSH.9.2>
|
24
|
+
<MSH.9.3>ADR_A19</MSH.9.3>
|
25
|
+
</MSH.9>
|
26
|
+
<MSH.10>
|
27
|
+
<MSH.10.1>10883208</MSH.10.1>
|
28
|
+
</MSH.10>
|
29
|
+
<MSH.11>
|
30
|
+
<MSH.11.1>P</MSH.11.1>
|
31
|
+
</MSH.11>
|
32
|
+
<MSH.12>
|
33
|
+
<MSH.12.1>2.4</MSH.12.1>
|
34
|
+
</MSH.12>
|
35
|
+
<MSH.13/>
|
36
|
+
<MSH.14/>
|
37
|
+
<MSH.15>
|
38
|
+
<MSH.15.1>NE</MSH.15.1>
|
39
|
+
</MSH.15>
|
40
|
+
<MSH.16>
|
41
|
+
<MSH.16.1>NE</MSH.16.1>
|
42
|
+
</MSH.16>
|
43
|
+
</MSH>
|
44
|
+
<MSA>
|
45
|
+
<MSA.1>
|
46
|
+
<MSA.1.1>CA</MSA.1.1>
|
47
|
+
</MSA.1>
|
48
|
+
<MSA.2>
|
49
|
+
<MSA.2.1>20190620121912766</MSA.2.1>
|
50
|
+
</MSA.2>
|
51
|
+
</MSA>
|
52
|
+
<QRD>
|
53
|
+
<QRD.1>
|
54
|
+
<QRD.1.1>20190620121912</QRD.1.1>
|
55
|
+
</QRD.1>
|
56
|
+
<QRD.2>
|
57
|
+
<QRD.2.1>R</QRD.2.1>
|
58
|
+
</QRD.2>
|
59
|
+
<QRD.3>
|
60
|
+
<QRD.3.1>I</QRD.3.1>
|
61
|
+
</QRD.3>
|
62
|
+
<QRD.4>
|
63
|
+
<QRD.4.1>766</QRD.4.1>
|
64
|
+
</QRD.4>
|
65
|
+
<QRD.5/>
|
66
|
+
<QRD.6/>
|
67
|
+
<QRD.7>
|
68
|
+
<QRD.7.1>1</QRD.7.1>
|
69
|
+
<QRD.7.2>RD</QRD.7.2>
|
70
|
+
</QRD.7>
|
71
|
+
<QRD.8>
|
72
|
+
<QRD.8.1>1234567890</QRD.8.1>
|
73
|
+
</QRD.8>
|
74
|
+
<QRD.9>
|
75
|
+
<QRD.9.1>DEM</QRD.9.1>
|
76
|
+
</QRD.9>
|
77
|
+
</QRD>
|
78
|
+
<PID>
|
79
|
+
<PID.1>
|
80
|
+
<PID.1.1>1</PID.1.1>
|
81
|
+
</PID.1>
|
82
|
+
<PID.2/>
|
83
|
+
<PID.3>
|
84
|
+
<PID.3.1>1234567890</PID.3.1>
|
85
|
+
<PID.3.2/>
|
86
|
+
<PID.3.3/>
|
87
|
+
<PID.3.4>XMCARE</PID.3.4>
|
88
|
+
<PID.3.5>PI</PID.3.5>
|
89
|
+
</PID.3>
|
90
|
+
<PID.3>
|
91
|
+
<PID.3.1>999991234</PID.3.1>
|
92
|
+
<PID.3.2/>
|
93
|
+
<PID.3.3/>
|
94
|
+
<PID.3.4>NLMINBIZA</PID.3.4>
|
95
|
+
<PID.3.5>NNNLD</PID.3.5>
|
96
|
+
<PID.3.6/>
|
97
|
+
<PID.3.7>20190123</PID.3.7>
|
98
|
+
</PID.3>
|
99
|
+
<PID.3>
|
100
|
+
<PID.3.1>""</PID.3.1>
|
101
|
+
<PID.3.2/>
|
102
|
+
<PID.3.3/>
|
103
|
+
<PID.3.4/>
|
104
|
+
<PID.3.5>IBAN</PID.3.5>
|
105
|
+
</PID.3>
|
106
|
+
<PID.3>
|
107
|
+
<PID.3.1>""</PID.3.1>
|
108
|
+
<PID.3.2/>
|
109
|
+
<PID.3.3/>
|
110
|
+
<PID.3.4>GIRO</PID.3.4>
|
111
|
+
<PID.3.5>BA</PID.3.5>
|
112
|
+
</PID.3>
|
113
|
+
<PID.3>
|
114
|
+
<PID.3.1>""</PID.3.1>
|
115
|
+
<PID.3.2/>
|
116
|
+
<PID.3.3/>
|
117
|
+
<PID.3.4>BANK</PID.3.4>
|
118
|
+
<PID.3.5>BA</PID.3.5>
|
119
|
+
</PID.3>
|
120
|
+
<PID.4/>
|
121
|
+
<PID.5>
|
122
|
+
<PID.5.1>
|
123
|
+
<PID.5.1.1>Anton</PID.5.1.1>
|
124
|
+
<PID.5.1.2>""</PID.5.1.2>
|
125
|
+
<PID.5.1.3>Anton</PID.5.1.3>
|
126
|
+
<PID.5.1.4>""</PID.5.1.4>
|
127
|
+
<PID.5.1.5>""</PID.5.1.5>
|
128
|
+
</PID.5.1>
|
129
|
+
<PID.5.2>B</PID.5.2>
|
130
|
+
<PID.5.3>C</PID.5.3>
|
131
|
+
<PID.5.4/>
|
132
|
+
<PID.5.5/>
|
133
|
+
<PID.5.6/>
|
134
|
+
<PID.5.7>L</PID.5.7>
|
135
|
+
</PID.5>
|
136
|
+
<PID.5>
|
137
|
+
<PID.5.1>Anton</PID.5.1>
|
138
|
+
<PID.5.2/>
|
139
|
+
<PID.5.3/>
|
140
|
+
<PID.5.4/>
|
141
|
+
<PID.5.5/>
|
142
|
+
<PID.5.6/>
|
143
|
+
<PID.5.7>D</PID.5.7>
|
144
|
+
</PID.5>
|
145
|
+
<PID.5>
|
146
|
+
<PID.5.1/>
|
147
|
+
<PID.5.2>Tirol</PID.5.2>
|
148
|
+
<PID.5.3/>
|
149
|
+
<PID.5.4/>
|
150
|
+
<PID.5.5/>
|
151
|
+
<PID.5.6/>
|
152
|
+
<PID.5.7>N</PID.5.7>
|
153
|
+
</PID.5>
|
154
|
+
<PID.6/>
|
155
|
+
<PID.7>
|
156
|
+
<PID.7.1>19991212</PID.7.1>
|
157
|
+
</PID.7>
|
158
|
+
<PID.8>
|
159
|
+
<PID.8.1>M</PID.8.1>
|
160
|
+
</PID.8>
|
161
|
+
<PID.9/>
|
162
|
+
<PID.10/>
|
163
|
+
<PID.11/>
|
164
|
+
<PID.11>
|
165
|
+
<PID.11.1>
|
166
|
+
<PID.11.1.1>Straatnaam 123</PID.11.1.1>
|
167
|
+
<PID.11.1.2>Straatnaam</PID.11.1.2>
|
168
|
+
<PID.11.1.3>123</PID.11.1.3>
|
169
|
+
</PID.11.1>
|
170
|
+
<PID.11.2>ab</PID.11.2>
|
171
|
+
<PID.11.3>DEURNE</PID.11.3>
|
172
|
+
<PID.11.4/>
|
173
|
+
<PID.11.5>1234AB</PID.11.5>
|
174
|
+
<PID.11.6>NL</PID.11.6>
|
175
|
+
<PID.11.7>H</PID.11.7>
|
176
|
+
</PID.11>
|
177
|
+
<PID.11>
|
178
|
+
<PID.11.1>
|
179
|
+
<PID.11.1.1/>
|
180
|
+
<PID.11.1.2>""</PID.11.1.2>
|
181
|
+
<PID.11.1.3>""</PID.11.1.3>
|
182
|
+
</PID.11.1>
|
183
|
+
<PID.11.2>""</PID.11.2>
|
184
|
+
<PID.11.3>'S-GRAVENHAGE</PID.11.3>
|
185
|
+
<PID.11.4/>
|
186
|
+
<PID.11.5>""</PID.11.5>
|
187
|
+
<PID.11.6>NL</PID.11.6>
|
188
|
+
<PID.11.7>N</PID.11.7>
|
189
|
+
</PID.11>
|
190
|
+
<PID.11>
|
191
|
+
<PID.11.1>
|
192
|
+
<PID.11.1.1/>
|
193
|
+
<PID.11.1.2>""</PID.11.1.2>
|
194
|
+
<PID.11.1.3>""</PID.11.1.3>
|
195
|
+
</PID.11.1>
|
196
|
+
<PID.11.2>""</PID.11.2>
|
197
|
+
<PID.11.3>""</PID.11.3>
|
198
|
+
<PID.11.4/>
|
199
|
+
<PID.11.5>""</PID.11.5>
|
200
|
+
<PID.11.6>""</PID.11.6>
|
201
|
+
<PID.11.7>C</PID.11.7>
|
202
|
+
</PID.11>
|
203
|
+
<PID.12/>
|
204
|
+
<PID.13>
|
205
|
+
<PID.13.1>0123-444444</PID.13.1>
|
206
|
+
<PID.13.2>PRN</PID.13.2>
|
207
|
+
<PID.13.3>PH</PID.13.3>
|
208
|
+
</PID.13>
|
209
|
+
<PID.13>
|
210
|
+
<PID.13.1>0031612345678</PID.13.1>
|
211
|
+
<PID.13.2>ORN</PID.13.2>
|
212
|
+
<PID.13.3>PH</PID.13.3>
|
213
|
+
</PID.13>
|
214
|
+
<PID.13>
|
215
|
+
<PID.13.1>""</PID.13.1>
|
216
|
+
<PID.13.2>ORN</PID.13.2>
|
217
|
+
<PID.13.3>FX</PID.13.3>
|
218
|
+
</PID.13>
|
219
|
+
<PID.13>
|
220
|
+
<PID.13.1/>
|
221
|
+
<PID.13.2>NET</PID.13.2>
|
222
|
+
<PID.13.3>Internet</PID.13.3>
|
223
|
+
<PID.13.4>voornaam+test@example.org</PID.13.4>
|
224
|
+
</PID.13>
|
225
|
+
<PID.14/>
|
226
|
+
<PID.15/>
|
227
|
+
<PID.16/>
|
228
|
+
<PID.17/>
|
229
|
+
<PID.18/>
|
230
|
+
<PID.19/>
|
231
|
+
<PID.20/>
|
232
|
+
<PID.21/>
|
233
|
+
<PID.22/>
|
234
|
+
<PID.23/>
|
235
|
+
<PID.24/>
|
236
|
+
<PID.25/>
|
237
|
+
<PID.26>
|
238
|
+
<PID.26.1>""</PID.26.1>
|
239
|
+
</PID.26>
|
240
|
+
<PID.27/>
|
241
|
+
<PID.28/>
|
242
|
+
<PID.29>
|
243
|
+
<PID.29.1>""</PID.29.1>
|
244
|
+
</PID.29>
|
245
|
+
<PID.30>
|
246
|
+
<PID.30.1>N</PID.30.1>
|
247
|
+
</PID.30>
|
248
|
+
<PID.31>
|
249
|
+
<PID.31.1>N</PID.31.1>
|
250
|
+
</PID.31>
|
251
|
+
</PID>
|
252
|
+
<ROL>
|
253
|
+
<ROL.1/>
|
254
|
+
<ROL.2>
|
255
|
+
<ROL.2.1>UP</ROL.2.1>
|
256
|
+
</ROL.2>
|
257
|
+
<ROL.3>
|
258
|
+
<ROL.3.1>PP</ROL.3.1>
|
259
|
+
</ROL.3>
|
260
|
+
<ROL.4>
|
261
|
+
<ROL.4.1>BENU-DEUR</ROL.4.1>
|
262
|
+
<ROL.4.2>
|
263
|
+
<ROL.4.2.1/>
|
264
|
+
<ROL.4.2.2/>
|
265
|
+
<ROL.4.2.3>Benu Apotheek</ROL.4.2.3>
|
266
|
+
</ROL.4.2>
|
267
|
+
<ROL.4.3/>
|
268
|
+
<ROL.4.4/>
|
269
|
+
<ROL.4.5/>
|
270
|
+
<ROL.4.6/>
|
271
|
+
<ROL.4.7/>
|
272
|
+
<ROL.4.8>P</ROL.4.8>
|
273
|
+
<ROL.4.9>LOCAL</ROL.4.9>
|
274
|
+
</ROL.4>
|
275
|
+
<ROL.4>
|
276
|
+
<ROL.4.1>01239000</ROL.4.1>
|
277
|
+
<ROL.4.2/>
|
278
|
+
<ROL.4.3/>
|
279
|
+
<ROL.4.4/>
|
280
|
+
<ROL.4.5/>
|
281
|
+
<ROL.4.6/>
|
282
|
+
<ROL.4.7/>
|
283
|
+
<ROL.4.8>02</ROL.4.8>
|
284
|
+
<ROL.4.9>VEKTIS</ROL.4.9>
|
285
|
+
</ROL.4>
|
286
|
+
<ROL.5/>
|
287
|
+
<ROL.6/>
|
288
|
+
<ROL.7/>
|
289
|
+
<ROL.8/>
|
290
|
+
<ROL.9>
|
291
|
+
<ROL.9.1>02</ROL.9.1>
|
292
|
+
<ROL.9.2/>
|
293
|
+
<ROL.9.3>VEKTIS</ROL.9.3>
|
294
|
+
</ROL.9>
|
295
|
+
</ROL>
|
296
|
+
<ROL>
|
297
|
+
<ROL.1/>
|
298
|
+
<ROL.2>
|
299
|
+
<ROL.2.1>UP</ROL.2.1>
|
300
|
+
</ROL.2>
|
301
|
+
<ROL.3>
|
302
|
+
<ROL.3.1>PP</ROL.3.1>
|
303
|
+
</ROL.3>
|
304
|
+
<ROL.4>
|
305
|
+
<ROL.4.1>OPEN-DEUR</ROL.4.1>
|
306
|
+
<ROL.4.2>
|
307
|
+
<ROL.4.2.1/>
|
308
|
+
<ROL.4.2.2>de</ROL.4.2.2>
|
309
|
+
<ROL.4.2.3>Open</ROL.4.2.3>
|
310
|
+
</ROL.4.2>
|
311
|
+
<ROL.4.3>M</ROL.4.3>
|
312
|
+
<ROL.4.4>P</ROL.4.4>
|
313
|
+
<ROL.4.5/>
|
314
|
+
<ROL.4.6/>
|
315
|
+
<ROL.4.7/>
|
316
|
+
<ROL.4.8>H</ROL.4.8>
|
317
|
+
<ROL.4.9>LOCAL</ROL.4.9>
|
318
|
+
</ROL.4>
|
319
|
+
<ROL.5/>
|
320
|
+
<ROL.6/>
|
321
|
+
<ROL.7/>
|
322
|
+
<ROL.8/>
|
323
|
+
<ROL.9>
|
324
|
+
<ROL.9.1>01</ROL.9.1>
|
325
|
+
<ROL.9.2/>
|
326
|
+
<ROL.9.3>VEKTIS</ROL.9.3>
|
327
|
+
</ROL.9>
|
328
|
+
</ROL>
|
329
|
+
<PV1>
|
330
|
+
<PV1.1/>
|
331
|
+
<PV1.2>
|
332
|
+
<PV1.2.1>O</PV1.2.1>
|
333
|
+
</PV1.2>
|
334
|
+
</PV1>
|
335
|
+
</HL7Message>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/healthy_spec.rb
CHANGED
File without changes
|
@@ -207,6 +207,14 @@ describe 'Fetching A19 from XMcare' do
|
|
207
207
|
end
|
208
208
|
end
|
209
209
|
|
210
|
+
describe 'a patient with an address suffix' do
|
211
|
+
before { load_fixture 'xmcare_house_number_addendum', '1234567890' }
|
212
|
+
subject { Roqua::Healthy::A19.fetch("1234567890") }
|
213
|
+
|
214
|
+
it 'returns the street with suffix appended' do
|
215
|
+
expect(subject[:street]).to eq("Straatnaam 123ab")
|
216
|
+
end
|
217
|
+
end
|
210
218
|
describe 'a patient that does not exist' do
|
211
219
|
before { load_fixture 'xmcare_patient_not_found', '12345678901' }
|
212
220
|
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
data/spec/support/fixtures.rb
CHANGED
File without changes
|
@@ -8,6 +8,7 @@ describe Roqua::Healthy::A19::AddressParser do
|
|
8
8
|
if types.include?('M')
|
9
9
|
addresses << {'PID.11.7' => 'M',
|
10
10
|
'PID.11.1' => {'PID.11.1.1' => 'Mailstreet 1'},
|
11
|
+
'PID.11.2' => '',
|
11
12
|
'PID.11.3' => 'Mailcity',
|
12
13
|
'PID.11.5' => 'Mailzipcode',
|
13
14
|
'PID.11.6' => 'Mailcountry'}
|
@@ -73,6 +74,30 @@ describe Roqua::Healthy::A19::AddressParser do
|
|
73
74
|
parser = described_class.new(message)
|
74
75
|
expect(parser.street).to be_nil
|
75
76
|
end
|
77
|
+
|
78
|
+
it 'appends house number suffix' do
|
79
|
+
addresses = [{'PID.11.7' => 'M',
|
80
|
+
'PID.11.1' => {'PID.11.1.1' => 'Homestreet 1'},
|
81
|
+
'PID.11.2' => "ab",
|
82
|
+
'PID.11.3' => 'Homecity',
|
83
|
+
'PID.11.5' => 'Homezipcode',
|
84
|
+
'PID.11.6' => 'Homecountry'}]
|
85
|
+
message = {'PID' => {'PID.11' => addresses}}
|
86
|
+
parser = described_class.new(message)
|
87
|
+
expect(parser.street).to eq("Homestreet 1ab")
|
88
|
+
end
|
89
|
+
|
90
|
+
it 'does not append house number suffix if full field already ends in it' do
|
91
|
+
addresses = [{'PID.11.7' => 'M',
|
92
|
+
'PID.11.1' => {'PID.11.1.1' => 'Homestreet 1ab'},
|
93
|
+
'PID.11.2' => "ab",
|
94
|
+
'PID.11.3' => 'Homecity',
|
95
|
+
'PID.11.5' => 'Homezipcode',
|
96
|
+
'PID.11.6' => 'Homecountry'}]
|
97
|
+
message = {'PID' => {'PID.11' => addresses}}
|
98
|
+
parser = described_class.new(message)
|
99
|
+
expect(parser.street).to eq("Homestreet 1ab")
|
100
|
+
end
|
76
101
|
end
|
77
102
|
|
78
103
|
describe '#city' do
|
File without changes
|
data/spec/unit/a19_spec.rb
CHANGED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roqua-healthy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-06-
|
14
|
+
date: 2019-06-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
@@ -356,6 +356,7 @@ files:
|
|
356
356
|
- spec/fixtures/user_patient_not_found.xml
|
357
357
|
- spec/fixtures/user_patient_with_gsm_and_email.xml
|
358
358
|
- spec/fixtures/user_patient_with_maiden_name.xml
|
359
|
+
- spec/fixtures/xmcare_house_number_addendum.xml
|
359
360
|
- spec/fixtures/xmcare_impersonating_cdis.xml
|
360
361
|
- spec/fixtures/xmcare_patient.xml
|
361
362
|
- spec/fixtures/xmcare_patient_email_in_field_number_four.xml
|
@@ -407,7 +408,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
407
408
|
- !ruby/object:Gem::Version
|
408
409
|
version: '0'
|
409
410
|
requirements: []
|
410
|
-
|
411
|
+
rubyforge_project:
|
412
|
+
rubygems_version: 2.6.14.4
|
411
413
|
signing_key:
|
412
414
|
specification_version: 4
|
413
415
|
summary: Arranges communication between Mirth and RoQua
|
@@ -431,6 +433,7 @@ test_files:
|
|
431
433
|
- spec/fixtures/user_patient_not_found.xml
|
432
434
|
- spec/fixtures/user_patient_with_gsm_and_email.xml
|
433
435
|
- spec/fixtures/user_patient_with_maiden_name.xml
|
436
|
+
- spec/fixtures/xmcare_house_number_addendum.xml
|
434
437
|
- spec/fixtures/xmcare_impersonating_cdis.xml
|
435
438
|
- spec/fixtures/xmcare_patient.xml
|
436
439
|
- spec/fixtures/xmcare_patient_email_in_field_number_four.xml
|