allscripts_unity_client 4.0.1 → 5.0.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +5 -5
  2. data/lib/allscripts_unity_client.rb +3 -0
  3. data/lib/allscripts_unity_client/client.rb +1 -1
  4. data/lib/allscripts_unity_client/client_options.rb +7 -3
  5. data/lib/allscripts_unity_client/json_client_driver.rb +33 -0
  6. data/lib/allscripts_unity_client/version.rb +1 -1
  7. metadata +22 -60
  8. data/.gitignore +0 -21
  9. data/.rspec +0 -2
  10. data/.rubocop.yml +0 -340
  11. data/.travis.yml +0 -11
  12. data/Gemfile +0 -2
  13. data/LICENSE +0 -22
  14. data/README.md +0 -347
  15. data/Rakefile +0 -7
  16. data/allscripts_unity_client.gemspec +0 -40
  17. data/spec/allscripts_unity_client_spec.rb +0 -66
  18. data/spec/client_driver_spec.rb +0 -23
  19. data/spec/client_options_spec.rb +0 -185
  20. data/spec/client_spec.rb +0 -471
  21. data/spec/factories/allscripts_unity_client_parameters_factory.rb +0 -18
  22. data/spec/factories/client_driver_factory.rb +0 -20
  23. data/spec/factories/client_factory.rb +0 -9
  24. data/spec/factories/client_options.rb +0 -18
  25. data/spec/factories/magic_request_factory.rb +0 -37
  26. data/spec/factories/unity_request_factory.rb +0 -13
  27. data/spec/factories/unity_response_factory.rb +0 -12
  28. data/spec/fixtures/attributes_hash.yml +0 -15
  29. data/spec/fixtures/date_hash.yml +0 -8
  30. data/spec/fixtures/date_string_hash.yml +0 -8
  31. data/spec/fixtures/error.json +0 -3
  32. data/spec/fixtures/get_providers.json +0 -69
  33. data/spec/fixtures/get_providers.xml +0 -119
  34. data/spec/fixtures/get_providers_json.yml +0 -65
  35. data/spec/fixtures/get_providers_xml.yml +0 -270
  36. data/spec/fixtures/get_security_token.json +0 -1
  37. data/spec/fixtures/get_security_token.xml +0 -7
  38. data/spec/fixtures/get_server_info.json +0 -10
  39. data/spec/fixtures/get_server_info.xml +0 -40
  40. data/spec/fixtures/get_server_info_json.yml +0 -8
  41. data/spec/fixtures/get_server_info_xml.yml +0 -55
  42. data/spec/fixtures/no_attributes_hash.yml +0 -7
  43. data/spec/fixtures/retire_security_token.json +0 -1
  44. data/spec/fixtures/retire_security_token.xml +0 -5
  45. data/spec/fixtures/soap_fault.xml +0 -13
  46. data/spec/fixtures/string_keyed_hash.yml +0 -8
  47. data/spec/fixtures/symbol_keyed_hash.yml +0 -8
  48. data/spec/json_client_driver_spec.rb +0 -152
  49. data/spec/json_unity_request_spec.rb +0 -37
  50. data/spec/json_unity_response_spec.rb +0 -44
  51. data/spec/spec_helper.rb +0 -85
  52. data/spec/support/factory_bot.rb +0 -10
  53. data/spec/support/fixture_loader.rb +0 -20
  54. data/spec/support/shared_examples_for_client_driver.rb +0 -118
  55. data/spec/support/shared_examples_for_unity_request.rb +0 -114
  56. data/spec/support/shared_examples_for_unity_response.rb +0 -26
  57. data/spec/unity_request_spec.rb +0 -37
  58. data/spec/unity_response_spec.rb +0 -36
  59. data/spec/utilities_spec.rb +0 -144
