Qualifier Relations
In this section, we explain how structured data for medications relations is represented in the NLP API JSON output and in the Output Database schema. We also provide sample queries to illustrate the key aspects of the data schema.
After reading this page, we hope you will:
- Understand what qualifier relations are.
- Know how to retrieve data for qualifier relations.
The content in this section builds on the concepts and data models explained in earlier sections (see Entity-level Tables, and Document-level Tables).
What are Qualifier Relations?
Some ontologies, such as SNOMED CT, contain adverbial or adjectival terms. These terms are collectively referred to as qualifier values. Qualifier values are frequently used to convey important details about a patient’s condition, observed abnormalities and disorders, and hence are vital to the physician’s understanding of the patient’s medical report. For example, a finding of ‘a very large intraparenchymal hemorrhage’ will necessitate a very different course of action than a finding of ‘small intraparenchymal hemorrhage’.
The NLP API extracts qualifier values and the subjects they refer to, as qualifier relations. A qualifier relation, is a one-to-one relation between: a subject being qualified, and a qualifier argument.
For example, consider this observation:
From the above sentence, the NLP API recognizes the qualifier mild-to-moderate and the qualifies argument stenosis as illustrated below. Note that the qualifies argument is the subject of the relation:

The subject being modified by a qualifier, is a regular the NLP API entity. In the NLP API data model, entities are associated with concepts and entity types. For example, in the SNOMED CT ontology, the subject of a qualifier relation may have a semantic type of disorder, finding, morphologic abnormality, or body structure, and the qualifier value can be one from an extensive list of carefully curated concepts that NLP API recognizes (over 400 at last count).
The NLP API supports several types of qualifier relations: status, size/severity, duration/time, location, stage/grade and compliance. For the most up-to-date list, please refer to the Qualifier type property in the NLP API JSON result specification. The following table provides a few examples of qualifier values to illustrate the descriptive function of each qualifier type.
The examples provided in this table represent a tiny subset of all recognized qualifier values. The best way to assess the usefulness of qualifiers is to explore their occurrence in your data set. You can do this by processing reports using the qualifier-relation feature and reviewing the qualifier types and values that were extracted. SQL queries that retrieve this information from an Output Database are provided in the Utility Functions section.
If your reports use qualifiers we do not recognize, please contact support@emtelligent.com. It is possible to extend the recognized set, and optimize the qualifier extraction for customer-specific use cases.
Qualifier relation types such as size/severity and status are ubiquitous in medical text, where as qualifier relation types like stage and compliance have more specialized uses. The stage/grade qualifier relation type, is extracted for explicit mention of cancer staging terms, for example Stage IV colon cancer, using SNOMED concepts. The compliance qualifier relation type, relates terms describing the patient’s compliance, non-compliance, or refusal of treatment or plan of care. SNOMED contains several concepts such as Poor drug compliance (finding), Vaccine refused by patient (situation), Patient self-discharge against medical advice (procedure) that are used in these qualifier relations. Note, compliance are complex concepts to express and present many challenges for general purpose information extraction. If you are interested in using cancer staging or compliance qualifier relations, we recommend that you contact us in advance to discuss the specifics of your data extraction use case.
The emtelligent ontology includes an extensive collection of qualifier terms building on the robust set of qualifier values provided by the SNOMED CT ontology. Hence, you should use either the emtelligent or SNOMED CT ontology when working with qualifier values in the Output Database. In both ontologies, qualifiers have a semantic type of qualifier value. In the UMLS metathesaurus, however, qualifiers have semantic type of Qualitative Concept.
JSON Data Model
Consider the following sentence:
The JSON output for the qualifier relation extracted from this sentence is shown below:
Notice the following:
- The
qualifiersarray is an element of therelationsobject. Each element of this array is a single object representing a qualifier relation. - A qualifier relation instance has two types of named arguments:
qualifierandqualifies. - The
qualifiesargument is a reference to an entity representing the subject of the relation. - The
qualifierargument is a reference to an entity that represents the qualifier value. - A qualifier relation has a
qualifier_typeattribute.
Qualifier Relation Tables
In the Output Database schema, qualifier relations are stored in the qualifierrelation table.
The following ER diagram shows the relationship between these tables:

