Skip to content

Commit

Permalink
Revert "[CDRIS-3170] Literal search over all documents"
Browse files Browse the repository at this point in the history
This reverts commit 401fda3.
  • Loading branch information
Steven Bates committed Nov 18, 2016
1 parent 401fda3 commit 79d26a5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
cdris_api_client (3.5.0dev0.01)
cdris_api_client (3.4.0dev0.09)
activesupport (~> 3.0)
api-auth (= 1.4.1)
mime-types (< 2.99)
Expand Down Expand Up @@ -104,4 +104,4 @@ DEPENDENCIES
yard (= 0.8.7)

BUNDLED WITH
1.13.1
1.12.5
17 changes: 0 additions & 17 deletions lib/cdris/gateway/patient_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,23 +196,6 @@ def search(options = {})
.to_hash
end

# Searches for documents
#
# @param [String] search_term specify what to search for
# @param [Hash] options specify query values
# @return [Hash] the patient's document metadata
# @raise [Cdris::Gateway::Exceptions::BadRequestError] when CDRIS returns a 400 status
# @raise [Cdris::Gateway::Exceptions::InvalidTenantOperation] when CDRIS returns a 403 status
# @raise [Cdris::Gateway::Exceptions::PatientDocumentNotFoundError] when CDRIS returns a 404 status
def literal_search(search_term, options = {})
path = "#{api}/patient_document/search"
request(path, options.merge(literal: search_term))
.if_400_raise(Cdris::Gateway::Exceptions::BadRequestError)
.if_403_raise(Cdris::Gateway::Exceptions::InvalidTenantOperation)
.if_404_raise(Cdris::Gateway::Exceptions::PatientDocumentNotFoundError)
.to_hash
end

# Gets a patient document cluster
#
# @param [Hash] params specify what patient to get, must specify either `:id` or `:root` and `extension`
Expand Down
2 changes: 1 addition & 1 deletion lib/cdris/gateway/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Cdris
module Gateway
VERSION = '3.5.0dev0.01'.freeze
VERSION = '3.4.0dev0.09'.freeze
end
end
14 changes: 0 additions & 14 deletions spec/cdris/gateway/patient_document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -684,20 +684,6 @@

end

describe 'self.literal_search' do

FakeWeb.register_uri(
:get,
'http://testhost:4242/api/v1/patient_document/search?literal=FizzBuzz&user%5Bextension%5D=spameggs&user%5Broot%5D=foobar',
body: DataSamples.patient_document_search.to_s)

it 'requests and returns the expected patient document literal search' do
expect(described_class.literal_search('FizzBuzz', { user: { root: 'foobar', extension: 'spameggs' } }
)).to eq(DataSamples.patient_document_search.to_hash)
end

end

describe 'self.cluster' do

FakeWeb.register_uri(
Expand Down

0 comments on commit 79d26a5

Please sign in to comment.