roqua-healthy 1.5.6 → 1.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/.document +0 -0
  3. data/.rspec +0 -0
  4. data/.yardopts +0 -0
  5. data/ChangeLog.md +4 -0
  6. data/Guardfile +0 -0
  7. data/LICENSE.txt +0 -0
  8. data/Rakefile +0 -0
  9. data/circle.yml +0 -0
  10. data/gemfiles/rails41.gemfile +0 -0
  11. data/gemfiles/rails42.gemfile +0 -0
  12. data/gemfiles/rails50.gemfile +0 -0
  13. data/lib/roqua/healthy/a19.rb +0 -0
  14. data/lib/roqua/healthy/a19/correct_patient_check.rb +0 -0
  15. data/lib/roqua/healthy/a19/impulse_name_parser.rb +0 -0
  16. data/lib/roqua/healthy/a19/name_parser.rb +0 -0
  17. data/lib/roqua/healthy/a19/response_parser.rb +0 -0
  18. data/lib/roqua/healthy/a19/transformer.rb +11 -1
  19. data/lib/roqua/healthy/message_cleaner.rb +0 -0
  20. data/lib/roqua/healthy/version.rb +1 -1
  21. data/lib/roqua_healthy.rb +0 -0
  22. data/spec/fixtures/comez_patient.xml +0 -0
  23. data/spec/fixtures/ggzwnb_patient.xml +0 -0
  24. data/spec/fixtures/oru-requests/spsy1218j.hl7 +0 -0
  25. data/spec/fixtures/oru-requests/spsy1218o.hl7 +0 -0
  26. data/spec/fixtures/oru-requests/spsy1218o2.hl7 +0 -0
  27. data/spec/fixtures/oru-requests/spsy411o.hl7 +0 -0
  28. data/spec/fixtures/oru-requests/spsy411o2.hl7 +0 -0
  29. data/spec/fixtures/oru-requests/spsyl.hl7 +0 -0
  30. data/spec/fixtures/oru-responses/xmcare_nack.hl7 +0 -0
  31. data/spec/fixtures/user_patient.xml +0 -0
  32. data/spec/fixtures/user_patient_deceased.xml +653 -0
  33. data/spec/fixtures/user_patient_not_found.xml +0 -0
  34. data/spec/fixtures/user_patient_with_gsm_and_email.xml +0 -0
  35. data/spec/fixtures/user_patient_with_maiden_name.xml +0 -0
  36. data/spec/fixtures/xmcare_patient.xml +0 -0
  37. data/spec/fixtures/xmcare_patient_email_in_field_number_four.xml +0 -0
  38. data/spec/fixtures/xmcare_patient_not_found.xml +0 -0
  39. data/spec/fixtures/xmcare_patient_with_maiden_name.xml +0 -0
  40. data/spec/fixtures/xmcare_patient_without_birthdate.xml +0 -0
  41. data/spec/fixtures/xmcare_phone_cell_in_prn.xml +0 -0
  42. data/spec/fixtures/xmcare_phone_cell_in_prn_orn.xml +0 -0
  43. data/spec/fixtures/xmcare_phone_home_in_prn.xml +0 -0
  44. data/spec/fixtures/xmcare_timeout_waiting_for_ack.xml +0 -0
  45. data/spec/fixtures/xmcare_unconventional_phone_cell_in_orn.xml +0 -0
  46. data/spec/fixtures/xmcare_unconventional_phone_cell_in_orn2.xml +0 -0
  47. data/spec/healthy_spec.rb +0 -0
  48. data/spec/integration/comez_spec.rb +1 -0
  49. data/spec/integration/epic_spec.rb +3 -0
  50. data/spec/integration/ggzwnb_spec.rb +1 -0
  51. data/spec/integration/user_spec.rb +12 -0
  52. data/spec/integration/xmcare_spec.rb +8 -0
  53. data/spec/spec_helper.rb +0 -0
  54. data/spec/support/fixtures.rb +0 -0
  55. data/spec/unit/a19/correct_patient_check_spec.rb +0 -0
  56. data/spec/unit/a19_spec.rb +0 -0
  57. data/spec/unit/message_cleaner_spec.rb +0 -0
  58. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fbf43c1a5be2df82c9a70d3b947e8bd6319bc1ea
4
- data.tar.gz: e924b5744beef04403156e234e864281ba257d64
2
+ SHA256:
3
+ metadata.gz: 188f815aa06bc9810fe1218d215bc2d8b0444945a4665c1bb35546bcc8e800b8
4
+ data.tar.gz: 8665aacab360207c3bf22037910a4fc58544aebed4f9f5e63b24fb997f7fddbe
5
5
  SHA512:
