### ICD-10-CM API v3 Search Example (Code Prefix) Source: https://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc This sample query shows how to use the ICD-10-CM API v3 to retrieve diagnoses starting with the code prefix 'A15'. It requests the 'code' and 'name' fields and returns the total matching results, a list of codes, and their display strings. ```URL https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&terms=A15 ``` -------------------------------- ### ICD-10-CM API v3 Search Example (Terms) Source: https://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc This sample query demonstrates how to search the ICD-10-CM API v3 for diagnoses related to 'tuberc'. It specifies the output fields ('code', 'name') and returns the total count of matching results, an array of codes, and associated display strings. ```URL https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&terms=tuberc ``` -------------------------------- ### GET /api/icd10cm/v3/search Source: https://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc Searches for ICD-10-CM codes based on provided terms. Supports filtering by fields, specifying extra data, and retrieving display strings and code systems. ```APIDOC ## GET /api/icd10cm/v3/search ### Description Searches for ICD-10-CM codes matching the specified terms. Allows customization of returned fields, extra data, and display strings. ### Method GET ### Endpoint https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search ### Parameters #### Query Parameters - **sf** (string) - Optional - Specifies the fields to be returned in the results (e.g., 'code', 'name'). - **terms** (string) - Required - The search term or prefix to find matching ICD-10-CM codes. - **ef** (string) - Optional - Specifies additional fields to include in the 'extra' data hash. - **df** (string) - Optional - Specifies the display strings to be returned for each code. ### Request Example ``` https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&terms=tuberc ``` ### Response #### Success Response (200) - **total_results** (integer) - The total number of results on the server (limited to 10,000). - **codes** (array of strings) - An array of ICD-10-CM codes matching the search criteria. - **extra_data** (hash) - A hash of requested 'extra' data, keyed by field name. - **display_strings** (array of arrays) - An array where each inner array contains display strings for a returned code. - **code_systems** (array of strings) - An array containing the code system for each returned code (if applicable). #### Response Example ```json { "total_results": 71, "codes": [ "A15.0", "A15.4", "A15.5", "A15.6", "A15.7", "A15.8", "A15.9" ], "extra_data": null, "display_strings": [ ["A15.0", "Tuberculosis of lung"], ["A15.4", "Tuberculosis of intrathoracic lymph nodes"], ["A15.5", "Tuberculosis of larynx, trachea and bronchus"], ["A15.6", "Tuberculous pleurisy"], ["A15.7", "Primary respiratory tuberculosis"], ["A15.8", "Other respiratory tuberculosis"], ["A15.9", "Respiratory tuberculosis unspecified"] ], "code_systems": [ "ICD10CM", "ICD10CM", "ICD10CM", "ICD10CM", "ICD10CM", "ICD10CM", "ICD10CM" ] } ``` ``` -------------------------------- ### ICD-10-CM API Autocompleter Initialization (JavaScript) Source: https://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc Initializes an autocompleter for searching ICD-10-CM codes and names using the NLM API. It requires jQuery and the NLM autocompleter JavaScript library. The autocompleter is attached to an input field and configured to use the '/api/icd10cm/v3/search' endpoint. ```javascript new Def.Autocompleter.Search('icd10', '/api/icd10cm/v3/search?sf=code,name', {tableFormat: true, valueCols: [0], colHeaders: ['Code', 'Name']}); ``` -------------------------------- ### Search ICD-10-CM Codes Source: https://clinicaltables.nlm.nih.gov/apidoc/icd10cm/v3/doc This endpoint allows you to search for ICD-10-CM codes based on terms, with options for filtering, sorting, and pagination. ```APIDOC ## GET /api/icd10cm/v3/search ### Description Searches for ICD-10-CM codes and their associated names based on a given search term. Supports various query parameters for refined searching and data retrieval. ### Method GET ### Endpoint https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search ### Parameters #### Query Parameters - **terms** (string) - Required - The search string (e.g., just a part of a word) for which to find matches in the list. More than one partial word can be present, in which case there is an implicit AND between them. - **maxList** (integer) - Optional - Specifies the number of results requested, up to the upper limit of 500. Defaults to 7. If present but empty, 500 will be used. - **count** (integer) - Optional - The number of results to retrieve (page size). The maximum count allowed is 500. Defaults to 7. - **offset** (integer) - Optional - The starting result number (0-based) to retrieve. Used with 'count' for pagination. Defaults to 0. - **q** (string) - Optional - An additional query string used to further constrain the results. Supports Elasticsearch query string syntax. - **df** (string) - Optional - A comma-separated list of display fields intended for user display. Defaults to 'code, name'. - **sf** (string) - Optional - A comma-separated list of fields to be searched. Defaults to 'code'. - **cf** (string) - Optional - A field to regard as the 'code' for the returned item data. Defaults to 'code'. - **ef** (string) - Optional - A comma-separated list of additional fields to be returned for each retrieved list item. Aliases can be specified using a colon (e.g., 'field_name:alias'). ### Request Example ``` GET https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?terms=diabetes&maxList=10&df=name ``` ### Response #### Success Response (200) - **results** (array) - An array of matching ICD-10-CM entries. - Each entry is an array containing fields specified by 'df' and 'ef' parameters. #### Response Example ```json { "results": [ ["E11.9", "Type 2 diabetes mellitus without complications"], ["E10.9", "Type 1 diabetes mellitus without complications"] ] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.