Extract entities from unstructured medical text
The medical comprehend endpoint analyzes unstructured medical text to extract entities and label them with standardized medical codes. Each extracted entity comes with a confidence score, making it useful for processing clinical notes, medical records, and other healthcare-related documents.
Use cases
- Automating medical records processing and classification
- Extracting diagnosis codes from clinical notes for billing and insurance purposes
- Creating structured datasets from unstructured medical documentation
- Identifying and categorizing medications and their attributes in patient records
- Standardizing medical terminology across different healthcare systems using SNOMED CT codes
You need an API key to access the Writer API. Get an API key by following the steps in the API quickstart.
We recommend setting the API key as an environment variable in a .env
file with the name WRITER_API_KEY
.
Endpoint overview
URL: POST https://api.writer.com/v1/tools/comprehend/medical
Request body
The request body includes the following parameters:
Parameter | Type | Description |
---|---|---|
content | string | Required. The medical text to analyze. |
response_type | string | Required. The desired response format. |
Response type options include:
Entities
: Returns medical entities with their categories.RxNorm
: RxNorm provides normalized names and unique identifiers for medicines and drugs, allowing computer systems to communicate drug-related information efficiently and unambiguously.ICD-10-CM
: ICD-10-CM is a standardized system used to code diseases and medical conditions (morbidity) data.SNOMED CT
: SNOMED CT is a standardized, multilingual vocabulary of clinical terminology that is used by physicians and other healthcare providers for the electronic exchange of health information.
Response parameters
Returns an array of medical entities, where each entity includes:
Parameter | Type | Description |
---|---|---|
category | string | The medical category of the entity |
text | string | The actual text that was identified |
score | float | Confidence score for the entity (0-1) |
traits | array | Array of trait objects with names and scores |
concepts | array | Array of medical concepts with codes and descriptions |
attributes | array | Related attributes with their own scores and relationships |
type | string | The entity type |
See the full response schema for more details.
Was this page helpful?