@@ -1,23 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe AllscriptsUnityClient::ClientDriver do
4
- it_behaves_like 'a client driver'
5
-
6
- subject { build(:client_driver) }
7
-
8
- describe '#client_type' do
9
- it { expect(subject.client_type).to be(:none) }
10
- end
11
-
12
- describe '#magic' do
13
- it { expect { subject.magic }.to raise_error(NotImplementedError) }
14
- end
15
-
16
- describe '#get_security_token!' do
17
- it { expect { subject.get_security_token! }.to raise_error(NotImplementedError) }
18
- end
19
-
20
- describe '#retire_security_token!' do
21
- it { expect { subject.retire_security_token! }.to raise_error(NotImplementedError) }
22
- end
23
- end
@@ -1,185 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe AllscriptsUnityClient::ClientOptions do
4
- subject { build(:client_options) }
5
-
6
- let(:url_with_slash) { 'http://www.example.com/' }
7
- let(:url_without_slash) { 'http://www.example.com' }
8
- let(:utc_timezone) { ActiveSupport::TimeZone['Etc/UTC'] }
9
- let(:america_los_angeles) { 'America/Los_Angeles' }
10
- let(:america_los_angeles_timezone) { ActiveSupport::TimeZone['America/Los_Angeles'] }
11
- let(:client_options_hash) { { base_unity_url: 'http://www.example.com', username: 'username', password: 'password', appname: 'appname', proxy: 'proxy', timezone: 'UTC', logger: nil } }
12
-
13
- describe '#validate_options' do
14
- context 'when not given base_unity_url' do
15
- it { expect { build(:client_options, base_unity_url: nil) }.to raise_error(ArgumentError) }
16
- end
17
-
18
- context 'when not given username' do
19
- it { expect { build(:client_options, username: nil) }.to raise_error(ArgumentError) }
20
- end
21
-
22
- context 'when not given password' do
23
- it { expect { build(:client_options, password: nil) }.to raise_error(ArgumentError) }
24
- end
25
-
26
- context 'when not given appname' do
27
- it { expect { build(:client_options, appname: nil) }.to raise_error(ArgumentError) }
28
- end
29
- end
30
-
31
- describe '#base_unity_url=' do
32
- context 'when given a base_unity_url that ends in a slash (/)' do
33
- it 'strips the slash' do
34
- subject.base_unity_url = url_with_slash
35
- expect(subject.base_unity_url).to eq(url_without_slash)
36
- end
37
- end
38
-
39
- context 'when given nil' do
40
- it { expect { subject.base_unity_url = nil }.to raise_error(ArgumentError) }
41
- end
42
- end
43
-
44
- describe '#username=' do
45
- context 'when given nil' do
46
- it { expect { subject.username = nil }.to raise_error(ArgumentError) }
47
- end
48
-
49
- context 'when given username' do
50
- it { expect { subject.username = 'username' }.not_to raise_error }
51
- end
52
- end
53
-
54
- describe '#password=' do
55
- context 'when given nil' do
56
- it { expect { subject.password = nil }.to raise_error(ArgumentError) }
57
- end
58
-
59
- context 'when given password' do
60
- it { expect { subject.password = 'password' }.not_to raise_error }
61
- end
62
- end
63
-
64
- describe '#appname=' do
65
- context 'when given nil' do
66
- it { expect { subject.appname = nil }.to raise_error(ArgumentError) }
67
- end
68
-
69
- context 'when given appname' do
70
- it { expect { subject.appname = 'appname' }.not_to raise_error }
71
- end
72
- end
73
-
74
- describe '#timezone=' do
75
- context 'when given nil' do
76
- it 'sets timezone to UTC' do
77
- subject.timezone = nil
78
- expect(subject.timezone).to eq(utc_timezone)
79
- end
80
- end
81
-
82
- context 'when given tzinfo string' do
83
- it 'sets it to correct Timezone' do
84
- subject.timezone = america_los_angeles
85
- expect(subject.timezone).to eq(america_los_angeles_timezone)
86
- end
87
- end
88
- end
89
-
90
- describe '#proxy?' do
91
- context 'when proxy is nil' do
92
- it 'returns false' do
93
- expect(subject.proxy?).to be_falsey
94
- end
95
- end
96
-
97
- context 'when proxy is not nil' do
98
- it 'returns true' do
99
- subject.proxy = url_with_slash
100
- expect(subject.proxy?).to be_truthy
101
- end
102
- end
103
-
104
- context 'when proxy is empty string' do
105
- it 'returns false' do
106
- subject.proxy = ''
107
- expect(subject.proxy?).to be_falsey
108
- end
109
- end
110
- end
111
-
112
- describe '#logger?' do
113
- context 'when logger is nil' do
114
- it 'returns false' do
115
- expect(subject.logger?).to be_falsey
116
- end
117
- end
118
-
119
- context 'when logger is not nil' do
120
- it 'returns true' do
121
- subject.logger = double('logger')
122
- expect(subject.logger?).to be_truthy
123
- end
124
- end
125
- end
126
-
127
- describe '#ca_file?' do
128
- context 'when ca_file is nil' do
129
- it 'returns false' do
130
- expect(subject.ca_file?).to be_falsey
131
- end
132
- end
133
-
134
- context 'when ca_file is not nil' do
135
- it 'returns true' do
136
- subject.ca_file = 'test_file'
137
- expect(subject.ca_file?).to be_truthy
138
- end
139
- end
140
-
141
- context 'when ca_file is empty string' do
142
- it 'returns false' do
143
- subject.ca_file = ''
144
- expect(subject.ca_file?).to be_falsey
145
- end
146
- end
147
- end
148
-
149
- describe '#ca_path?' do
150
- context 'when ca_path is nil' do
151
- it 'returns false' do
152
- expect(subject.ca_path?).to be_falsey
153
- end
154
- end
155
-
156
- context 'when ca_path is not nil' do
157
- it 'returns true' do
158
- subject.ca_path = 'test_path'
159
- expect(subject.ca_path?).to be_truthy
160
- end
161
- end
162
-
163
- context 'when ca_path is empty string' do
164
- it 'returns false' do
165
- subject.ca_path = ''
166
- expect(subject.ca_path?).to be_falsey
167
- end
168
- end
169
- end
170
-
171
- describe '#timeout?' do
172
- context 'when timeout is nil' do
173
- it 'returns false' do
174
- expect(subject.timeout?).to be_falsey
175
- end
176
- end
177
-
178
- context 'when timeout is not nil' do
179
- it 'returns true' do
180
- subject.timeout = 10
181
- expect(subject.timeout?).to be_truthy
182
- end
183
- end
184
- end
185
- end
data/spec/client_spec.rb DELETED
@@ -1,471 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe AllscriptsUnityClient::Client do
4
- subject { build(:client) }
5
-
6
- describe '#initialize' do
7
- context 'when given nil for client_driver' do
8
- it { expect { build(:client, client_driver: nil) }.to raise_error(ArgumentError) }
9
- end
10
- end
11
-
12
- describe '#magic' do
13
- it 'calls magic on @client_driver' do
14
- subject.client_driver = double(magic: 'magic')
15
- subject.magic
16
- expect(subject.client_driver).to have_received(:magic)
17
- end
18
- end
19
-
20
- describe '#get_security_token!' do
21
- it 'calls get_security_token! on @client_driver' do
22
- subject.client_driver = double(get_security_token!: 'get_security_token!')
23
- subject.get_security_token!
24
- expect(subject.client_driver).to have_received(:get_security_token!)
25
- end
26
- end
27
-
28
- describe '#retire_security_token!' do
29
- it 'calls retire_security_token! on @client_driver' do
30
- subject.client_driver = double(retire_security_token!: 'retire_security_token!')
31
- subject.retire_security_token!
32
- expect(subject.client_driver).to have_received(:retire_security_token!)
33
- end
34
- end
35
-
36
- describe '#security_token?' do
37
- it 'calls security_token? on @client_driver' do
38
- subject.client_driver = double(security_token?: 'security_token?')
39
- subject.security_token?
40
- expect(subject.client_driver).to have_received(:security_token?)
41
- end
42
- end
43
-
44
- describe '#client_type' do
45
- it 'calls client_type on @client_driver' do
46
- subject.client_driver = double(client_type: 'client_type?')
47
- subject.client_type
48
- expect(subject.client_driver).to have_received(:client_type)
49
- end
50
- end
51
-
52
- describe '#get_task_list' do
53
- it 'does stuff' do
54
- subject.client_driver = double(magic: 'magic')
55
- subject.get_task_list(123, Date.yesterday.strftime("%m/%d/%Y"),
56
- 'Y', 'Something|okj', 'Ready|go')
57
- magicified_parameters = {
58
- action: 'GetTaskList',
59
- userid: 123,
60
- parameter1: Date.yesterday.strftime("%m/%d/%Y"),
61
- parameter2: 'Something|okj',
62
- parameter3: 'Ready|go',
63
- parameter4: 'Y'
64
- }
65
- expect(subject.client_driver).to have_received(:magic).with(magicified_parameters)
66
- end
67
- end
68
-
69
- describe '#commit_charges' do
70
- it { expect { subject.commit_charges }.to raise_error(NotImplementedError) }
71
- end
72
-
73
- describe '#echo'
74
-
75
- describe '#get_account'
76
-
77
- describe '#get_changed_patients'
78
-
79
- describe '#get_charge_info_by_username' do
80
- it { expect { subject.get_charge_info_by_username }.to raise_error(NotImplementedError) }
81
- end
82
-
83
- describe '#get_charges' do
84
- it { expect { subject.get_charges }.to raise_error(NotImplementedError) }
85
- end
86
-
87
- describe '#get_chart_item_details'
88
- describe '#get_clinical_summary'
89
-
90
- describe '#get_delegates' do
91
- it { expect { subject.get_delegates }.to raise_error(NotImplementedError) }
92
- end
93
-
94
- describe '#get_dictionary'
95
-
96
- describe '#get_dictionary_sets' do
97
- it { expect { subject.get_dictionary_sets }.to raise_error(NotImplementedError) }
98
- end
99
-
100
- describe '#get_doc_template' do
101
- it { expect { subject.get_doc_template }.to raise_error(NotImplementedError) }
102
- end
103
-
104
- describe '#get_document_by_accession' do
105
- it { expect { subject.get_document_by_accession }.to raise_error(NotImplementedError) }
106
- end
107
-
108
- describe '#get_document_image' do
109
- it { expect { subject.get_document_image }.to raise_error(NotImplementedError) }
110
- end
111
-
112
- describe '#get_documents' do
113
- it { expect { subject.get_documents }.to raise_error(NotImplementedError) }
114
- end
115
-
116
- describe '#get_document_type' do
117
- it { expect { subject.get_document_type }.to raise_error(NotImplementedError) }
118
- end
119
-
120
- describe '#get_dur' do
121
- it { expect { subject.get_dur }.to raise_error(NotImplementedError) }
122
- end
123
-
124
- describe '#get_encounter' do
125
- it { expect { subject.get_encounter }.to raise_error(NotImplementedError) }
126
- end
127
-
128
- describe '#get_encounter_date' do
129
- it { expect { subject.get_encounter_date }.to raise_error(NotImplementedError) }
130
- end
131
-
132
- describe '#get_encounter_list'
133
-
134
- describe '#get_hie_document' do
135
- it { expect { subject.get_hie_document }.to raise_error(NotImplementedError) }
136
- end
137
-
138
- describe '#get_last_patient' do
139
- it { expect { subject.get_last_patient }.to raise_error(NotImplementedError) }
140
- end
141
-
142
- describe '#get_list_of_dictionaries' do
143
- it { expect { subject.get_list_of_dictionaries }.to raise_error(NotImplementedError) }
144
- end
145
-
146
- describe '#get_medication_by_trans_id'
147
-
148
- describe '#get_order_history' do
149
- it { expect { subject.get_order_history }.to raise_error(NotImplementedError) }
150
- end
151
-
152
- describe '#get_organization_id' do
153
- it { expect { subject.get_organization_id }.to raise_error(NotImplementedError) }
154
- end
155
-
156
- describe '#get_packages' do
157
- it { expect { subject.get_packages }.to raise_error(NotImplementedError) }
158
- end
159
-
160
- describe '#get_patient'
161
- describe '#get_patient_activity'
162
- describe '#get_patient_by_mrn'
163
-
164
- describe '#get_patient_cda' do
165
- it { expect { subject.get_patient_cda }.to raise_error(NotImplementedError) }
166
- end
167
-
168
- describe '#get_patient_diagnosis'
169
-
170
- describe '#get_patient_full' do
171
- it { expect { subject.get_patient_full }.to raise_error(NotImplementedError) }
172
- end
173
-
174
- describe '#get_patient_ids' do
175
- it { expect { subject.get_patient_ids }.to raise_error(NotImplementedError) }
176
- end
177
-
178
- describe '#get_patient_list' do
179
- it { expect { subject.get_patient_list }.to raise_error(NotImplementedError) }
180
- end
181
-
182
- describe '#get_patient_locations' do
183
- it { expect { subject.get_patient_locations }.to raise_error(NotImplementedError) }
184
- end
185
-
186
- describe '#get_patient_pharmacies' do
187
- let(:patient_pharmacy) do
188
- {
189
- :phone => "(608) 555-5555",
190
- :supports_epcs => "N",
191
- :city => "MADISON",
192
- :pharm_id => "1234",
193
- :address2 => " ",
194
- :fax => "(608) 555-5556",
195
- :description => "1234 STATE ST, MADISON, WI 537061234, \nPh: 608-555-5555",
196
- :type => "R",
197
- :state => "WI",
198
- :zip => "537041234 ",
199
- :name => "WALGREENS-1234 STATE ST",
200
- :address1 => "1234 STATE ST"
201
- }
202
- end
203
-
204
- let(:patient_id) { '1234' }
205
-
206
- let(:driver) { double('Driver') }
207
- let(:client) { AllscriptsUnityClient::Client.new(driver) }
208
-
209
- it 'returns an Array when Unity returns a Hash' do
210
- allow(driver).
211
- to receive(:magic).
212
- with(action: 'GetPatientPharmacies',
213
- patientid: patient_id,
214
- parameter1: 'N') { patient_pharmacy }
215
-
216
- expect(client.get_patient_pharmacies(patient_id)).to eq([patient_pharmacy])
217
- end
218
-
219
- it 'preserves Arrays returned by Unity' do
220
- allow(driver).
221
- to receive(:magic).
222
- with(action: 'GetPatientPharmacies',
223
- patientid: patient_id,
224
- parameter1: 'N') { [patient_pharmacy] }
225
-
226
- expect(client.get_patient_pharmacies(patient_id)).to eq([patient_pharmacy])
227
- end
228
-
229
- it 'coerces truthy values in the second parameter to Unity true' do
230
- expect(driver).
231
- to receive(:magic).
232
- with(action: 'GetPatientPharmacies',
233
- patientid: patient_id,
234
- parameter1: 'Y')
235
-
236
- client.get_patient_pharmacies(patient_id, true)
237
- end
238
-
239
- it 'preserves Unity false values in the second parameter' do
240
- expect(driver).
241
- to receive(:magic).
242
- with(action: 'GetPatientPharmacies',
243
- patientid: patient_id,
244
- parameter1: 'N')
245
-
246
- client.get_patient_pharmacies(patient_id, 'N')
247
- end
248
- end
249
-
250
- describe '#get_patient_problems'
251
- describe '#get_patients_by_icd9'
252
-
253
- describe '#get_patient_sections' do
254
- it { expect { subject.get_patient_sections }.to raise_error(NotImplementedError) }
255
- end
256
-
257
- describe '#get_procedures' do
258
- it { expect { subject.get_procedures }.to raise_error(NotImplementedError) }
259
- end
260
-
261
- describe '#get_provider'
262
- describe '#get_providers'
263
-
264
- describe '#get_ref_providers_by_specialty' do
265
- it { expect { subject.get_ref_providers_by_specialty }.to raise_error(NotImplementedError) }
266
- end
267
-
268
- describe '#get_rounding_list_entries' do
269
- it { expect { subject.get_rounding_list_entries }.to raise_error(NotImplementedError) }
270
- end
271
-
272
- describe '#get_rounding_lists' do
273
- it { expect { subject.get_rounding_lists }.to raise_error(NotImplementedError) }
274
- end
275
-
276
- describe '#get_rx_favs' do
277
- it { expect { subject.get_rx_favs }.to raise_error(NotImplementedError) }
278
- end
279
-
280
- describe '#get_schedule' do
281
- it { expect { subject.get_schedule }.to raise_error(NotImplementedError) }
282
- end
283
-
284
- describe '#get_server_info'
285
-
286
- describe '#get_sigs' do
287
- it { expect { subject.get_sigs }.to raise_error(NotImplementedError) }
288
- end
289
-
290
- describe '#get_task'
291
- describe '#get_task_list'
292
-
293
- describe '#get_user_authentication' do
294
- it { expect { subject.get_user_authentication }.to raise_error(NotImplementedError) }
295
- end
296
-
297
- describe '#get_user_id' do
298
- it { expect { subject.get_user_id }.to raise_error(NotImplementedError) }
299
- end
300
-
301
- describe '#get_user_security' do
302
- it { expect { subject.get_user_security }.to raise_error(NotImplementedError) }
303
- end
304
-
305
- describe '#get_vaccine_manufacturers' do
306
- it { expect { subject.get_vaccine_manufacturers }.to raise_error(NotImplementedError) }
307
- end
308
-
309
- describe '#get_vitals' do
310
- it { expect { subject.get_vitals }.to raise_error(NotImplementedError) }
311
- end
312
-
313
- describe '#make_task' do
314
- it { expect { subject.make_task }.to raise_error(NotImplementedError) }
315
- end
316
-
317
- describe '#save_admin_task' do
318
- it { expect { subject.save_admin_task }.to raise_error(NotImplementedError) }
319
- end
320
-
321
- describe '#save_allergy' do
322
- it { expect { subject.save_allergy }.to raise_error(NotImplementedError) }
323
- end
324
-
325
- describe '#save_ced' do
326
- it { expect { subject.save_ced }.to raise_error(NotImplementedError) }
327
- end
328
-
329
- describe '#save_charge' do
330
- it { expect { subject.save_charge }.to raise_error(NotImplementedError) }
331
- end
332
-
333
- describe '#save_chart_view_audit' do
334
- it { expect { subject.save_chart_view_audit }.to raise_error(NotImplementedError) }
335
- end
336
-
337
- describe '#save_diagnosis' do
338
- it { expect { subject.save_diagnosis }.to raise_error(NotImplementedError) }
339
- end
340
-
341
- describe '#save_document_image' do
342
- it { expect { subject.save_document_image }.to raise_error(NotImplementedError) }
343
- end
344
-
345
- describe '#save_er_note' do
346
- it { expect { subject.save_er_note }.to raise_error(NotImplementedError) }
347
- end
348
-
349
- describe '#save_hie_document' do
350
- it { expect { subject.save_hie_document }.to raise_error(NotImplementedError) }
351
- end
352
-
353
- describe '#save_history' do
354
- it { expect { subject.save_history }.to raise_error(NotImplementedError) }
355
- end
356
-
357
- describe '#save_immunization' do
358
- it { expect { subject.save_immunization }.to raise_error(NotImplementedError) }
359
- end
360
-
361
- describe '#save_note' do
362
- it { expect { subject.save_note }.to raise_error(NotImplementedError) }
363
- end
364
-
365
- describe '#save_patient' do
366
- it { expect { subject.save_patient }.to raise_error(NotImplementedError) }
367
- end
368
-
369
- describe '#save_patient_location' do
370
- it { expect { subject.save_patient_location }.to raise_error(NotImplementedError) }
371
- end
372
-
373
- describe '#save_problem' do
374
- it { expect { subject.save_problem }.to raise_error(NotImplementedError) }
375
- end
376
-
377
- describe '#save_problems_data' do
378
- it { expect { subject.save_problems_data }.to raise_error(NotImplementedError) }
379
- end
380
-
381
- describe '#save_ref_provider' do
382
- it { expect { subject.save_ref_provider }.to raise_error(NotImplementedError) }
383
- end
384
-
385
- describe '#save_result' do
386
- it { expect { subject.save_result }.to raise_error(NotImplementedError) }
387
- end
388
-
389
- describe '#save_rx'
390
-
391
- describe '#save_simple_encounter' do
392
- it { expect { subject.save_simple_encounter }.to raise_error(NotImplementedError) }
393
- end
394
-
395
- describe '#save_simple_rx' do
396
- it { expect { subject.save_simple_rx }.to raise_error(NotImplementedError) }
397
- end
398
-
399
- describe '#save_specialist' do
400
- it { expect { subject.save_specialist }.to raise_error(NotImplementedError) }
401
- end
402
-
403
- describe '#save_task'
404
- describe '#save_task_status'
405
-
406
- describe '#save_tiff' do
407
- it { expect { subject.save_tiff }.to raise_error(NotImplementedError) }
408
- end
409
-
410
- describe '#save_unstructured_document' do
411
- it { expect { subject.save_unstructured_document }.to raise_error(NotImplementedError) }
412
- end
413
-
414
- describe '#save_v10_doc_signature' do
415
- it { expect { subject.save_v10_doc_signature }.to raise_error(NotImplementedError) }
416
- end
417
-
418
- describe '#save_v11_note' do
419
- it { expect { subject.save_v11_note }.to raise_error(NotImplementedError) }
420
- end
421
-
422
- describe '#save_vitals' do
423
- it { expect { subject.save_vitals }.to raise_error(NotImplementedError) }
424
- end
425
-
426
- describe '#save_vitals_data' do
427
- it { expect { subject.save_vitals_data }.to raise_error(NotImplementedError) }
428
- end
429
-
430
- describe '#search_charge_codes' do
431
- it { expect { subject.search_charge_codes }.to raise_error(NotImplementedError) }
432
- end
433
-
434
- describe '#search_diagnosis_codes' do
435
- it { expect { subject.search_diagnosis_codes }.to raise_error(NotImplementedError) }
436
- end
437
-
438
- describe '#search_meds'
439
- describe '#search_patients'
440
-
441
- describe '#search_patients_rxhub5' do
442
- it { expect { subject.search_patients_rxhub5 }.to raise_error(NotImplementedError) }
443
- end
444
-
445
- describe '#search_pharmacies'
446
-
447
- describe '#search_problem_codes' do
448
- it { expect { subject.search_problem_codes }.to raise_error(NotImplementedError) }
449
- end
450
-
451
- describe '#update_encounter' do
452
- it { expect { subject.update_encounter }.to raise_error(NotImplementedError) }
453
- end
454
-
455
- describe '#update_order' do
456
- it { expect { subject.update_order }.to raise_error(NotImplementedError) }
457
- end
458
-
459
- describe '#update_referral_order_status' do
460
- it { expect { subject.update_referral_order_status }.to raise_error(NotImplementedError) }
461
- end
462
-
463
- describe '#nokogiri_to_string' do
464
- context 'when given a Nokogiri::XML::Builder' do
465
- it 'returns an XML string' do
466
- builder = Nokogiri::XML::Builder.new { |xml| xml.field 'test' }
467
- expect(subject.send(:nokogiri_to_string, builder)).to eq('<field>test</field>')
468
- end
469
- end
470
- end
471
- end