6
- metadata.gz: eaef696cab6222a1c11006e7e5b7a205cc6dc1bbb866c9e22443be7adabb1b88859f3b392b523cc78e0fd8f7f73732bca96e0a57834bde116ecb8b09be2e9253
7
- data.tar.gz: 6f22ccd2c7ca7254c1157a64c63868aee5886063ee78e2d5cc4fc46d89fb73d3a5fb160a889c0a6ca3a85390311d22183fb1164f714999df406cf4b429e1412f
6
+ metadata.gz: f2a6638530dec574f3be0fcd81e534f73d2654af4f5be160d5c933474e8f6db45d49911cd043ad27aabecc8d7ecb42ca1a80d78415c0644e51d19a998510dfe1
7
+ data.tar.gz: f74860226be11358e36f2d69acfddf1f7cc20efa5ad439f4e5694c934c477c24ab89b9964442f60ec8fd1efa28a8586ae07a584c0080b31e2c0b91af0037db75
data/.document CHANGED
File without changes
data/.rspec CHANGED
File without changes
data/.yardopts CHANGED
File without changes
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 1.5.7
2
+
3
+ * Add deceased attribute (boolean)
4
+
1
5
  ### 1.5.6
2
6
 
3
7
  * Use compounded last names for epic HL7 messages instead of family names
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -24,6 +24,7 @@ module Roqua
24
24
  @message = MessageCleaner.new(message).message
25
25
  end
26
26
 
27
+ # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
27
28
  def to_patient
28
29
  {
29
30
  status: status,
@@ -43,9 +44,11 @@ module Roqua
43
44
  birthdate: birthdate,
44
45
  gender: gender,
45
46
  phone_cell: phone_cell,
46
- medoq_data: medoq_data
47
+ medoq_data: medoq_data,
48
+ deceased: deceased
47
49
  }
48
50
  end
51
+ # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
49
52
 
50
53
  def status
51
54
  'SUCCESS'
@@ -104,6 +107,13 @@ module Roqua
104
107
  message.dig('PID', 'PID.8', 'PID.8.1')
105
108
  end
106
109
 
110
+ def deceased
111
+ case message.dig('PID', 'PID.30', 'PID.30.1')
112
+ when 'Y' then true
113
+ when 'N' then false
114
+ end
115
+ end
116
+
107
117
  private
108
118
 
109
119
  def name
File without changes
@@ -2,6 +2,6 @@
2
2
  module Roqua
3
3
  module Healthy
4
4
  # healthy version
5
- VERSION = "1.5.6"
5
+ VERSION = "1.5.7"
6
6
  end