From the ER diagram above, observe that:
-
The qualifierrelation table has qualifier_id and qualifies_id columns which contain foreign key references to the primary key column of the entity table.
- The qualifies_id refers to an entity that is the subject of the relation: for example, the entity extracted for the text
stenosis. - The qualifie(r)_id refers to an entity that is the qualifier value: for example, the entity extracted for the text
mild-to-moderate.
- The qualifies_id refers to an entity that is the subject of the relation: for example, the entity extracted for the text
-
The entity table has a foreign key reference to the foundentity table which stores many entity attributes. By joining the foundentity with other entity-related tables, you can retrieve information associated with the concepts, entity types and locations for the entity. See Entity-level Tables.
-
The qualifierrelation table has a qualifier_type column. This column contains the attribute of the qualifier relation. Examples of valid qualifier types are:
status,size/severity,duration/time,stage/gradeandcompliance.
Sample Queries
In this section, we present queries to illustrate how to write SQL queries to retrieve information about qualifier relations. The SQL queries will be discussed in order as follows:
- Query: List qualifier terms and concepts
- Query: Retrieve subject and qualifier values for qualifier relations
- Query: Rank by qualifier concepts
Note: Because qualifier relations such as size/severity and status are most prevalent in Radiology reports, it may be helpful to use a database containing output from Radiology reports.
Query: List qualifier terms and concepts
This query shows the qualifier values present in your data. It returns the annotated text for qualifiers extracted by the NLP API and the concepts they mapped to.
To find information about qualifier relations we start at the qualifierrelation table. Then we perform a series of joins to retrieve the concept ID from the concept table, and the annotated text from the foundentity table. For more complete explanation of how to work with these tables, see Entity-level Tables.
In the WHERE clause, we then filter for the qualifier relation type and ontology of interest. In the example below, we search for qualifier relations where the type is size/severity and for concepts from the snomed ontology.
Query: Retrieve subject and qualifier values for qualifier relations
This query shows how to retrieve both the subject being qualified, and the qualifier value for qualifier relations. This query appears complex due to the large number of joins involved. However, it is actually straight-forward. The query involves the following steps:
- Start with the qualifierrelation table.
- Perform a series of joins on the qualifie(s)_id column of the qualifierrelation table to get the foundentity, foundentitytype and concept tables for the subject of the relation.
- The foundentity contains the annotated text for an entity.
- The concept contains data about the concept such as its parent ontology, ID and fully-qualified description.
- The foundentitytype table contains the entity type name and entity type ontology.
- Next, perform a series of joins similar to step 1 for the qualifier value but joining on the qualifie(r)_id. Note: we do not retrieve the entity type for the qualifier value because we know that all qualifier values will have the same semantic type representation for a given ontology.
- Last, we filter for the parameters of interest in the WHERE clause.
Note, there are many options of ontologies to use for retrieving information about qualifier relations in the Output Database. Although a common scenario is to use the SNOMED CT ontology for classifying both the qualifier value and subject entities, you are not limited to SNOMED CT. The following query uses three different ontologies: the emtelligent ontology for qualifier values, and the MEDCIN ontology for the concept of subject entities, and the SNOMED CT ontology for the semantic type classification of subject entities.
Query: Rank by qualifier concepts
Many qualifier relation types contain ordinal values, for example size/severity. In this query, we count the qualifier relations pertaining to the term stenosis, and then return the count in the order of descending size or severity.
This query uses the CASE statement in the ORDER BY clause to map the qualifier concept ID to a string value that can be sorted. A preparatory step is required to get a list of qualifier value concept IDs. The SQL query we used to get the IDs is given in the Utility Functions section.
Utility Functions
Below are some helpful data exploration queries for qualifier relations.

