A Table of Contents is relatively easy to produce via the menus in DBT. For details, see Layout: Generate Table of Contents.
As you will discover, the main secret of the process is ensuring that your document contains appropriate Heading Styles, such as "h1.", "h2.", and "h3.".
However, there may be occasions when you wish to customize the process.
For example, you might wish to produce a TOC showing a list of codes as they appear in the DBT Codes Quick Reference.
You might also wish to include text in the TOC, which does not appear in the actual text.