7
7
  end
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
@@ -0,0 +1,653 @@
1
+ <?xml version="1.0"?>
2
+ <HL7Message>
3
+ <MSH>
4
+ <MSH.1>|</MSH.1>
5
+ <MSH.2>^~\&amp;</MSH.2>
6
+ <MSH.3>
7
+ <MSH.3.1>USER</MSH.3.1>
8
+ </MSH.3>
9
+ <MSH.4>
10
+ <MSH.4.1>IMPULSE</MSH.4.1>
11
+ </MSH.4>
12
+ <MSH.5>
13
+ <MSH.5.1>ROQUA</MSH.5.1>
14
+ </MSH.5>
15
+ <MSH.6>
16
+ <MSH.6.1>RGOC</MSH.6.1>
17
+ </MSH.6>
18
+ <MSH.7>
19
+ <MSH.7.1>201508281204</MSH.7.1>
20
+ </MSH.7>
21
+ <MSH.8/>
22
+ <MSH.9>
23
+ <MSH.9.1>ADR</MSH.9.1>
24
+ <MSH.9.2>A19</MSH.9.2>
25
+ </MSH.9>
26
+ <MSH.10>
27
+ <MSH.10.1>00000000000004444444</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.17>
44
+ <MSH.17.1>NLD</MSH.17.1>
45
+ </MSH.17>
46
+ <MSH.18>
47
+ <MSH.18.1>UNICODE</MSH.18.1>
48
+ </MSH.18>
49
+ <MSH.19/>
50
+ <MSH.20/>
51
+ <MSH.21/>
52
+ <MSH.22/>
53
+ </MSH>
54
+ <MSA>
55
+ <MSA.1>
56
+ <MSA.1.1>CA</MSA.1.1>
57
+ </MSA.1>
58
+ <MSA.2>
59
+ <MSA.2.1>cccaaaccc</MSA.2.1>
60
+ </MSA.2>
61
+ <MSA.3/>
62
+ <MSA.4/>
63
+ <MSA.5/>
64
+ <MSA.6/>
65
+ <MSA.7/>
66
+ </MSA>
67
+ <QAK>
68
+ <QAK.1/>
69
+ <QAK.2>
70
+ <QAK.2.1>OK</QAK.2.1>
71
+ </QAK.2>
72
+ <QAK.3/>
73
+ <QAK.4/>
74
+ <QAK.5/>
75
+ <QAK.6/>
76
+ <QAK.7/>
77
+ </QAK>
78
+ <QRD>
79
+ <QRD.1>
80
+ <QRD.1.1>201508280000</QRD.1.1>
81
+ </QRD.1>
82
+ <QRD.2>
83
+ <QRD.2.1>R</QRD.2.1>
84
+ </QRD.2>
85
+ <QRD.3>
86
+ <QRD.3.1>I</QRD.3.1>
87
+ </QRD.3>
88
+ <QRD.4>
89
+ <QRD.4.1>cccaaaccc</QRD.4.1>
90
+ </QRD.4>
91
+ <QRD.5/>
92
+ <QRD.6/>
93
+ <QRD.7>
94
+ <QRD.7.1>1</QRD.7.1>
95
+ <QRD.7.2>RD</QRD.7.2>
96
+ </QRD.7>
97
+ <QRD.8>
98
+ <QRD.8.1>111111</QRD.8.1>
99
+ <QRD.8.2>
100
+ <QRD.8.2.1/>
101
+ <QRD.8.2.2/>
102
+ <QRD.8.2.3/>
103
+ <QRD.8.2.4/>
104
+ <QRD.8.2.5/>
105
+ </QRD.8.2>
106
+ <QRD.8.3/>
107
+ <QRD.8.4/>
108
+ <QRD.8.5/>
109
+ <QRD.8.6/>
110
+ <QRD.8.7/>
111
+ <QRD.8.8/>
112
+ <QRD.8.9/>
113
+ <QRD.8.10/>
114
+ <QRD.8.11/>
115
+ <QRD.8.12/>
116
+ <QRD.8.13/>
117
+ <QRD.8.14/>
118
+ <QRD.8.15/>
119
+ <QRD.8.16/>
120
+ <QRD.8.17/>
121
+ <QRD.8.18/>
122
+ </QRD.8>
123
+ <QRD.9>
124
+ <QRD.9.1>DEM</QRD.9.1>
125
+ </QRD.9>
126
+ <QRD.10/>
127
+ <QRD.11/>
128
+ <QRD.12/>
129
+ <QRD.13/>
130
+ </QRD>
131
+ <PID>
132
+ <PID.1>
133
+ <PID.1.1>1</PID.1.1>
134
+ </PID.1>
135
+ <PID.2/>
136
+ <PID.3>
137
+ <PID.3.1>111111</PID.3.1>
138
+ <PID.3.2/>
139
+ <PID.3.3/>
140
+ <PID.3.4/>
141
+ <PID.3.5>PI</PID.3.5>
142
+ <PID.3.6/>
143
+ <PID.3.7/>
144
+ <PID.3.8/>
145
+ </PID.3>
146
+ <PID.3>
147
+ <PID.3.1>111111</PID.3.1>
148
+ <PID.3.2/>
149
+ <PID.3.3/>
150
+ <PID.3.4>NLMINBIZA</PID.3.4>
151
+ <PID.3.5>NNNLD</PID.3.5>
152
+ <PID.3.6/>
153
+ <PID.3.7>20150112</PID.3.7>
154
+ <PID.3.8/>
155
+ </PID.3>
156
+ <PID.4>
157
+ <PID.4.1>Client</PID.4.1>
158
+ <PID.4.2/>
159
+ <PID.4.3/>
160
+ <PID.4.4>LOCAL</PID.4.4>
161
+ <PID.4.5>Soort</PID.4.5>
162
+ <PID.4.6/>
163
+ <PID.4.7/>
164
+ <PID.4.8/>
165
+ </PID.4>
166
+ <PID.5>
167
+ <PID.5.1>
168
+ <PID.5.1.1>de Achternaam</PID.5.1.1>
169
+ <PID.5.1.2>de</PID.5.1.2>
170
+ <PID.5.1.3>Achternaam</PID.5.1.3>
171
+ <PID.5.1.4/>
172
+ <PID.5.1.5/>
173
+ </PID.5.1>
174
+ <PID.5.2>E.</PID.5.2>
175
+ <PID.5.3>T.</PID.5.3>
176
+ <PID.5.4/>
177
+ <PID.5.5>de</PID.5.5>
178
+ <PID.5.6/>
179
+ <PID.5.7>L</PID.5.7>
180
+ <PID.5.8/>
181
+ <PID.5.9/>
182
+ <PID.5.10/>
183
+ <PID.5.11/>
184
+ </PID.5>
185
+ <PID.5>
186
+ <PID.5.1>
187
+ <PID.5.1.1/>
188
+ <PID.5.1.2/>
189
+ <PID.5.1.3/>
190
+ <PID.5.1.4/>
191
+ <PID.5.1.5/>
192
+ </PID.5.1>
193
+ <PID.5.2>Eerste</PID.5.2>
194
+ <PID.5.3/>
195
+ <PID.5.4/>
196
+ <PID.5.5/>
197
+ <PID.5.6/>
198
+ <PID.5.7>N</PID.5.7>
199
+ <PID.5.8/>
200
+ <PID.5.9/>
201
+ <PID.5.10/>
202
+ <PID.5.11/>
203
+ </PID.5>
204
+ <PID.6/>
205
+ <PID.7>
206
+ <PID.7.1>19511101</PID.7.1>
207
+ </PID.7>
208
+ <PID.8>
209
+ <PID.8.1>F</PID.8.1>
210
+ </PID.8>
211
+ <PID.9/>
212
+ <PID.10/>
213
+ <PID.11>
214
+ <PID.11.1>
215
+ <PID.11.1.1>Van Straatstraat 8</PID.11.1.1>
216
+ <PID.11.1.2>Van Straatstraat</PID.11.1.2>
217
+ <PID.11.1.3>8</PID.11.1.3>
218
+ </PID.11.1>
219
+ <PID.11.2/>
220
+ <PID.11.3>GRONINGEN</PID.11.3>
221
+ <PID.11.4/>
222
+ <PID.11.5>9711 XX</PID.11.5>
223
+ <PID.11.6>NL</PID.11.6>
224
+ <PID.11.7>L</PID.11.7>
225
+ <PID.11.8/>
226
+ <PID.11.9/>
227
+ <PID.11.10/>
228
+ <PID.11.11/>
229
+ <PID.11.12/>
230
+ </PID.11>
231
+ <PID.12/>
232
+ <PID.13>
233
+ <PID.13.1>050 555555</PID.13.1>
234
+ <PID.13.2>PRN</PID.13.2>
235
+ <PID.13.3>PH</PID.13.3>
236
+ <PID.13.4/>
237
+ <PID.13.5/>
238
+ <PID.13.6/>
239
+ <PID.13.7/>
240
+ <PID.13.8/>
241
+ <PID.13.9/>
242
+ </PID.13>
243
+ <PID.14/>
244
+ <PID.15/>
245
+ <PID.16>
246
+ <PID.16.1>U</PID.16.1>
247
+ </PID.16>
248
+ <PID.17/>
249
+ <PID.18/>
250
+ <PID.19>
251
+ <PID.19.1>11111111</PID.19.1>
252
+ </PID.19>
253
+ <PID.20/>
254
+ <PID.21/>
255
+ <PID.22/>
256
+ <PID.23/>
257
+ <PID.24/>
258
+ <PID.25/>
259
+ <PID.26/>
260
+ <PID.27/>
261
+ <PID.28/>
262
+ <PID.29/>
263
+ <PID.30>
264
+ <PID.30.1>Y</PID.30.1>
265
+ </PID.30>
266
+ <PID.31>
267
+ <PID.31.1>N</PID.31.1>
268
+ </PID.31>
269
+ <PID.32/>
270
+ <PID.33/>
271
+ <PID.34/>
272
+ <PID.35/>
273
+ <PID.36/>
274
+ <PID.37/>
275
+ <PID.38/>
276
+ <PID.39/>
277
+ </PID>
278
+ <ROL>
279
+ <ROL.1/>
280
+ <ROL.2>
281
+ <ROL.2.1>UP</ROL.2.1>
282
+ </ROL.2>
283
+ <ROL.3>
284
+ <ROL.3.1>PP</ROL.3.1>
285
+ <ROL.3.2>Primary Care Provider</ROL.3.2>
286
+ </ROL.3>
287
+ <ROL.4>
288
+ <ROL.4.1>1111</ROL.4.1>
289
+ <ROL.4.2>
290
+ <ROL.4.2.1>Huisartsenpraktijk De Linde</ROL.4.2.1>
291
+ <ROL.4.2.2/>
292
+ <ROL.4.2.3>Huisartsenpraktijk De Linde</ROL.4.2.3>
293
+ <ROL.4.2.4/>
294
+ <ROL.4.2.5/>
295
+ </ROL.4.2>
296
+ <ROL.4.3/>
297
+ <ROL.4.4/>
298
+ <ROL.4.5/>
299
+ <ROL.4.6/>
300
+ <ROL.4.7/>
301
+ <ROL.4.8/>
302
+ <ROL.4.9/>
303
+ <ROL.4.10/>
304
+ <ROL.4.11/>
305
+ <ROL.4.12/>
306
+ <ROL.4.13/>
307
+ <ROL.4.14/>
308
+ <ROL.4.15/>
309
+ <ROL.4.16/>
310
+ <ROL.4.17/>
311
+ <ROL.4.18/>
312
+ </ROL.4>
313
+ <ROL.5/>
314
+ <ROL.6/>
315
+ <ROL.7/>
316
+ <ROL.8/>
317
+ <ROL.9>
318
+ <ROL.9.1>01</ROL.9.1>
319
+ <ROL.9.2>Huisartsen</ROL.9.2>
320
+ <ROL.9.3>Vektis</ROL.9.3>
321
+ </ROL.9>
322
+ <ROL.10/>
323
+ <ROL.11>
324
+ <ROL.11.1>
325
+ <ROL.11.1.1>Lindenlaan 6</ROL.11.1.1>
326
+ <ROL.11.1.2>Lindenlaan</ROL.11.1.2>
327
+ <ROL.11.1.3>6</ROL.11.1.3>
328
+ </ROL.11.1>
329
+ <ROL.11.2/>
330
+ <ROL.11.3>GRONINGEN</ROL.11.3>
331
+ <ROL.11.4/>
332
+ <ROL.11.5>9711 XY</ROL.11.5>
333
+ <ROL.11.6>NL</ROL.11.6>
334
+ <ROL.11.7>L</ROL.11.7>
335
+ <ROL.11.8/>
336
+ <ROL.11.9/>
337
+ <ROL.11.10/>
338
+ <ROL.11.11/>
339
+ <ROL.11.12/>
340
+ </ROL.11>
341
+ <ROL.12>
342
+ <ROL.12.1>050 5123123</ROL.12.1>
343
+ <ROL.12.2>PRN</ROL.12.2>
344
+ <ROL.12.3>PH</ROL.12.3>
345
+ <ROL.12.4/>
346
+ <ROL.12.5/>
347
+ <ROL.12.6/>
348
+ <ROL.12.7/>
349
+ <ROL.12.8/>
350
+ <ROL.12.9/>
351
+ </ROL.12>
352
+ <ROL.13/>
353
+ </ROL>
354
+ <ROL>
355
+ <ROL.1/>
356
+ <ROL.2>
357
+ <ROL.2.1>UP</ROL.2.1>
358
+ </ROL.2>
359
+ <ROL.3>
360
+ <ROL.3.1>PP</ROL.3.1>
361
+ <ROL.3.2>Primary Care Provider</ROL.3.2>
362
+ </ROL.3>
363
+ <ROL.4/>
364
+ <ROL.5/>
365
+ <ROL.6/>
366
+ <ROL.7/>
367
+ <ROL.8/>
368
+ <ROL.9>
369
+ <ROL.9.1>02</ROL.9.1>
370
+ <ROL.9.2>Apothekers</ROL.9.2>
371
+ <ROL.9.3>Vektis</ROL.9.3>
372
+ </ROL.9>
373
+ <ROL.10/>
374
+ <ROL.11>
375
+ <ROL.11.1>
376
+ <ROL.11.1.1/>
377
+ <ROL.11.1.2/>
378
+ <ROL.11.1.3/>
379
+ </ROL.11.1>
380
+ <ROL.11.2/>
381
+ <ROL.11.3/>
382
+ <ROL.11.4/>
383
+ <ROL.11.5/>
384
+ <ROL.11.6/>
385
+ <ROL.11.7>L</ROL.11.7>
386
+ <ROL.11.8/>
387
+ <ROL.11.9/>
388
+ <ROL.11.10/>
389
+ <ROL.11.11/>
390
+ <ROL.11.12/>
391
+ </ROL.11>
392
+ <ROL.12/>
393
+ <ROL.13/>
394
+ </ROL>
395
+ <PV1>
396
+ <PV1.1>
397
+ <PV1.1.1>1</PV1.1.1>
398
+ </PV1.1>
399
+ <PV1.2>
400
+ <PV1.2.1>O</PV1.2.1>
401
+ </PV1.2>
402
+ <PV1.3>
403
+ <PV1.3.1>03340004</PV1.3.1>
404
+ </PV1.3>
405
+ <PV1.4/>
406
+ <PV1.5/>
407
+ <PV1.6/>
408
+ <PV1.7>
409
+ <PV1.7.1>111112</PV1.7.1>
410
+ <PV1.7.2>
411
+ <PV1.7.2.1>van Hout</PV1.7.2.1>
412
+ <PV1.7.2.2>van</PV1.7.2.2>
413
+ <PV1.7.2.3>Hout</PV1.7.2.3>
414
+ <PV1.7.2.4/>
415
+ <PV1.7.2.5/>
416
+ </PV1.7.2>
417
+ <PV1.7.3/>
418
+ <PV1.7.4>G.</PV1.7.4>
419
+ <PV1.7.5/>
420
+ <PV1.7.6/>
421
+ <PV1.7.7/>
422
+ <PV1.7.8/>
423
+ <PV1.7.9/>
424
+ <PV1.7.10/>
425
+ <PV1.7.11/>
426
+ <PV1.7.12/>
427
+ <PV1.7.13/>
428
+ <PV1.7.14/>
429
+ <PV1.7.15/>
430
+ <PV1.7.16/>
431
+ <PV1.7.17/>
432
+ <PV1.7.18/>
433
+ </PV1.7>
434
+ <PV1.8/>
435
+ <PV1.9/>
436
+ <PV1.10/>
437
+ <PV1.11/>
438
+ <PV1.12/>
439
+ <PV1.13/>
440
+ <PV1.14/>
441
+ <PV1.15/>
442
+ <PV1.16/>
443
+ <PV1.17/>
444
+ <PV1.18/>
445
+ <PV1.19>
446
+ <PV1.19.1>
447
+ <PV1.19.1.1>002</PV1.19.1.1>
448
+ <PV1.19.1.2>002</PV1.19.1.2>
449
+ </PV1.19.1>
450
+ <PV1.19.2/>
451
+ <PV1.19.3/>
452
+ <PV1.19.4/>
453
+ <PV1.19.5/>
454
+ <PV1.19.6/>
455
+ <PV1.19.7/>
456
+ <PV1.19.8/>
457
+ </PV1.19>
458
+ <PV1.20/>
459
+ <PV1.21/>
460
+ <PV1.22/>
461
+ <PV1.23/>
462
+ <PV1.24/>
463
+ <PV1.25/>
464
+ <PV1.26/>
465
+ <PV1.27/>
466
+ <PV1.28/>
467
+ <PV1.29/>
468
+ <PV1.30/>
469
+ <PV1.31/>
470
+ <PV1.32/>
471
+ <PV1.33/>
472
+ <PV1.34/>
473
+ <PV1.35/>
474
+ <PV1.36/>
475
+ <PV1.37/>
476
+ <PV1.38/>
477
+ <PV1.39/>
478
+ <PV1.40/>
479
+ <PV1.41/>
480
+ <PV1.42/>
481
+ <PV1.43/>
482
+ <PV1.44>
483
+ <PV1.44.1>201508201330</PV1.44.1>
484
+ </PV1.44>
485
+ <PV1.45/>
486
+ <PV1.46/>
487
+ <PV1.47/>
488
+ <PV1.48/>
489
+ <PV1.49/>
490
+ <PV1.50>
491
+ <PV1.50.1>37</PV1.50.1>
492
+ <PV1.50.2/>
493
+ <PV1.50.3/>
494
+ <PV1.50.4/>
495
+ <PV1.50.5/>
496
+ <PV1.50.6/>
497
+ <PV1.50.7/>
498
+ <PV1.50.8/>
499
+ </PV1.50>
500
+ <PV1.51/>
501
+ <PV1.52/>
502
+ <PV1.53/>
503
+ </PV1>
504
+ <PV2>
505
+ <PV2.1/>
506
+ <PV2.2/>
507
+ <PV2.3>
508
+ <PV2.3.1>180</PV2.3.1>
509
+ </PV2.3>
510
+ <PV2.4/>
511
+ <PV2.5/>
512
+ <PV2.6/>
513
+ <PV2.7/>
514
+ <PV2.8>
515
+ <PV2.8.1>20150820</PV2.8.1>
516
+ </PV2.8>
517
+ <PV2.9/>
518
+ <PV2.10/>
519
+ <PV2.11/>
520
+ <PV2.12/>
521
+ <PV2.13/>
522
+ <PV2.14/>
523
+ <PV2.15/>
524
+ <PV2.16/>
525
+ <PV2.17/>
526
+ <PV2.18/>
527
+ <PV2.19/>
528
+ <PV2.20/>
529
+ <PV2.21/>
530
+ <PV2.22/>
531
+ <PV2.23/>
532
+ <PV2.24/>
533
+ <PV2.25/>
534
+ <PV2.26/>
535
+ <PV2.27/>
536
+ <PV2.28/>
537
+ <PV2.29/>
538
+ <PV2.30/>
539
+ <PV2.31/>
540
+ <PV2.32/>
541
+ <PV2.33/>
542
+ <PV2.34/>
543
+ <PV2.35/>
544
+ <PV2.36/>
545
+ <PV2.37/>
546
+ <PV2.38/>
547
+ <PV2.39/>
548
+ <PV2.40/>
549
+ <PV2.41/>
550
+ <PV2.42/>
551
+ <PV2.43/>
552
+ <PV2.44/>
553
+ <PV2.45/>
554
+ <PV2.46/>
555
+ <PV2.47/>
556
+ <PV2.48/>
557
+ </PV2>
558
+ <IN1>
559
+ <IN1.1>
560
+ <IN1.1.1>1</IN1.1.1>
561
+ </IN1.1>
562
+ <IN1.2>
563
+ <IN1.2.1>""</IN1.2.1>
564
+ </IN1.2>
565
+ <IN1.3>
566
+ <IN1.3.1>3332</IN1.3.1>
567
+ <IN1.3.2/>
568
+ <IN1.3.3/>
569
+ <IN1.3.4>VEKTIS</IN1.3.4>
570
+ <IN1.3.5/>
571
+ <IN1.3.6/>
572
+ <IN1.3.7/>
573
+ <IN1.3.8/>
574
+ </IN1.3>
575
+ <IN1.4>
576
+ <IN1.4.1>MENZIS</IN1.4.1>
577
+ <IN1.4.2/>
578
+ <IN1.4.3/>
579
+ <IN1.4.4/>
580
+ <IN1.4.5/>
581
+ <IN1.4.6/>
582
+ <IN1.4.7/>
583
+ <IN1.4.8/>
584
+ </IN1.4>
585
+ <IN1.5>
586
+ <IN1.5.1>
587
+ <IN1.5.1.1>Postbus 75000</IN1.5.1.1>
588
+ <IN1.5.1.2>Postbus</IN1.5.1.2>
589
+ <IN1.5.1.3>75000</IN1.5.1.3>
590
+ </IN1.5.1>
591
+ <IN1.5.2/>
592
+ <IN1.5.3>ENSCHEDE</IN1.5.3>
593
+ <IN1.5.4/>
594
+ <IN1.5.5>7500 KC</IN1.5.5>
595
+ <IN1.5.6>NL</IN1.5.6>
596
+ <IN1.5.7>L</IN1.5.7>
597
+ <IN1.5.8/>
598
+ <IN1.5.9/>
599
+ <IN1.5.10/>
600
+ <IN1.5.11/>
601
+ <IN1.5.12/>
602
+ </IN1.5>
603
+ <IN1.6/>
604
+ <IN1.7/>
605
+ <IN1.8/>
606
+ <IN1.9/>
607
+ <IN1.10/>
608
+ <IN1.11/>
609
+ <IN1.12>
610
+ <IN1.12.1>20140101</IN1.12.1>
611
+ </IN1.12>
612
+ <IN1.13/>
613
+ <IN1.14/>
614
+ <IN1.15/>
615
+ <IN1.16/>
616
+ <IN1.17/>
617
+ <IN1.18/>
618
+ <IN1.19/>
619
+ <IN1.20/>
620
+ <IN1.21/>
621
+ <IN1.22/>
622
+ <IN1.23/>
623
+ <IN1.24/>
624
+ <IN1.25/>
625
+ <IN1.26/>
626
+ <IN1.27/>
627
+ <IN1.28/>
628
+ <IN1.29/>
629
+ <IN1.30/>
630
+ <IN1.31/>
631
+ <IN1.32/>
632
+ <IN1.33/>
633
+ <IN1.34/>
634
+ <IN1.35/>
635
+ <IN1.36>
636
+ <IN1.36.1>111111111</IN1.36.1>
637
+ </IN1.36>
638
+ <IN1.37/>
639
+ <IN1.38/>
640
+ <IN1.39/>
641
+ <IN1.40/>
642
+ <IN1.41/>
643
+ <IN1.42/>
644
+ <IN1.43/>
645
+ <IN1.44/>
646
+ <IN1.45/>
647
+ <IN1.46/>
648
+ <IN1.47/>
649
+ <IN1.48/>
650
+ <IN1.49/>
651
+ <IN1.50/>
652
+ </IN1>
653
+ </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
@@ -29,5 +29,6 @@ describe 'Fetching A19 from Comez' do
29
29
  # phone cells with letters are rejected, because it usually means they can not be used as a client's own
