TAPS API

The Tobacco, Alcohol, Prescription medication, and other Substance use (TAPS) Tool consists of a combined screening component (TAPS-1) followed by a brief assessment (TAPS-2) for those who screen positive.

How do you query the API?

The TAPS API does not have any parameters and will return all questions or summaries. As such, simply using the API endpoints is enough. To access the APIs you must have an API key. The API key must be passed as a header value assigned to the x-api-key property.

You can register for an API key by completing the API Gateway Registration form.

For additional information, terms of use, and FAQs, please see our NIDA Screening Tool APIs: Overview for Developers page.

Questions API

The endpoint is as follows:
https://api.drugabuse.gov/taps/questions

What does the question response data look like?

Below is an example of the response from the endpoint.

          
            {
              questions: [
                {
                  id: "20520",
                  title: "In the PAST YEAR, on how many days did you smoke cigarettes or use other tobacco products?",
                  description: "",
                  field_type: "slider",
                  answers: "365",
                  starting_question: "1",
                  drugs: "Tobacco",
                  dependencies: "",
                  hasSubs: "No",
                  risk_value: null
                }
              ]
            }
          
        
Properties
questions
wrapper for questions
id
the system ID. this value is used in question dependencies
title
the question being asked
field_type
this property can be used to switch input types for a frontend display values are slider, text and radio or none.
answers
The answers to the question. Answers can be a single string or multiple answers separated by double pipes '||'
starting_question
Indicates if this should be the first question. A value of 1 is true and a value of 0 is false
drugs
Drug the question is related to. Drugs can be a single string or multiple drugs separated by double pipes '||'
dependencies
Indicates the parent questions of this question. The value consist of a question id and answer pair with a single pipe. Multiple dependencies are separated by commas. If the questions dependencies equate to true, the question should show.
hasSubs
Indicates if a question has sub questions and if they should be displayed together. This is purely for frontend functionality
risk_value
value of the question in relation to the drug the question represents. each drug has a score that starts at 0

Summaries API

The endpoint is as follows: https://api.drugabuse.gov/taps/summaries

What does the summary response data look like?

Below is an example of the response from the endpoints.

          
            {
              {
                summary: [
                {
                  title: "Tobacco",
                  riskLevel: "High",
                  description: "<p> Patients with this result are at high risk for adverse outcomes related to tobacco/nicotine product use and are likely to meet DSM V criteria for a Tobacco Use Disorder at a high severity level. </p>",
                  drug: "Tobacco",
                  toolType: "TAPS",
                  additionalResources: "<h3> Tobacco Use Resources </h3> <ul> <li> <a href="http://www.ncbi.nlm.nih.gov/books/NBK63952/" target="_blank">U.S. Department of Health &amp; Human Services: Treating Tobacco Use and Dependence: 2008 Update</a> </li> <li> <a href="https://innovations.ahrq.gov/qualitytools/helping-smokers-quit-guide-clinicians">Agency for Healthcare Research and Quality: Helping Smokers Quit: A Guide for Clinicians</a> </li> </ul> <h3> General Resources </h3> <ul> <li> <a href="/sites/default/files/sbirt_training_manual_2012_100719_284_13471_v3.pdf">Yale School of Medicine: Screening, Brief Intervention &amp; Referral to Treatment Training Manual</a> </li> <li> <a href="/blending-initiative/cme-ce-simulation">NIDA: Motivational Interviewing Skills Practice</a> </li> <li> <a href="/sites/default/files/oarsessentialcommunicationtechniques.pdf">Center for Health Training: OARS Essential Communication Techniques</a> </li> </ul> ",
                  suggestedAction: "<p> The suggested intervention for this group is further assessment, and treatment for those who are found to have a tobacco use disorder. </p> <ol> <li> Assess further through a clinical interview.&nbsp; <ul> <li> Questions from the Fagerstrom Test for Nicotine Dependence or DSM-5 can be used as a guide. </li> </ul> </li> <li> Express concern and recommend cessation. <ul> <li> Use the <a href="http://www.who.int/substance_abuse/activities/en/Draft_Brief_Intervention_for_Substance_Use.pdf#page=12">FRAMES</a> components and <u><a href="/blending-initiative/cme-ce-simulation">motivational interviewing techniques</a></u>&nbsp;(see references for specific resources) to encourage engagement in treatment. </li> </ul> </li> <li> Make a specific plan, including strategies for reducing health consequences of tobacco use. </li> <li> Consider prescribing medications to treat tobacco dependence (nicotine replacement, bupropion SR, varenicline). </li> <li> Offer a referral to support groups or counseling for tobacco cessation. </li> <li> Arrange follow-up. </li> </ol> "
                }
            }
          
        
Properties
title
The title of the summary
riskLevel
The risk level at which the summary should be displayed
description
The body of the summmary presented in HTML format
drug
Drug the question is related to.
toolType
designates that the summary belongs to the specific tool
additionalResources
Additional resources for the drug and it's risk level presented in HTML format
suggestedAction
Suggested Actions for the drug and it's risk level presented in HTML format

How do you use the question and summary data together?

First please consider going through the tool that exist at https://www.drugabuse.gov/taps

Going through this tool will give a general idea of how the two api parts should work together. In short:

  1. A patient or clinician (user) is expected to either go through or administer these screenings
  2. The application makes a call to the API go get all the questions
  3. The application will guide the user through the questions based on dependencies while storing the answers and the score based on the answers
  4. The application will make a call to the API to get all the summaries once all relevant questions are answered
  5. The application will provide a summary based on the score for each drug.

In general, your application will need to make a call to get the all the questions and handle the logic to proceed through the questions. The logic for the questions is handled via the dependency field on each question.

Question Dependencies

Each question has a dependency. This is how the application knows what question to display. The dependencies are based on the id of the parent question or questions and how they were answered. So if a question has a value of 20520|!0, that means that if the question with the id of 20520 had an answer that was not 0, this question should be displayed. Multiple dependencies are separated by commas.

Summary Risk Levels

Risk Levels are used to display the correct summary result information. In TAPS, the risk level is assessed based on the score of each drug. The score is assessed based on the answer to each question. Values are included with each questions. There are four risk levels minimal, low, moderate, and high as it pertains to the tool and the risk levels are specific to each drug. The study this is based on has three risk levels, but the tool handles risk levels a specific way to meet the study's process

  • A user starts out with a minimal risk level
  • If a user answers never, no, or indicates no days of usage, the score for that drug is not increased
  • if a user answers yes, or indicates a value greater than 0 the score for that drug is increased by the question value
  • the appropriate risk level for each drug should be displayed