> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Relation Feature Queries

The NLP API implements NLP models that are trained to recognize many types of relations that exist between entities. These relations are extracted by the NLP API into the Output Database. An introduction to relations is provided in the [Relation Features](/nlp/database/schema/relations/overview) documentation.

This section of the cookbook features SQL query examples that use the relations to extract information from the Output Database. This section contains examples of all the feature relations that NLP API supports such as Measurement, Medication, Qualifiers, Follow-ups and Imagelinks, except Experiencer relations. For examples of how to use the Experiencer relations are provided in the [Concept Queries](/nlp/database/cookbook/concept-queries/overview) section. Look for queries which search for entities experienced by the patient.

It is recommended that you have some familiarity with entities, concepts and entity types before using relations for data retrieval. An introduction to these concepts are found [here](/nlp/database/schema/relations/schema-overview).