30
30
  # cell phone number
31
31
  it { expect(subject[:phone_cell]).to eq(nil) }
32
+ it { expect(subject[:deceased]).to eq(false) }
32
33
  end
33
34
  end
@@ -24,6 +24,7 @@ describe 'Fetching A19 from EPIC' do
24
24
  it { expect(subject[:birthdate]).to eq('19800101') }
25
25
  it { expect(subject[:gender]).to eq('M') }
26
26
  it { expect(subject[:phone_cell]).to eq('0612345679') }
27
+ it { expect(subject[:deceased]).to eq(false) }
27
28
  end
28
29
 
29
30
  describe 'epd example: a patient with no PID 8.1 (gender) field' do
@@ -47,6 +48,7 @@ describe 'Fetching A19 from EPIC' do
47
48
  it { expect(subject[:birthdate]).to eq('20011003') }
48
49
  it { expect(subject[:gender]).to eq(nil) }
49
50
  it { expect(subject[:phone_cell]).to eq(nil) }
51
+ it { expect(subject[:deceased]).to eq(false) }
50
52
  end
51
53
 
52
54
  describe 'example of compounded last name and prefix' do
@@ -73,6 +75,7 @@ describe 'Fetching A19 from EPIC' do
73
75
  it { expect(subject[:birthdate]).to eq('1990101') }
