> 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.

# Release notes for NLP API 2.21

## Contents

* [Summary](#summary)
* [New Qualifier Relation Types](#new-qualifier-relation-types)
* [Clinical/CCD subcategory](#clinical-ccd)
* [Python SDK updates](#python-sdk-updates)

## Summary

### Added

* Two new qualifier relation types: "compliance" and "stage/grade".
* Added `class NUM` qualifiers to the `stage/grade` qualifier relation type.
* Annotation updates for `status` type qualifiers for fractures.
* New Clinical document subcategory called CCD.
* Annotation updates for referrals/consults and biomarkers.
* Added new measurement units.
* Added section based entity disambiguation.
* Multiple annotation updates for SNOMED, RxNorm, HGNC.

### Fixed

* Improvements to ejection fraction and FEV1 measurement relations.
* Improved measurement unit handling.
* Improved qualifier relations.
* Improved measurement relations.
* Remove unitless measurements not in measurement relations.
* Entity finding bug fixes for trailing `+` or `-` and hyphenated terms and dangling single quotes.
* Fixed false positive unitless measurement relations.
* Fixed a bug that raised ValueError exception in followup relation finding.
* Improved negation handling.

### Changed

* Remove punctuation insertion for faster processing.
* Bare/unitless measurements entities that are not in a relation are pruned from the engine output.
* Tokenizer improvements for better word splitting.
* Improve plain/Clinical/generic section handling.
* Added qualifier relations detection in Clinical documents.
* Improved plain/Clinical/generic section handling to avoid false positives on "alcohol" and other sub-section headings.
* HGNC ontology limited to entitylink matches.

### Compatibility

* API version 2 Release 21
* Python SDK and client v4.3.0 to v5.2.0
* Java SDK and client v3.0.2 to v3.1.0
* JSON result output schema v2.14 for [emtellipro-json-2](/nlp/reference/result-format)

The latest version of the SDK is required for the new features in this release. The JSON result output schemas are backward compatible for all `v2.x` versions of `emtellipro-json-2`.

## New Qualifier Relation Types

Existing qualifier relation types supported by the NLP API are:

* `size/severity`
* `status`
* `duration/time`

Two new types of qualifier relations were added:

* `stage/grade`
* `compliance`

For the following example sentences:

```text
Stage IV gastric adenocarcinoma.
The patient refused a LP.
```

The output from the engine using output json result format `v2.14.0` is shown below. The output is truncated to the relevant parts (the `...` indicate the ellipsis).

```javascript
...
"entities": {
    "found": [
        {
            "label": "E0",
            "spans": [
                {
                    "start": 0,
                    "end": 8
                }
            ],
            ...
            "entity_type": {
                "snomed": "qualifier value"
            },
            "text": [
                "Stage IV"
            ]
        },
        {
            "label": "E1",
            "spans": [
                {
                    "start": 9,
                    "end": 31
                }
            ],
            ...
            "entity_type": {
                "snomed": "disorder",
            },
            "text": [
                "gastric adenocarcinoma"
            ]
        },
        {
            "label": "E6",
            "spans": [
                {
                    "start": 37,
                    "end": 44
                }
            ],
            ...
            "entity_type": {
                "snomed": "person",
            },
            "text": [
                "patient"
            ]
        },
        {
            "label": "E7",
            "spans": [
                {
                    "start": 45,
                    "end": 52
                }
            ],
            ...
            "entity_type": {
                "snomed": "qualifier value"
            },
            "text": [
                "refused"
            ]
        },
        {
            "label": "E8",
            "spans": [
                {
                    "start": 55,
                    "end": 57
                }
            ],
            ...
            "entity_type": {
                "snomed": "procedure"
            },
            "text": [
                "LP"
            ]
        },
        ...
    ],
    ...
    "qualifiers": [
        {
            "label": "RQ0",
            "attributes": {
                "qualifier_type": "stage/grade"
            },
            "args": {
                "qualifier": {
                    "ref": "E0",
                    "text": [
                        "Stage IV"
                    ]
                },
                "qualifies": {
                    "ref": "E1",
                    "text": [
                        "gastric adenocarcinoma"
                    ]
                }
            }
        },
        {
            "label": "RQ1",
            "attributes": {
                "qualifier_type": "compliance"
            },
            "args": {
                "qualifier": {
                    "ref": "E7",
                    "text": [
                        "refused"
                    ]
                },
                "qualifies": {
                    "ref": "E8",
                    "text": [
                        "LP"
                    ]
                }
            }
        }
    ],
},
...
```

The processing feature to ask the engine to produce qualifer relations is `qualifier-relations`.

## Clinical CCD

Both emtellipro and the Python SDK now support a new document subcategory called `CCD` under the `Clinical` document category.

A new `CCD` option has been added to the list of subcategories for the `subcategory` part header in the [NLP API](/nlp/api).

## Python SDK updates

You will need NLP API Python SDK 5.2.0 for the new features listed below . If you are using Output Database client, please use the migrate command to upgrade DB to the new version of engine and SDK.

### Plugins for ingesting novel document types

The Python database client now supports plugins for different input file types. Currently XML files in the CCD format are supported via a new plugin `emtellipro-sdk-python-ccd-plugin` which is available from the [Downloads](https://legacy-docs.emtelligent.com/emtellipro/downloads.html) page.

To use a plugin you should `pip install` the wheel that you downloaded. The Python database client will automatically use the plugin for file types (specified by the suffix, e.g. `.ccd` or `.xml`) that the plugin registers with the client. Any such file types will be processed by the plugin and it will communicate the parsed information to the database client which will send it to the emtellipro API for processing.

The text spans are reported on the output of the plugin. For instance, the CCD plugin will return a plain text version of the structured XML input file. The spans produced by emtellipro will be over this plain text version (not the original XML document).

### New qualifier relation types

New qualifier relation types called `stage/grade` and `compliance` are now supported by `emtellipro_db` (the Python database client).

The new qualifier relation type appears in the `qualifierrelation` table in the Output Database:

```text
 id | qualifier_type | qualifier_id | qualifies_id
----+----------------+--------------+--------------
```

The `qualifier_type` field can now contain `stage/grade` and `compliance` in the Output Database.