About the Clinical Table Search Service

The purpose of the Clinical Table Search Service (CTSS) is to support autocompleting form fields by providing list items from over 20 clinical data tables, including medical conditions, drug names, and ICD-10-CM. For example, if a form has a drug name field, it can use the CTSS to supply the user with drug names that match what the user is typing in the field.

The CTSS is a web service, which means it is meant to be used by computer programs (such as websites) for retrieving data via URL requests.

This particular web-service provides a search service designed for fast retrieval of small numbers of search results. The targeted use case is that of people filling out medical forms on a website which has been coded to provide a list of suggestions as the user types in a field.

The above example of autocompletion of drug names comes from our demo PHR form, which is sending requests to the CTSS in response to the user typing in the "Medication name" field. The requests return a compact JSON representation of the data, an example of which is shown below for a response from the medical conditions API (for the user input "arm").

The text format is not the easiest to read by a human, but it is easily parsed by a web application, which then needs to place it into a list for the user. Optionally, one can use our open-source autocompletion package, autocomplete-lhc, which understands the above format and can display the list for a form field to which it is attached. This autocompletion package is the one you will see used in the demos on the CTSS main page, which also provides links to sample code. The sample code uses pre-built versions of the autocomplete-lhc package hosted on the CTSS website, which makes it easy to get started without needing to install a package.

As an example, just the following few lines of HTML and JavaScript added to any web page will create an autocompletion field for medical conditions:

<link rel="stylesheet"
<script src="https://clinicaltables.nlm.nih.gov/autocomplete-lhc-versions/15.1.1/autocomplete-lhc_jQuery.min.js"></script>
<input type="text" id="condition" placeholder="Condition">
<script>new Def.Autocompleter.Search("condition",

Each data table in the CTSS contains several fields. For instance, the medical conditions table contains fields for synonyms and ICD-10-CM codes, and the drug names table (RxTerms) contains a field with the strength-form combinations for each drug. The web service APIs allow you to specify, as a part of the URL request, which fields you want to be searched, and which you want to be returned, either as fields for displaying to the user in the list, or as additional data about the items to be used after the user selects an item from the list. The latter feature comes in handy for cases such as the RxTerms demo on the CTSS website, in which the strength and form list is retrieved and used to supply a list for the strength field after the user makes a drug name selection, as shown below.

For more information, including a complete list of available clinical data tables, visit the main page of the Clinical Table Search Service website and follow the links under "Table Description" to the detailed instructions for each data table's API.