74
76
  it { expect(subject[:gender]).to eq('F') }
75
77
  it { expect(subject[:phone_cell]).to eq('0612345678') }
78
+ it { expect(subject[:deceased]).to eq(false) }
76
79
  end
77
80
 
78
81
  describe 'patient not found' do
@@ -29,5 +29,6 @@ describe 'Fetching A19 from GGZWNB' do
29
29
  # phone cells with letters are rejected, because it usually means they can not be used as a client's own
30
30
  # cell phone number
31
31
  it { expect(subject[:phone_cell]).to eq('0612345678') }
32
+ it { expect(subject[:deceased]).to eq(false) }
32
33
  end
33
34
  end
@@ -24,6 +24,7 @@ describe 'Fetching A19 from USER' do
24
24
  it { expect(subject[:birthdate]).to eq('19511101') }
25
25
  it { expect(subject[:gender]).to eq('F') }
26
26
  it { expect(subject[:phone_cell]).to eq(nil) }
27
+ it { expect(subject[:deceased]).to eq(nil) }
27
28
  end
28
29
 
29
30
  describe 'a patient with a maiden name' do
@@ -48,6 +49,7 @@ describe 'Fetching A19 from USER' do
48
49
  it { expect(subject[:birthdate]).to eq('19200101') }
49
50
  it { expect(subject[:gender]).to eq('F') }
