Class: AquaIo::Api::Icd10
- Inherits:
-
Object
- Object
- AquaIo::Api::Icd10
- Defined in:
- lib/aqua_io/api/icd10.rb
Overview
Returns an ICD-10 code.
Instance Method Summary collapse
-
#initialize(client) ⇒ Icd10
constructor
A new instance of Icd10.
-
#search_by_description(query, options = {}) ⇒ Object
Returns all codes whose description contains the search string.
-
#search_by_name(query, options = {}) ⇒ Object
Returns all codes whose name contains the search string.
-
#search_by_name_or_description(query, options = {}) ⇒ Object
Returns all codes whose name or description contains the search string.
-
#single_code(code_name, options = {}) ⇒ Object
Returns a single code matching the name, if any exists.
-
#top_level_codes(options = {}) ⇒ Object
Returns all top-level ICD-10 codes.
Constructor Details
#initialize(client) ⇒ Icd10
Returns a new instance of Icd10.
8 9 10 |
# File 'lib/aqua_io/api/icd10.rb', line 8 def initialize(client) @client = client end |
Instance Method Details
#search_by_description(query, options = {}) ⇒ Object
Returns all codes whose description contains the search string.
‘codes/v1/icd10?q=:query’ GET
query - the search query string
50 51 52 53 54 55 |
# File 'lib/aqua_io/api/icd10.rb', line 50 def search_by_description(query, = {}) body = .fetch(:query, {}) body[:query] = query @client.get("codes/v1/icd10?q[description_cont]=#{query}", body, ) end |
#search_by_name(query, options = {}) ⇒ Object
Returns all codes whose name contains the search string.
‘codes/v1/icd10?q=:query’ GET
query - the search query string
38 39 40 41 42 43 |
# File 'lib/aqua_io/api/icd10.rb', line 38 def search_by_name(query, = {}) body = .fetch(:query, {}) body[:query] = query @client.get("codes/v1/icd10?q[name_cont]=#{query}", body, ) end |
#search_by_name_or_description(query, options = {}) ⇒ Object
Returns all codes whose name or description contains the search string.
‘codes/v1/icd10?q=:query’ GET
query - the search query string
62 63 64 65 66 67 |
# File 'lib/aqua_io/api/icd10.rb', line 62 def search_by_name_or_description(query, = {}) body = .fetch(:query, {}) body[:query] = query @client.get("codes/v1/icd10?q[name_or_description_cont]=#{query}", body, ) end |
#single_code(code_name, options = {}) ⇒ Object
Returns a single code matching the name, if any exists. Replace periods with hypens (e.g. ‘R50-9’ for ‘R50.9’)
‘codes/v1/icd10/:code_name’ GET
code_name - name of code
26 27 28 29 30 31 |
# File 'lib/aqua_io/api/icd10.rb', line 26 def single_code(code_name, = {}) body = .fetch(:query, {}) body[:code_name] = code_name @client.get("codes/v1/icd10/#{code_name}", body, ) end |
#top_level_codes(options = {}) ⇒ Object
Returns all top-level ICD-10 codes. Useful for helping a user navigate down the ICD-10 hierarchy to find a code.
‘codes/v1/icd10’ GET
15 16 17 18 19 |
# File 'lib/aqua_io/api/icd10.rb', line 15 def top_level_codes( = {}) body = .fetch(:query, {}) @client.get("codes/v1/icd10", body, ) end |