50
51
  it { expect(subject[:phone_cell]).to be_nil }
52
+ it { expect(subject[:deceased]).to eq(nil) }
51
53
  end
52
54
 
53
55
  describe 'a patient with gsm number and email address' do
@@ -72,6 +74,7 @@ describe 'Fetching A19 from USER' do
72
74
  it { expect(subject[:birthdate]).to eq('19800101') }
73
75
  it { expect(subject[:gender]).to eq('M') }
74
76
  it { expect(subject[:phone_cell]).to eq('0611223344') }
77
+ it { expect(subject[:deceased]).to eq(nil) }
75
78
  end
76
79
 
77
80
  describe 'a patient that does not exist' do
@@ -81,4 +84,13 @@ describe 'Fetching A19 from USER' do
81
84
  expect { Roqua::Healthy::A19.fetch("123456") }.to raise_error(Roqua::Healthy::PatientNotFound)
82
85
  end
83
86
  end
87
+
88
+ describe 'a deceased patient' do
89
+ before { load_fixture 'user_patient_deceased', '111111' }
90
+ subject { Roqua::Healthy::A19.fetch("111111") }
91
+
92
+ it 'returns true' do
93
+ expect(subject[:deceased]).to eq(true)
94
+ end
95
+ end
84
96
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require 'spec_helper'
3
3
 
4
+ # rubocop:disable Metrics/BlockLength
4
5
  describe 'Fetching A19 from XMcare' do
5
6
  describe 'a patient' do
6
7
  before { load_fixture 'xmcare_patient', '12345678901' }
@@ -27,6 +28,7 @@ describe 'Fetching A19 from XMcare' do
27
28
  it { expect(subject[:birthdate]).to eq('17070415') }
28
29
  it { expect(subject[:gender]).to eq('F') }
29
30
  it { expect(subject[:phone_cell]).to eq('0612345678') } # - stripped
31
+ it { expect(subject[:deceased]).to eq(false) }
30
32
  end
31
33
 
32
34
  describe 'a patient with a maiden name' do
@@ -54,6 +56,7 @@ describe 'Fetching A19 from XMcare' do
54
56
  it { expect(subject[:birthdate]).to eq('17070415') }
55
57
  it { expect(subject[:gender]).to eq('F') }
56
58
  it { expect(subject[:phone_cell]).to eq('0612345678') } # - stripped
59
+ it { expect(subject[:deceased]).to eq(false) }
57
60
  end
58
61
 
59
62
  describe 'a patient without a known birthdate' do
@@ -81,6 +84,7 @@ describe 'Fetching A19 from XMcare' do
81
84
  it { expect(subject[:birthdate]).to be_nil }
82
85
  it { expect(subject[:gender]).to eq('F') }
83
86
  it { expect(subject[:phone_cell]).to eq('0612345678') } # - stripped
87
+ it { expect(subject[:deceased]).to eq(false) }
84
88
  end
85
89
 
86
90
  describe 'a patient with an email in an alternate place' do
@@ -108,6 +112,7 @@ describe 'Fetching A19 from XMcare' do
108
112
  it { expect(subject[:birthdate]).to eq('17070415') }
109
113
  it { expect(subject[:gender]).to eq('F') }
110
114
  it { expect(subject[:phone_cell]).to eq('0612345678') } # spaces stripped
115
+ it { expect(subject[:deceased]).to eq(false) }
111
116
  end
112
117
 
113
118
  describe 'a patient from an xmcare instance impersonating cdis' do
@@ -135,6 +140,7 @@ describe 'Fetching A19 from XMcare' do
135
140
  it { expect(subject[:birthdate]).to eq('17070415') }
136
141
  it { expect(subject[:gender]).to eq('M') }
137
142
  it { expect(subject[:phone_cell]).to eq('0612345678') } # - stripped
143
+ it { expect(subject[:deceased]).to eq(false) }
138
144
  end
139
145
 
140
146
  describe 'a patient with a cell phone number only in the primary residence number field' do
@@ -162,6 +168,7 @@ describe 'Fetching A19 from XMcare' do
162
168
  it { expect(subject[:birthdate]).to eq('19900101') }
163
169
  it { expect(subject[:gender]).to eq('F') }
164
170
  it { expect(subject[:phone_cell]).to eq('0612345678') }
171
+ it { expect(subject[:deceased]).to eq(false) }
165
172
  end
166
173
 
167
174
  describe 'a patient with a cell phone number in the both residence number fields' do
@@ -208,3 +215,4 @@ describe 'Fetching A19 from XMcare' do
208
215
  end
209
216
  end
210
217
  end
218
+ # rubocop:enable Metrics/BlockLength
data/spec/spec_helper.rb CHANGED
File without changes
File without changes
File without changes
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.6
4
+ version: 1.5.7
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: 2018-04-12 00:00:00.000000000 Z
14
+ date: 2018-05-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -352,6 +352,7 @@ files:
352
352
  - spec/fixtures/oru-requests/spsyl.hl7
353
353
  - spec/fixtures/oru-responses/xmcare_nack.hl7
354
354
  - spec/fixtures/user_patient.xml
355
+ - spec/fixtures/user_patient_deceased.xml
355
356
  - spec/fixtures/user_patient_not_found.xml
356
357
  - spec/fixtures/user_patient_with_gsm_and_email.xml
357
358
  - spec/fixtures/user_patient_with_maiden_name.xml
@@ -407,7 +408,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
407
408
  version: '0'
408
409
  requirements: []
409
410
  rubyforge_project:
410
- rubygems_version: 2.5.1
411
+ rubygems_version: 2.7.6
411
412
  signing_key:
412
413
  specification_version: 4
413
414
  summary: Arranges communication between Mirth and RoQua
@@ -427,6 +428,7 @@ test_files:
427
428
  - spec/fixtures/oru-requests/spsyl.hl7
428
429
  - spec/fixtures/oru-responses/xmcare_nack.hl7
429
430
  - spec/fixtures/user_patient.xml
431
+ - spec/fixtures/user_patient_deceased.xml
430
432
  - spec/fixtures/user_patient_not_found.xml
431
433
  - spec/fixtures/user_patient_with_gsm_and_email.xml
432
434
  - spec/fixtures/user_patient_with_maiden_name.xml